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