xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-pmics.dtsi (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1b97ee269SEmmanuel Vadot// SPDX-License-Identifier: BSD-3-Clause
2b97ee269SEmmanuel Vadot/*
3b97ee269SEmmanuel Vadot * Copyright (c) 2022, Linaro Limited
4b97ee269SEmmanuel Vadot */
5b97ee269SEmmanuel Vadot
601950c46SEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
701950c46SEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
801950c46SEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
9b97ee269SEmmanuel Vadot#include <dt-bindings/input/input.h>
10b97ee269SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
11b97ee269SEmmanuel Vadot#include <dt-bindings/spmi/spmi.h>
12b97ee269SEmmanuel Vadot
138bab661aSEmmanuel Vadot/ {
148bab661aSEmmanuel Vadot	thermal-zones {
158bab661aSEmmanuel Vadot		pm8280_1_thermal: pm8280-1-thermal {
168bab661aSEmmanuel Vadot			polling-delay-passive = <100>;
17*0e8011faSEmmanuel Vadot
188bab661aSEmmanuel Vadot			thermal-sensors = <&pm8280_1_temp_alarm>;
198bab661aSEmmanuel Vadot
208bab661aSEmmanuel Vadot			trips {
218bab661aSEmmanuel Vadot				trip0 {
228bab661aSEmmanuel Vadot					temperature = <95000>;
238bab661aSEmmanuel Vadot					hysteresis = <0>;
248bab661aSEmmanuel Vadot					type = "passive";
258bab661aSEmmanuel Vadot				};
268bab661aSEmmanuel Vadot
278bab661aSEmmanuel Vadot				trip1 {
288bab661aSEmmanuel Vadot					temperature = <115000>;
298bab661aSEmmanuel Vadot					hysteresis = <0>;
308bab661aSEmmanuel Vadot					type = "critical";
318bab661aSEmmanuel Vadot				};
328bab661aSEmmanuel Vadot			};
338bab661aSEmmanuel Vadot		};
348bab661aSEmmanuel Vadot
358bab661aSEmmanuel Vadot		pm8280_2_thermal: pm8280-2-thermal {
368bab661aSEmmanuel Vadot			polling-delay-passive = <100>;
37*0e8011faSEmmanuel Vadot
388bab661aSEmmanuel Vadot			thermal-sensors = <&pm8280_2_temp_alarm>;
398bab661aSEmmanuel Vadot
408bab661aSEmmanuel Vadot			trips {
418bab661aSEmmanuel Vadot				trip0 {
428bab661aSEmmanuel Vadot					temperature = <95000>;
438bab661aSEmmanuel Vadot					hysteresis = <0>;
448bab661aSEmmanuel Vadot					type = "passive";
458bab661aSEmmanuel Vadot				};
468bab661aSEmmanuel Vadot
478bab661aSEmmanuel Vadot				trip1 {
488bab661aSEmmanuel Vadot					temperature = <115000>;
498bab661aSEmmanuel Vadot					hysteresis = <0>;
508bab661aSEmmanuel Vadot					type = "critical";
518bab661aSEmmanuel Vadot				};
528bab661aSEmmanuel Vadot			};
538bab661aSEmmanuel Vadot		};
548bab661aSEmmanuel Vadot	};
558bab661aSEmmanuel Vadot};
568bab661aSEmmanuel Vadot
57b97ee269SEmmanuel Vadot&spmi_bus {
58b97ee269SEmmanuel Vadot	pmk8280: pmic@0 {
59b97ee269SEmmanuel Vadot		compatible = "qcom,pmk8350", "qcom,spmi-pmic";
60b97ee269SEmmanuel Vadot		reg = <0x0 SPMI_USID>;
61b97ee269SEmmanuel Vadot		#address-cells = <1>;
62b97ee269SEmmanuel Vadot		#size-cells = <0>;
63b97ee269SEmmanuel Vadot
64b97ee269SEmmanuel Vadot		pmk8280_pon: pon@1300 {
65cb7aa33aSEmmanuel Vadot			compatible = "qcom,pmk8350-pon";
66cb7aa33aSEmmanuel Vadot			reg = <0x1300>, <0x800>;
67cb7aa33aSEmmanuel Vadot			reg-names = "hlos", "pbs";
68b97ee269SEmmanuel Vadot
69b97ee269SEmmanuel Vadot			pmk8280_pon_pwrkey: pwrkey {
70b97ee269SEmmanuel Vadot				compatible = "qcom,pmk8350-pwrkey";
71cb7aa33aSEmmanuel Vadot				interrupts-extended = <&spmi_bus 0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
72b97ee269SEmmanuel Vadot				linux,code = <KEY_POWER>;
73b97ee269SEmmanuel Vadot				status = "disabled";
74b97ee269SEmmanuel Vadot			};
758bab661aSEmmanuel Vadot
768bab661aSEmmanuel Vadot			pmk8280_pon_resin: resin {
778bab661aSEmmanuel Vadot				compatible = "qcom,pmk8350-resin";
78cb7aa33aSEmmanuel Vadot				interrupts-extended = <&spmi_bus 0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
798bab661aSEmmanuel Vadot				status = "disabled";
808bab661aSEmmanuel Vadot			};
818bab661aSEmmanuel Vadot		};
828bab661aSEmmanuel Vadot
838bab661aSEmmanuel Vadot		pmk8280_vadc: adc@3100 {
848bab661aSEmmanuel Vadot			compatible = "qcom,spmi-adc7";
858bab661aSEmmanuel Vadot			reg = <0x3100>;
86cb7aa33aSEmmanuel Vadot			interrupts-extended = <&spmi_bus 0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
878bab661aSEmmanuel Vadot			#address-cells = <1>;
888bab661aSEmmanuel Vadot			#size-cells = <0>;
898bab661aSEmmanuel Vadot			#io-channel-cells = <1>;
9001950c46SEmmanuel Vadot
9101950c46SEmmanuel Vadot			channel@3 {
9201950c46SEmmanuel Vadot				reg = <PMK8350_ADC7_DIE_TEMP>;
9301950c46SEmmanuel Vadot				qcom,pre-scaling = <1 1>;
9401950c46SEmmanuel Vadot				label = "pmk8350_die_temp";
9501950c46SEmmanuel Vadot			};
9601950c46SEmmanuel Vadot
9701950c46SEmmanuel Vadot			channel@44 {
9801950c46SEmmanuel Vadot				reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
9901950c46SEmmanuel Vadot				qcom,hw-settle-time = <200>;
10001950c46SEmmanuel Vadot				qcom,ratiometric;
10101950c46SEmmanuel Vadot				label = "pmk8350_xo_therm";
10201950c46SEmmanuel Vadot			};
10301950c46SEmmanuel Vadot
10401950c46SEmmanuel Vadot			channel@103 {
10501950c46SEmmanuel Vadot				reg = <PM8350_ADC7_DIE_TEMP(1)>;
10601950c46SEmmanuel Vadot				qcom,pre-scaling = <1 1>;
10701950c46SEmmanuel Vadot				label = "pmc8280_1_die_temp";
10801950c46SEmmanuel Vadot			};
10901950c46SEmmanuel Vadot
11001950c46SEmmanuel Vadot			channel@303 {
11101950c46SEmmanuel Vadot				reg = <PM8350_ADC7_DIE_TEMP(3)>;
11201950c46SEmmanuel Vadot				qcom,pre-scaling = <1 1>;
11301950c46SEmmanuel Vadot				label = "pmc8280_2_die_temp";
11401950c46SEmmanuel Vadot			};
11501950c46SEmmanuel Vadot
11601950c46SEmmanuel Vadot			channel@403 {
11701950c46SEmmanuel Vadot				reg = <PMR735A_ADC7_DIE_TEMP>;
11801950c46SEmmanuel Vadot				qcom,pre-scaling = <1 1>;
11901950c46SEmmanuel Vadot				label = "pmr735a_die_temp";
12001950c46SEmmanuel Vadot			};
1218bab661aSEmmanuel Vadot		};
1228bab661aSEmmanuel Vadot
1238bab661aSEmmanuel Vadot		pmk8280_adc_tm: adc-tm@3400 {
1248bab661aSEmmanuel Vadot			compatible = "qcom,spmi-adc-tm5-gen2";
1258bab661aSEmmanuel Vadot			reg = <0x3400>;
126cb7aa33aSEmmanuel Vadot			interrupts-extended = <&spmi_bus 0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
1278bab661aSEmmanuel Vadot			#address-cells = <1>;
1288bab661aSEmmanuel Vadot			#size-cells = <0>;
1298bab661aSEmmanuel Vadot			#thermal-sensor-cells = <1>;
1308bab661aSEmmanuel Vadot			status = "disabled";
131b97ee269SEmmanuel Vadot		};
132fac71e4eSEmmanuel Vadot
133fac71e4eSEmmanuel Vadot		pmk8280_rtc: rtc@6100 {
134fac71e4eSEmmanuel Vadot			compatible = "qcom,pmk8350-rtc";
135fac71e4eSEmmanuel Vadot			reg = <0x6100>, <0x6200>;
136fac71e4eSEmmanuel Vadot			reg-names = "rtc", "alarm";
137aa1a8ff2SEmmanuel Vadot			interrupts-extended = <&spmi_bus 0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
138fac71e4eSEmmanuel Vadot			wakeup-source;
139fac71e4eSEmmanuel Vadot			status = "disabled";
140fac71e4eSEmmanuel Vadot		};
141fac71e4eSEmmanuel Vadot
142fac71e4eSEmmanuel Vadot		pmk8280_sdam_6: nvram@8500 {
143fac71e4eSEmmanuel Vadot			compatible = "qcom,spmi-sdam";
144fac71e4eSEmmanuel Vadot			reg = <0x8500>;
145fac71e4eSEmmanuel Vadot			#address-cells = <1>;
146fac71e4eSEmmanuel Vadot			#size-cells = <1>;
147fac71e4eSEmmanuel Vadot			ranges = <0 0x8500 0x100>;
148fac71e4eSEmmanuel Vadot			status = "disabled";
149fac71e4eSEmmanuel Vadot		};
150b97ee269SEmmanuel Vadot	};
151b97ee269SEmmanuel Vadot
152b97ee269SEmmanuel Vadot	pmc8280_1: pmic@1 {
153b97ee269SEmmanuel Vadot		compatible = "qcom,pm8350", "qcom,spmi-pmic";
154b97ee269SEmmanuel Vadot		reg = <0x1 SPMI_USID>;
155b97ee269SEmmanuel Vadot		#address-cells = <1>;
156b97ee269SEmmanuel Vadot		#size-cells = <0>;
157b97ee269SEmmanuel Vadot
1588bab661aSEmmanuel Vadot		pm8280_1_temp_alarm: temp-alarm@a00 {
1598bab661aSEmmanuel Vadot			compatible = "qcom,spmi-temp-alarm";
1608bab661aSEmmanuel Vadot			reg = <0xa00>;
161cb7aa33aSEmmanuel Vadot			interrupts-extended = <&spmi_bus 0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
16201950c46SEmmanuel Vadot			io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(1)>;
16301950c46SEmmanuel Vadot			io-channel-names = "thermal";
1648bab661aSEmmanuel Vadot			#thermal-sensor-cells = <0>;
1658bab661aSEmmanuel Vadot		};
1668bab661aSEmmanuel Vadot
167b97ee269SEmmanuel Vadot		pmc8280_1_gpios: gpio@8800 {
168b97ee269SEmmanuel Vadot			compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
169b97ee269SEmmanuel Vadot			reg = <0x8800>;
170b97ee269SEmmanuel Vadot			gpio-controller;
171b97ee269SEmmanuel Vadot			gpio-ranges = <&pmc8280_1_gpios 0 0 10>;
172b97ee269SEmmanuel Vadot			#gpio-cells = <2>;
173b97ee269SEmmanuel Vadot			interrupt-controller;
174b97ee269SEmmanuel Vadot			#interrupt-cells = <2>;
175b97ee269SEmmanuel Vadot		};
176b97ee269SEmmanuel Vadot	};
177b97ee269SEmmanuel Vadot
178b97ee269SEmmanuel Vadot	pmc8280c: pmic@2 {
179b97ee269SEmmanuel Vadot		compatible = "qcom,pm8350c", "qcom,spmi-pmic";
180b97ee269SEmmanuel Vadot		reg = <0x2 SPMI_USID>;
181b97ee269SEmmanuel Vadot		#address-cells = <1>;
182b97ee269SEmmanuel Vadot		#size-cells = <0>;
183b97ee269SEmmanuel Vadot
184b97ee269SEmmanuel Vadot		pmc8280c_gpios: gpio@8800 {
185b97ee269SEmmanuel Vadot			compatible = "qcom,pm8350c-gpio", "qcom,spmi-gpio";
186b97ee269SEmmanuel Vadot			reg = <0x8800>;
187b97ee269SEmmanuel Vadot			gpio-controller;
188b97ee269SEmmanuel Vadot			gpio-ranges = <&pmc8280c_gpios 0 0 9>;
189b97ee269SEmmanuel Vadot			#gpio-cells = <2>;
190b97ee269SEmmanuel Vadot			interrupt-controller;
191b97ee269SEmmanuel Vadot			#interrupt-cells = <2>;
192b97ee269SEmmanuel Vadot		};
193b97ee269SEmmanuel Vadot
1947ef62cebSEmmanuel Vadot		pmc8280c_lpg: pwm {
195b97ee269SEmmanuel Vadot			compatible = "qcom,pm8350c-pwm";
196b97ee269SEmmanuel Vadot
197b97ee269SEmmanuel Vadot			#address-cells = <1>;
198b97ee269SEmmanuel Vadot			#size-cells = <0>;
199b97ee269SEmmanuel Vadot
200b97ee269SEmmanuel Vadot			#pwm-cells = <2>;
201b97ee269SEmmanuel Vadot
202b97ee269SEmmanuel Vadot			status = "disabled";
203b97ee269SEmmanuel Vadot		};
204b97ee269SEmmanuel Vadot	};
205b97ee269SEmmanuel Vadot
206b97ee269SEmmanuel Vadot	pmc8280_2: pmic@3 {
207b97ee269SEmmanuel Vadot		compatible = "qcom,pm8350", "qcom,spmi-pmic";
208b97ee269SEmmanuel Vadot		reg = <0x3 SPMI_USID>;
209b97ee269SEmmanuel Vadot		#address-cells = <1>;
210b97ee269SEmmanuel Vadot		#size-cells = <0>;
211b97ee269SEmmanuel Vadot
2128bab661aSEmmanuel Vadot		pm8280_2_temp_alarm: temp-alarm@a00 {
2138bab661aSEmmanuel Vadot			compatible = "qcom,spmi-temp-alarm";
2148bab661aSEmmanuel Vadot			reg = <0xa00>;
215cb7aa33aSEmmanuel Vadot			interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
21601950c46SEmmanuel Vadot			io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(3)>;
21701950c46SEmmanuel Vadot			io-channel-names = "thermal";
2188bab661aSEmmanuel Vadot			#thermal-sensor-cells = <0>;
2198bab661aSEmmanuel Vadot		};
2208bab661aSEmmanuel Vadot
221b97ee269SEmmanuel Vadot		pmc8280_2_gpios: gpio@8800 {
222b97ee269SEmmanuel Vadot			compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
223b97ee269SEmmanuel Vadot			reg = <0x8800>;
224b97ee269SEmmanuel Vadot			gpio-controller;
225b97ee269SEmmanuel Vadot			gpio-ranges = <&pmc8280_2_gpios 0 0 10>;
226b97ee269SEmmanuel Vadot			#gpio-cells = <2>;
227b97ee269SEmmanuel Vadot			interrupt-controller;
228b97ee269SEmmanuel Vadot			#interrupt-cells = <2>;
229b97ee269SEmmanuel Vadot		};
230b97ee269SEmmanuel Vadot	};
231b97ee269SEmmanuel Vadot
232b97ee269SEmmanuel Vadot	pmr735a: pmic@4 {
233b97ee269SEmmanuel Vadot		compatible = "qcom,pmr735a", "qcom,spmi-pmic";
234b97ee269SEmmanuel Vadot		reg = <0x4 SPMI_USID>;
235b97ee269SEmmanuel Vadot		#address-cells = <1>;
236b97ee269SEmmanuel Vadot		#size-cells = <0>;
237b97ee269SEmmanuel Vadot
238b97ee269SEmmanuel Vadot		pmr735a_gpios: gpio@8800 {
239b97ee269SEmmanuel Vadot			compatible = "qcom,pmr735a-gpio", "qcom,spmi-gpio";
240b97ee269SEmmanuel Vadot			reg = <0x8800>;
241b97ee269SEmmanuel Vadot			gpio-controller;
242b97ee269SEmmanuel Vadot			gpio-ranges = <&pmr735a_gpios 0 0 4>;
243b97ee269SEmmanuel Vadot			#gpio-cells = <2>;
244b97ee269SEmmanuel Vadot			interrupt-controller;
245b97ee269SEmmanuel Vadot			#interrupt-cells = <2>;
246b97ee269SEmmanuel Vadot		};
247b97ee269SEmmanuel Vadot	};
248b97ee269SEmmanuel Vadot};
249