Cadence GPIO Controller

Schema identifier ($id): "http://devicetree.org/schemas/gpio/cdns,gpio.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Jan Kotas <jank@cadence.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "cdns,gpio-r1p02"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "axiado,ax3000-gpio"

Item 2

Exact value (const): "cdns,gpio-r1p02"

reg — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Maximum number of items (maxItems): 1

ngpios — not listed as required here #

Minimum value (minimum): 1

Maximum value (maximum): 32

gpio-controller — required here #

true — No constraints added by this property rule.

#gpio-cells — required here #

Exact value (const): 2

- First cell is the GPIO line number.
- Second cell is flags as defined in <dt-bindings/gpio/gpio.h>,
  only GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW supported.

interrupt-controller — not listed as required here #

true — No constraints added by this property rule.

#interrupt-cells — not listed as required here #

Exact value (const): 2

- First cell is the GPIO line number used as IRQ.
- Second cell is the trigger type, as defined in
  <dt-bindings/interrupt-controller/irq.h>.

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

Required in this object (required): "compatible", "reg", "clocks", "gpio-controller", "#gpio-cells"

Condition (if) #

Required in this object (required): "interrupt-controller"

When the condition matches (then) #

Required in this object (required): "interrupts"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
gpio0: gpio-controller@fd060000 {
    compatible = "cdns,gpio-r1p02";
    reg = <0xfd060000 0x1000>;
    clocks = <&gpio_clk>;

    interrupt-parent = <&gic>;
    interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;

    gpio-controller;
    #gpio-cells = <2>;

    interrupt-controller;
    #interrupt-cells = <2>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Edit this page