Loongson GPIO controller.
Schema identifier ($id): "http://devicetree.org/schemas/gpio/loongson,ls-gpio.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Yinbo Zhu <zhuyinbo@loongson.cn>"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"loongson,ls2k-gpio","loongson,ls2k0300-gpio","loongson,ls2k0500-gpio0","loongson,ls2k0500-gpio1","loongson,ls2k2000-gpio0","loongson,ls2k2000-gpio1","loongson,ls2k2000-gpio2","loongson,ls3a5000-gpio","loongson,ls3a6000-gpio","loongson,ls7a-gpio","loongson,ls7a2000-gpio1","loongson,ls7a2000-gpio2"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"loongson,ls2k1000-gpio"Item 2
Exact value (
const):"loongson,ls2k-gpio"
Rule 3
Array item rules (
items)Item 1
Exact value (
const):"loongson,ls7a1000-gpio"Item 2
Exact value (
const):"loongson,ls7a-gpio"
reg — required here #
Maximum number of items (maxItems): 1
ngpios — required here #
Minimum value (minimum): 1
Maximum value (maximum): 128
#gpio-cells — required here #
Exact value (const): 2
gpio-controller — required here #
true — No constraints added by this property rule.
gpio-ranges — required here #
true — No constraints added by this property rule.
interrupts — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 64
#interrupt-cells — not listed as required here #
Exact value (const): 2
interrupt-controller — not listed as required here #
true — No constraints added by this property rule.
resets — not listed as required here #
Maximum number of items (maxItems): 1
Required in this object (required): "compatible", "reg", "ngpios", "#gpio-cells", "gpio-controller", "gpio-ranges", "interrupts"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"loongson,ls2k0300-gpio"When the condition matches (
then) #Required in this object (
required):"#interrupt-cells","interrupt-controller","resets"When the condition does not match (
else) #Properties and child nodes (
properties)
#interrupts-cells— not listed as required here
false— Not permitted by this property rule.
interrupt-controller— not listed as required here
false— Not permitted by this property rule.
resets— not listed as required here
false— Not permitted by this property rule.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
gpio0: gpio@1fe00500 {
compatible = "loongson,ls2k1000-gpio", "loongson,ls2k-gpio";
reg = <0x1fe00500 0x38>;
ngpios = <64>;
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&pctrl 0 0 15>,
<&pctrl 16 16 15>,
<&pctrl 32 32 10>,
<&pctrl 44 44 20>;
interrupt-parent = <&liointc1>;
interrupts = <28 IRQ_TYPE_LEVEL_LOW>,
<29 IRQ_TYPE_LEVEL_LOW>,
<30 IRQ_TYPE_LEVEL_LOW>,
<30 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ_TYPE_LEVEL_LOW>,
<26 IRQ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