Canaan Kendryte K210 FPIOA
Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/canaan,k210-fpioa.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Damien Le Moal <dlemoal@kernel.org>"
The Canaan Kendryte K210 SoC Fully Programmable IO Array (FPIOA) controller allows assigning any of 256 possible functions to any of 48 IO pins of the SoC. Pin function configuration is performed on a per-pin basis.
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "canaan,k210-fpioa"
reg — required here #
Maximum number of items (maxItems): 1
Address and length of the register set for the FPIOA controller.
clocks — required here #
Array item rules (items) #
Item 1
Controller reference clock source
Item 2
APB interface clock source
clock-names — not listed as required here #
Array item rules (items) #
Item 1
Exact value (
const):"ref"
Item 2
Exact value (
const):"pclk"
resets — not listed as required here #
Maximum number of items (maxItems): 1
canaan,k210-sysctl-power — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array
Array item rules (items) #
Item 1
Array item rules (
items)Item 1
phandle of the K210 system controller node
Item 2
offset of its power domain control register
phandle of the K210 system controller node and offset of its power domain control register.
Properties matching a name pattern (patternProperties) #
-pinmux$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): /schemas/pinctrl/pinmux-node.yaml
FPIOA client devices use sub-nodes to define the desired pin configuration. Client device sub-nodes use the pinux property below.
Properties and child nodes (properties) #
pinmux — required here
List of IO pins alternate functions. The values for each IO pin is a combination of an IO pin number (0 to 47) with the desired function for the IO pin. Functions are defined as macros in include/dt-bindings/pinctrl/k210-fpioa.h. The K210_FPIOA(IO pin, function) macro is provided to facilitate the combination of IO pin numbers and functions.
Required in this object (required): "pinmux"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
-pins$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): /schemas/pinctrl/pincfg-node.yaml
FPIOA client devices use sub-nodes to define the desired configuration of pins. Client device sub-nodes use the properties below.
Properties and child nodes (properties) #
pins — not listed as required here
List of IO pins affected by the properties specified in this subnode. IO pins are identified using the pin names "IO_xx". Pin configuration nodes can also define the power domain to be used for the SoC pin groups A0 (IO pins 0-5), A1 (IO pins 6-11), A2 (IO pins 12-17), B0 (IO pins 18-23), B1 (IO pins 24-29), B2 (IO pins 30-35), B3 (IO pins 30-35), C0 (IO pins 36-41) and C1 (IO pins 42-47) using the power-source property.
Array item rules (items)
At least one of these rules must match (
anyOf)Rule 1
String pattern (
pattern):"^(IO_([0-9]*))|(A[0-2])|(B[3-5])|(C[6-7])$"Rule 2
Allowed values (
enum):"IO_0","IO_1","IO_2","IO_3","IO_4","IO_5","IO_6","IO_7","IO_8","IO_9","IO_10","IO_11","IO_12","IO_13","IO_14","IO_15","IO_16","IO_17","IO_18","IO_19","IO_20","IO_21","IO_22","IO_23","IO_24","IO_25","IO_26","IO_27","IO_28","IO_29","IO_30","IO_31","IO_32","IO_33","IO_34","IO_35","IO_36","IO_37","IO_38","IO_39","IO_40","IO_41","IO_42","IO_43","IO_44","IO_45","IO_46","IO_47","A0","A1","A2","B3","B4","B5","C6","C7"
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.
drive-strength — not listed as required here
true — No constraints added by this property rule.
drive-strength-microamp — 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-disable — 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.
input-schmitt-disable — not listed as required here
true — No constraints added by this property rule.
input-polarity-invert — not listed as required here
Value type (type): "boolean"
Enable or disable pin input polarity inversion.
output-enable — not listed as required here
true — No constraints added by this property rule.
output-disable — 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.
output-polarity-invert — not listed as required here
Value type (type): "boolean"
Enable or disable pin output polarity inversion.
slew-rate — not listed as required here
true — No constraints added by this property rule.
power-source — not listed as required here
true — No constraints added by this property rule.
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): "compatible", "reg", "clocks", "canaan,k210-sysctl-power"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/pinctrl/k210-fpioa.h>
#include <dt-bindings/clock/k210-clk.h>
#include <dt-bindings/reset/k210-rst.h>
fpioa: pinmux@502b0000 {
compatible = "canaan,k210-fpioa";
reg = <0x502b0000 0x100>;
clocks = <&sysclk K210_CLK_FPIOA>,
<&sysclk K210_CLK_APB0>;
clock-names = "ref", "pclk";
resets = <&sysrst K210_RST_FPIOA>;
canaan,k210-sysctl-power = <&sysctl 108>;
pinctrl-0 = <&jtag_pinctrl>;
pinctrl-names = "default";
jtag_pinctrl: jtag-pinmux {
pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>,
<K210_FPIOA(1, K210_PCF_JTAG_TDI)>,
<K210_FPIOA(2, K210_PCF_JTAG_TMS)>,
<K210_FPIOA(3, K210_PCF_JTAG_TDO)>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)