Debian Codegraph @

Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/pinctrl/spacemit,k1-pinctrl.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: SpacemiT K1 SoC Pin Controller
8
9 maintainers:
10 - Yixun Lan <[email protected]>
11
12 properties:
13 compatible:
14 enum:
15 - spacemit,k1-pinctrl
16 - spacemit,k3-pinctrl
17
18 reg:
19 items:
20 - description: pinctrl io memory base
21
22 clocks:
23 items:
24 - description: Functional Clock
25 - description: Bus Clock
26
27 clock-names:
28 items:
29 - const: func
30 - const: bus
31
32 resets:
33 maxItems: 1
34
35 spacemit,apbc:
36 $ref: /schemas/types.yaml#/definitions/phandle
37 description: Phandle to syscon that access the protected register
38
39 patternProperties:
40 '-cfg$':
41 type: object
42 additionalProperties: false
43
44 description:
45 A pinctrl node should contain at least one subnode representing the
46 pinctrl groups available on the machine.
47
48 patternProperties:
49 '-pins$':
50 type: object
51 additionalProperties: false
52
53 description:
54 Each subnode will list the pins it needs, and how they should
55 be configured, with regard to muxer configuration, bias pull,
56 drive strength, input schmitt trigger, slew rate, power source.
57
58 allOf:
59 - $ref: pincfg-node.yaml#
60 - $ref: pinmux-node.yaml#
61
62 properties:
63 pinmux:
64 description:
65 The list of GPIOs and their mux settings that properties in the
66 node apply to. This should be set using the K1_PADCONF macro to
67 construct the value.
68
69 bias-disable: true
70
71 bias-pull-down: true
72
73 bias-pull-up:
74 description: |
75 typical value for selecting bias pull up or strong pull up.
76 0: normal bias pull up
77 1: strong bias pull up
78 enum: [ 0, 1 ]
79
80 drive-strength:
81 description:
82 typical current (in mA) when the output at high level.
83 anyOf:
84 - enum: [ 11, 21, 32, 42 ]
85 description: For K1 SoC, 1.8V voltage output
86
87 - enum: [ 7, 10, 13, 16, 19, 23, 26, 29 ]
88 description: For K1 SoC, 3.3V voltage output
89
90 - enum: [ 2, 4, 6, 7, 9, 11, 13, 14, 21, 23, 25, 26, 28, 30, 31, 33 ]
91 description: For K3 SoC, 1.8V voltage output
92
93 - enum: [ 3, 5, 7, 9, 11, 13, 15, 17, 25, 27, 29, 31, 33, 35, 37, 38 ]
94 description: For K3 SoC, 3.3V voltage output
95
96 input-schmitt:
97 description: |
98 typical threshold for schmitt trigger.
99 0: buffer mode
100 1: trigger mode
101 2, 3: trigger mode
102 $ref: /schemas/types.yaml#/definitions/uint32
103 enum: [ 0, 1, 2, 3 ]
104
105 power-source:
106 description: external power supplies at 1.8v or 3.3v.
107 enum: [ 1800, 3300 ]
108
109 slew-rate:
110 description: |
111 slew rate for output buffer.
112 0: disable it
113 1: enable it (via bundled value from drive strength)
114 2: slow speed 0
115 3: slow speed 1
116 4: medium speed
117 5: fast speed
118 enum: [ 0, 1, 2, 3, 4, 5 ]
119
120 required:
121 - pinmux
122
123 required:
124 - compatible
125 - reg
126 - clocks
127 - clock-names
128
129 additionalProperties: false
130
131 examples:
132 - |
133 #define K1_PADCONF(pin, func) (((pin) << 16) | (func))
134
135 soc {
136 #address-cells = <2>;
137 #size-cells = <2>;
138
139 pinctrl@d401e000 {
140 compatible = "spacemit,k1-pinctrl";
141 reg = <0x0 0xd401e000 0x0 0x400>;
142 clocks = <&syscon_apbc 42>,
143 <&syscon_apbc 94>;
144 clock-names = "func", "bus";
145 spacemit,apbc = <&syscon_apbc>;
146
147 uart0_2_cfg: uart0-2-cfg {
148 uart0-2-pins {
149 pinmux = <K1_PADCONF(68, 2)>,
150 <K1_PADCONF(69, 2)>;
151
152 bias-pull-up = <0>;
153 drive-strength = <32>;
154 };
155 };
156 };
157 };
158
159 ...