1 # SPDX-License-Identifier: GPL-2.0-only
4 $id: http://devicetree.org/schemas/i2c/i2c-mux-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: GPIO-based I2C Bus Mux
13 This binding describes an I2C bus multiplexer that uses GPIOs to route the I2C signals.
17 +------------+ +-----+ +-----+
19 | | /--------+--------+
20 | +------+ | +------+ child bus A, on GPIO value set to 0
22 | +------+ | +--+---+ child bus B, on GPIO value set to 1
23 | | | \----------+--------+--------+
25 | | GPIO |-|-----+ +-----+ +-----+ +-----+
26 | +------+ | | dev | | dev | | dev |
27 +------------+ +-----+ +-----+ +-----+
29 For each I2C child node, an I2C child bus will be created. They will be numbered based on their
30 order in the device tree.
32 Whenever an access is made to a device on a child bus, the value set in the relevant node's reg
33 property will be output using the list of GPIOs, the first in the list holding the least-
36 If an idle state is defined, using the idle-state (optional) property, whenever an access is not
37 being made to a device on a child bus, the GPIOs will be set according to the idle value.
39 If an idle state is not defined, the most recently used value will be left programmed into
40 hardware whenever no access is being made to a device on a child bus.
47 description: phandle of the I2C bus that this multiplexer's master-side port is connected to
48 $ref: /schemas/types.yaml#/definitions/phandle
51 description: list of GPIOs used to control the muxer
53 maxItems: 4 # Should be enough
56 description: Value to set the muxer to when idle. When no value is given, it defaults to the
58 $ref: /schemas/types.yaml#/definitions/uint32
63 unevaluatedProperties: false
73 compatible = "i2c-mux-gpio";
76 mux-gpios = <&gpio1 22 0>, <&gpio1 23 0>;
85 compatible = "solomon,ssd1307fb-i2c";
88 reset-gpios = <&gpio2 7 1>;
98 compatible = "nxp,pca9555";