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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/fsl,mc13xxx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale MC13xxx Power Management Integrated Circuits (PMIC)
maintainers:
- Alexander Kurz <akurz@blala.de>
description: >
The MC13xxx PMIC series consists of the three models MC13783, MC13892
and MC34708 and provide regulators and other features like RTC, ADC,
LED, touchscreen, codec and input buttons.
Link to datasheets
https://www.nxp.com/docs/en/data-sheet/MC13783.pdf
https://www.nxp.com/docs/en/data-sheet/MC13892.pdf
https://www.nxp.com/docs/en/data-sheet/MC34708.pdf
properties:
compatible:
enum:
- fsl,mc13783
- fsl,mc13892
- fsl,mc34708
reg:
description: I2C slave address or SPI chip select number.
maxItems: 1
spi-max-frequency: true
spi-cs-high: true
system-power-controller: true
interrupts:
maxItems: 1
buttons:
type: object
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^onkey@[0-2]$":
$ref: /schemas/input/input.yaml#
unevaluatedProperties: false
type: object
properties:
reg:
description: |
One of
MC13783 BUTTON IDs:
0: ONOFD1
1: ONOFD2
2: ONOFD3
MC13892 BUTTON IDs:
0: PWRON1
1: PWRON2
2: PWRON3
MC34708 BUTTON IDs:
0: PWRON1
1: PWRON2
maximum: 2
debounce-delay-ms:
enum: [0, 30, 150, 750]
default: 30
active-low:
description: Set active when pin is pulled low.
linux,code: true
fsl,enable-reset:
description:
Setting of the global reset option.
type: boolean
unevaluatedProperties: false
leds:
type: object
additionalProperties: false
properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
led-control:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: |
Setting for LED-Control register array length depends on model,
mc13783: 6, mc13892: 4, mc34708: 1
patternProperties:
'^led@[0-9a-b]$':
$ref: /schemas/leds/common.yaml#
unevaluatedProperties: false
properties:
reg:
description: |
One of
MC13783 LED IDs
0: Main display
1: AUX display
2: Keypad
3: Red 1
4: Green 1
5: Blue 1
6: Red 2
7: Green 2
8: Blue 2
9: Red 3
10: Green 3
11: Blue 3
MC13892 LED IDs
0: Main display
1: AUX display
2: Keypad
3: Red
4: Green
5: Blue
MC34708 LED IDs
0: Charger Red
1: Charger Green
maxItems: 1
regulators:
type: object
additionalProperties:
type: object
description: |
List of child nodes specifying the regulators, depending on chip variant.
Each child node is defined using the standard binding for regulators and
the optional regulator properties defined below.
fsl,mc13xxx-uses-adc:
type: boolean
description: Indicate the ADC is being used
fsl,mc13xxx-uses-codec:
type: boolean
description: Indicate the Audio Codec is being used
fsl,mc13xxx-uses-rtc:
type: boolean
description: Indicate the RTC is being used
fsl,mc13xxx-uses-touch:
type: boolean
description: Indicate the touchscreen controller is being used
required:
- compatible
- reg
allOf:
- if:
properties:
compatible:
contains:
const: fsl,mc13783
then:
properties:
leds:
properties:
led-control:
minItems: 6
maxItems: 6
regulators:
patternProperties:
"^gpo[1-4]|pwgt[12]spi|sw[12][ab]|sw3|vaudio|vcam|vdig|vesim|vgen|viohi|violo|vmmc[12]|vrf[12]|vrfbg|vrfcp|vrfdig|vrfref|vsim|vvib$":
type: object
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
- if:
properties:
compatible:
contains:
const: fsl,mc13892
then:
properties:
leds:
properties:
led-control:
minItems: 4
maxItems: 4
regulators:
patternProperties:
"^gpo[1-4]|pwgt[12]spi|sw[1-4]|swbst|vaudio|vcam|vcoincell|vdig|vgen[1-3]|viohi|vpll|vsd|vusb|vusb2|vvideo$":
type: object
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
- if:
properties:
compatible:
contains:
const: fsl,mc34708
then:
properties:
buttons:
patternProperties:
"^onkey@[0-2]$":
properties:
reg:
maximum: 1
leds:
properties:
led-control:
minItems: 1
maxItems: 1
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
pmic: mc13892@0 {
compatible = "fsl,mc13892";
reg = <0>;
spi-max-frequency = <1000000>;
spi-cs-high;
interrupt-parent = <&gpio0>;
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
fsl,mc13xxx-uses-rtc;
fsl,mc13xxx-uses-adc;
buttons {
#address-cells = <1>;
#size-cells = <0>;
onkey@0 {
reg = <0>;
debounce-delay-ms = <30>;
active-low;
fsl,enable-reset;
};
};
leds {
#address-cells = <1>;
#size-cells = <0>;
led-control = <0x000 0x000 0x0e0 0x000>;
led@3 {
reg = <3>;
label = "system:red:live";
linux,default-trigger = "heartbeat";
};
};
regulators {
sw1_reg: sw1 {
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1375000>;
regulator-boot-on;
regulator-always-on;
};
sw2_reg: sw2 {
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1850000>;
regulator-boot-on;
regulator-always-on;
};
};
};
};
|