xref: /openbmc/linux/arch/arm64/boot/dts/qcom/pm660.dtsi (revision fe38b4d6)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2020, Konrad Dybcio
4 */
5
6#include <dt-bindings/iio/qcom,spmi-vadc.h>
7#include <dt-bindings/input/linux-event-codes.h>
8#include <dt-bindings/interrupt-controller/irq.h>
9#include <dt-bindings/spmi/spmi.h>
10#include <dt-bindings/thermal/thermal.h>
11
12/ {
13	thermal-zones {
14		pm660 {
15			polling-delay-passive = <250>;
16			polling-delay = <1000>;
17
18			thermal-sensors = <&pm660_temp>;
19
20			trips {
21				pm660_alert0: pm660-alert0 {
22					temperature = <95000>;
23					hysteresis = <2000>;
24					type = "passive";
25				};
26				pm660_crit: pm660-crit {
27					temperature = <125000>;
28					hysteresis = <2000>;
29					type = "critical";
30				};
31			};
32		};
33	};
34};
35
36&spmi_bus {
37
38	pmic@0 {
39		compatible = "qcom,pm660", "qcom,spmi-pmic";
40		reg = <0x0 SPMI_USID>;
41		#address-cells = <1>;
42		#size-cells = <0>;
43
44		rtc@6000 {
45			compatible = "qcom,pm8941-rtc";
46			reg = <0x6000>, <0x6100>;
47			reg-names = "rtc", "alarm";
48			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
49		};
50
51		pon: pon@800 {
52			compatible = "qcom,pm8998-pon";
53			reg = <0x800>;
54			mode-bootloader = <0x2>;
55			mode-recovery = <0x1>;
56
57			pwrkey {
58				compatible = "qcom,pm8941-pwrkey";
59				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
60				debounce = <15625>;
61				bias-pull-up;
62				linux,code = <KEY_POWER>;
63			};
64
65		};
66
67		pm660_temp: temp-alarm@2400 {
68			compatible = "qcom,spmi-temp-alarm";
69			reg = <0x2400>;
70			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
71			io-channels = <&pm660_adc ADC5_DIE_TEMP>;
72			io-channel-names = "thermal";
73			#thermal-sensor-cells = <0>;
74		};
75
76		pm660_adc: adc@3100 {
77			compatible = "qcom,spmi-adc-rev2";
78			reg = <0x3100>;
79			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
80			#address-cells = <1>;
81			#size-cells = <0>;
82			#io-channel-cells = <1>;
83
84			ref_gnd: ref_gnd@0 {
85				reg = <ADC5_REF_GND>;
86				qcom,decimation = <1024>;
87				qcom,pre-scaling = <1 1>;
88			};
89
90			vref_1p25: vref_1p25@1 {
91				reg = <ADC5_1P25VREF>;
92				qcom,decimation = <1024>;
93				qcom,pre-scaling = <1 1>;
94			};
95
96			die_temp: die_temp@6 {
97				reg = <ADC5_DIE_TEMP>;
98				qcom,decimation = <1024>;
99				qcom,pre-scaling = <1 1>;
100			};
101
102			xo_therm: xo_therm@4c {
103				reg = <ADC5_XO_THERM_100K_PU>;
104				qcom,pre-scaling = <1 1>;
105				qcom,decimation = <1024>;
106				qcom,hw-settle-time = <200>;
107				qcom,ratiometric;
108			};
109
110			msm_therm: msm_therm@4d {
111				reg = <ADC5_AMUX_THM1_100K_PU>;
112				qcom,pre-scaling = <1 1>;
113				qcom,decimation = <1024>;
114				qcom,hw-settle-time = <200>;
115				qcom,ratiometric;
116			};
117
118			emmc_therm: emmc_therm@4e {
119				reg = <ADC5_AMUX_THM2_100K_PU>;
120				qcom,pre-scaling = <1 1>;
121				qcom,decimation = <1024>;
122				qcom,hw-settle-time = <200>;
123				qcom,ratiometric;
124			};
125
126			pa_therm0: thermistor0@4f {
127				reg = <ADC5_AMUX_THM3_100K_PU>;
128				qcom,pre-scaling = <1 1>;
129				qcom,decimation = <1024>;
130				qcom,hw-settle-time = <200>;
131				qcom,ratiometric;
132			};
133
134			pa_therm1: thermistor1@50 {
135				reg = <ADC5_AMUX_THM4_100K_PU>;
136				qcom,pre-scaling = <1 1>;
137				qcom,decimation = <1024>;
138				qcom,hw-settle-time = <200>;
139				qcom,ratiometric;
140			};
141
142			quiet_therm: quiet_therm@51 {
143				reg = <ADC5_AMUX_THM5_100K_PU>;
144				qcom,pre-scaling = <1 1>;
145				qcom,decimation = <1024>;
146				qcom,hw-settle-time = <200>;
147				qcom,ratiometric;
148			};
149
150			vadc_vph_pwr: vph_pwr@83 {
151				reg = <ADC5_VPH_PWR>;
152				qcom,decimation = <1024>;
153				qcom,pre-scaling = <1 3>;
154			};
155
156			vcoin: vcoin@83 {
157				reg = <ADC5_VCOIN>;
158				qcom,decimation = <1024>;
159				qcom,pre-scaling = <1 3>;
160			};
161		};
162
163		pm660_gpios: gpios@c000 {
164			compatible = "qcom,pm660-gpio";
165			reg = <0xc000>;
166			gpio-controller;
167			gpio-ranges = <&pm660_gpios 0 0 13>;
168			#gpio-cells = <2>;
169			interrupt-controller;
170			#interrupt-cells = <2>;
171		};
172	};
173
174	pmic@1 {
175		compatible = "qcom,pm660", "qcom,spmi-pmic";
176		reg = <0x1 SPMI_USID>;
177		#address-cells = <1>;
178		#size-cells = <0>;
179
180		pm660_spmi_regulators: pm660-regulators {
181			compatible = "qcom,pm660-regulators";
182		};
183	};
184};
185