Path: blob/main/sys/contrib/device-tree/Bindings/gpio/cdns,gpio.txt
48378 views
Cadence GPIO controller bindings12Required properties:3- compatible: should be "cdns,gpio-r1p02".4- reg: the register base address and size.5- #gpio-cells: should be 2.6* first cell is the GPIO number.7* second cell specifies the GPIO flags, as defined in8<dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH9and GPIO_ACTIVE_LOW flags are supported.10- gpio-controller: marks the device as a GPIO controller.11- clocks: should contain one entry referencing the peripheral clock driving12the GPIO controller.1314Optional properties:15- ngpios: integer number of gpio lines supported by this controller, up to 32.16- interrupts: interrupt specifier for the controllers interrupt.17- interrupt-controller: marks the device as an interrupt controller. When18defined, interrupts, interrupt-parent and #interrupt-cells19are required.20- interrupt-cells: should be 2.21* first cell is the GPIO number you want to use as an IRQ source.22* second cell specifies the IRQ type, as defined in23<dt-bindings/interrupt-controller/irq.h>.24Currently only level sensitive IRQs are supported.252627Example:28gpio0: gpio-controller@fd060000 {29compatible = "cdns,gpio-r1p02";30reg =<0xfd060000 0x1000>;3132clocks = <&gpio_clk>;3334interrupt-parent = <&gic>;35interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;3637gpio-controller;38#gpio-cells = <2>;3940interrupt-controller;41#interrupt-cells = <2>;42};434445