1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/pinctrl-single.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic Pin Controller with a Single Register for One or More Pins
maintainers:
- Tony Lindgren <tony@atomide.com>
description:
Some pin controller devices use a single register for one or more pins. The
range of pin control registers can vary from one to many for each controller
instance. Some SoCs from Altera, Broadcom, HiSilicon, Ralink, and TI have this
kind of pin controller instances.
properties:
compatible:
oneOf:
- enum:
- pinctrl-single
- pinconf-single
- items:
- enum:
- ti,am437-padconf
- ti,am654-padconf
- ti,dra7-padconf
- ti,omap2420-padconf
- ti,omap2430-padconf
- ti,omap3-padconf
- ti,omap4-padconf
- ti,omap5-padconf
- ti,j7200-padconf
- const: pinctrl-single
reg:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
'#pinctrl-cells':
description:
Number of cells. Usually 2, consisting of register offset, pin configuration
value, and pinmux mode. Some controllers may use 1 for just offset and value.
enum: [ 1, 2 ]
pinctrl-single,bit-per-mux:
description: Optional flag to indicate register controls more than one pin
type: boolean
pinctrl-single,function-mask:
description: Mask of the allowed register bits
$ref: /schemas/types.yaml#/definitions/uint32
pinctrl-single,function-off:
description: Optional function off mode for disabled state
$ref: /schemas/types.yaml#/definitions/uint32
pinctrl-single,register-width:
description: Width of pin specific bits in the register
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 8, 16, 32 ]
pinctrl-single,gpio-range:
description: Optional list of pin base, nr pins & gpio function
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle of a gpio-range node
- description: pin base
- description: number of pins
- description: gpio function
'#gpio-range-cells':
description: No longer needed, may exist in older files for gpio-ranges
deprecated: true
const: 3
gpio-range:
description: Optional node for gpio range cells
type: object
additionalProperties: false
properties:
'#pinctrl-single,gpio-range-cells':
description: Number of gpio range cells
const: 3
$ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
'-pins(-[0-9]+)?$|-pin$':
description:
Pin group node name using naming ending in -pins followed by an optional
instance number
type: object
additionalProperties: false
properties:
pinctrl-single,pins:
description:
Array of pins as described in pinmux-node.yaml for pinctrl-pin-array
$ref: /schemas/types.yaml#/definitions/uint32-array
pinctrl-single,bits:
description: Register bit configuration for pinctrl-single,bit-per-mux
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: register offset
- description: value
- description: pin bitmask in the register
pinctrl-single,bias-pullup:
description: Optional bias pull up configuration
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: input
- description: enabled pull up bits
- description: disabled pull up bits
- description: bias pull up mask
pinctrl-single,bias-pulldown:
description: Optional bias pull down configuration
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: input
- description: enabled pull down bits
- description: disabled pull down bits
- description: bias pull down mask
pinctrl-single,drive-strength:
description: Optional drive strength configuration
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: drive strength current
- description: drive strength mask
pinctrl-single,input-schmitt:
description: Optional input schmitt configuration
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: input
- description: enable bits
- description: disable bits
- description: input schmitt mask
pinctrl-single,low-power-mode:
description: Optional low power mode configuration
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: low power mode value
- description: low power mode mask
pinctrl-single,slew-rate:
description: Optional slew rate configuration
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: slew rate
- description: slew rate mask
allOf:
- $ref: pinctrl.yaml#
required:
- compatible
- reg
- pinctrl-single,register-width
additionalProperties: false
examples:
- |
soc {
#address-cells = <1>;
#size-cells = <1>;
pinmux@4a100040 {
compatible = "pinctrl-single";
reg = <0x4a100040 0x0196>;
#address-cells = <1>;
#size-cells = <0>;
#pinctrl-cells = <2>;
#interrupt-cells = <1>;
interrupt-controller;
pinctrl-single,register-width = <16>;
pinctrl-single,function-mask = <0xffff>;
pinctrl-single,gpio-range = <&range 0 3 0>;
range: gpio-range {
#pinctrl-single,gpio-range-cells = <3>;
};
uart2-pins {
pinctrl-single,pins =
<0xd8 0x118>,
<0xda 0>,
<0xdc 0x118>,
<0xde 0>;
};
};
};
|