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
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/allwinner,sun55i-a523-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner A523 Pin Controller
maintainers:
- Andre Przywara <andre.przywara@arm.com>
properties:
"#gpio-cells":
const: 3
description:
GPIO consumers must use three arguments, first the number of the
bank, then the pin number inside that bank, and finally the GPIO
flags.
"#interrupt-cells":
const: 3
description:
Interrupts consumers must use three arguments, first the number
of the bank, then the pin number inside that bank, and finally
the interrupts flags.
compatible:
enum:
- allwinner,sun55i-a523-pinctrl
- allwinner,sun55i-a523-r-pinctrl
reg:
maxItems: 1
interrupts:
minItems: 2
maxItems: 10
description:
One interrupt per external interrupt bank supported on the
controller, sorted by bank number ascending order.
clocks:
items:
- description: Bus Clock
- description: High Frequency Oscillator
- description: Low Frequency Oscillator
clock-names:
items:
- const: apb
- const: hosc
- const: losc
gpio-controller: true
interrupt-controller: true
gpio-line-names: true
input-debounce:
description:
Debouncing periods in microseconds, one period per interrupt
bank found in the controller
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2
maxItems: 10
patternProperties:
# It's pretty scary, but the basic idea is that:
# - One node name can start with either s- or r- for PRCM nodes,
# - Then, the name itself can be any repetition of <string>- (to
# accommodate with nodes like uart4-rts-cts-pins), where each
# string can be either starting with 'p' but in a string longer
# than 3, or something that doesn't start with 'p',
# - Then, the bank name is optional and will be between pa and pm.
# Some pins groups that have several options will have the pin
# numbers then,
# - Finally, the name will end with either -pin or pins.
"^([rs]-)?(([a-z0-9]{3,}|[a-oq-z][a-z0-9]*?)?-)+?(p[a-m][0-9]*?-)??pins?$":
type: object
properties:
pins: true
function: true
bias-disable: true
bias-pull-up: true
bias-pull-down: true
drive-strength:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [10, 20, 30, 40]
allwinner,pinmux:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
Pinmux selector value, for each pin. Almost every time this value
is the same for all pins, so any array shorter than the number of
pins will repeat the last value, to allow just specifying a single
cell, for all cells.
required:
- pins
- allwinner,pinmux
- function
additionalProperties: false
"^vcc-p[a-m]-supply$":
description:
Power supplies for pin banks.
required:
- "#gpio-cells"
- compatible
- reg
- clocks
- clock-names
- gpio-controller
- "#interrupt-cells"
- interrupts
- interrupt-controller
allOf:
- $ref: pinctrl.yaml#
- if:
properties:
compatible:
enum:
- allwinner,sun55i-a523-pinctrl
then:
properties:
interrupts:
minItems: 10
maxItems: 10
- if:
properties:
compatible:
enum:
- allwinner,sun55i-a523-r-pinctrl
then:
properties:
interrupts:
minItems: 2
maxItems: 2
additionalProperties: false
examples:
- |
r_pio: pinctrl@7022000 {
compatible = "allwinner,sun55i-a523-r-pinctrl";
reg = <0x7022000 0x800>;
interrupts = <0 159 4>, <0 161 4>;
clocks = <&r_ccu 1>, <&osc24M>, <&osc32k>;
clock-names = "apb", "hosc", "losc";
gpio-controller;
#gpio-cells = <3>;
interrupt-controller;
#interrupt-cells = <3>;
r_i2c_pins: r-i2c-pins {
pins = "PL0", "PL1";
allwinner,pinmux = <2>;
function = "r_i2c0";
bias-pull-up;
};
r_spi_pins: r-spi-pins {
pins = "PL11" ,"PL12", "PL13";
allwinner,pinmux = <6>;
function = "r_spi";
};
};
|