xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/gpio-ath79.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotBinding for Qualcomm Atheros AR7xxx/AR9xxx GPIO controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: has to be "qca,<soctype>-gpio" and one of the following
5*c66ec88fSEmmanuel Vadot  fallbacks:
6*c66ec88fSEmmanuel Vadot  - "qca,ar7100-gpio"
7*c66ec88fSEmmanuel Vadot  - "qca,ar9340-gpio"
8*c66ec88fSEmmanuel Vadot- reg: Base address and size of the controllers memory area
9*c66ec88fSEmmanuel Vadot- gpio-controller : Marks the device node as a GPIO controller.
10*c66ec88fSEmmanuel Vadot- #gpio-cells : Should be two. The first cell is the pin number and the
11*c66ec88fSEmmanuel Vadot  second cell is used to specify optional parameters.
12*c66ec88fSEmmanuel Vadot- ngpios: Should be set to the number of GPIOs available on the SoC.
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel VadotOptional properties:
15*c66ec88fSEmmanuel Vadot- interrupts: Interrupt specifier for the controllers interrupt.
16*c66ec88fSEmmanuel Vadot- interrupt-controller : Identifies the node as an interrupt controller
17*c66ec88fSEmmanuel Vadot- #interrupt-cells : Specifies the number of cells needed to encode interrupt
18*c66ec88fSEmmanuel Vadot		     source, should be 2
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel VadotPlease refer to interrupts.txt in this directory for details of the common
21*c66ec88fSEmmanuel VadotInterrupt Controllers bindings used by client devices.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel VadotExample:
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel Vadot	gpio@18040000 {
26*c66ec88fSEmmanuel Vadot		compatible = "qca,ar9132-gpio", "qca,ar7100-gpio";
27*c66ec88fSEmmanuel Vadot		reg = <0x18040000 0x30>;
28*c66ec88fSEmmanuel Vadot		interrupts = <2>;
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel Vadot		ngpios = <22>;
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadot		gpio-controller;
33*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel Vadot		interrupt-controller;
36*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
37*c66ec88fSEmmanuel Vadot	};
38