Sophgo SG2042 Pin Controller
Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/sophgo,sg2042-pinctrl.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Inochi Amaoto <inochiama@outlook.com>"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "sophgo,sg2042-pinctrl", "sophgo,sg2044-pinctrl"
reg — required here #
Maximum number of items (maxItems): 1
Properties matching a name pattern (patternProperties) #
-cfg$ — name matches this regular expression #
Value type (type): "object"
A pinctrl node should contain at least one subnode representing the pinctrl groups available on the machine.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties matching a name pattern (patternProperties) #
-pins$ — name matches this regular expression
Value type (type): "object"
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 enable, drive strength output enable/disable state. For configuration detail, refer to https://github.com/sophgo/sophgo-doc/.
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 PINMUX macro.
bias-disable — not listed as required here
true — No constraints added by this property rule.
bias-pull-up — not listed as required here
Value type (type): "boolean"
bias-pull-down — not listed as required here
Value type (type): "boolean"
drive-strength-microamp — not listed as required here
typical current when output low level.
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.
Required in this object (required): "pinmux"
Properties not matched by properties or patternProperties in this schema (additionalProperties)
false
Not allowed by this rule.
Required in this object (required): "compatible", "reg"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"sophgo,sg2042-pinctrl"When the condition matches (
then) #Properties matching a name pattern (
patternProperties)
-cfg$— name matches this regular expressionProperties matching a name pattern (
patternProperties)
-pins$— name matches this regular expressionProperties and child nodes (
properties)
drive-strength-microamp— not listed as required hereAllowed values (
enum):5400,8100,10700,13400,16100,18800,21400,24100,26800,29400,32100,34800,37400,40100,42800,45400
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"sophgo,sg2044-pinctrl"When the condition matches (
then) #Properties matching a name pattern (
patternProperties)
-cfg$— name matches this regular expressionProperties matching a name pattern (
patternProperties)
-pins$— name matches this regular expressionProperties and child nodes (
properties)
drive-strength-microamp— not listed as required hereAllowed values (
enum):3200,6400,9600,12700,15900,19100,22200,25300,29500,32700,35900,39000,42000,45200,48300,51400
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/pinctrl/pinctrl-sg2042.h>
pinctrl@30011000 {
compatible = "sophgo,sg2042-pinctrl";
reg = <30011000 0x1000>;
uart0_cfg: uart0-cfg {
uart0-pins {
pinmux = <PINMUX(PIN_UART0_TX, 0)>,
<PINMUX(PIN_UART0_RX, 0)>;
bias-pull-up;
drive-strength-microamp = <13400>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause