Aspeed GPIO controller

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

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

Maintainers (maintainers): "Andrew Jeffery <andrew@codeconstruct.com.au>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "aspeed,ast2400-gpio", "aspeed,ast2500-gpio", "aspeed,ast2600-gpio", "aspeed,ast2700-gpio"

reg — required here #

Maximum number of items (maxItems): 1

clocks — not listed as required here #

Maximum number of items (maxItems): 1

The clock to use for debounce timings

gpio-controller — required here #

true — No constraints added by this property rule.

gpio-line-names — not listed as required here #

Minimum number of items (minItems): 12

Maximum number of items (maxItems): 232

gpio-ranges — not listed as required here #

true — No constraints added by this property rule.

#gpio-cells — required here #

Exact value (const): 2

interrupts — required here #

Maximum number of items (maxItems): 1

interrupt-controller — required here #

true — No constraints added by this property rule.

#interrupt-cells — required here #

Exact value (const): 2

ngpios — not listed as required here #

Minimum value (minimum): 12

Maximum value (maximum): 232

Properties matching a name pattern (patternProperties) #

-hog(-[0-9]+)?$ — name matches this regular expression #

Value type (type): "object"

Required in this object (required): "gpio-hog"

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

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "aspeed,ast2400-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 220

Maximum number of items (maxItems): 220

ngpios — not listed as required here

Exact value (const): 220

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "aspeed,ast2500-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 232

Maximum number of items (maxItems): 232

ngpios — not listed as required here

Exact value (const): 232

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "aspeed,ast2600-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 36

Maximum number of items (maxItems): 208

ngpios — required here

Allowed values (enum): 36, 208

Required in this object (required): "ngpios"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "aspeed,ast2700-gpio"

When the condition matches (then) #

Properties and child nodes (properties)

gpio-line-names — not listed as required here

Minimum number of items (minItems): 12

Maximum number of items (maxItems): 216

ngpios — required here

Allowed values (enum): 12, 216

Required in this object (required): "ngpios"

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

false

Not allowed by this rule.

Examples (examples) #

gpio@1e780000 {
    compatible = "aspeed,ast2400-gpio";
    reg = <0x1e780000 0x1000>;
    interrupts = <20>;
    interrupt-controller;
    #interrupt-cells = <2>;
    gpio-controller;
    #gpio-cells = <2>;
};
gpio: gpio@1e780000 {
    compatible = "aspeed,ast2500-gpio";
    reg = <0x1e780000 0x200>;
    interrupts = <20>;
    interrupt-controller;
    #interrupt-cells = <2>;
    gpio-controller;
    #gpio-cells = <2>;
    gpio-ranges = <&pinctrl 0 0 232>;
};
#include <dt-bindings/clock/ast2600-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
gpio0: gpio@1e780000 {
    compatible = "aspeed,ast2600-gpio";
    reg = <0x1e780000 0x400>;
    clocks = <&syscon ASPEED_CLK_APB2>;
    interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-controller;
    #interrupt-cells = <2>;
    #gpio-cells = <2>;
    gpio-controller;
    gpio-ranges = <&pinctrl 0 0 208>;
    ngpios = <208>;
};
gpio1: gpio@1e780800 {
    compatible = "aspeed,ast2600-gpio";
    reg = <0x1e780800 0x800>;
    clocks = <&syscon ASPEED_CLK_APB1>;
    interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-controller;
    #interrupt-cells = <2>;
    gpio-controller;
    #gpio-cells = <2>;
    gpio-ranges = <&pinctrl 0 208 36>;
    ngpios = <36>;
};

Source notes #

Annotations retained from the schema source

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

Edit this page