xref: /openbmc/linux/Documentation/devicetree/bindings/gpio/gpio-mpc8xxx.txt (revision 976e3645923bdd2fe7893aae33fd7a21098bfb28)
11418f9e6SLiu Gang* Freescale MPC512x/MPC8xxx/QorIQ/Layerscape GPIO controller
2bb379cebSUwe Kleine-König
3bb379cebSUwe Kleine-KönigRequired properties:
4bb379cebSUwe Kleine-König- compatible : Should be "fsl,<soc>-gpio"
5bb379cebSUwe Kleine-König  The following <soc>s are known to be supported:
61418f9e6SLiu Gang	mpc5121, mpc5125, mpc8349, mpc8572, mpc8610, pq3, qoriq,
7*ff6cd68dSSong Hui	ls1021a, ls1043a, ls2080a, ls1028a, ls1088a.
8bb379cebSUwe Kleine-König- reg : Address and length of the register set for the device
9bb379cebSUwe Kleine-König- interrupts : Should be the port interrupt shared by all 32 pins.
10bb379cebSUwe Kleine-König- #gpio-cells : Should be two.  The first cell is the pin number and
11bb379cebSUwe Kleine-König  the second cell is used to specify the gpio polarity:
12bb379cebSUwe Kleine-König      0 = active high
13bb379cebSUwe Kleine-König      1 = active low
14bb379cebSUwe Kleine-König
15edb70e29SLi YangOptional properties:
16edb70e29SLi Yang- little-endian : GPIO registers are used as little endian. If not
17edb70e29SLi Yang                  present registers are used as big endian by default.
18edb70e29SLi Yang
191418f9e6SLiu GangExample of gpio-controller node for a mpc5125 SoC:
20bb379cebSUwe Kleine-König
21bb379cebSUwe Kleine-Königgpio0: gpio@1100 {
22bb379cebSUwe Kleine-König	compatible = "fsl,mpc5125-gpio";
23bb379cebSUwe Kleine-König	#gpio-cells = <2>;
24bb379cebSUwe Kleine-König	reg = <0x1100 0x080>;
25bb379cebSUwe Kleine-König	interrupts = <78 0x8>;
26bb379cebSUwe Kleine-König};
271418f9e6SLiu Gang
281418f9e6SLiu GangExample of gpio-controller node for a ls2080a SoC:
291418f9e6SLiu Gang
301418f9e6SLiu Ganggpio0: gpio@2300000 {
311418f9e6SLiu Gang	compatible = "fsl,ls2080a-gpio", "fsl,qoriq-gpio";
321418f9e6SLiu Gang	reg = <0x0 0x2300000 0x0 0x10000>;
331418f9e6SLiu Gang	interrupts = <0 36 0x4>; /* Level high type */
341418f9e6SLiu Gang	gpio-controller;
351418f9e6SLiu Gang	little-endian;
361418f9e6SLiu Gang	#gpio-cells = <2>;
371418f9e6SLiu Gang	interrupt-controller;
381418f9e6SLiu Gang	#interrupt-cells = <2>;
391418f9e6SLiu Gang};
4040b0bcd3SSong Hui
4140b0bcd3SSong Hui
42*ff6cd68dSSong HuiExample of gpio-controller node for a ls1028a/ls1088a SoC:
4340b0bcd3SSong Hui
4440b0bcd3SSong Huigpio1: gpio@2300000 {
45*ff6cd68dSSong Hui	compatible = "fsl,ls1028a-gpio", "fsl,ls1088a-gpio", "fsl,qoriq-gpio";
4640b0bcd3SSong Hui	reg = <0x0 0x2300000 0x0 0x10000>;
4740b0bcd3SSong Hui	interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
4840b0bcd3SSong Hui	gpio-controller;
4940b0bcd3SSong Hui	#gpio-cells = <2>;
5040b0bcd3SSong Hui	interrupt-controller;
5140b0bcd3SSong Hui	#interrupt-cells = <2>;
5240b0bcd3SSong Hui	little-endian;
5340b0bcd3SSong Hui};
54