1*c66ec88fSEmmanuel VadotMediatek MT7621 SoC GPIO controller bindings 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotThe IP core used inside these SoCs has 3 banks of 32 GPIOs each. 4*c66ec88fSEmmanuel VadotThe registers of all the banks are interwoven inside one single IO range. 5*c66ec88fSEmmanuel VadotWe load one GPIO controller instance per bank. Also the GPIO controller can receive 6*c66ec88fSEmmanuel Vadotinterrupts on any of the GPIOs, either edge or level. It then interrupts the CPU 7*c66ec88fSEmmanuel Vadotusing GIC INT12. 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel VadotRequired properties for the top level node: 10*c66ec88fSEmmanuel Vadot- #gpio-cells : Should be two. The first cell is the GPIO pin number and the 11*c66ec88fSEmmanuel Vadot second cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. 12*c66ec88fSEmmanuel Vadot Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. 13*c66ec88fSEmmanuel Vadot- #interrupt-cells : Specifies the number of cells needed to encode an 14*c66ec88fSEmmanuel Vadot interrupt. Should be 2. The first cell defines the interrupt number, 15*c66ec88fSEmmanuel Vadot the second encodes the trigger flags encoded as described in 16*c66ec88fSEmmanuel Vadot Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 17*c66ec88fSEmmanuel Vadot- compatible: 18*c66ec88fSEmmanuel Vadot - "mediatek,mt7621-gpio" for Mediatek controllers 19*c66ec88fSEmmanuel Vadot- reg : Physical base address and length of the controller's registers 20*c66ec88fSEmmanuel Vadot- interrupt-parent : phandle of the parent interrupt controller. 21*c66ec88fSEmmanuel Vadot- interrupts : Interrupt specifier for the controllers interrupt. 22*c66ec88fSEmmanuel Vadot- interrupt-controller : Mark the device node as an interrupt controller. 23*c66ec88fSEmmanuel Vadot- gpio-controller : Marks the device node as a GPIO controller. 24*c66ec88fSEmmanuel Vadot 25*c66ec88fSEmmanuel VadotExample: 26*c66ec88fSEmmanuel Vadot gpio@600 { 27*c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 28*c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 29*c66ec88fSEmmanuel Vadot compatible = "mediatek,mt7621-gpio"; 30*c66ec88fSEmmanuel Vadot gpio-controller; 31*c66ec88fSEmmanuel Vadot interrupt-controller; 32*c66ec88fSEmmanuel Vadot reg = <0x600 0x100>; 33*c66ec88fSEmmanuel Vadot interrupt-parent = <&gic>; 34*c66ec88fSEmmanuel Vadot interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>; 35*c66ec88fSEmmanuel Vadot }; 36