RaspberryPi RP1 GPIO/Pinconf/Pinmux Controller submodule
Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/raspberrypi,rp1-gpio.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "A. della Porta <andrea.porta@suse.com>"
The RP1 chipset is a Multi Function Device containing, among other sub-peripherals, a gpio/pinconf/mux controller whose 54 pins are grouped into 3 banks. It works also as an interrupt controller for those gpios.
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "raspberrypi,rp1-gpio"
reg — required here #
Maximum number of items (maxItems): 3
One reg specifier for each one of the 3 pin banks.
#gpio-cells — required here #
The first cell is the pin number and the second cell is used to specify the flags (see include/dt-bindings/gpio/gpio.h).
Exact value (const): 2
gpio-controller — required here #
true — No constraints added by this property rule.
gpio-ranges — not listed as required here #
Maximum number of items (maxItems): 1
gpio-line-names — not listed as required here #
Maximum number of items (maxItems): 54
interrupts — required here #
Maximum number of items (maxItems): 3
One interrupt specifier for each one of the 3 pin banks.
#interrupt-cells — required here #
Specifies the Bank number [0, 1, 2] and Flags as defined in include/dt-bindings/interrupt-controller/irq.h.
Exact value (const): 2
interrupt-controller — required here #
true — No constraints added by this property rule.
Properties matching a name pattern (patternProperties) #
-state$ — name matches this regular expression #
Exactly one of these rules must match (oneOf) #
Rule 1
Shared schema rule (
$ref):#/$defs/raspberrypi-rp1-state
Rule 2
Properties matching a name pattern (
patternProperties)
-pins$— name matches this regular expressionShared schema rule (
$ref):#/$defs/raspberrypi-rp1-stateProperties not matched by properties or patternProperties in this schema (
additionalProperties)
falseNot allowed by this rule.
Reusable definitions ($defs) #
raspberrypi-rp1-state #
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#
Pin controller client devices use pin configuration subnodes (children and grandchildren) for desired pin configuration. Client device subnodes use below standard properties.
Properties and child nodes (properties) #
pins — not listed as required here
List of gpio pins affected by the properties specified in this subnode (either this or "groups" must be specified).
Array item rules (items)
String pattern (
pattern):"^gpio([0-9]|[1-4][0-9]|5[0-3])$"
groups — not listed as required here
List of groups affected by the properties specified in this subnode (either this or "pins" must be specified).
Array item rules (items)
At least one of these rules must match (
anyOf)Rule 1
String pattern (
pattern):"^gpio([0-9]|[1-4][0-9]|5[0-3])$"Rule 2
Allowed values (
enum):"uart0","uart0_ctrl","uart1","uart1_ctrl","uart2","uart2_ctrl","uart3","uart3_ctrl","uart4","uart4_ctrl","uart5_0","uart5_0_ctrl","uart5_1","uart5_1_ctrl","uart5_2","uart5_2_ctrl","uart5_3","sd0","sd1","i2s0","i2s0_dual","i2s0_quad","i2s1","i2s1_dual","i2s1_quad","i2s2_0","i2s2_0_dual","i2s2_1","i2s2_1_dual","i2c4_0","i2c4_1","i2c4_2","i2c4_3","i2c6_0","i2c6_1","i2c5_0","i2c5_1","i2c5_2","i2c5_3","i2c0_0","i2c0_1","i2c1_0","i2c1_1","i2c2_0","i2c2_1","i2c3_0","i2c3_1","i2c3_2","dpi_16bit","dpi_16bit_cpadhi","dpi_16bit_pad666","dpi_18bit","dpi_18bit_cpadhi","dpi_24bit","spi0","spi0_quad","spi1","spi2","spi3","spi4","spi5","spi6_0","spi6_1","spi7_0","spi7_1","spi8_0","spi8_1","aaud_0","aaud_1","aaud_2","aaud_3","aaud_4","vbus0_0","vbus0_1","vbus1","vbus2","vbus3","mic_0","mic_1","mic_2","mic_3","ir"
function — required here
Allowed values (enum): "alt0", "alt1", "alt2", "alt3", "alt4", "gpio", "alt6", "alt7", "alt8", "none", "aaud", "dcd0", "dpi", "dsi0_te_ext", "dsi1_te_ext", "dsr0", "dtr0", "gpclk0", "gpclk1", "gpclk2", "gpclk3", "gpclk4", "gpclk5", "i2c0", "i2c1", "i2c2", "i2c3", "i2c4", "i2c5", "i2c6", "i2s0", "i2s1", "i2s2", "ir", "mic", "pcie_clkreq_n", "pio", "proc_rio", "pwm0", "pwm1", "ri0", "sd0", "sd1", "spi0", "spi1", "spi2", "spi3", "spi4", "spi5", "spi6", "spi7", "spi8", "uart0", "uart1", "uart2", "uart3", "uart4", "uart5", "vbus0", "vbus1", "vbus2", "vbus3"
Specify the alternative function to be configured for the specified pins.
bias-disable — not listed as required here
true — No constraints added by this property rule.
bias-pull-down — not listed as required here
true — No constraints added by this property rule.
bias-pull-up — 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.
input-schmitt-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.
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.
slew-rate — not listed as required here
0 is slow slew rate, 1 is fast slew rate
drive-strength — not listed as required here
Allowed values (enum): 2, 4, 8, 12
Required in this object (required): "function"
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.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):pinctrl.yaml#
Required in this object (required): "reg", "compatible", "#gpio-cells", "gpio-controller", "interrupts", "#interrupt-cells", "interrupt-controller"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
rp1 {
#address-cells = <2>;
#size-cells = <2>;
rp1_gpio: pinctrl@c0400d0000 {
reg = <0xc0 0x400d0000 0x0 0xc000>,
<0xc0 0x400e0000 0x0 0xc000>,
<0xc0 0x400f0000 0x0 0xc000>;
compatible = "raspberrypi,rp1-gpio";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>,
<1 IRQ_TYPE_LEVEL_HIGH>,
<2 IRQ_TYPE_LEVEL_HIGH>;
gpio-line-names =
"ID_SDA", // GPIO0
"ID_SCL", // GPIO1
"GPIO2", "GPIO3", "GPIO4", "GPIO5", "GPIO6",
"GPIO7", "GPIO8", "GPIO9", "GPIO10", "GPIO11",
"GPIO12", "GPIO13", "GPIO14", "GPIO15", "GPIO16",
"GPIO17", "GPIO18", "GPIO19", "GPIO20", "GPIO21",
"GPIO22", "GPIO23", "GPIO24", "GPIO25", "GPIO26",
"GPIO27",
"PCIE_RP1_WAKE", // GPIO28
"FAN_TACH", // GPIO29
"HOST_SDA", // GPIO30
"HOST_SCL", // GPIO31
"ETH_RST_N", // GPIO32
"", // GPIO33
"CD0_IO0_MICCLK", // GPIO34
"CD0_IO0_MICDAT0", // GPIO35
"RP1_PCIE_CLKREQ_N", // GPIO36
"", // GPIO37
"CD0_SDA", // GPIO38
"CD0_SCL", // GPIO39
"CD1_SDA", // GPIO40
"CD1_SCL", // GPIO41
"USB_VBUS_EN", // GPIO42
"USB_OC_N", // GPIO43
"RP1_STAT_LED", // GPIO44
"FAN_PWM", // GPIO45
"CD1_IO0_MICCLK", // GPIO46
"2712_WAKE", // GPIO47
"CD1_IO1_MICDAT1", // GPIO48
"EN_MAX_USB_CUR", // GPIO49
"", // GPIO50
"", // GPIO51
"", // GPIO52
""; // GPIO53
rp1-i2s0-default-state {
function = "i2s0";
pins = "gpio18", "gpio19", "gpio20", "gpio21";
bias-disable;
};
rp1-uart0-default-state {
txd-pins {
function = "uart0";
pins = "gpio14";
bias-disable;
};
rxd-pins {
function = "uart0";
pins = "gpio15";
bias-pull-up;
};
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)