SpacemiT K1 GPIO controller
Schema identifier ($id): "http://devicetree.org/schemas/gpio/spacemit,k1-gpio.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Yixun Lan <dlan@gentoo.org>"
The controller's registers are organized as sets of eight 32-bit registers with each set of port controlling 32 pins. A single interrupt line is shared for all of the pins by the controller.
Properties and child nodes (properties) #
$nodename — not listed as required here #
String pattern (pattern): "^gpio@[0-9a-f]+$"
compatible — required here #
Allowed values (enum): "spacemit,k1-gpio", "spacemit,k3-gpio"
reg — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Array item rules (items) #
Item 1
GPIO Core Clock
Item 2
GPIO Bus Clock
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"core"
Item 2
Exact value (
const):"bus"
resets — not listed as required here #
Maximum number of items (maxItems): 1
gpio-controller — required here #
true — No constraints added by this property rule.
#gpio-cells — required here #
Exact value (const): 3
The first two cells are the GPIO bank index and offset inside the bank, the third cell should specify GPIO flag.
gpio-ranges — required here #
true — No constraints added by this property rule.
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): 3
The first two cells are the GPIO bank index and offset inside the bank, the third cell should specify interrupt flag. The controller does not support level interrupts, so flags of IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW should not be used. Refer <dt-bindings/interrupt-controller/irq.h> for valid flags.
Required in this object (required): "compatible", "reg", "clocks", "clock-names", "gpio-controller", "#gpio-cells", "interrupts", "interrupt-controller", "#interrupt-cells", "gpio-ranges"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
gpio@d4019000 {
compatible = "spacemit,k1-gpio";
reg = <0xd4019000 0x800>;
clocks = <&ccu 9>, <&ccu 61>;
clock-names = "core", "bus";
gpio-controller;
#gpio-cells = <3>;
interrupts = <58>;
interrupt-controller;
interrupt-parent = <&plic>;
#interrupt-cells = <3>;
gpio-ranges = <&pinctrl 0 0 0 32>,
<&pinctrl 1 0 32 32>,
<&pinctrl 2 0 64 32>,
<&pinctrl 3 0 96 32>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)