Merge tag 'rtc-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / mux / mmio-mux.txt
1 MMIO register bitfield-based multiplexer controller bindings
2
3 Define register bitfields to be used to control multiplexers. The parent
4 device tree node must be a syscon node to provide register access.
5
6 Required properties:
7 - compatible : "mmio-mux"
8 - #mux-control-cells : <1>
9 - mux-reg-masks : an array of register offset and pre-shifted bitfield mask
10                   pairs, each describing a single mux control.
11 * Standard mux-controller bindings as decribed in mux-controller.txt
12
13 Optional properties:
14 - idle-states : if present, the state the muxes will have when idle. The
15                 special state MUX_IDLE_AS_IS is the default.
16
17 The multiplexer state of each multiplexer is defined as the value of the
18 bitfield described by the corresponding register offset and bitfield mask pair
19 in the mux-reg-masks array, accessed through the parent syscon.
20
21 Example:
22
23         syscon {
24                 compatible = "syscon";
25
26                 mux: mux-controller {
27                         compatible = "mmio-mux";
28                         #mux-control-cells = <1>;
29
30                         mux-reg-masks = <0x3 0x30>, /* 0: reg 0x3, bits 5:4 */
31                                         <0x3 0x40>, /* 1: reg 0x3, bit 6 */
32                         idle-states = <MUX_IDLE_AS_IS>, <0>;
33                 };
34         };
35
36         video-mux {
37                 compatible = "video-mux";
38                 mux-controls = <&mux 0>;
39
40                 ports {
41                         /* inputs 0..3 */
42                         port@0 {
43                                 reg = <0>;
44                         };
45                         port@1 {
46                                 reg = <1>;
47                         };
48                         port@2 {
49                                 reg = <2>;
50                         };
51                         port@3 {
52                                 reg = <3>;
53                         };
54
55                         /* output */
56                         port@4 {
57                                 reg = <4>;
58                         };
59                 };
60         };