Canaan Kendryte K230 Pin Controller
Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/canaan,k230-pinctrl.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Ze Huang <18771902331@163.com>"
The Canaan Kendryte K230 platform includes 64 IO pins, each capable of multiplexing up to 5 different functions. Pin function configuration is performed on a per-pin basis.
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "canaan,k230-pinctrl"
reg — required here #
Maximum number of items (maxItems): 1
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.
A pinctrl node should contain at least one subnode representing the pinctrl groups available on the machine.
Properties matching a name pattern (patternProperties) #
-cfg$ — name matches this regular expression
Value type (type): "object"
All of these rules must match (allOf)
Rule 1
Shared schema rule (
$ref):/schemas/pinctrl/pincfg-node.yaml
Rule 2
Shared schema rule (
$ref):/schemas/pinctrl/pinmux-node.yaml
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, input enable/disable, input schmitt trigger, slew-rate enable/disable, slew-rate, drive strength.
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 with the macro 'K230_PINMUX(pin, mode)'
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
Minimum value (minimum): 0
Maximum value (maximum): 15
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.
input-schmitt-enable — not listed as required here
true — No constraints added by this property rule.
slew-rate — not listed as required here
slew rate control enable 0: disable 1: enable
power-source — not listed as required here
Specifies the power source voltage for the IO bank that the pin belongs to. Each bank of IO pins operate at a specific, fixed voltage levels. Incorrect voltage configuration can damage the chip. The defined constants represent the possible voltage configurations:
- K230_MSC_3V3 (value 0): 3.3V power supply - K230_MSC_1V8 (value 1): 1.8V power supply
The following banks have the corresponding voltage configurations:
- bank IO0 to IO1: Fixed at 1.8V - bank IO2 to IO13: Fixed at 1.8V - bank IO14 to IO25: Fixed at 1.8V - bank IO26 to IO37: Fixed at 1.8V - bank IO38 to IO49: Fixed at 1.8V - bank IO50 to IO61: Fixed at 3.3V - bank IO62 to IO63: Fixed at 1.8V
Required in this object (required): "pinmux"
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) #
pinctrl@91105000 {
compatible = "canaan,k230-pinctrl";
reg = <0x91105000 0x100>;
uart2-pins {
uart2-pins-cfg {
pinmux = <0x503>, /* uart2 txd */
<0x603>; /* uart2 rxd */
slew-rate = <0>;
drive-strength = <4>;
power-source = <1>;
input-enable;
output-enable;
bias-disable;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause