xref: /linux/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi (revision d53b8e36925256097a08d7cb749198d85cbf9b2b)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Linaro Limited
4 */
5
6#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
7#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
8#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
9#include <dt-bindings/input/input.h>
10#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/spmi/spmi.h>
12
13/ {
14	thermal-zones {
15		pm8280_1_thermal: pm8280-1-thermal {
16			polling-delay-passive = <100>;
17
18			thermal-sensors = <&pm8280_1_temp_alarm>;
19
20			trips {
21				trip0 {
22					temperature = <95000>;
23					hysteresis = <0>;
24					type = "passive";
25				};
26
27				trip1 {
28					temperature = <115000>;
29					hysteresis = <0>;
30					type = "critical";
31				};
32			};
33		};
34
35		pm8280_2_thermal: pm8280-2-thermal {
36			polling-delay-passive = <100>;
37
38			thermal-sensors = <&pm8280_2_temp_alarm>;
39
40			trips {
41				trip0 {
42					temperature = <95000>;
43					hysteresis = <0>;
44					type = "passive";
45				};
46
47				trip1 {
48					temperature = <115000>;
49					hysteresis = <0>;
50					type = "critical";
51				};
52			};
53		};
54	};
55};
56
57&spmi_bus {
58	pmk8280: pmic@0 {
59		compatible = "qcom,pmk8350", "qcom,spmi-pmic";
60		reg = <0x0 SPMI_USID>;
61		#address-cells = <1>;
62		#size-cells = <0>;
63
64		pmk8280_pon: pon@1300 {
65			compatible = "qcom,pmk8350-pon";
66			reg = <0x1300>, <0x800>;
67			reg-names = "hlos", "pbs";
68
69			pmk8280_pon_pwrkey: pwrkey {
70				compatible = "qcom,pmk8350-pwrkey";
71				interrupts-extended = <&spmi_bus 0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
72				linux,code = <KEY_POWER>;
73				status = "disabled";
74			};
75
76			pmk8280_pon_resin: resin {
77				compatible = "qcom,pmk8350-resin";
78				interrupts-extended = <&spmi_bus 0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
79				status = "disabled";
80			};
81		};
82
83		pmk8280_vadc: adc@3100 {
84			compatible = "qcom,spmi-adc7";
85			reg = <0x3100>;
86			interrupts-extended = <&spmi_bus 0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
87			#address-cells = <1>;
88			#size-cells = <0>;
89			#io-channel-cells = <1>;
90
91			channel@3 {
92				reg = <PMK8350_ADC7_DIE_TEMP>;
93				qcom,pre-scaling = <1 1>;
94				label = "pmk8350_die_temp";
95			};
96
97			channel@44 {
98				reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
99				qcom,hw-settle-time = <200>;
100				qcom,ratiometric;
101				label = "pmk8350_xo_therm";
102			};
103
104			channel@103 {
105				reg = <PM8350_ADC7_DIE_TEMP(1)>;
106				qcom,pre-scaling = <1 1>;
107				label = "pmc8280_1_die_temp";
108			};
109
110			channel@303 {
111				reg = <PM8350_ADC7_DIE_TEMP(3)>;
112				qcom,pre-scaling = <1 1>;
113				label = "pmc8280_2_die_temp";
114			};
115
116			channel@403 {
117				reg = <PMR735A_ADC7_DIE_TEMP>;
118				qcom,pre-scaling = <1 1>;
119				label = "pmr735a_die_temp";
120			};
121		};
122
123		pmk8280_adc_tm: adc-tm@3400 {
124			compatible = "qcom,spmi-adc-tm5-gen2";
125			reg = <0x3400>;
126			interrupts-extended = <&spmi_bus 0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
127			#address-cells = <1>;
128			#size-cells = <0>;
129			#thermal-sensor-cells = <1>;
130			status = "disabled";
131		};
132
133		pmk8280_rtc: rtc@6100 {
134			compatible = "qcom,pmk8350-rtc";
135			reg = <0x6100>, <0x6200>;
136			reg-names = "rtc", "alarm";
137			interrupts-extended = <&spmi_bus 0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
138			wakeup-source;
139			status = "disabled";
140		};
141
142		pmk8280_sdam_6: nvram@8500 {
143			compatible = "qcom,spmi-sdam";
144			reg = <0x8500>;
145			#address-cells = <1>;
146			#size-cells = <1>;
147			ranges = <0 0x8500 0x100>;
148			status = "disabled";
149		};
150	};
151
152	pmc8280_1: pmic@1 {
153		compatible = "qcom,pm8350", "qcom,spmi-pmic";
154		reg = <0x1 SPMI_USID>;
155		#address-cells = <1>;
156		#size-cells = <0>;
157
158		pm8280_1_temp_alarm: temp-alarm@a00 {
159			compatible = "qcom,spmi-temp-alarm";
160			reg = <0xa00>;
161			interrupts-extended = <&spmi_bus 0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
162			io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(1)>;
163			io-channel-names = "thermal";
164			#thermal-sensor-cells = <0>;
165		};
166
167		pmc8280_1_gpios: gpio@8800 {
168			compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
169			reg = <0x8800>;
170			gpio-controller;
171			gpio-ranges = <&pmc8280_1_gpios 0 0 10>;
172			#gpio-cells = <2>;
173			interrupt-controller;
174			#interrupt-cells = <2>;
175		};
176	};
177
178	pmc8280c: pmic@2 {
179		compatible = "qcom,pm8350c", "qcom,spmi-pmic";
180		reg = <0x2 SPMI_USID>;
181		#address-cells = <1>;
182		#size-cells = <0>;
183
184		pmc8280c_gpios: gpio@8800 {
185			compatible = "qcom,pm8350c-gpio", "qcom,spmi-gpio";
186			reg = <0x8800>;
187			gpio-controller;
188			gpio-ranges = <&pmc8280c_gpios 0 0 9>;
189			#gpio-cells = <2>;
190			interrupt-controller;
191			#interrupt-cells = <2>;
192		};
193
194		pmc8280c_lpg: pwm {
195			compatible = "qcom,pm8350c-pwm";
196
197			#address-cells = <1>;
198			#size-cells = <0>;
199
200			#pwm-cells = <2>;
201
202			status = "disabled";
203		};
204	};
205
206	pmc8280_2: pmic@3 {
207		compatible = "qcom,pm8350", "qcom,spmi-pmic";
208		reg = <0x3 SPMI_USID>;
209		#address-cells = <1>;
210		#size-cells = <0>;
211
212		pm8280_2_temp_alarm: temp-alarm@a00 {
213			compatible = "qcom,spmi-temp-alarm";
214			reg = <0xa00>;
215			interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
216			io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(3)>;
217			io-channel-names = "thermal";
218			#thermal-sensor-cells = <0>;
219		};
220
221		pmc8280_2_gpios: gpio@8800 {
222			compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
223			reg = <0x8800>;
224			gpio-controller;
225			gpio-ranges = <&pmc8280_2_gpios 0 0 10>;
226			#gpio-cells = <2>;
227			interrupt-controller;
228			#interrupt-cells = <2>;
229		};
230	};
231
232	pmr735a: pmic@4 {
233		compatible = "qcom,pmr735a", "qcom,spmi-pmic";
234		reg = <0x4 SPMI_USID>;
235		#address-cells = <1>;
236		#size-cells = <0>;
237
238		pmr735a_gpios: gpio@8800 {
239			compatible = "qcom,pmr735a-gpio", "qcom,spmi-gpio";
240			reg = <0x8800>;
241			gpio-controller;
242			gpio-ranges = <&pmr735a_gpios 0 0 4>;
243			#gpio-cells = <2>;
244			interrupt-controller;
245			#interrupt-cells = <2>;
246		};
247	};
248};
249