xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/raspberrypi,firmware-gpio.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotRaspberry Pi GPIO expander
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThe Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The
4*c66ec88fSEmmanuel Vadotfirmware exposes a mailbox interface that allows the ARM core to control the
5*c66ec88fSEmmanuel VadotGPIO lines on the expander.
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotThe Raspberry Pi GPIO expander node must be a child node of the Raspberry Pi
8*c66ec88fSEmmanuel Vadotfirmware node.
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel VadotRequired properties:
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadot- compatible : Should be "raspberrypi,firmware-gpio"
13*c66ec88fSEmmanuel Vadot- gpio-controller : Marks the device node as a gpio controller
14*c66ec88fSEmmanuel Vadot- #gpio-cells : Should be two.  The first cell is the pin number, and
15*c66ec88fSEmmanuel Vadot  the second cell is used to specify the gpio polarity:
16*c66ec88fSEmmanuel Vadot  0 = active high
17*c66ec88fSEmmanuel Vadot  1 = active low
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel VadotExample:
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel Vadotfirmware: firmware-rpi {
22*c66ec88fSEmmanuel Vadot	compatible = "raspberrypi,bcm2835-firmware";
23*c66ec88fSEmmanuel Vadot	mboxes = <&mailbox>;
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel Vadot	expgpio: gpio {
26*c66ec88fSEmmanuel Vadot		 compatible = "raspberrypi,firmware-gpio";
27*c66ec88fSEmmanuel Vadot		 gpio-controller;
28*c66ec88fSEmmanuel Vadot		 #gpio-cells = <2>;
29*c66ec88fSEmmanuel Vadot	 };
30*c66ec88fSEmmanuel Vadot};
31