xref: /openbmc/linux/Documentation/devicetree/bindings/mux/adi,adg792a.txt (revision 762f99f4f3cb41a775b5157dd761217beba65873)
1f6689802SPeter RosinBindings for Analog Devices ADG792A/G Triple 4:1 Multiplexers
2f6689802SPeter Rosin
3f6689802SPeter RosinRequired properties:
4f6689802SPeter Rosin- compatible : "adi,adg792a" or "adi,adg792g"
5f6689802SPeter Rosin- #mux-control-cells : <0> if parallel (the three muxes are bound together
6f6689802SPeter Rosin  with a single mux controller controlling all three muxes), or <1> if
7f6689802SPeter Rosin  not (one mux controller for each mux).
8*9b358af7SRob Herring* Standard mux-controller bindings as described in mux-controller.yaml
9f6689802SPeter Rosin
10f6689802SPeter RosinOptional properties for ADG792G:
11f6689802SPeter Rosin- gpio-controller : if present, #gpio-cells below is required.
12f6689802SPeter Rosin- #gpio-cells : should be <2>
13f6689802SPeter Rosin			  - First cell is the GPO line number, i.e. 0 or 1
14f6689802SPeter Rosin			  - Second cell is used to specify active high (0)
15f6689802SPeter Rosin			    or active low (1)
16f6689802SPeter Rosin
17f6689802SPeter RosinOptional properties:
18f6689802SPeter Rosin- idle-state : if present, array of states that the mux controllers will have
19f6689802SPeter Rosin  when idle. The special state MUX_IDLE_AS_IS is the default and
20f6689802SPeter Rosin  MUX_IDLE_DISCONNECT is also supported.
21f6689802SPeter Rosin
22f6689802SPeter RosinStates 0 through 3 correspond to signals A through D in the datasheet.
23f6689802SPeter Rosin
24f6689802SPeter RosinExample:
25f6689802SPeter Rosin
26f6689802SPeter Rosin	/*
27f6689802SPeter Rosin	 * Three independent mux controllers (of which one is used).
28f6689802SPeter Rosin	 * Mux 0 is disconnected when idle, mux 1 idles in the previously
29f6689802SPeter Rosin	 * selected state and mux 2 idles with signal B.
30f6689802SPeter Rosin	 */
31f6689802SPeter Rosin	&i2c0 {
32f6689802SPeter Rosin		mux: mux-controller@50 {
33f6689802SPeter Rosin			compatible = "adi,adg792a";
34f6689802SPeter Rosin			reg = <0x50>;
35f6689802SPeter Rosin			#mux-control-cells = <1>;
36f6689802SPeter Rosin
37f6689802SPeter Rosin			idle-state = <MUX_IDLE_DISCONNECT MUX_IDLE_AS_IS 1>;
38f6689802SPeter Rosin		};
39f6689802SPeter Rosin	};
40f6689802SPeter Rosin
41f6689802SPeter Rosin	adc-mux {
42f6689802SPeter Rosin		compatible = "io-channel-mux";
43f6689802SPeter Rosin		io-channels = <&adc 0>;
44f6689802SPeter Rosin		io-channel-names = "parent";
45f6689802SPeter Rosin
46f6689802SPeter Rosin		mux-controls = <&mux 2>;
47f6689802SPeter Rosin
48f6689802SPeter Rosin		channels = "sync-1", "", "out";
49f6689802SPeter Rosin	};
50f6689802SPeter Rosin
51f6689802SPeter Rosin
52f6689802SPeter Rosin	/*
53f6689802SPeter Rosin	 * Three parallel muxes with one mux controller, useful e.g. if
54f6689802SPeter Rosin	 * the adc is differential, thus needing two signals to be muxed
55f6689802SPeter Rosin	 * simultaneously for correct operation.
56f6689802SPeter Rosin	 */
57f6689802SPeter Rosin	&i2c0 {
58f6689802SPeter Rosin		pmux: mux-controller@50 {
59f6689802SPeter Rosin			compatible = "adi,adg792a";
60f6689802SPeter Rosin			reg = <0x50>;
61f6689802SPeter Rosin			#mux-control-cells = <0>;
62f6689802SPeter Rosin
63f6689802SPeter Rosin			idle-state = <1>;
64f6689802SPeter Rosin		};
65f6689802SPeter Rosin	};
66f6689802SPeter Rosin
67f6689802SPeter Rosin	diff-adc-mux {
68f6689802SPeter Rosin		compatible = "io-channel-mux";
69f6689802SPeter Rosin		io-channels = <&adc 0>;
70f6689802SPeter Rosin		io-channel-names = "parent";
71f6689802SPeter Rosin
72f6689802SPeter Rosin		mux-controls = <&pmux>;
73f6689802SPeter Rosin
74f6689802SPeter Rosin		channels = "sync-1", "", "out";
75f6689802SPeter Rosin	};
76