xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/sc8180x-pmics.dtsi (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
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
17d3302290SVinod Koul			thermal-sensors = <&pmc8180_temp>;
18d3302290SVinod Koul
19d3302290SVinod Koul			trips {
20d3302290SVinod Koul				trip0 {
21d3302290SVinod Koul					temperature = <95000>;
22d3302290SVinod Koul					hysteresis = <0>;
23d3302290SVinod Koul					type = "passive";
24d3302290SVinod Koul				};
25d3302290SVinod Koul
26d3302290SVinod Koul				trip1 {
27d3302290SVinod Koul					temperature = <115000>;
28d3302290SVinod Koul					hysteresis = <0>;
29d3302290SVinod Koul					type = "hot";
30d3302290SVinod Koul				};
31d3302290SVinod Koul
32d3302290SVinod Koul				trip2 {
33d3302290SVinod Koul					temperature = <145000>;
34d3302290SVinod Koul					hysteresis = <0>;
35d3302290SVinod Koul					type = "critical";
36d3302290SVinod Koul				};
37d3302290SVinod Koul			};
38d3302290SVinod Koul		};
39d3302290SVinod Koul
40d3302290SVinod Koul		pmc8180c-thermal {
41d3302290SVinod Koul			polling-delay-passive = <100>;
42d3302290SVinod Koul
43d3302290SVinod Koul			thermal-sensors = <&pmc8180c_temp>;
44d3302290SVinod Koul
45d3302290SVinod Koul			trips {
46d3302290SVinod Koul				trip0 {
47d3302290SVinod Koul					temperature = <95000>;
48d3302290SVinod Koul					hysteresis = <0>;
49d3302290SVinod Koul					type = "passive";
50d3302290SVinod Koul				};
51d3302290SVinod Koul
52d3302290SVinod Koul				trip1 {
53d3302290SVinod Koul					temperature = <115000>;
54d3302290SVinod Koul					hysteresis = <0>;
55d3302290SVinod Koul					type = "hot";
56d3302290SVinod Koul				};
57d3302290SVinod Koul
58d3302290SVinod Koul				trip2 {
59d3302290SVinod Koul					temperature = <145000>;
60d3302290SVinod Koul					hysteresis = <0>;
61d3302290SVinod Koul					type = "critical";
62d3302290SVinod Koul				};
63d3302290SVinod Koul			};
64d3302290SVinod Koul		};
65d3302290SVinod Koul	};
66d3302290SVinod Koul};
67d3302290SVinod Koul
68d3302290SVinod Koul&spmi_bus {
69d3302290SVinod Koul	pmc8180_0: pmic@0 {
70d3302290SVinod Koul		compatible = "qcom,pm8150", "qcom,spmi-pmic";
71d3302290SVinod Koul		reg = <0x0 SPMI_USID>;
72d3302290SVinod Koul		#address-cells = <1>;
73d3302290SVinod Koul		#size-cells = <0>;
74d3302290SVinod Koul
75bf520227SKrzysztof Kozlowski		pon: pon@800 {
76d3302290SVinod Koul			compatible = "qcom,pm8916-pon";
77d3302290SVinod Koul			reg = <0x0800>;
78*3706bcfbSBjorn Andersson			pmc8180_pwrkey: pwrkey {
79d3302290SVinod Koul				compatible = "qcom,pm8941-pwrkey";
80d3302290SVinod Koul				interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
81d3302290SVinod Koul				debounce = <15625>;
82d3302290SVinod Koul				bias-pull-up;
83d3302290SVinod Koul				linux,code = <KEY_POWER>;
84d3302290SVinod Koul
85d3302290SVinod Koul				status = "disabled";
86d3302290SVinod Koul			};
87d3302290SVinod Koul		};
88d3302290SVinod Koul
89d3302290SVinod Koul		pmc8180_temp: temp-alarm@2400 {
90d3302290SVinod Koul			compatible = "qcom,spmi-temp-alarm";
91d3302290SVinod Koul			reg = <0x2400>;
92d3302290SVinod Koul			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
93d3302290SVinod Koul			io-channels = <&pmc8180_adc ADC5_DIE_TEMP>;
94d3302290SVinod Koul			io-channel-names = "thermal";
95d3302290SVinod Koul			#thermal-sensor-cells = <0>;
96d3302290SVinod Koul		};
97d3302290SVinod Koul
98d3302290SVinod Koul		pmc8180_adc: adc@3100 {
99d3302290SVinod Koul			compatible = "qcom,spmi-adc5";
100d3302290SVinod Koul			reg = <0x3100>;
101d3302290SVinod Koul			#address-cells = <1>;
102d3302290SVinod Koul			#size-cells = <0>;
103d3302290SVinod Koul			#io-channel-cells = <1>;
104d3302290SVinod Koul			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
105d3302290SVinod Koul
10697886986SKrzysztof Kozlowski			channel@0 {
107d3302290SVinod Koul				reg = <ADC5_REF_GND>;
108d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
109d3302290SVinod Koul				label = "ref_gnd";
110d3302290SVinod Koul			};
111d3302290SVinod Koul
11297886986SKrzysztof Kozlowski			channel@1 {
113d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
114d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
115d3302290SVinod Koul				label = "vref_1p25";
116d3302290SVinod Koul			};
117d3302290SVinod Koul
11897886986SKrzysztof Kozlowski			channel@6 {
119d3302290SVinod Koul				reg = <ADC5_DIE_TEMP>;
120d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
121d3302290SVinod Koul				label = "die_temp";
122d3302290SVinod Koul			};
123d3302290SVinod Koul		};
124d3302290SVinod Koul
125d3302290SVinod Koul		pmc8180_adc_tm: adc-tm@3500 {
126d3302290SVinod Koul			compatible = "qcom,spmi-adc-tm5";
127d3302290SVinod Koul			reg = <0x3500>;
128d3302290SVinod Koul			interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
129d3302290SVinod Koul			#thermal-sensor-cells = <1>;
130d3302290SVinod Koul			#address-cells = <1>;
131d3302290SVinod Koul			#size-cells = <0>;
132d3302290SVinod Koul			status = "disabled";
133d3302290SVinod Koul		};
134d3302290SVinod Koul
135d3302290SVinod Koul		rtc@6000 {
136d3302290SVinod Koul			compatible = "qcom,pm8941-rtc";
137d3302290SVinod Koul			reg = <0x6000>;
138d3302290SVinod Koul			reg-names = "rtc", "alarm";
139d3302290SVinod Koul			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
140d3302290SVinod Koul		};
141d3302290SVinod Koul
142c8d8e936SBjorn Andersson		pmc8180_1_gpios: gpio@c000 {
1430304fc1dSKrzysztof Kozlowski			compatible = "qcom,pmc8180-gpio", "qcom,spmi-gpio";
144d3302290SVinod Koul			reg = <0xc000>;
145d3302290SVinod Koul			gpio-controller;
146c8d8e936SBjorn Andersson			gpio-ranges = <&pmc8180_1_gpios 0 0 10>;
147d3302290SVinod Koul			#gpio-cells = <2>;
148d3302290SVinod Koul			interrupt-controller;
149d3302290SVinod Koul			#interrupt-cells = <2>;
150d3302290SVinod Koul		};
151d3302290SVinod Koul	};
152d3302290SVinod Koul
153d3302290SVinod Koul	pmic@1 {
154d3302290SVinod Koul		compatible = "qcom,pmc8180", "qcom,spmi-pmic";
155d3302290SVinod Koul		reg = <0x1 SPMI_USID>;
156d3302290SVinod Koul		#address-cells = <1>;
157d3302290SVinod Koul		#size-cells = <0>;
158d3302290SVinod Koul	};
159d3302290SVinod Koul
160d3302290SVinod Koul	pmic@2 {
161d3302290SVinod Koul		compatible = "qcom,smb2351", "qcom,spmi-pmic";
162d3302290SVinod Koul		reg = <0x2 SPMI_USID>;
163d3302290SVinod Koul		#address-cells = <1>;
164d3302290SVinod Koul		#size-cells = <0>;
165d3302290SVinod Koul
166d3302290SVinod Koul		adc@3100 {
167d3302290SVinod Koul			compatible = "qcom,spmi-adc-rev2";
168d3302290SVinod Koul			reg = <0x3100>;
169d3302290SVinod Koul			#address-cells = <1>;
170d3302290SVinod Koul			#size-cells = <0>;
171d3302290SVinod Koul			#io-channel-cells = <1>;
172d3302290SVinod Koul			interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
173d3302290SVinod Koul
17497886986SKrzysztof Kozlowski			channel@0 {
175d3302290SVinod Koul				reg = <ADC5_REF_GND>;
176d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
177d3302290SVinod Koul				label = "ref_gnd";
178d3302290SVinod Koul			};
179d3302290SVinod Koul
18097886986SKrzysztof Kozlowski			channel@1 {
181d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
182d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
183d3302290SVinod Koul				label = "vref_1p25";
184d3302290SVinod Koul			};
185d3302290SVinod Koul
18697886986SKrzysztof Kozlowski			channel@85 {
187d3302290SVinod Koul				reg = <0x85>;
188d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
189d3302290SVinod Koul				label = "vcoin2";
190d3302290SVinod Koul			};
191d3302290SVinod Koul		};
192d3302290SVinod Koul	};
193d3302290SVinod Koul
194d3302290SVinod Koul	pmic@6 {
195d3302290SVinod Koul		compatible = "qcom,pm8150c", "qcom,spmi-pmic";
196d3302290SVinod Koul		reg = <0x6 SPMI_USID>;
197d3302290SVinod Koul		#address-cells = <1>;
198d3302290SVinod Koul		#size-cells = <0>;
199d3302290SVinod Koul	};
200d3302290SVinod Koul
201c8d8e936SBjorn Andersson	pmc8180_2: pmic@8 {
202d3302290SVinod Koul		compatible = "qcom,pm8150", "qcom,spmi-pmic";
203d3302290SVinod Koul		reg = <0x8 SPMI_USID>;
204d3302290SVinod Koul		#address-cells = <1>;
205d3302290SVinod Koul		#size-cells = <0>;
206c8d8e936SBjorn Andersson
207c8d8e936SBjorn Andersson		pmc8180_2_gpios: gpio@c000 {
208c8d8e936SBjorn Andersson			compatible = "qcom,pmc8180-gpio", "qcom,spmi-gpio";
209c8d8e936SBjorn Andersson			reg = <0xc000>;
210c8d8e936SBjorn Andersson			gpio-controller;
211c8d8e936SBjorn Andersson			gpio-ranges = <&pmc8180_2_gpios 0 0 10>;
212c8d8e936SBjorn Andersson			#gpio-cells = <2>;
213c8d8e936SBjorn Andersson			interrupt-controller;
214c8d8e936SBjorn Andersson			#interrupt-cells = <2>;
215c8d8e936SBjorn Andersson		};
216d3302290SVinod Koul	};
217d3302290SVinod Koul
218d3302290SVinod Koul	pmic@a {
219d3302290SVinod Koul		compatible = "qcom,smb2351", "qcom,spmi-pmic";
220d3302290SVinod Koul		reg = <0xa SPMI_USID>;
221d3302290SVinod Koul		#address-cells = <1>;
222d3302290SVinod Koul		#size-cells = <0>;
223d3302290SVinod Koul
224d3302290SVinod Koul		adc@3100 {
225d3302290SVinod Koul			compatible = "qcom,spmi-adc-rev2";
226d3302290SVinod Koul			reg = <0x3100>;
227d3302290SVinod Koul			#address-cells = <1>;
228d3302290SVinod Koul			#size-cells = <0>;
229d3302290SVinod Koul			#io-channel-cells = <1>;
230d3302290SVinod Koul			interrupts = <0xa 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
231d3302290SVinod Koul
23297886986SKrzysztof Kozlowski			channel@0 {
233d3302290SVinod Koul				reg = <ADC5_REF_GND>;
234d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
235d3302290SVinod Koul				label = "ref_gnd";
236d3302290SVinod Koul			};
237d3302290SVinod Koul
23897886986SKrzysztof Kozlowski			channel@1 {
239d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
240d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
241d3302290SVinod Koul				label = "vref_1p25";
242d3302290SVinod Koul			};
243d3302290SVinod Koul
24497886986SKrzysztof Kozlowski			channel@85 {
245d3302290SVinod Koul				reg = <0x85>;
246d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
247d3302290SVinod Koul				label = "vcoin";
248d3302290SVinod Koul			};
249d3302290SVinod Koul		};
250d3302290SVinod Koul	};
251d3302290SVinod Koul
252d3302290SVinod Koul	pmic@4 {
253d3302290SVinod Koul		compatible = "qcom,pm8150c", "qcom,spmi-pmic";
254d3302290SVinod Koul		reg = <0x4 SPMI_USID>;
255d3302290SVinod Koul		#address-cells = <1>;
256d3302290SVinod Koul		#size-cells = <0>;
257d3302290SVinod Koul
258bf520227SKrzysztof Kozlowski		pon@800 {
259d3302290SVinod Koul			compatible = "qcom,pm8916-pon";
260d3302290SVinod Koul			reg = <0x0800>;
261d3302290SVinod Koul
262d3302290SVinod Koul			status = "disabled";
263d3302290SVinod Koul		};
264d3302290SVinod Koul
265d3302290SVinod Koul		pmc8180c_temp: temp-alarm@2400 {
266d3302290SVinod Koul			compatible = "qcom,spmi-temp-alarm";
267d3302290SVinod Koul			reg = <0x2400>;
268d3302290SVinod Koul			interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
269d3302290SVinod Koul			io-channels = <&pmc8180c_adc ADC5_DIE_TEMP>;
270d3302290SVinod Koul			io-channel-names = "thermal";
271d3302290SVinod Koul			#thermal-sensor-cells = <0>;
272d3302290SVinod Koul		};
273d3302290SVinod Koul
274d3302290SVinod Koul		pmc8180c_adc: adc@3100 {
275d3302290SVinod Koul			compatible = "qcom,spmi-adc5";
276d3302290SVinod Koul			reg = <0x3100>;
277d3302290SVinod Koul			#address-cells = <1>;
278d3302290SVinod Koul			#size-cells = <0>;
279d3302290SVinod Koul			#io-channel-cells = <1>;
280d3302290SVinod Koul			interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
281d3302290SVinod Koul
28297886986SKrzysztof Kozlowski			channel@0 {
283d3302290SVinod Koul				reg = <ADC5_REF_GND>;
284d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
285d3302290SVinod Koul				label = "ref_gnd";
286d3302290SVinod Koul			};
287d3302290SVinod Koul
28897886986SKrzysztof Kozlowski			channel@1 {
289d3302290SVinod Koul				reg = <ADC5_1P25VREF>;
290d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
291d3302290SVinod Koul				label = "vref_1p25";
292d3302290SVinod Koul			};
293d3302290SVinod Koul
29497886986SKrzysztof Kozlowski			channel@6 {
295d3302290SVinod Koul				reg = <ADC5_DIE_TEMP>;
296d3302290SVinod Koul				qcom,pre-scaling = <1 1>;
297d3302290SVinod Koul				label = "die_temp";
298d3302290SVinod Koul			};
299d3302290SVinod Koul		};
300d3302290SVinod Koul
301d3302290SVinod Koul		pmc8180c_adc_tm: adc-tm@3500 {
302d3302290SVinod Koul			compatible = "qcom,spmi-adc-tm5";
303d3302290SVinod Koul			reg = <0x3500>;
304d3302290SVinod Koul			interrupts = <0x4 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
305d3302290SVinod Koul			#thermal-sensor-cells = <1>;
306d3302290SVinod Koul			#address-cells = <1>;
307d3302290SVinod Koul			#size-cells = <0>;
308d3302290SVinod Koul			status = "disabled";
309d3302290SVinod Koul		};
310d3302290SVinod Koul
311d3302290SVinod Koul		pmc8180c_gpios: gpio@c000 {
3120304fc1dSKrzysztof Kozlowski			compatible = "qcom,pmc8180c-gpio", "qcom,spmi-gpio";
313d3302290SVinod Koul			reg = <0xc000>;
314d3302290SVinod Koul			gpio-controller;
315565951b1SKrzysztof Kozlowski			gpio-ranges = <&pmc8180c_gpios 0 0 12>;
316d3302290SVinod Koul			#gpio-cells = <2>;
317d3302290SVinod Koul			interrupt-controller;
318d3302290SVinod Koul			#interrupt-cells = <2>;
319d3302290SVinod Koul		};
320d3302290SVinod Koul	};
321d3302290SVinod Koul
322d3302290SVinod Koul	pmic@5 {
323d3302290SVinod Koul		compatible = "qcom,pmc8180c", "qcom,spmi-pmic";
324d3302290SVinod Koul		reg = <0x5 SPMI_USID>;
325d3302290SVinod Koul
3264af302a7SKrzysztof Kozlowski		pmc8180c_lpg: pwm {
327d3302290SVinod Koul			compatible = "qcom,pmc8180c-lpg";
328d3302290SVinod Koul
329d3302290SVinod Koul			#address-cells = <1>;
330d3302290SVinod Koul			#size-cells = <0>;
331d3302290SVinod Koul			#pwm-cells = <2>;
332d3302290SVinod Koul
333d3302290SVinod Koul			status = "disabled";
334d3302290SVinod Koul		};
335d3302290SVinod Koul	};
336d3302290SVinod Koul};
337