Synopsys DesignWare APB GPIO controller

Schema identifier ($id): "http://devicetree.org/schemas/gpio/snps,dw-apb-gpio.yaml#"

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

Synopsys DesignWare GPIO controllers have a configurable number of ports, each of which are intended to be represented as child nodes with the generic GPIO-controller properties as described in this bindings file.

Maintainers (maintainers): "Hoan Tran <hoan@os.amperecomputing.com>", "Serge Semin <fancer.lancer@gmail.com>"

Properties and child nodes (properties) #

$nodename — not listed as required here #

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

compatible — required here #

Exact value (const): "snps,dw-apb-gpio"

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 0

reg — required here #

Maximum number of items (maxItems): 1

clocks — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

APB interface clock source

Item 2

DW GPIO debounce reference clock source

clock-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "bus"

Item 2

Exact value (const): "db"

resets — not listed as required here #

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

^gpio-(port|controller)@[0-9a-f]+$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

compatible — required here

Exact value (const): "snps,dw-apb-gpio-port"

reg — 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): 2

gpio-line-names — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 32

gpio-ranges — not listed as required here

true — No constraints added by this property rule.

ngpios — not listed as required here

Default value (default): 32

Minimum value (minimum): 1

Maximum value (maximum): 32

snps,nr-gpios — not listed as required here

The number of GPIO pins exported by the port.

Deprecated (deprecated): true

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Default value (default): 32

Minimum value (minimum): 1

Maximum value (maximum): 32

interrupts — not listed as required here

The interrupts to the parent controller raised when GPIOs generate the interrupts. If the controller provides one combined interrupt for all GPIOs, specify a single interrupt. If the controller provides one interrupt for each GPIO, provide a list of interrupts that correspond to each of the GPIO pins.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 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

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

Property dependencies (dependencies) #

interrupt-controller — applies when this property is present

Also requires: "interrupts"

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

false

Not allowed by this rule.

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

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "#address-cells", "#size-cells"

Examples (examples) #

gpio: gpio@20000 {
  compatible = "snps,dw-apb-gpio";
  reg = <0x20000 0x1000>;
  #address-cells = <1>;
  #size-cells = <0>;

  porta: gpio-port@0 {
    compatible = "snps,dw-apb-gpio-port";
    reg = <0>;
    gpio-controller;
    #gpio-cells = <2>;
    snps,nr-gpios = <8>;
    interrupt-controller;
    #interrupt-cells = <2>;
    interrupt-parent = <&vic1>;
    interrupts = <0>;
  };

  portb: gpio-port@1 {
    compatible = "snps,dw-apb-gpio-port";
    reg = <1>;
    gpio-controller;
    #gpio-cells = <2>;
    snps,nr-gpios = <8>;
  };
};

Source notes #

Annotations retained from the schema source

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

Edit this page