• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1GPIO-based multiplexer controller bindings
2
3Define what GPIO pins are used to control a multiplexer. Or several
4multiplexers, if the same pins control more than one multiplexer.
5
6Required properties:
7- compatible : "gpio-mux"
8- mux-gpios : list of gpios used to control the multiplexer, least
9	      significant bit first.
10- #mux-control-cells : <0>
11* Standard mux-controller bindings as decribed in mux-controller.txt
12
13Optional properties:
14- idle-state : if present, the state the mux will have when idle. The
15	       special state MUX_IDLE_AS_IS is the default.
16
17The multiplexer state is defined as the number represented by the
18multiplexer GPIO pins, where the first pin is the least significant
19bit. An active pin is a binary 1, an inactive pin is a binary 0.
20
21Example:
22
23	mux: mux-controller {
24		compatible = "gpio-mux";
25		#mux-control-cells = <0>;
26
27		mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
28			    <&pioA 1 GPIO_ACTIVE_HIGH>;
29	};
30
31	adc-mux {
32		compatible = "io-channel-mux";
33		io-channels = <&adc 0>;
34		io-channel-names = "parent";
35
36		mux-controls = <&mux>;
37
38		channels = "sync-1", "in", "out", "sync-2";
39	};
40
41	i2c-mux {
42		compatible = "i2c-mux";
43		i2c-parent = <&i2c1>;
44
45		mux-controls = <&mux>;
46
47		#address-cells = <1>;
48		#size-cells = <0>;
49
50		i2c@0 {
51			reg = <0>;
52			#address-cells = <1>;
53			#size-cells = <0>;
54
55			ssd1307: oled@3c {
56				/* ... */
57			};
58		};
59
60		i2c@3 {
61			reg = <3>;
62			#address-cells = <1>;
63			#size-cells = <0>;
64
65			pca9555: pca9555@20 {
66				/* ... */
67			};
68		};
69	};
70