UniPhier GPIO controller

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

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

Maintainers (maintainers): "Masahiro Yamada <yamada.masahiro@socionext.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): "socionext,uniphier-gpio"

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

interrupt-controller — required here #

true — No constraints added by this property rule.

#interrupt-cells — required here #

The first cell defines the interrupt number.
The second cell bits[3:0] is used to specify trigger type as follows:
  1 = low-to-high edge triggered
  2 = high-to-low edge triggered
  4 = active high level-sensitive
  8 = active low level-sensitive
Valid combinations are 1, 2, 3, 4, 8.

Exact value (const): 2

ngpios — required here #

Minimum value (minimum): 0

Maximum value (maximum): 512

gpio-ranges — required here #

true — No constraints added by this property rule.

gpio-ranges-group-names — not listed as required here #

true — No constraints added by this property rule.

socionext,interrupt-ranges — required here #

Specifies an interrupt number mapping between this GPIO controller and its interrupt parent, in the form of arbitrary number of <child-interrupt-base parent-interrupt-base length> triplets.

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

Properties matching a name pattern (patternProperties) #

^.+-hog(-[0-9]+)?$ — name matches this regular expression #

Value type (type): "object"

Required in this object (required): "gpio-hog"

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

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

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/uniphier-gpio.h>

gpio: gpio@55000000 {
    compatible = "socionext,uniphier-gpio";
    reg = <0x55000000 0x200>;
    interrupt-parent = <&aidet>;
    interrupt-controller;
    #interrupt-cells = <2>;
    gpio-controller;
    #gpio-cells = <2>;
    gpio-ranges = <&pinctrl 0 0 0>;
    gpio-ranges-group-names = "gpio_range";
    ngpios = <248>;
    socionext,interrupt-ranges = <0 48 16>, <16 154 5>, <21 217 3>;
};

// Consumer:
// Please note UNIPHIER_GPIO_PORT(29, 4) represents PORT294 in the SoC
// document. Unfortunately, only the one's place is octal in the port
// numbering. (That is, PORT 8, 9, 18, 19, 28, 29, ... do not exist.)
// UNIPHIER_GPIO_PORT() is a helper macro to calculate 29 * 8 + 4.
sdhci0_pwrseq {
    compatible = "mmc-pwrseq-emmc";
    reset-gpios = <&gpio UNIPHIER_GPIO_PORT(29, 4) GPIO_ACTIVE_LOW>;
};

Source notes #

Annotations retained from the schema source

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

Edit this page