xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunRaspberry Pi GPIO expander
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The
4*4882a593Smuzhiyunfirmware exposes a mailbox interface that allows the ARM core to control the
5*4882a593SmuzhiyunGPIO lines on the expander.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunThe Raspberry Pi GPIO expander node must be a child node of the Raspberry Pi
8*4882a593Smuzhiyunfirmware node.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunRequired properties:
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun- compatible : Should be "raspberrypi,firmware-gpio"
13*4882a593Smuzhiyun- gpio-controller : Marks the device node as a gpio controller
14*4882a593Smuzhiyun- #gpio-cells : Should be two.  The first cell is the pin number, and
15*4882a593Smuzhiyun  the second cell is used to specify the gpio polarity:
16*4882a593Smuzhiyun  0 = active high
17*4882a593Smuzhiyun  1 = active low
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunExample:
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunfirmware: firmware-rpi {
22*4882a593Smuzhiyun	compatible = "raspberrypi,bcm2835-firmware";
23*4882a593Smuzhiyun	mboxes = <&mailbox>;
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun	expgpio: gpio {
26*4882a593Smuzhiyun		 compatible = "raspberrypi,firmware-gpio";
27*4882a593Smuzhiyun		 gpio-controller;
28*4882a593Smuzhiyun		 #gpio-cells = <2>;
29*4882a593Smuzhiyun	 };
30*4882a593Smuzhiyun};
31