Debian Codegraph @

Documentation/devicetree/bindings/i2c/i2c-mux-gpmux.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/i2c/i2c-mux-gpmux.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: General Purpose I2C Bus Mux
8
9 maintainers:
10 - Peter Rosin <[email protected]>
11
12 description: |+
13 This binding describes an I2C bus multiplexer that uses a mux controller
14 from the mux subsystem to route the I2C signals.
15
16 .-----. .-----.
17 | dev | | dev |
18 .------------. '-----' '-----'
19 | SoC | | |
20 | | .--------+--------'
21 | .------. | .------+ child bus A, on MUX value set to 0
22 | | I2C |-|--| Mux |
23 | '------' | '--+---+ child bus B, on MUX value set to 1
24 | .------. | | '----------+--------+--------.
25 | | MUX- | | | | | |
26 | | Ctrl |-|-----+ .-----. .-----. .-----.
27 | '------' | | dev | | dev | | dev |
28 '------------' '-----' '-----' '-----'
29
30 allOf:
31 - $ref: /schemas/i2c/i2c-mux.yaml#
32
33 properties:
34 compatible:
35 const: i2c-mux
36
37 i2c-parent:
38 $ref: /schemas/types.yaml#/definitions/phandle
39 description:
40 The phandle of the I2C bus that this multiplexer's master-side port is
41 connected to.
42
43 mux-controls:
44 maxItems: 1
45 description:
46 The mux-controller states are the I2C sub-bus numbers.
47
48 mux-locked:
49 type: boolean
50 description: |
51 Explicitly allow unrelated I2C transactions on the parent I2C adapter at
52 these times:
53 - during setup of the multiplexer
54 - between setup of the multiplexer and the child bus I2C transaction
55 - between the child bus I2C transaction and releasing of the multiplexer
56 - during releasing of the multiplexer
57
58 However, I2C transactions to devices behind all I2C multiplexers connected
59 to the same parent adapter that this multiplexer is connected to are blocked
60 for the full duration of the complete multiplexed I2C transaction (i.e.
61 including the times covered by the above list).
62 If mux-locked is not present, the multiplexer is assumed to be parent-locked.
63 This means that no unrelated I2C transactions are allowed on the parent I2C
64 adapter for the complete multiplexed I2C transaction.
65 The properties of mux-locked and parent-locked multiplexers are discussed
66 in more detail in Documentation/i2c/i2c-topology.rst.
67
68 required:
69 - compatible
70 - i2c-parent
71 - mux-controls
72
73 unevaluatedProperties: false
74
75 examples:
76 - |
77 #include <dt-bindings/gpio/gpio.h>
78 mux: mux-controller {
79 compatible = "gpio-mux";
80 #mux-control-cells = <0>;
81
82 mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
83 <&pioA 1 GPIO_ACTIVE_HIGH>;
84 };
85
86 i2c-mux {
87 compatible = "i2c-mux";
88 mux-locked;
89 i2c-parent = <&i2c1>;
90
91 mux-controls = <&mux>;
92
93 #address-cells = <1>;
94 #size-cells = <0>;
95
96 i2c@1 {
97 reg = <1>;
98 #address-cells = <1>;
99 #size-cells = <0>;
100
101 gpio@20 {
102 compatible = "nxp,pca9555";
103 gpio-controller;
104 #gpio-cells = <2>;
105 reg = <0x20>;
106 };
107 };
108
109 i2c@3 {
110 reg = <3>;
111 #address-cells = <1>;
112 #size-cells = <0>;
113
114 gpio@20 {
115 compatible = "nxp,pca9555";
116 gpio-controller;
117 #gpio-cells = <2>;
118 reg = <0x20>;
119 };
120 };
121 };
122 ...