Renesas RZ/T2H and RZ/N2H Pin and GPIO controller
Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/renesas,r9a09g077-pinctrl.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>"
The Renesas RZ/T2H and RZ/N2H SoCs feature a combined Pin and GPIO controller. Pin multiplexing and GPIO configuration are performed on a per-pin basis. Each port supports up to 8 pins, each configurable for either GPIO (port mode) or alternate function mode. Each pin supports function mode values ranging from 0x0 to 0x2A, allowing selection from up to 43 different functions.
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "renesas,r9a09g077-pinctrl", "renesas,r9a09g087-pinctrl"
reg — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Non-safety I/O Port base
Item 2
Safety I/O Port safety region base
Item 3
Safety I/O Port Non-safety region base
reg-names — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"nsr"
Item 2
Exact value (
const):"srs"
Item 3
Exact value (
const):"srn"
gpio-controller — required here #
true — No constraints added by this property rule.
#gpio-cells — required here #
Exact value (const): 2
The first cell contains the global GPIO port index, constructed using the RZT2H_GPIO() helper macro from <dt-bindings/pinctrl/renesas,r9a09g077-pinctrl.h> (e.g. "RZT2H_GPIO(3, 0)" for P03_0). The second cell represents the consumer flag. Use the macros defined in include/dt-bindings/gpio/gpio.h.
gpio-ranges — required here #
Maximum number of items (maxItems): 1
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
The first cell contains the global GPIO port index, constructed using the RZT2H_GPIO() helper macro from <dt-bindings/pinctrl/renesas,r9a09g077-pinctrl.h> and the second cell is used to specify the flag. E.g. "interrupts = <RZT2H_GPIO(8, 6) IRQ_TYPE_EDGE_FALLING>;" if P08_6 is being used as an interrupt.
clocks — required here #
Maximum number of items (maxItems): 1
power-domains — required here #
Maximum number of items (maxItems): 1
Reusable definitions (definitions) #
renesas-rzt2h-n2h-pins-node #
Value type (type): "object"
All of these rules must match (allOf) #
Rule 1
Shared schema rule (
$ref):pincfg-node.yaml#
Rule 2
Shared schema rule (
$ref):pinmux-node.yaml#
Properties and child nodes (properties) #
pinmux — not listed as required here
Values are constructed from I/O port number, pin number, and alternate function configuration number using the RZT2H_PORT_PINMUX() helper macro from <dt-bindings/pinctrl/renesas,r9a09g077-pinctrl.h>.
pins — not listed as required here
true — No constraints added by this property rule.
phandle — not listed as required here
true — No constraints added by this property rule.
input — not listed as required here
true — No constraints added by this property rule.
input-enable — not listed as required here
true — No constraints added by this property rule.
output-enable — not listed as required here
true — No constraints added by this property rule.
Exactly one of these rules must match (oneOf) #
Rule 1
Rule 2
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties matching a name pattern (patternProperties) #
.*-group$ — name matches this regular expression #
Value type (type): "object"
Pin controller client devices can organize pin configuration entries into grouping nodes ending in "-group". These group nodes may contain multiple child nodes each ending in "-pins" to configure distinct sets of pins.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties matching a name pattern (patternProperties) #
-pins$ — name matches this regular expression
Shared schema rule ($ref): #/definitions/renesas-rzt2h-n2h-pins-node
-pins$ — name matches this regular expression #
Shared schema rule ($ref): #/definitions/renesas-rzt2h-n2h-pins-node
-hog$ — name matches this regular expression #
Value type (type): "object"
GPIO hog node
Properties and child nodes (properties) #
gpio-hog — required here
true — No constraints added by this property rule.
gpios — required here
true — No constraints added by this property rule.
input — not listed as required here
true — No constraints added by this property rule.
output-high — not listed as required here
true — No constraints added by this property rule.
output-low — not listed as required here
true — No constraints added by this property rule.
line-name — not listed as required here
true — No constraints added by this property rule.
Required in this object (required): "gpio-hog", "gpios"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):pinctrl.yaml#
Required in this object (required): "compatible", "reg", "reg-names", "gpio-controller", "#gpio-cells", "gpio-ranges", "clocks", "power-domains"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h>
#include <dt-bindings/pinctrl/renesas,r9a09g077-pinctrl.h>
pinctrl@802c0000 {
compatible = "renesas,r9a09g077-pinctrl";
reg = <0x802c0000 0x2000>,
<0x812c0000 0x2000>,
<0x802b0000 0x2000>;
reg-names = "nsr", "srs", "srn";
clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKM>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 288>;
interrupt-controller;
#interrupt-cells = <2>;
power-domains = <&cpg>;
serial0-pins {
pinmux = <RZT2H_PORT_PINMUX(38, 0, 1)>, /* Tx */
<RZT2H_PORT_PINMUX(38, 1, 1)>; /* Rx */
};
sd1-pwr-en-hog {
gpio-hog;
gpios = <RZT2H_GPIO(39, 2) 0>;
output-high;
line-name = "sd1_pwr_en";
};
i2c0-pins {
pins = "RIIC0_SDA", "RIIC0_SCL";
input-enable;
};
sd0-sd-group {
ctrl-pins {
pinmux = <RZT2H_PORT_PINMUX(12, 0, 0x29)>, /* SD0_CLK */
<RZT2H_PORT_PINMUX(12, 1, 0x29)>; /* SD0_CMD */
};
data-pins {
pinmux = <RZT2H_PORT_PINMUX(12, 0, 0x29)>, /* SD0_CLK */
<RZT2H_PORT_PINMUX(12, 1, 0x29)>; /* SD0_CMD */
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 22: RZ/T2H
Line 23: RZ/N2H
Line 92: Grouping nodes: allow multiple "-pins" subnodes within a "-group"
Line 104: Standalone "-pins" nodes under client devices or groups