Realtek Otto GPIO controller

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

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

Maintainers (maintainers): "Sander Vanheule <sander@svanheule.net>", "Bert Vermeulen <bert@biot.com>"

Realtek's GPIO controller on their MIPS switch SoCs (Otto platform) consists of two banks of 32 GPIOs. These GPIOs can generate edge-triggered interrupts. Each bank's interrupts are cascased into one interrupt line on the parent interrupt controller, if provided. This binding allows defining a single bank in the devicetree. The interrupt controller is not supported on the fallback compatible name, which only allows for GPIO port use.

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^gpio@[0-9a-f]+$"

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "realtek,rtl8380-gpio", "realtek,rtl8390-gpio", "realtek,rtl9300-gpio", "realtek,rtl9310-gpio"

Item 2

Exact value (const): "realtek,otto-gpio"

reg — required here #

true — No constraints added by this property rule.

#gpio-cells — required here #

Exact value (const): 2

gpio-controller — required here #

true — No constraints added by this property rule.

ngpios — not listed as required here #

Minimum value (minimum): 1

Maximum value (maximum): 32

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

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

Condition (if) #

Properties and child nodes (properties) #

compatible — not listed as required here #

Rule for matching array elements (contains)

Exact value (const): "realtek,rtl9300-gpio"

When the condition matches (then) #

Properties and child nodes (properties) #

reg — not listed as required here #

Array item rules (items)

Item 1

GPIO and interrupt control

Item 2

interrupt CPU map

When the condition does not match (else) #

Properties and child nodes (properties) #

reg — not listed as required here #

Array item rules (items)

Item 1

GPIO and interrupt control

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

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

false

Not allowed by this rule.

Property dependencies (dependencies) #

interrupt-controller — applies when this property is present #

Also requires: "interrupts"

Examples (examples) #

gpio@3500 {
    compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
    reg = <0x3500 0x1c>;
    gpio-controller;
    #gpio-cells = <2>;
    ngpios = <24>;
    interrupt-controller;
    #interrupt-cells = <2>;
    interrupt-parent = <&rtlintc>;
    interrupts = <23>;
};
gpio@3300 {
    compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
    reg = <0x3300 0x1c>, <0x3338 0x8>;
    gpio-controller;
    #gpio-cells = <2>;
    ngpios = <24>;
    interrupt-controller;
    #interrupt-cells = <2>;
    interrupt-parent = <&rtlintc>;
    interrupts = <13>;
};

Source notes #

Annotations retained from the schema source

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

Edit this page