Path: blob/master/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.yaml
26307 views
# SPDX-License-Identifier: GPL-2.0-only1%YAML 1.22---3$id: http://devicetree.org/schemas/i2c/i2c-mux-pinctrl.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Pinctrl-based I2C Bus Mux78maintainers:9- Wolfram Sang <wsa@kernel.org>1011description: |12This binding describes an I2C bus multiplexer that uses pin multiplexing to route the I2C13signals, and represents the pin multiplexing configuration using the pinctrl device tree14bindings.1516+-----+ +-----+17| dev | | dev |18+------------------------+ +-----+ +-----+19| SoC | | |20| /----|------+--------+21| +---+ +------+ | child bus A, on first set of pins22| |I2C|---|Pinmux| |23| +---+ +------+ | child bus B, on second set of pins24| \----|------+--------+--------+25| | | | |26+------------------------+ +-----+ +-----+ +-----+27| dev | | dev | | dev |28+-----+ +-----+ +-----+2930For each named state defined in the pinctrl-names property, an I2C child bus will be created.31I2C child bus numbers are assigned based on the index into the pinctrl-names property.3233The only exception is that no bus will be created for a state named "idle". If such a state is34defined, it must be the last entry in pinctrl-names. For example:3536pinctrl-names = "ddc", "pta", "idle" -> ddc = bus 0, pta = bus 137pinctrl-names = "ddc", "idle", "pta" -> Invalid ("idle" not last)38pinctrl-names = "idle", "ddc", "pta" -> Invalid ("idle" not last)3940Whenever an access is made to a device on a child bus, the relevant pinctrl state will be41programmed into hardware.4243If an idle state is defined, whenever an access is not being made to a device on a child bus,44the idle pinctrl state will be programmed into hardware.4546If an idle state is not defined, the most recently used pinctrl state will be left programmed47into hardware whenever no access is being made of a device on a child bus.4849properties:50compatible:51const: i2c-mux-pinctrl5253i2c-parent:54$ref: /schemas/types.yaml#/definitions/phandle55description: The phandle of the I2C bus that this multiplexer's master-side port is connected56to.5758allOf:59- $ref: i2c-mux.yaml6061unevaluatedProperties: false6263required:64- compatible65- i2c-parent6667examples:68- |69i2cmux {70compatible = "i2c-mux-pinctrl";71#address-cells = <1>;72#size-cells = <0>;7374i2c-parent = <&i2c1>;7576pinctrl-names = "ddc", "pta", "idle";77pinctrl-0 = <&state_i2cmux_ddc>;78pinctrl-1 = <&state_i2cmux_pta>;79pinctrl-2 = <&state_i2cmux_idle>;8081i2c@0 {82reg = <0>;83#address-cells = <1>;84#size-cells = <0>;8586eeprom@50 {87compatible = "atmel,24c02";88reg = <0x50>;89};90};9192i2c@1 {93reg = <1>;94#address-cells = <1>;95#size-cells = <0>;9697eeprom@50 {98compatible = "atmel,24c02";99reg = <0x50>;100};101};102};103104105