Debian Codegraph @

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0-only
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm SPMI PMICs multi-function device
8
9 description: |
10 Some Qualcomm PMICs used with the Snapdragon series SoCs are interfaced
11 to the chip via the SPMI (System Power Management Interface) bus.
12 Support for multiple independent functions are implemented by splitting the
13 16-bit SPMI peripheral address space into 256 smaller fixed-size regions, 256 bytes
14 each. A function can consume one or more of these fixed-size register regions.
15
16 The Qualcomm SPMI series includes the PM8941, PM8841, PMA8084, PM8998 and other
17 PMICs. These PMICs use a "QPNP" scheme through SPMI interface.
18 QPNP is effectively a partitioning scheme for dividing the SPMI extended
19 register space up into logical pieces, and set of fixed register
20 locations/definitions within these regions, with some of these regions
21 specifically used for interrupt handling.
22
23 maintainers:
24 - Stephen Boyd <[email protected]>
25
26 properties:
27 $nodename:
28 oneOf:
29 - pattern: '^pmic@.*$'
30 - pattern: '^pm(a|s)?[0-9]*@.*$'
31 deprecated: true
32
33 compatible:
34 items:
35 - enum:
36 - qcom,pm2250
37 - qcom,pm6125
38 - qcom,pm6150
39 - qcom,pm6150l
40 - qcom,pm6350
41 - qcom,pm660
42 - qcom,pm660l
43 - qcom,pm7250b
44 - qcom,pm7550ba
45 - qcom,pm7325
46 - qcom,pm7550
47 - qcom,pm8004
48 - qcom,pm8005
49 - qcom,pm8009
50 - qcom,pm8010
51 - qcom,pm8019
52 - qcom,pm8028
53 - qcom,pm8110
54 - qcom,pm8150
55 - qcom,pm8150b
56 - qcom,pm8150c
57 - qcom,pm8150l
58 - qcom,pm8226
59 - qcom,pm8350
60 - qcom,pm8350b
61 - qcom,pm8350c
62 - qcom,pm8450
63 - qcom,pm8550
64 - qcom,pm8550b
65 - qcom,pm8550ve
66 - qcom,pm8550vs
67 - qcom,pm8841
68 - qcom,pm8909
69 - qcom,pm8916
70 - qcom,pm8937
71 - qcom,pm8941
72 - qcom,pm8950
73 - qcom,pm8953
74 - qcom,pm8994
75 - qcom,pm8998
76 - qcom,pma8084
77 - qcom,pmc8180
78 - qcom,pmc8180c
79 - qcom,pmc8380
80 - qcom,pmcx0102
81 - qcom,pmd8028
82 - qcom,pmd9635
83 - qcom,pmh0101
84 - qcom,pmh0104
85 - qcom,pmh0110
86 - qcom,pmi632
87 - qcom,pmi8950
88 - qcom,pmi8962
89 - qcom,pmi8994
90 - qcom,pmi8998
91 - qcom,pmih0108
92 - qcom,pmiv0104
93 - qcom,pmk8002
94 - qcom,pmk8350
95 - qcom,pmk8550
96 - qcom,pmk8850
97 - qcom,pmm8155au
98 - qcom,pmm8654au
99 - qcom,pmp8074
100 - qcom,pmr735a
101 - qcom,pmr735b
102 - qcom,pmr735d
103 - qcom,pms405
104 - qcom,pmx55
105 - qcom,pmx65
106 - qcom,pmx75
107 - qcom,smb2351
108 - qcom,smb2360
109 - qcom,smb2370
110 - const: qcom,spmi-pmic
111
112 reg:
113 minItems: 1
114 maxItems: 2
115
116 '#address-cells':
117 const: 1
118
119 '#size-cells':
120 const: 0
121
122 labibb:
123 type: object
124 $ref: /schemas/regulator/qcom-labibb-regulator.yaml#
125
126 regulators:
127 type: object
128 $ref: /schemas/regulator/qcom,spmi-regulator.yaml#
129
130 pwm:
131 type: object
132 $ref: /schemas/leds/leds-qcom-lpg.yaml#
133
134 patternProperties:
135 "^adc@[0-9a-f]+$":
136 type: object
137 oneOf:
138 - $ref: /schemas/iio/adc/qcom,spmi-iadc.yaml#
139 - $ref: /schemas/iio/adc/qcom,spmi-rradc.yaml#
140 - $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml#
141
142 "^adc-tm@[0-9a-f]+$":
143 type: object
144 # ref depends on compatible, see allOf below
145
146 "^audio-codec@[0-9a-f]+$":
147 type: object
148 $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml#
149
150 "^battery@[0-9a-f]+$":
151 type: object
152 oneOf:
153 - $ref: /schemas/power/supply/qcom,pm8916-bms-vm.yaml#
154
155 "^charger@[0-9a-f]+$":
156 type: object
157 oneOf:
158 - $ref: /schemas/power/supply/qcom,pm8916-lbc.yaml#
159 - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml#
160 - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml#
161 - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml#
162
163 "gpio@[0-9a-f]+$":
164 type: object
165 $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml#
166
167 "^led-controller@[0-9a-f]+$":
168 type: object
169 $ref: /schemas/leds/qcom,spmi-flash-led.yaml#
170
171 "^nvram@[0-9a-f]+$":
172 type: object
173 $ref: /schemas/nvmem/qcom,spmi-sdam.yaml#
174
175 "^pbs@[0-9a-f]+$":
176 type: object
177 $ref: /schemas/soc/qcom/qcom,pbs.yaml#
178
179 "phy@[0-9a-f]+$":
180 type: object
181 $ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml#
182
183 "pon@[0-9a-f]+$":
184 type: object
185 $ref: /schemas/power/reset/qcom,pon.yaml#
186
187 "^rtc@[0-9a-f]+$":
188 type: object
189 $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#
190
191 "^temp-alarm@[0-9a-f]+$":
192 type: object
193 $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml#
194
195 "^typec@[0-9a-f]+$":
196 type: object
197 $ref: /schemas/usb/qcom,pmic-typec.yaml#
198
199 "^usb-detect@[0-9a-f]+$":
200 type: object
201 $ref: /schemas/extcon/qcom,pm8941-misc.yaml#
202
203 "^usb-vbus-regulator@[0-9a-f]+$":
204 type: object
205 $ref: /schemas/regulator/qcom,usb-vbus-regulator.yaml#
206
207 "^vibrator@[0-9a-f]+$":
208 type: object
209 $ref: /schemas/input/qcom,pm8xxx-vib.yaml#
210
211 "^mpps@[0-9a-f]+$":
212 type: object
213 $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml#
214
215 "(.*)?(wled|leds)@[0-9a-f]+$":
216 type: object
217 $ref: /schemas/leds/backlight/qcom-wled.yaml#
218 unevaluatedProperties: false
219
220 required:
221 - compatible
222 - reg
223
224 allOf:
225 - if:
226 properties:
227 compatible:
228 contains:
229 enum:
230 - qcom,pm8998
231 then:
232 patternProperties:
233 "^adc-tm@[0-9a-f]+$":
234 $ref: /schemas/thermal/qcom-spmi-adc-tm-hc.yaml#
235 else:
236 patternProperties:
237 "^adc-tm@[0-9a-f]+$":
238 $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml#
239
240 additionalProperties: false
241
242 examples:
243 - |
244 #include <dt-bindings/spmi/spmi.h>
245 #include <dt-bindings/interrupt-controller/irq.h>
246 #include <dt-bindings/interrupt-controller/arm-gic.h>
247
248 spmi@c440000 {
249 compatible = "qcom,spmi-pmic-arb";
250 reg = <0x0c440000 0x1100>,
251 <0x0c600000 0x2000000>,
252 <0x0e600000 0x100000>,
253 <0x0e700000 0xa0000>,
254 <0x0c40a000 0x26000>;
255 reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
256 interrupt-names = "periph_irq";
257 interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>;
258 qcom,ee = <0>;
259 qcom,channel = <0>;
260 #address-cells = <2>;
261 #size-cells = <0>;
262 interrupt-controller;
263 #interrupt-cells = <4>;
264
265 pmic@2 {
266 compatible = "qcom,pmi8998", "qcom,spmi-pmic";
267 reg = <0x2 SPMI_USID>;
268 #address-cells = <1>;
269 #size-cells = <0>;
270
271 gpio@c000 {
272 compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
273 reg = <0xc000>;
274 gpio-controller;
275 gpio-ranges = <&pmi8998_gpio 0 0 14>;
276 #gpio-cells = <2>;
277 interrupt-controller;
278 #interrupt-cells = <2>;
279 };
280 };
281 };
282
283 - |
284 #include <dt-bindings/input/input.h>
285 #include <dt-bindings/interrupt-controller/irq.h>
286 #include <dt-bindings/interrupt-controller/arm-gic.h>
287 #include <dt-bindings/iio/qcom,spmi-vadc.h>
288 #include <dt-bindings/spmi/spmi.h>
289
290 pmic@0 {
291 compatible = "qcom,pm6150", "qcom,spmi-pmic";
292 reg = <0x0 SPMI_USID>;
293 #address-cells = <1>;
294 #size-cells = <0>;
295
296 pon@800 {
297 compatible = "qcom,pm8998-pon";
298 reg = <0x800>;
299 mode-bootloader = <0x2>;
300 mode-recovery = <0x1>;
301
302 pwrkey {
303 compatible = "qcom,pm8941-pwrkey";
304 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
305 debounce = <15625>;
306 bias-pull-up;
307 linux,code = <KEY_POWER>;
308 };
309 };
310
311 temp-alarm@2400 {
312 compatible = "qcom,spmi-temp-alarm";
313 reg = <0x2400>;
314 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
315 io-channels = <&pm6150_adc ADC5_DIE_TEMP>;
316 io-channel-names = "thermal";
317 #thermal-sensor-cells = <0>;
318 };
319
320 pm6150_adc: adc@3100 {
321 compatible = "qcom,spmi-adc5";
322 reg = <0x3100>;
323 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
324 #address-cells = <1>;
325 #size-cells = <0>;
326 #io-channel-cells = <1>;
327
328 channel@6 {
329 reg = <ADC5_DIE_TEMP>;
330 label = "die_temp";
331 };
332
333 channel@4f {
334 reg = <ADC5_AMUX_THM3_100K_PU>;
335 qcom,ratiometric;
336 qcom,hw-settle-time = <200>;
337 };
338 };
339
340 adc-tm@3500 {
341 compatible = "qcom,spmi-adc-tm5";
342 reg = <0x3500>;
343 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
344 #thermal-sensor-cells = <1>;
345 #address-cells = <1>;
346 #size-cells = <0>;
347
348 charger-thermistor@0 {
349 reg = <0>;
350 io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>;
351 qcom,ratiometric;
352 qcom,hw-settle-time-us = <200>;
353 };
354 };
355
356 gpio@c000 {
357 compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio";
358 reg = <0xc000>;
359 gpio-controller;
360 gpio-ranges = <&pm6150_gpio 0 0 10>;
361 #gpio-cells = <2>;
362 interrupt-controller;
363 #interrupt-cells = <2>;
364 };
365 };