SiFive GPIO controller
Schema identifier ($id): "http://devicetree.org/schemas/gpio/sifive,gpio.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Paul Walmsley <paul.walmsley@sifive.com>"
Properties and child nodes (properties) #
compatible — required here #
Array item rules (items) #
Item 1
Allowed values (
enum):"sifive,fu540-c000-gpio","sifive,fu740-c000-gpio","canaan,k210-gpiohs"
Item 2
Exact value (
const):"sifive,gpio0"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 32
interrupt-controller — required here #
true — No constraints added by this property rule.
#interrupt-cells — required here #
Exact value (const): 2
clocks — not listed as required here #
Maximum number of items (maxItems): 1
#gpio-cells — required here #
Exact value (const): 2
ngpios — not listed as required here #
The number of GPIOs available on the controller implementation. It is 16 for the SiFive SoCs and 32 for the Canaan K210.
Minimum value (minimum): 1
Maximum value (maximum): 32
Default value (default): 16
gpio-line-names — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 32
gpio-controller — required here #
true — No constraints added by this property rule.
Required in this object (required): "compatible", "reg", "interrupts", "interrupt-controller", "#interrupt-cells", "#gpio-cells", "gpio-controller"
Condition (if) #
Properties and child nodes (
properties) #
compatible— not listed as required here #Rule for matching array elements (
contains)Allowed values (
enum):"sifive,fu540-c000-gpio","sifive,fu740-c000-gpio"
When the condition matches (then) #
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/clock/sifive-fu540-prci.h>
gpio@10060000 {
compatible = "sifive,fu540-c000-gpio", "sifive,gpio0";
interrupt-parent = <&plic>;
interrupts = <7>, <8>, <9>, <10>, <11>, <12>, <13>, <14>, <15>, <16>,
<17>, <18>, <19>, <20>, <21>, <22>;
reg = <0x10060000 0x1000>;
clocks = <&tlclk FU540_PRCI_CLK_TLCLK>;
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)