Nuvoton WPCM450 pin control and GPIO
Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/nuvoton,wpcm450-pinctrl.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Jonathan Neuschäfer <j.neuschaefer@gmx.net>"
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "nuvoton,wpcm450-pinctrl"
reg — required here #
Maximum number of items (maxItems): 1
#address-cells — not listed as required here #
Exact value (const): 1
#size-cells — not listed as required here #
Exact value (const): 0
Properties matching a name pattern (patternProperties) #
^gpio@[0-7]$ — name matches this regular expression #
Value type (type): "object"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Eight GPIO banks (gpio@0 to gpio@7), that each contain between 14 and 18 GPIOs. Some GPIOs support interrupts.
Properties and child nodes (properties) #
reg — required here
Minimum value (minimum): 0
Maximum value (maximum): 7
gpio-controller — required here
true — No constraints added by this property rule.
#gpio-cells — required here
Exact value (const): 2
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
interrupts — not listed as required here
Maximum number of items (maxItems): 3
The interrupts associated with this GPIO bank
Required in this object (required): "reg", "gpio-controller", "#gpio-cells"
^mux- — name matches this regular expression #
Shared schema rule ($ref): pinmux-node.yaml#
Properties and child nodes (properties) #
groups — not listed as required here
One or more groups of pins to mux to a certain function
Array item rules (items)
Allowed values (
enum):"smb3","smb4","smb5","scs1","scs2","scs3","smb0","smb1","smb2","bsp","hsp1","hsp2","r1err","r1md","rmii2","r2err","r2md","kbcc","dvo","clko","smi","uinc","gspi","mben","xcs2","xcs1","sdio","sspi","fi0","fi1","fi2","fi3","fi4","fi5","fi6","fi7","fi8","fi9","fi10","fi11","fi12","fi13","fi14","fi15","pwm0","pwm1","pwm2","pwm3","pwm4","pwm5","pwm6","pwm7","hg0","hg1","hg2","hg3","hg4","hg5","hg6","hg7"
function — not listed as required here
The function that a group of pins is muxed to
Allowed values (enum): "smb3", "smb4", "smb5", "scs1", "scs2", "scs3", "smb0", "smb1", "smb2", "bsp", "hsp1", "hsp2", "r1err", "r1md", "rmii2", "r2err", "r2md", "kbcc", "dvo0", "dvo1", "dvo2", "dvo3", "dvo4", "dvo5", "dvo6", "dvo7", "clko", "smi", "uinc", "gspi", "mben", "xcs2", "xcs1", "sdio", "sspi", "fi0", "fi1", "fi2", "fi3", "fi4", "fi5", "fi6", "fi7", "fi8", "fi9", "fi10", "fi11", "fi12", "fi13", "fi14", "fi15", "pwm0", "pwm1", "pwm2", "pwm3", "pwm4", "pwm5", "pwm6", "pwm7", "hg0", "hg1", "hg2", "hg3", "hg4", "hg5", "hg6", "hg7", "gpio"
Property dependencies (dependencies) #
groups — applies when this property is present
Also requires: "function"
function — applies when this property is present
Also requires: "groups"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
^cfg- — name matches this regular expression #
Shared schema rule ($ref): pincfg-node.yaml#
Properties and child nodes (properties) #
pins — not listed as required here
A list of pins to configure in certain ways, such as enabling debouncing
Array item rules (items)
String pattern (
pattern):"^gpio1?[0-9]{1,2}$"
input-debounce — not listed as required here
Maximum number of items (maxItems): 1
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "reg"
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>
#include <dt-bindings/gpio/gpio.h>
pinctrl: pinctrl@b8003000 {
compatible = "nuvoton,wpcm450-pinctrl";
reg = <0xb8003000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
gpio0: gpio@0 {
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>,
<3 IRQ_TYPE_LEVEL_HIGH>,
<4 IRQ_TYPE_LEVEL_HIGH>;
};
mux-rmii2 {
groups = "rmii2";
function = "rmii2";
};
pinmux_uid: mux-uid {
groups = "gspi", "sspi";
function = "gpio";
};
pinctrl_uid: cfg-uid {
pins = "gpio14";
input-debounce = <1>;
};
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uid>, <&pinmux_uid>;
button-uid {
label = "UID";
linux,code = <102>;
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
Line 26: There are three kinds of subnodes:
Line 27: 1. a GPIO controller node for each GPIO bank
Line 28: 2. a pinmux node configures pin muxing for a group of pins (e.g. rmii2)
Line 29: 3. a pinconf node configures properties of a single pin