1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2024, Linaro Limited
4 */
5
6#include <dt-bindings/input/input.h>
7#include <dt-bindings/input/linux-event-codes.h>
8#include <dt-bindings/interrupt-controller/irq.h>
9#include <dt-bindings/spmi/spmi.h>
10
11/ {
12	thermal-zones {
13		pm8550-thermal {
14			polling-delay-passive = <100>;
15
16			thermal-sensors = <&pm8550_temp_alarm>;
17
18			trips {
19				trip0 {
20					temperature = <95000>;
21					hysteresis = <0>;
22					type = "passive";
23				};
24
25				trip1 {
26					temperature = <115000>;
27					hysteresis = <0>;
28					type = "hot";
29				};
30			};
31		};
32
33		pm8550ve-2-thermal {
34			polling-delay-passive = <100>;
35
36			thermal-sensors = <&pm8550ve_2_temp_alarm>;
37
38			trips {
39				trip0 {
40					temperature = <95000>;
41					hysteresis = <0>;
42					type = "passive";
43				};
44
45				trip1 {
46					temperature = <115000>;
47					hysteresis = <0>;
48					type = "hot";
49				};
50			};
51		};
52
53		pmc8380-3-thermal {
54			polling-delay-passive = <100>;
55
56			thermal-sensors = <&pmc8380_3_temp_alarm>;
57
58			trips {
59				trip0 {
60					temperature = <95000>;
61					hysteresis = <0>;
62					type = "passive";
63				};
64
65				trip1 {
66					temperature = <115000>;
67					hysteresis = <0>;
68					type = "hot";
69				};
70			};
71		};
72
73		pmc8380-4-thermal {
74			polling-delay-passive = <100>;
75
76			thermal-sensors = <&pmc8380_4_temp_alarm>;
77
78			trips {
79				trip0 {
80					temperature = <95000>;
81					hysteresis = <0>;
82					type = "passive";
83				};
84
85				trip1 {
86					temperature = <115000>;
87					hysteresis = <0>;
88					type = "hot";
89				};
90			};
91		};
92
93		pmc8380-5-thermal {
94			polling-delay-passive = <100>;
95
96			thermal-sensors = <&pmc8380_5_temp_alarm>;
97
98			trips {
99				trip0 {
100					temperature = <95000>;
101					hysteresis = <0>;
102					type = "passive";
103				};
104
105				trip1 {
106					temperature = <115000>;
107					hysteresis = <0>;
108					type = "hot";
109				};
110			};
111		};
112
113		pmc8380-6-thermal {
114			polling-delay-passive = <100>;
115
116			thermal-sensors = <&pmc8380_6_temp_alarm>;
117
118			trips {
119				trip0 {
120					temperature = <95000>;
121					hysteresis = <0>;
122					type = "passive";
123				};
124
125				trip1 {
126					temperature = <115000>;
127					hysteresis = <0>;
128					type = "hot";
129				};
130			};
131		};
132
133		pm8550ve-8-thermal {
134			polling-delay-passive = <100>;
135
136			thermal-sensors = <&pm8550ve_8_temp_alarm>;
137
138			trips {
139				trip0 {
140					temperature = <95000>;
141					hysteresis = <0>;
142					type = "passive";
143				};
144
145				trip1 {
146					temperature = <115000>;
147					hysteresis = <0>;
148					type = "hot";
149				};
150			};
151		};
152
153		pm8550ve-9-thermal {
154			polling-delay-passive = <100>;
155
156			thermal-sensors = <&pm8550ve_9_temp_alarm>;
157
158			trips {
159				trip0 {
160					temperature = <95000>;
161					hysteresis = <0>;
162					type = "passive";
163				};
164
165				trip1 {
166					temperature = <115000>;
167					hysteresis = <0>;
168					type = "hot";
169				};
170			};
171		};
172
173		pm8010-thermal {
174			polling-delay-passive = <100>;
175
176			thermal-sensors = <&pm8010_temp_alarm>;
177
178			trips {
179				trip0 {
180					temperature = <95000>;
181					hysteresis = <0>;
182					type = "passive";
183				};
184
185				trip1 {
186					temperature = <115000>;
187					hysteresis = <0>;
188					type = "hot";
189				};
190			};
191		};
192	};
193};
194
195&spmi_bus0 {
196	/* PMK8380 */
197	pmk8550: pmic@0 {
198		compatible = "qcom,pm8550", "qcom,spmi-pmic";
199		reg = <0x0 SPMI_USID>;
200		#address-cells = <1>;
201		#size-cells = <0>;
202
203		pmk8550_pon: pon@1300 {
204			compatible = "qcom,pmk8350-pon";
205			reg = <0x1300>, <0x800>;
206			reg-names = "hlos", "pbs";
207
208			pon_pwrkey: pwrkey {
209				compatible = "qcom,pmk8350-pwrkey";
210				interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
211				linux,code = <KEY_POWER>;
212			};
213
214			pon_resin: resin {
215				compatible = "qcom,pmk8350-resin";
216				interrupts = <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
217				status = "disabled";
218			};
219		};
220
221		pmk8550_rtc: rtc@6100 {
222			compatible = "qcom,pmk8350-rtc";
223			reg = <0x6100>, <0x6200>;
224			reg-names = "rtc", "alarm";
225			interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
226			/* Not yet sure what blocks access */
227			status = "reserved";
228		};
229
230		pmk8550_sdam_2: nvram@7100 {
231			compatible = "qcom,spmi-sdam";
232			reg = <0x7100>;
233			#address-cells = <1>;
234			#size-cells = <1>;
235			ranges = <0 0x7100 0x100>;
236
237			reboot_reason: reboot-reason@48 {
238				reg = <0x48 0x1>;
239				bits = <1 7>;
240			};
241		};
242
243		pmk8550_gpios: gpio@8800 {
244			compatible = "qcom,pmk8550-gpio", "qcom,spmi-gpio";
245			reg = <0xb800>;
246			gpio-controller;
247			gpio-ranges = <&pmk8550_gpios 0 0 6>;
248			#gpio-cells = <2>;
249			interrupt-controller;
250			#interrupt-cells = <2>;
251		};
252
253		pmk8550_pwm: pwm {
254			compatible = "qcom,pmk8550-pwm";
255
256			#pwm-cells = <2>;
257
258			status = "disabled";
259		};
260	};
261
262	/* PMC8380C */
263	pm8550: pmic@1 {
264		compatible = "qcom,pm8550", "qcom,spmi-pmic";
265		reg = <0x1 SPMI_USID>;
266		#address-cells = <1>;
267		#size-cells = <0>;
268
269		pm8550_temp_alarm: temp-alarm@a00 {
270			compatible = "qcom,spmi-temp-alarm";
271			reg = <0xa00>;
272			interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
273			#thermal-sensor-cells = <0>;
274		};
275
276		pm8550_gpios: gpio@8800 {
277			compatible = "qcom,pm8550-gpio", "qcom,spmi-gpio";
278			reg = <0x8800>;
279			gpio-controller;
280			gpio-ranges = <&pm8550_gpios 0 0 12>;
281			#gpio-cells = <2>;
282			interrupt-controller;
283			#interrupt-cells = <2>;
284		};
285
286		pm8550_flash: led-controller@ee00 {
287			compatible = "qcom,pm8550-flash-led", "qcom,spmi-flash-led";
288			reg = <0xee00>;
289			status = "disabled";
290		};
291
292		pm8550_pwm: pwm {
293			compatible = "qcom,pm8550-pwm", "qcom,pm8350c-pwm";
294			#pwm-cells = <2>;
295
296			status = "disabled";
297		};
298	};
299
300	/* PMC8380VE */
301	pm8550ve_2: pmic@2 {
302		compatible = "qcom,pm8550", "qcom,spmi-pmic";
303		reg = <0x2 SPMI_USID>;
304		#address-cells = <1>;
305		#size-cells = <0>;
306
307		pm8550ve_2_temp_alarm: temp-alarm@a00 {
308			compatible = "qcom,spmi-temp-alarm";
309			reg = <0xa00>;
310			interrupts = <0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
311			#thermal-sensor-cells = <0>;
312		};
313
314		pm8550ve_2_gpios: gpio@8800 {
315			compatible = "qcom,pm8550ve-gpio", "qcom,spmi-gpio";
316			reg = <0x8800>;
317			gpio-controller;
318			gpio-ranges = <&pm8550ve_2_gpios 0 0 8>;
319			#gpio-cells = <2>;
320			interrupt-controller;
321			#interrupt-cells = <2>;
322		};
323	};
324
325	/* PMC8380 is actually not a PM8550 series rebrand */
326	pmc8380_3: pmic@3 {
327		compatible = "qcom,pmc8380", "qcom,spmi-pmic";
328		reg = <0x3 SPMI_USID>;
329		#address-cells = <1>;
330		#size-cells = <0>;
331
332		pmc8380_3_temp_alarm: temp-alarm@a00 {
333			compatible = "qcom,spmi-temp-alarm";
334			reg = <0xa00>;
335			interrupts = <0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
336			#thermal-sensor-cells = <0>;
337		};
338
339		pmc8380_3_gpios: gpio@8800 {
340			compatible = "qcom,pmc8380-gpio", "qcom,spmi-gpio";
341			reg = <0x8800>;
342			gpio-controller;
343			gpio-ranges = <&pmc8380_3_gpios 0 0 10>;
344			#gpio-cells = <2>;
345			interrupt-controller;
346			#interrupt-cells = <2>;
347		};
348	};
349
350	pmc8380_4: pmic@4 {
351		compatible = "qcom,pmc8380", "qcom,spmi-pmic";
352		reg = <0x4 SPMI_USID>;
353		#address-cells = <1>;
354		#size-cells = <0>;
355
356		pmc8380_4_temp_alarm: temp-alarm@a00 {
357			compatible = "qcom,spmi-temp-alarm";
358			reg = <0xa00>;
359			interrupts = <0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
360			#thermal-sensor-cells = <0>;
361		};
362
363		pmc8380_4_gpios: gpio@8800 {
364			compatible = "qcom,pmc8380-gpio", "qcom,spmi-gpio";
365			reg = <0x8800>;
366			gpio-controller;
367			gpio-ranges = <&pmc8380_4_gpios 0 0 10>;
368			#gpio-cells = <2>;
369			interrupt-controller;
370			#interrupt-cells = <2>;
371		};
372	};
373
374	pmc8380_5: pmic@5 {
375		compatible = "qcom,pmc8380", "qcom,spmi-pmic";
376		reg = <0x5 SPMI_USID>;
377		#address-cells = <1>;
378		#size-cells = <0>;
379
380		pmc8380_5_temp_alarm: temp-alarm@a00 {
381			compatible = "qcom,spmi-temp-alarm";
382			reg = <0xa00>;
383			interrupts = <0x5 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
384			#thermal-sensor-cells = <0>;
385		};
386
387		pmc8380_5_gpios: gpio@8800 {
388			compatible = "qcom,pmc8380-gpio", "qcom,spmi-gpio";
389			reg = <0x8800>;
390			gpio-controller;
391			gpio-ranges = <&pmc8380_5_gpios 0 0 10>;
392			#gpio-cells = <2>;
393			interrupt-controller;
394			#interrupt-cells = <2>;
395		};
396	};
397
398	pmc8380_6: pmic@6 {
399		compatible = "qcom,pmc8380", "qcom,spmi-pmic";
400		reg = <0x6 SPMI_USID>;
401		#address-cells = <1>;
402		#size-cells = <0>;
403
404		pmc8380_6_temp_alarm: temp-alarm@a00 {
405			compatible = "qcom,spmi-temp-alarm";
406			reg = <0xa00>;
407			interrupts = <0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
408			#thermal-sensor-cells = <0>;
409		};
410
411		pmc8380_6_gpios: gpio@8800 {
412			compatible = "qcom,pmc8380-gpio", "qcom,spmi-gpio";
413			reg = <0x8800>;
414			gpio-controller;
415			gpio-ranges = <&pmc8380_6_gpios 0 0 10>;
416			#gpio-cells = <2>;
417			interrupt-controller;
418			#interrupt-cells = <2>;
419		};
420	};
421
422	/* PMC8380VE */
423	pm8550ve_8: pmic@8 {
424		compatible = "qcom,pm8550", "qcom,spmi-pmic";
425		reg = <0x8 SPMI_USID>;
426		#address-cells = <1>;
427		#size-cells = <0>;
428
429		pm8550ve_8_temp_alarm: temp-alarm@a00 {
430			compatible = "qcom,spmi-temp-alarm";
431			reg = <0xa00>;
432			interrupts = <0x8 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
433			#thermal-sensor-cells = <0>;
434		};
435
436		pm8550ve_8_gpios: gpio@8800 {
437			compatible = "qcom,pm8550ve-gpio", "qcom,spmi-gpio";
438			reg = <0x8800>;
439			gpio-controller;
440			gpio-ranges = <&pm8550ve_8_gpios 0 0 8>;
441			#gpio-cells = <2>;
442			interrupt-controller;
443			#interrupt-cells = <2>;
444		};
445	};
446
447	/* PMC8380VE */
448	pm8550ve_9: pmic@9 {
449		compatible = "qcom,pm8550", "qcom,spmi-pmic";
450		reg = <0x9 SPMI_USID>;
451		#address-cells = <1>;
452		#size-cells = <0>;
453
454		pm8550ve_9_temp_alarm: temp-alarm@a00 {
455			compatible = "qcom,spmi-temp-alarm";
456			reg = <0xa00>;
457			interrupts = <0x9 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
458			#thermal-sensor-cells = <0>;
459		};
460
461		pm8550ve_9_gpios: gpio@8800 {
462			compatible = "qcom,pm8550ve-gpio", "qcom,spmi-gpio";
463			reg = <0x8800>;
464			gpio-controller;
465			gpio-ranges = <&pm8550ve_9_gpios 0 0 8>;
466			#gpio-cells = <2>;
467			interrupt-controller;
468			#interrupt-cells = <2>;
469		};
470	};
471
472	pm8010: pmic@c {
473		compatible = "qcom,pm8010", "qcom,spmi-pmic";
474		reg = <0xc SPMI_USID>;
475		#address-cells = <1>;
476		#size-cells = <0>;
477
478		pm8010_temp_alarm: temp-alarm@2400 {
479			compatible = "qcom,spmi-temp-alarm";
480			reg = <0x2400>;
481			interrupts = <0xc 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
482			#thermal-sensor-cells = <0>;
483		};
484	};
485};
486
487&spmi_bus1 {
488	smb2360_0: pmic@7 {
489		compatible = "qcom,smb2360", "qcom,spmi-pmic";
490		reg = <0x7 SPMI_USID>;
491		#address-cells = <1>;
492		#size-cells = <0>;
493
494		smb2360_0_eusb2_repeater: phy@fd00 {
495			compatible = "qcom,smb2360-eusb2-repeater";
496			reg = <0xfd00>;
497			#phy-cells = <0>;
498		};
499	};
500
501	smb2360_1: pmic@a {
502		compatible = "qcom,smb2360", "qcom,spmi-pmic";
503		reg = <0xa SPMI_USID>;
504		#address-cells = <1>;
505		#size-cells = <0>;
506
507		smb2360_1_eusb2_repeater: phy@fd00 {
508			compatible = "qcom,smb2360-eusb2-repeater";
509			reg = <0xfd00>;
510			#phy-cells = <0>;
511		};
512	};
513
514	smb2360_2: pmic@b {
515		compatible = "qcom,smb2360", "qcom,spmi-pmic";
516		reg = <0xb SPMI_USID>;
517		#address-cells = <1>;
518		#size-cells = <0>;
519
520		status = "disabled";
521
522		smb2360_2_eusb2_repeater: phy@fd00 {
523			compatible = "qcom,smb2360-eusb2-repeater";
524			reg = <0xfd00>;
525			#phy-cells = <0>;
526		};
527	};
528
529	smb2360_3: pmic@c {
530		compatible = "qcom,smb2360", "qcom,spmi-pmic";
531		reg = <0xc SPMI_USID>;
532		#address-cells = <1>;
533		#size-cells = <0>;
534
535		status = "disabled";
536
537		smb2360_3_eusb2_repeater: phy@fd00 {
538			compatible = "qcom,smb2360-eusb2-repeater";
539			reg = <0xfd00>;
540			#phy-cells = <0>;
541		};
542	};
543};
544