SpacemiT K1 SoC Pin Controller
Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/spacemit,k1-pinctrl.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Yixun Lan <dlan@gentoo.org>"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "spacemit,k1-pinctrl", "spacemit,k3-pinctrl"
reg — required here #
Array item rules (items) #
Item 1
pinctrl io memory base
clocks — required here #
Array item rules (items) #
Item 1
Functional Clock
Item 2
Bus Clock
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"func"
Item 2
Exact value (
const):"bus"
resets — not listed as required here #
Maximum number of items (maxItems): 1
spacemit,apbc — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
Phandle to syscon that access the protected register
Properties matching a name pattern (patternProperties) #
-cfg$ — 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.
A pinctrl node should contain at least one subnode representing the pinctrl groups available on the machine.
Properties matching a name pattern (patternProperties) #
-pins$ — 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.
Each subnode will list the pins it needs, and how they should be configured, with regard to muxer configuration, bias pull, drive strength, input schmitt trigger, slew rate, power source.
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 — required here
The list of GPIOs and their mux settings that properties in the node apply to. This should be set using the K1_PADCONF macro to construct the value.
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
typical value for selecting bias pull up or strong pull up. 0: normal bias pull up 1: strong bias pull up
drive-strength — not listed as required here
typical current (in mA) when the output at high level.
At least one of these rules must match (anyOf)
Rule 1
Allowed values (
enum):11,21,32,42For K1 SoC, 1.8V voltage output
Rule 2
Allowed values (
enum):7,10,13,16,19,23,26,29For K1 SoC, 3.3V voltage output
Rule 3
Allowed values (
enum):2,4,6,7,9,11,13,14,21,23,25,26,28,30,31,33For K3 SoC, 1.8V voltage output
Rule 4
Allowed values (
enum):3,5,7,9,11,13,15,17,25,27,29,31,33,35,37,38For K3 SoC, 3.3V voltage output
input-schmitt — not listed as required here
typical threshold for schmitt trigger. 0: buffer mode 1: trigger mode 2, 3: trigger mode
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2, 3
power-source — not listed as required here
external power supplies at 1.8v or 3.3v.
Allowed values (enum): 1800, 3300
slew-rate — not listed as required here
slew rate for output buffer. 0: disable it 1: enable it (via bundled value from drive strength) 2: slow speed 0 3: slow speed 1 4: medium speed 5: fast speed
Allowed values (enum): 0, 1, 2, 3, 4, 5
Required in this object (required): "pinmux"
Required in this object (required): "compatible", "reg", "clocks", "clock-names"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#define K1_PADCONF(pin, func) (((pin) << 16) | (func))
soc {
#address-cells = <2>;
#size-cells = <2>;
pinctrl@d401e000 {
compatible = "spacemit,k1-pinctrl";
reg = <0x0 0xd401e000 0x0 0x400>;
clocks = <&syscon_apbc 42>,
<&syscon_apbc 94>;
clock-names = "func", "bus";
spacemit,apbc = <&syscon_apbc>;
uart0_2_cfg: uart0-2-cfg {
uart0-2-pins {
pinmux = <K1_PADCONF(68, 2)>,
<K1_PADCONF(69, 2)>;
bias-pull-up = <0>;
drive-strength = <32>;
};
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause