xref: /linux/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
1*a36e9a1cSJohn CrispinLantiq SoC External Bus memory mapped GPIO controller
2*a36e9a1cSJohn Crispin
3*a36e9a1cSJohn CrispinBy attaching hardware latches to the EBU it is possible to create output
4*a36e9a1cSJohn Crispinonly gpios. This driver configures a special memory address, which when
5*a36e9a1cSJohn Crispinwritten to outputs 16 bit to the latches.
6*a36e9a1cSJohn Crispin
7*a36e9a1cSJohn CrispinThe node describing the memory mapped GPIOs needs to be a child of the node
8*a36e9a1cSJohn Crispindescribing the "lantiq,localbus".
9*a36e9a1cSJohn Crispin
10*a36e9a1cSJohn CrispinRequired properties:
11*a36e9a1cSJohn Crispin- compatible : Should be "lantiq,gpio-mm-lantiq"
12*a36e9a1cSJohn Crispin- reg : Address and length of the register set for the device
13*a36e9a1cSJohn Crispin- #gpio-cells : Should be two.  The first cell is the pin number and
14*a36e9a1cSJohn Crispin  the second cell is used to specify optional parameters (currently
15*a36e9a1cSJohn Crispin  unused).
16*a36e9a1cSJohn Crispin- gpio-controller : Marks the device node as a gpio controller.
17*a36e9a1cSJohn Crispin
18*a36e9a1cSJohn CrispinOptional properties:
19*a36e9a1cSJohn Crispin- lantiq,shadow : The default value that we shall assume as already set on the
20*a36e9a1cSJohn Crispin  shift register cascade.
21*a36e9a1cSJohn Crispin
22*a36e9a1cSJohn CrispinExample:
23*a36e9a1cSJohn Crispin
24*a36e9a1cSJohn Crispinlocalbus@0 {
25*a36e9a1cSJohn Crispin	#address-cells = <2>;
26*a36e9a1cSJohn Crispin	#size-cells = <1>;
27*a36e9a1cSJohn Crispin	ranges = <0 0 0x0 0x3ffffff /* addrsel0 */
28*a36e9a1cSJohn Crispin		1 0 0x4000000 0x4000010>; /* addsel1 */
29*a36e9a1cSJohn Crispin	compatible = "lantiq,localbus", "simple-bus";
30*a36e9a1cSJohn Crispin
31*a36e9a1cSJohn Crispin	gpio_mm0: gpio@4000000 {
32*a36e9a1cSJohn Crispin		compatible = "lantiq,gpio-mm";
33*a36e9a1cSJohn Crispin		reg = <1 0x0 0x10>;
34*a36e9a1cSJohn Crispin		gpio-controller;
35*a36e9a1cSJohn Crispin		#gpio-cells = <2>;
36*a36e9a1cSJohn Crispin		lantiq,shadow = <0x77f>
37*a36e9a1cSJohn Crispin	};
38*a36e9a1cSJohn Crispin}
39