diff options
author | Jan Kotas <jank@cadence.com> | 2018-12-18 19:10:41 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-12-21 13:39:24 +0300 |
commit | e4b194aa0bf522dad9ecf0568eb0fdd598a2713b (patch) | |
tree | da9c4f89365701476e8bfdea8d2f8fe5cb37bbff /Documentation | |
parent | 6c905f91d8ae103cc0767267509a456f961a279d (diff) | |
download | linux-e4b194aa0bf522dad9ecf0568eb0fdd598a2713b.tar.xz |
dt-bindings: gpio: Add bindings for Cadence GPIO
This patch adds a DT binding documentation for
Cadence GPIO controller.
Signed-off-by: Jan Kotas <jank@cadence.com>
Reviewed-by: Rob Herring <robh@kernel.org>
[Removed interrupt-parent]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/gpio/cdns,gpio.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/cdns,gpio.txt b/Documentation/devicetree/bindings/gpio/cdns,gpio.txt new file mode 100644 index 000000000000..706ef00f5c64 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/cdns,gpio.txt @@ -0,0 +1,43 @@ +Cadence GPIO controller bindings + +Required properties: +- compatible: should be "cdns,gpio-r1p02". +- reg: the register base address and size. +- #gpio-cells: should be 2. + * first cell is the GPIO number. + * second cell specifies the GPIO flags, as defined in + <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH + and GPIO_ACTIVE_LOW flags are supported. +- gpio-controller: marks the device as a GPIO controller. +- clocks: should contain one entry referencing the peripheral clock driving + the GPIO controller. + +Optional properties: +- ngpios: integer number of gpio lines supported by this controller, up to 32. +- interrupts: interrupt specifier for the controllers interrupt. +- interrupt-controller: marks the device as an interrupt controller. When + defined, interrupts, interrupt-parent and #interrupt-cells + are required. +- interrupt-cells: should be 2. + * first cell is the GPIO number you want to use as an IRQ source. + * second cell specifies the IRQ type, as defined in + <dt-bindings/interrupt-controller/irq.h>. + Currently only level sensitive IRQs are supported. + + +Example: + gpio0: gpio-controller@fd060000 { + compatible = "cdns,gpio-r1p02"; + reg =<0xfd060000 0x1000>; + + clocks = <&gpio_clk>; + + interrupt-parent = <&gic>; + interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>; + + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; |