Allwinner A10 Pin Controller

Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/allwinner,sun4i-a10-pinctrl.yaml#"

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

Maintainers (maintainers): "Chen-Yu Tsai <wens@csie.org>", "Maxime Ripard <mripard@kernel.org>"

Properties and child nodes (properties) #

#gpio-cells — required here #

Exact value (const): 3

GPIO consumers must use three arguments, first the number of the bank, then the pin number inside that bank, and finally the GPIO flags.

#interrupt-cells — not listed as required here #

Exact value (const): 3

Interrupts consumers must use three arguments, first the number of the bank, then the pin number inside that bank, and finally the interrupts flags.

compatible — required here #

Allowed values (enum): "allwinner,sun4i-a10-pinctrl", "allwinner,sun5i-a10s-pinctrl", "allwinner,sun5i-a13-pinctrl", "allwinner,sun6i-a31-pinctrl", "allwinner,sun6i-a31-r-pinctrl", "allwinner,sun6i-a31s-pinctrl", "allwinner,sun7i-a20-pinctrl", "allwinner,sun8i-a23-pinctrl", "allwinner,sun8i-a23-r-pinctrl", "allwinner,sun8i-a33-pinctrl", "allwinner,sun8i-a83t-pinctrl", "allwinner,sun8i-a83t-r-pinctrl", "allwinner,sun8i-h3-pinctrl", "allwinner,sun8i-h3-r-pinctrl", "allwinner,sun8i-r40-pinctrl", "allwinner,sun8i-v3-pinctrl", "allwinner,sun8i-v3s-pinctrl", "allwinner,sun8i-v853-pinctrl", "allwinner,sun9i-a80-pinctrl", "allwinner,sun9i-a80-r-pinctrl", "allwinner,sun20i-d1-pinctrl", "allwinner,sun50i-a64-pinctrl", "allwinner,sun50i-a64-r-pinctrl", "allwinner,sun50i-a100-pinctrl", "allwinner,sun50i-a100-r-pinctrl", "allwinner,sun50i-h5-pinctrl", "allwinner,sun50i-h6-pinctrl", "allwinner,sun50i-h6-r-pinctrl", "allwinner,sun50i-h616-pinctrl", "allwinner,sun50i-h616-r-pinctrl", "allwinner,suniv-f1c100s-pinctrl", "nextthing,gr8-pinctrl"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 8

One interrupt per external interrupt bank supported on the controller, sorted by bank number ascending order.

clocks — required here #

Array item rules (items) #

Item 1

Bus Clock

Item 2

High Frequency Oscillator

Item 3

Low Frequency Oscillator

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "apb"

Item 2

Exact value (const): "hosc"

Item 3

Exact value (const): "losc"

gpio-controller — required here #

true — No constraints added by this property rule.

interrupt-controller — not listed as required here #

true — No constraints added by this property rule.

gpio-line-names — not listed as required here #

true — No constraints added by this property rule.

input-debounce — not listed as required here #

Debouncing periods in microseconds, one period per interrupt bank found in the controller

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

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 8

Properties matching a name pattern (patternProperties) #

^([rs]-)?(([a-z0-9]{3,}|[a-oq-z0-9][a-z0-9]*?)?-)+?(p[a-ilm][0-9]*?-)??pins?$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

pins — required here

true — No constraints added by this property rule.

function — required here

true — No constraints added by this property rule.

bias-disable — 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.

bias-pull-down — not listed as required here

true — No constraints added by this property rule.

drive-strength — not listed as required here

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

Allowed values (enum): 10, 20, 30, 40

Required in this object (required): "pins", "function"

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

false

Not allowed by this rule.

^vcc-p[a-ilm]-supply$ — name matches this regular expression #

Power supplies for pin banks.

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

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): pinctrl.yaml#

Rule 2 #

Condition (if) #

This rule must not match (not)

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun50i-h616-r-pinctrl"

When the condition matches (then) #

Required in this object (required): "#interrupt-cells", "interrupts", "interrupt-controller"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun50i-h616-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 8

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun50i-a100-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 7

Maximum number of items (maxItems): 7

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun8i-v853-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 8

Maximum number of items (maxItems): 8

Rule 6 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun20i-d1-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 6

Maximum number of items (maxItems): 6

Rule 7 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun9i-a80-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 5

Maximum number of items (maxItems): 5

Rule 8 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun6i-a31-pinctrl", "allwinner,sun6i-a31s-pinctrl", "allwinner,sun50i-h6-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

Rule 9 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun8i-a23-pinctrl", "allwinner,sun8i-a83t-pinctrl", "allwinner,sun50i-a64-pinctrl", "allwinner,sun50i-h5-pinctrl", "allwinner,suniv-f1c100s-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

Rule 10 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun6i-a31-r-pinctrl", "allwinner,sun8i-a33-pinctrl", "allwinner,sun8i-h3-pinctrl", "allwinner,sun8i-v3-pinctrl", "allwinner,sun8i-v3s-pinctrl", "allwinner,sun9i-a80-r-pinctrl", "allwinner,sun50i-h6-r-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

Rule 11 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "allwinner,sun4i-a10-pinctrl", "allwinner,sun5i-a10s-pinctrl", "allwinner,sun5i-a13-pinctrl", "allwinner,sun7i-a20-pinctrl", "allwinner,sun8i-a23-r-pinctrl", "allwinner,sun8i-a83t-r-pinctrl", "allwinner,sun8i-h3-r-pinctrl", "allwinner,sun8i-r40-pinctrl", "allwinner,sun50i-a64-r-pinctrl", "allwinner,sun50i-a100-r-pinctrl", "nextthing,gr8-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 1

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

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/sun5i-ccu.h>

pio: pinctrl@1c20800 {
    compatible = "allwinner,sun5i-a13-pinctrl";
    reg = <0x01c20800 0x400>;
    interrupts = <28>;
    clocks = <&ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>;
    clock-names = "apb", "hosc", "losc";
    gpio-controller;
    interrupt-controller;
    #interrupt-cells = <3>;
    #gpio-cells = <3>;

    uart1_pe_pins: uart1-pe-pins {
        pins = "PE10", "PE11";
        function = "uart1";
    };

    uart1_pg_pins: uart1-pg-pins {
        pins = "PG3", "PG4";
        function = "uart1";
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Line 98: It's pretty scary, but the basic idea is that:

Line 99: - One node name can start with either s- or r- for PRCM nodes,

Line 100: - Then, the name itself can be any repetition of <string>- (to

Line 101: accommodate with nodes like uart4-rts-cts-pins), where each

Line 102: string can be either starting with 'p' but in a string longer

Line 103: than 3, or something that doesn't start with 'p',

Line 104: - Then, the bank name is optional and will be between pa and pg,

Line 105: pl or pm. Some pins groups that have several options will have

Line 106: the pin numbers then,

Line 107: - Finally, the name will end with either -pin or pins.

Line 142: FIXME: We should have the pin bank supplies here, but not a lot of

Line 143: boards are defining it at the moment so it would generate a lot of

Line 144: warnings.

Edit this page