blob: b7f01cbb8fffa0135bd68b4cc3484bea41c123e0 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# 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
7title: Qualcomm SPMI PMICs multi-function device
8
9description: |
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
23maintainers:
24 - Stephen Boyd <sboyd@kernel.org>
25
26properties:
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,pm8004
47 - qcom,pm8005
48 - qcom,pm8009
49 - qcom,pm8010
50 - qcom,pm8019
51 - qcom,pm8028
52 - qcom,pm8110
53 - qcom,pm8150
54 - qcom,pm8150b
55 - qcom,pm8150c
56 - qcom,pm8150l
57 - qcom,pm8226
58 - qcom,pm8350
59 - qcom,pm8350b
60 - qcom,pm8350c
61 - qcom,pm8450
62 - qcom,pm8550
63 - qcom,pm8550b
64 - qcom,pm8550ve
65 - qcom,pm8550vs
66 - qcom,pm8841
67 - qcom,pm8909
68 - qcom,pm8916
Tom Rini93743d22024-04-01 09:08:13 -040069 - qcom,pm8937
Tom Rini53633a82024-02-29 12:33:36 -050070 - qcom,pm8941
71 - qcom,pm8950
72 - qcom,pm8953
73 - qcom,pm8994
74 - qcom,pm8998
75 - qcom,pma8084
76 - qcom,pmc8180
77 - qcom,pmc8180c
78 - qcom,pmd9635
79 - qcom,pmi632
80 - qcom,pmi8950
81 - qcom,pmi8962
82 - qcom,pmi8994
83 - qcom,pmi8998
84 - qcom,pmk8002
85 - qcom,pmk8350
86 - qcom,pmk8550
87 - qcom,pmm8155au
88 - qcom,pmm8654au
89 - qcom,pmp8074
90 - qcom,pmr735a
91 - qcom,pmr735b
92 - qcom,pmr735d
93 - qcom,pms405
94 - qcom,pmx55
95 - qcom,pmx65
96 - qcom,pmx75
97 - qcom,smb2351
98 - const: qcom,spmi-pmic
99
100 reg:
101 minItems: 1
102 maxItems: 2
103
104 '#address-cells':
105 const: 1
106
107 '#size-cells':
108 const: 0
109
110 labibb:
111 type: object
112 $ref: /schemas/regulator/qcom-labibb-regulator.yaml#
113
114 regulators:
115 type: object
116 $ref: /schemas/regulator/qcom,spmi-regulator.yaml#
117
118 pwm:
119 type: object
120 $ref: /schemas/leds/leds-qcom-lpg.yaml#
121
122patternProperties:
123 "^adc@[0-9a-f]+$":
124 type: object
125 oneOf:
126 - $ref: /schemas/iio/adc/qcom,spmi-iadc.yaml#
127 - $ref: /schemas/iio/adc/qcom,spmi-rradc.yaml#
128 - $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml#
129
130 "^adc-tm@[0-9a-f]+$":
131 type: object
132 # ref depends on compatible, see allOf below
133
134 "^audio-codec@[0-9a-f]+$":
135 type: object
136 $ref: /schemas/sound/qcom,pm8916-wcd-analog-codec.yaml#
137
Tom Rini93743d22024-04-01 09:08:13 -0400138 "^battery@[0-9a-f]+$":
139 type: object
140 oneOf:
141 - $ref: /schemas/power/supply/qcom,pm8916-bms-vm.yaml#
142
Tom Rini53633a82024-02-29 12:33:36 -0500143 "^charger@[0-9a-f]+$":
144 type: object
145 oneOf:
Tom Rini93743d22024-04-01 09:08:13 -0400146 - $ref: /schemas/power/supply/qcom,pm8916-lbc.yaml#
Tom Rini53633a82024-02-29 12:33:36 -0500147 - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml#
148 - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml#
149 - $ref: /schemas/power/supply/qcom,pmi8998-charger.yaml#
150
151 "gpio@[0-9a-f]+$":
152 type: object
153 $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml#
154
155 "^led-controller@[0-9a-f]+$":
156 type: object
157 $ref: /schemas/leds/qcom,spmi-flash-led.yaml#
158
159 "^nvram@[0-9a-f]+$":
160 type: object
161 $ref: /schemas/nvmem/qcom,spmi-sdam.yaml#
162
Tom Rini762f85b2024-07-20 11:15:10 -0600163 "^pbs@[0-9a-f]+$":
164 type: object
165 $ref: /schemas/soc/qcom/qcom,pbs.yaml#
166
Tom Rini53633a82024-02-29 12:33:36 -0500167 "phy@[0-9a-f]+$":
168 type: object
169 $ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml#
170
171 "pon@[0-9a-f]+$":
172 type: object
173 $ref: /schemas/power/reset/qcom,pon.yaml#
174
175 "^rtc@[0-9a-f]+$":
176 type: object
177 $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#
178
179 "^temp-alarm@[0-9a-f]+$":
180 type: object
181 $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml#
182
183 "^typec@[0-9a-f]+$":
184 type: object
185 $ref: /schemas/usb/qcom,pmic-typec.yaml#
186
187 "^usb-detect@[0-9a-f]+$":
188 type: object
189 $ref: /schemas/extcon/qcom,pm8941-misc.yaml#
190
191 "^usb-vbus-regulator@[0-9a-f]+$":
192 type: object
193 $ref: /schemas/regulator/qcom,usb-vbus-regulator.yaml#
194
195 "^vibrator@[0-9a-f]+$":
196 type: object
197 $ref: /schemas/input/qcom,pm8xxx-vib.yaml#
198
199 "^mpps@[0-9a-f]+$":
200 type: object
201 $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml#
202
203 "(.*)?(wled|leds)@[0-9a-f]+$":
204 type: object
205 $ref: /schemas/leds/backlight/qcom-wled.yaml#
206 unevaluatedProperties: false
207
208required:
209 - compatible
210 - reg
211
212allOf:
213 - if:
214 properties:
215 compatible:
216 contains:
217 enum:
218 - qcom,pm8998
219 then:
220 patternProperties:
221 "^adc-tm@[0-9a-f]+$":
222 $ref: /schemas/thermal/qcom-spmi-adc-tm-hc.yaml#
223 else:
224 patternProperties:
225 "^adc-tm@[0-9a-f]+$":
226 $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml#
227
228additionalProperties: false
229
230examples:
231 - |
232 #include <dt-bindings/spmi/spmi.h>
233 #include <dt-bindings/interrupt-controller/irq.h>
234 #include <dt-bindings/interrupt-controller/arm-gic.h>
235
236 spmi@c440000 {
237 compatible = "qcom,spmi-pmic-arb";
238 reg = <0x0c440000 0x1100>,
239 <0x0c600000 0x2000000>,
240 <0x0e600000 0x100000>,
241 <0x0e700000 0xa0000>,
242 <0x0c40a000 0x26000>;
243 reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
244 interrupt-names = "periph_irq";
245 interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>;
246 qcom,ee = <0>;
247 qcom,channel = <0>;
248 #address-cells = <2>;
249 #size-cells = <0>;
250 interrupt-controller;
251 #interrupt-cells = <4>;
252
253 pmic@2 {
254 compatible = "qcom,pmi8998", "qcom,spmi-pmic";
255 reg = <0x2 SPMI_USID>;
256 #address-cells = <1>;
257 #size-cells = <0>;
258
259 gpio@c000 {
260 compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
261 reg = <0xc000>;
262 gpio-controller;
263 gpio-ranges = <&pmi8998_gpio 0 0 14>;
264 #gpio-cells = <2>;
265 interrupt-controller;
266 #interrupt-cells = <2>;
267 };
268 };
269 };
270
271 - |
272 #include <dt-bindings/input/input.h>
273 #include <dt-bindings/interrupt-controller/irq.h>
274 #include <dt-bindings/interrupt-controller/arm-gic.h>
275 #include <dt-bindings/iio/qcom,spmi-vadc.h>
276 #include <dt-bindings/spmi/spmi.h>
277
278 pmic@0 {
279 compatible = "qcom,pm6150", "qcom,spmi-pmic";
280 reg = <0x0 SPMI_USID>;
281 #address-cells = <1>;
282 #size-cells = <0>;
283
284 pon@800 {
285 compatible = "qcom,pm8998-pon";
286 reg = <0x800>;
287 mode-bootloader = <0x2>;
288 mode-recovery = <0x1>;
289
290 pwrkey {
291 compatible = "qcom,pm8941-pwrkey";
292 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
293 debounce = <15625>;
294 bias-pull-up;
295 linux,code = <KEY_POWER>;
296 };
297 };
298
299 temp-alarm@2400 {
300 compatible = "qcom,spmi-temp-alarm";
301 reg = <0x2400>;
302 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
303 io-channels = <&pm6150_adc ADC5_DIE_TEMP>;
304 io-channel-names = "thermal";
305 #thermal-sensor-cells = <0>;
306 };
307
308 pm6150_adc: adc@3100 {
309 compatible = "qcom,spmi-adc5";
310 reg = <0x3100>;
311 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
312 #address-cells = <1>;
313 #size-cells = <0>;
314 #io-channel-cells = <1>;
315
316 channel@6 {
317 reg = <ADC5_DIE_TEMP>;
318 label = "die_temp";
319 };
320
321 channel@4f {
322 reg = <ADC5_AMUX_THM3_100K_PU>;
323 qcom,ratiometric;
324 qcom,hw-settle-time = <200>;
325 };
326 };
327
328 adc-tm@3500 {
329 compatible = "qcom,spmi-adc-tm5";
330 reg = <0x3500>;
331 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
332 #thermal-sensor-cells = <1>;
333 #address-cells = <1>;
334 #size-cells = <0>;
335
336 charger-thermistor@0 {
337 reg = <0>;
338 io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>;
339 qcom,ratiometric;
340 qcom,hw-settle-time-us = <200>;
341 };
342 };
343
344 gpio@c000 {
345 compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio";
346 reg = <0xc000>;
347 gpio-controller;
348 gpio-ranges = <&pm6150_gpio 0 0 10>;
349 #gpio-cells = <2>;
350 interrupt-controller;
351 #interrupt-cells = <2>;
352 };
353 };