1*d3302290SVinod Koul// SPDX-License-Identifier: BSD-3-Clause
2*d3302290SVinod Koul/*
3*d3302290SVinod Koul * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
4*d3302290SVinod Koul * Copyright (c) 2021-2023, Linaro Limited
5*d3302290SVinod Koul */
6*d3302290SVinod Koul
7*d3302290SVinod Koul#include <dt-bindings/input/input.h>
8*d3302290SVinod Koul#include <dt-bindings/interrupt-controller/irq.h>
9*d3302290SVinod Koul#include <dt-bindings/spmi/spmi.h>
10*d3302290SVinod Koul#include <dt-bindings/iio/qcom,spmi-vadc.h>
11*d3302290SVinod Koul
12*d3302290SVinod Koul/ {
13*d3302290SVinod Koul	thermal-zones {
14*d3302290SVinod Koul		pmc8180-thermal {
15*d3302290SVinod Koul			polling-delay-passive = <100>;
16*d3302290SVinod Koul			polling-delay = <0>;
17*d3302290SVinod Koul
18*d3302290SVinod Koul			thermal-sensors = <&pmc8180_temp>;
19*d3302290SVinod Koul
20*d3302290SVinod Koul			trips {
21*d3302290SVinod Koul				trip0 {
22*d3302290SVinod Koul					temperature = <95000>;
23*d3302290SVinod Koul					hysteresis = <0>;
24*d3302290SVinod Koul					type = "passive";
25*d3302290SVinod Koul				};
26*d3302290SVinod Koul
27*d3302290SVinod Koul				trip1 {
28*d3302290SVinod Koul					temperature = <115000>;
29*d3302290SVinod Koul					hysteresis = <0>;
30*d3302290SVinod Koul					type = "hot";
31*d3302290SVinod Koul				};
32*d3302290SVinod Koul
33*d3302290SVinod Koul				trip2 {
34*d3302290SVinod Koul					temperature = <145000>;
35*d3302290SVinod Koul					hysteresis = <0>;
36*d3302290SVinod Koul					type = "critical";
37*d3302290SVinod Koul				};
38*d3302290SVinod Koul			};
39*d3302290SVinod Koul		};
40*d3302290SVinod Koul
41*d3302290SVinod Koul		pmc8180c-thermal {
42*d3302290SVinod Koul			polling-delay-passive = <100>;
43*d3302290SVinod Koul			polling-delay = <0>;
44*d3302290SVinod Koul
45*d3302290SVinod Koul			thermal-sensors = <&pmc8180c_temp>;
46*d3302290SVinod Koul
47*d3302290SVinod Koul			trips {
48*d3302290SVinod Koul				trip0 {
49*d3302290SVinod Koul					temperature = <95000>;
50*d3302290SVinod Koul					hysteresis = <0>;
51*d3302290SVinod Koul					type = "passive";
52*d3302290SVinod Koul				};
53*d3302290SVinod Koul
54*d3302290SVinod Koul				trip1 {
55*d3302290SVinod Koul					temperature = <115000>;
56*d3302290SVinod Koul					hysteresis = <0>;
57*d3302290SVinod Koul					type = "hot";
58*d3302290SVinod Koul				};
59*d3302290SVinod Koul
60*d3302290SVinod Koul				trip2 {
61*d3302290SVinod Koul					temperature = <145000>;
62*d3302290SVinod Koul					hysteresis = <0>;
63*d3302290SVinod Koul					type = "critical";
64*d3302290SVinod Koul				};
65*d3302290SVinod Koul			};
66*d3302290SVinod Koul		};
67*d3302290SVinod Koul	};
68*d3302290SVinod Koul};
69*d3302290SVinod Koul
70*d3302290SVinod Koul&spmi_bus {
71*d3302290SVinod Koul	pmc8180_0: pmic@0 {
72*d3302290SVinod Koul		compatible = "qcom,pm8150", "qcom,spmi-pmic";
73*d3302290SVinod Koul		reg = <0x0 SPMI_USID>;
74*d3302290SVinod Koul		#address-cells = <1>;
75*d3302290SVinod Koul		#size-cells = <0>;
76*d3302290SVinod Koul
77*d3302290SVinod Koul		pon: power-on@800 {
78*d3302290SVinod Koul			compatible = "qcom,pm8916-pon";
79*d3302290SVinod Koul			reg = <0x0800>;
80*d3302290SVinod Koul			pwrkey {
81*d3302290SVinod Koul				compatible = "qcom,pm8941-pwrkey";
82*d3302290SVinod Koul				interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
83*d3302290SVinod Koul				debounce = <15625>;
84*d3302290SVinod Koul				bias-pull-up;
85*d3302290SVinod Koul				linux,code = <KEY_POWER>;
86*d3302290SVinod Koul
87*d3302290SVinod Koul				status = "disabled";
88*d3302290SVinod Koul			};
89*d3302290SVinod Koul		};
90*d3302290SVinod Koul
91*d3302290SVinod Koul		pmc8180_temp: temp-alarm@2400 {
92*d3302290SVinod Koul			compatible = "qcom,spmi-temp-alarm";
93*d3302290SVinod Koul			reg = <0x2400>;
94*d3302290SVinod Koul			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
95*d3302290SVinod Koul			io-channels = <&pmc8180_adc ADC5_DIE_TEMP>;
96*d3302290SVinod Koul			io-channel-names = "thermal";
97*d3302290SVinod Koul			#thermal-sensor-cells = <0>;
98*d3302290SVinod Koul		};
99*d3302290SVinod Koul
100*d3302290SVinod Koul		pmc8180_adc: adc@3100 {
101*d3302290SVinod Koul			compatible = "qcom,spmi-adc5";
102*d3302290SVinod Koul			reg = <0x3100>;
103*d3302290SVinod Koul			#address-cells = <1>;
104*d3302290SVinod Koul			#size-cells = <0>;
105*d3302290SVinod Koul			#io-channel-cells = <1>;
106*d3302290SVinod Koul			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
107*d3302290SVinod Koul
108*d3302290SVinod Koul			ref-gnd@0 {
109*d3302290SVinod Koul				reg = <ADC5_REF_GND>;
110*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
111*d3302290SVinod Koul				label = "ref_gnd";
112*d3302290SVinod Koul			};
113*d3302290SVinod Koul
114*d3302290SVinod Koul			vref-1p25@1 {
115*d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
116*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
117*d3302290SVinod Koul				label = "vref_1p25";
118*d3302290SVinod Koul			};
119*d3302290SVinod Koul
120*d3302290SVinod Koul			die-temp@6 {
121*d3302290SVinod Koul				reg = <ADC5_DIE_TEMP>;
122*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
123*d3302290SVinod Koul				label = "die_temp";
124*d3302290SVinod Koul			};
125*d3302290SVinod Koul		};
126*d3302290SVinod Koul
127*d3302290SVinod Koul		pmc8180_adc_tm: adc-tm@3500 {
128*d3302290SVinod Koul			compatible = "qcom,spmi-adc-tm5";
129*d3302290SVinod Koul			reg = <0x3500>;
130*d3302290SVinod Koul			interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
131*d3302290SVinod Koul			#thermal-sensor-cells = <1>;
132*d3302290SVinod Koul			#address-cells = <1>;
133*d3302290SVinod Koul			#size-cells = <0>;
134*d3302290SVinod Koul			status = "disabled";
135*d3302290SVinod Koul		};
136*d3302290SVinod Koul
137*d3302290SVinod Koul		rtc@6000 {
138*d3302290SVinod Koul			compatible = "qcom,pm8941-rtc";
139*d3302290SVinod Koul			reg = <0x6000>;
140*d3302290SVinod Koul			reg-names = "rtc", "alarm";
141*d3302290SVinod Koul			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
142*d3302290SVinod Koul		};
143*d3302290SVinod Koul
144*d3302290SVinod Koul		pmc8180_gpios: gpio@c000 {
145*d3302290SVinod Koul			compatible = "qcom,pmc8180-gpio";
146*d3302290SVinod Koul			reg = <0xc000>;
147*d3302290SVinod Koul			gpio-controller;
148*d3302290SVinod Koul			#gpio-cells = <2>;
149*d3302290SVinod Koul			interrupt-controller;
150*d3302290SVinod Koul			#interrupt-cells = <2>;
151*d3302290SVinod Koul		};
152*d3302290SVinod Koul	};
153*d3302290SVinod Koul
154*d3302290SVinod Koul	pmic@1 {
155*d3302290SVinod Koul		compatible = "qcom,pmc8180", "qcom,spmi-pmic";
156*d3302290SVinod Koul		reg = <0x1 SPMI_USID>;
157*d3302290SVinod Koul		#address-cells = <1>;
158*d3302290SVinod Koul		#size-cells = <0>;
159*d3302290SVinod Koul	};
160*d3302290SVinod Koul
161*d3302290SVinod Koul	pmic@2 {
162*d3302290SVinod Koul		compatible = "qcom,smb2351", "qcom,spmi-pmic";
163*d3302290SVinod Koul		reg = <0x2 SPMI_USID>;
164*d3302290SVinod Koul		#address-cells = <1>;
165*d3302290SVinod Koul		#size-cells = <0>;
166*d3302290SVinod Koul
167*d3302290SVinod Koul		adc@3100 {
168*d3302290SVinod Koul			compatible = "qcom,spmi-adc-rev2";
169*d3302290SVinod Koul			reg = <0x3100>;
170*d3302290SVinod Koul			#address-cells = <1>;
171*d3302290SVinod Koul			#size-cells = <0>;
172*d3302290SVinod Koul			#io-channel-cells = <1>;
173*d3302290SVinod Koul			interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
174*d3302290SVinod Koul
175*d3302290SVinod Koul			ref-gnd@0 {
176*d3302290SVinod Koul				reg = <ADC5_REF_GND>;
177*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
178*d3302290SVinod Koul				label = "ref_gnd";
179*d3302290SVinod Koul			};
180*d3302290SVinod Koul
181*d3302290SVinod Koul			vref-1p25@1 {
182*d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
183*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
184*d3302290SVinod Koul				label = "vref_1p25";
185*d3302290SVinod Koul			};
186*d3302290SVinod Koul
187*d3302290SVinod Koul			vcoin@85 {
188*d3302290SVinod Koul				reg = <0x85>;
189*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
190*d3302290SVinod Koul				label = "vcoin2";
191*d3302290SVinod Koul			};
192*d3302290SVinod Koul		};
193*d3302290SVinod Koul	};
194*d3302290SVinod Koul
195*d3302290SVinod Koul	pmic@6 {
196*d3302290SVinod Koul		compatible = "qcom,pm8150c", "qcom,spmi-pmic";
197*d3302290SVinod Koul		reg = <0x6 SPMI_USID>;
198*d3302290SVinod Koul		#address-cells = <1>;
199*d3302290SVinod Koul		#size-cells = <0>;
200*d3302290SVinod Koul	};
201*d3302290SVinod Koul
202*d3302290SVinod Koul	pmic@8 {
203*d3302290SVinod Koul		compatible = "qcom,pm8150", "qcom,spmi-pmic";
204*d3302290SVinod Koul		reg = <0x8 SPMI_USID>;
205*d3302290SVinod Koul		#address-cells = <1>;
206*d3302290SVinod Koul		#size-cells = <0>;
207*d3302290SVinod Koul	};
208*d3302290SVinod Koul
209*d3302290SVinod Koul	pmic@a {
210*d3302290SVinod Koul		compatible = "qcom,smb2351", "qcom,spmi-pmic";
211*d3302290SVinod Koul		reg = <0xa SPMI_USID>;
212*d3302290SVinod Koul		#address-cells = <1>;
213*d3302290SVinod Koul		#size-cells = <0>;
214*d3302290SVinod Koul
215*d3302290SVinod Koul		adc@3100 {
216*d3302290SVinod Koul			compatible = "qcom,spmi-adc-rev2";
217*d3302290SVinod Koul			reg = <0x3100>;
218*d3302290SVinod Koul			#address-cells = <1>;
219*d3302290SVinod Koul			#size-cells = <0>;
220*d3302290SVinod Koul			#io-channel-cells = <1>;
221*d3302290SVinod Koul			interrupts = <0xa 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
222*d3302290SVinod Koul
223*d3302290SVinod Koul			ref-gnd@0 {
224*d3302290SVinod Koul				reg = <ADC5_REF_GND>;
225*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
226*d3302290SVinod Koul				label = "ref_gnd";
227*d3302290SVinod Koul			};
228*d3302290SVinod Koul
229*d3302290SVinod Koul			vref-1p25@1 {
230*d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
231*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
232*d3302290SVinod Koul				label = "vref_1p25";
233*d3302290SVinod Koul			};
234*d3302290SVinod Koul
235*d3302290SVinod Koul			vcoin@85 {
236*d3302290SVinod Koul				reg = <0x85>;
237*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
238*d3302290SVinod Koul				label = "vcoin";
239*d3302290SVinod Koul			};
240*d3302290SVinod Koul		};
241*d3302290SVinod Koul	};
242*d3302290SVinod Koul
243*d3302290SVinod Koul	pmic@4 {
244*d3302290SVinod Koul		compatible = "qcom,pm8150c", "qcom,spmi-pmic";
245*d3302290SVinod Koul		reg = <0x4 SPMI_USID>;
246*d3302290SVinod Koul		#address-cells = <1>;
247*d3302290SVinod Koul		#size-cells = <0>;
248*d3302290SVinod Koul
249*d3302290SVinod Koul		power-on@800 {
250*d3302290SVinod Koul			compatible = "qcom,pm8916-pon";
251*d3302290SVinod Koul			reg = <0x0800>;
252*d3302290SVinod Koul
253*d3302290SVinod Koul			status = "disabled";
254*d3302290SVinod Koul		};
255*d3302290SVinod Koul
256*d3302290SVinod Koul		pmc8180c_temp: temp-alarm@2400 {
257*d3302290SVinod Koul			compatible = "qcom,spmi-temp-alarm";
258*d3302290SVinod Koul			reg = <0x2400>;
259*d3302290SVinod Koul			interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
260*d3302290SVinod Koul			io-channels = <&pmc8180c_adc ADC5_DIE_TEMP>;
261*d3302290SVinod Koul			io-channel-names = "thermal";
262*d3302290SVinod Koul			#thermal-sensor-cells = <0>;
263*d3302290SVinod Koul		};
264*d3302290SVinod Koul
265*d3302290SVinod Koul		pmc8180c_adc: adc@3100 {
266*d3302290SVinod Koul			compatible = "qcom,spmi-adc5";
267*d3302290SVinod Koul			reg = <0x3100>;
268*d3302290SVinod Koul			#address-cells = <1>;
269*d3302290SVinod Koul			#size-cells = <0>;
270*d3302290SVinod Koul			#io-channel-cells = <1>;
271*d3302290SVinod Koul			interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
272*d3302290SVinod Koul
273*d3302290SVinod Koul			ref-gnd@0 {
274*d3302290SVinod Koul				reg = <ADC5_REF_GND>;
275*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
276*d3302290SVinod Koul				label = "ref_gnd";
277*d3302290SVinod Koul			};
278*d3302290SVinod Koul
279*d3302290SVinod Koul			vref-1p25@1 {
280*d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
281*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
282*d3302290SVinod Koul				label = "vref_1p25";
283*d3302290SVinod Koul			};
284*d3302290SVinod Koul
285*d3302290SVinod Koul			die-temp@6 {
286*d3302290SVinod Koul				reg = <ADC5_DIE_TEMP>;
287*d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
288*d3302290SVinod Koul				label = "die_temp";
289*d3302290SVinod Koul			};
290*d3302290SVinod Koul		};
291*d3302290SVinod Koul
292*d3302290SVinod Koul		pmc8180c_adc_tm: adc-tm@3500 {
293*d3302290SVinod Koul			compatible = "qcom,spmi-adc-tm5";
294*d3302290SVinod Koul			reg = <0x3500>;
295*d3302290SVinod Koul			interrupts = <0x4 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
296*d3302290SVinod Koul			#thermal-sensor-cells = <1>;
297*d3302290SVinod Koul			#address-cells = <1>;
298*d3302290SVinod Koul			#size-cells = <0>;
299*d3302290SVinod Koul			status = "disabled";
300*d3302290SVinod Koul		};
301*d3302290SVinod Koul
302*d3302290SVinod Koul		pmc8180c_gpios: gpio@c000 {
303*d3302290SVinod Koul			compatible = "qcom,pmc8180c-gpio";
304*d3302290SVinod Koul			reg = <0xc000>;
305*d3302290SVinod Koul			gpio-controller;
306*d3302290SVinod Koul			#gpio-cells = <2>;
307*d3302290SVinod Koul			interrupt-controller;
308*d3302290SVinod Koul			#interrupt-cells = <2>;
309*d3302290SVinod Koul		};
310*d3302290SVinod Koul	};
311*d3302290SVinod Koul
312*d3302290SVinod Koul	pmic@5 {
313*d3302290SVinod Koul		compatible = "qcom,pmc8180c", "qcom,spmi-pmic";
314*d3302290SVinod Koul		reg = <0x5 SPMI_USID>;
315*d3302290SVinod Koul
316*d3302290SVinod Koul		pmc8180c_lpg: lpg {
317*d3302290SVinod Koul			compatible = "qcom,pmc8180c-lpg";
318*d3302290SVinod Koul
319*d3302290SVinod Koul			#address-cells = <1>;
320*d3302290SVinod Koul			#size-cells = <0>;
321*d3302290SVinod Koul			#pwm-cells = <2>;
322*d3302290SVinod Koul
323*d3302290SVinod Koul			status = "disabled";
324*d3302290SVinod Koul		};
325*d3302290SVinod Koul	};
326*d3302290SVinod Koul};
327