Path: blob/main/sys/contrib/device-tree/Bindings/gpio/mediatek,mt7621-gpio.txt
179045 views
Mediatek MT7621 SoC GPIO controller bindings12The IP core used inside these SoCs has 3 banks of 32 GPIOs each.3The registers of all the banks are interwoven inside one single IO range.4We load one GPIO controller instance per bank. Also the GPIO controller can receive5interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU6using GIC INT12.78Required properties for the top level node:9- #gpio-cells : Should be two. The first cell is the GPIO pin number and the10second cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>.11Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.12- #interrupt-cells : Specifies the number of cells needed to encode an13interrupt. Should be 2. The first cell defines the interrupt number,14the second encodes the trigger flags encoded as described in15Documentation/devicetree/bindings/interrupt-controller/interrupts.txt16- compatible:17- "mediatek,mt7621-gpio" for Mediatek controllers18- reg : Physical base address and length of the controller's registers19- interrupt-parent : phandle of the parent interrupt controller.20- interrupts : Interrupt specifier for the controllers interrupt.21- interrupt-controller : Mark the device node as an interrupt controller.22- gpio-controller : Marks the device node as a GPIO controller.2324Example:25gpio@600 {26#gpio-cells = <2>;27#interrupt-cells = <2>;28compatible = "mediatek,mt7621-gpio";29gpio-controller;30interrupt-controller;31reg = <0x600 0x100>;32interrupt-parent = <&gic>;33interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>;34};353637