Path: blob/main/sys/contrib/device-tree/Bindings/gpio/8xxx_gpio.txt
48376 views
GPIO controllers on MPC8xxx SoCs12This is for the non-QE/CPM/GUTs GPIO controllers as found on38349, 8572, 8610 and compatible.45Every GPIO controller node must have #gpio-cells property defined,6this information will be used to translate gpio-specifiers.7See bindings/gpio/gpio.txt for details of how to specify GPIO8information for devices.910The GPIO module usually is connected to the SoC's internal interrupt11controller, see bindings/interrupt-controller/interrupts.txt (the12interrupt client nodes section) for details how to specify this GPIO13module's interrupt.1415The GPIO module may serve as another interrupt controller (cascaded to16the SoC's internal interrupt controller). See the interrupt controller17nodes section in bindings/interrupt-controller/interrupts.txt for18details.1920Required properties:21- compatible: "fsl,<chip>-gpio" followed by "fsl,mpc8349-gpio"22for 83xx, "fsl,mpc8572-gpio" for 85xx, or23"fsl,mpc8610-gpio" for 86xx.24- #gpio-cells: Should be two. The first cell is the pin number25and the second cell is used to specify optional26parameters (currently unused).27- interrupts: Interrupt mapping for GPIO IRQ.28- gpio-controller: Marks the port as GPIO controller.2930Optional properties:31- interrupt-controller: Empty boolean property which marks the GPIO32module as an IRQ controller.33- #interrupt-cells: Should be two. Defines the number of integer34cells required to specify an interrupt within35this interrupt controller. The first cell36defines the pin number, the second cell37defines additional flags (trigger type,38trigger polarity). Note that the available39set of trigger conditions supported by the40GPIO module depends on the actual SoC.4142Example of gpio-controller nodes for a MPC8347 SoC:4344gpio1: gpio-controller@c00 {45#gpio-cells = <2>;46compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";47reg = <0xc00 0x100>;48interrupt-parent = <&ipic>;49interrupts = <74 0x8>;50gpio-controller;51interrupt-controller;52#interrupt-cells = <2>;53};5455gpio2: gpio-controller@d00 {56#gpio-cells = <2>;57compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";58reg = <0xd00 0x100>;59interrupt-parent = <&ipic>;60interrupts = <75 0x8>;61gpio-controller;62};6364Example of a peripheral using the GPIO module as an IRQ controller:6566funkyfpga@0 {67compatible = "funky-fpga";68...69interrupt-parent = <&gpio1>;70interrupts = <4 3>;71};727374