xref: /freebsd-src/sys/contrib/device-tree/Bindings/gpio/abilis,tb10x-gpio.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Abilis TB10x GPIO controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired Properties:
4*c66ec88fSEmmanuel Vadot- compatible: Should be "abilis,tb10x-gpio"
5*c66ec88fSEmmanuel Vadot- reg: Address and length of the register set for the device
6*c66ec88fSEmmanuel Vadot- gpio-controller: Marks the device node as a gpio controller.
7*c66ec88fSEmmanuel Vadot- #gpio-cells: Should be <2>. The first cell is the pin number and the
8*c66ec88fSEmmanuel Vadot  second cell is used to specify optional parameters:
9*c66ec88fSEmmanuel Vadot   - bit 0 specifies polarity (0 for normal, 1 for inverted).
10*c66ec88fSEmmanuel Vadot- abilis,ngpio: the number of GPIO pins this driver controls.
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel VadotOptional Properties:
13*c66ec88fSEmmanuel Vadot- interrupt-controller: Marks the device node as an interrupt controller.
14*c66ec88fSEmmanuel Vadot- #interrupt-cells: Should be <1>. Interrupts are triggered on both edges.
15*c66ec88fSEmmanuel Vadot- interrupts: Defines the interrupt line connecting this GPIO controller to
16*c66ec88fSEmmanuel Vadot  its parent interrupt controller.
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel VadotGPIO ranges are specified as described in
19*c66ec88fSEmmanuel VadotDocumentation/devicetree/bindings/gpio/gpio.txt
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel VadotExample:
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadot	gpioa: gpio@ff140000 {
24*c66ec88fSEmmanuel Vadot		compatible = "abilis,tb10x-gpio";
25*c66ec88fSEmmanuel Vadot		interrupt-controller;
26*c66ec88fSEmmanuel Vadot		#interrupt-cells = <1>;
27*c66ec88fSEmmanuel Vadot		interrupt-parent = <&tb10x_ictl>;
28*c66ec88fSEmmanuel Vadot		interrupts = <27 2>;
29*c66ec88fSEmmanuel Vadot		reg = <0xFF140000 0x1000>;
30*c66ec88fSEmmanuel Vadot		gpio-controller;
31*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
32*c66ec88fSEmmanuel Vadot		abilis,ngpio = <3>;
33*c66ec88fSEmmanuel Vadot		gpio-ranges = <&iomux 0 0 0>;
34*c66ec88fSEmmanuel Vadot		gpio-ranges-group-names = "gpioa_pins";
35*c66ec88fSEmmanuel Vadot	};
36