blob: e5fa849acc375ab49f945b36851e16189f9d09c3 [file] [log] [blame]
Luca Weiss9b022442023-04-14 14:47:36 +02001#include <dt-bindings/interrupt-controller/irq.h>
2#include <dt-bindings/spmi/spmi.h>
3#include <dt-bindings/msm/power-on.h>
4
5&spmi_bus {
6 qcom,pm660l@2 {
7 compatible = "qcom,spmi-pmic";
8 reg = <0x2 SPMI_USID>;
9 #address-cells = <2>;
10 #size-cells = <0>;
11
12 pm660l_revid: qcom,revid@100 {
13 compatible = "qcom,qpnp-revid";
14 reg = <0x100 0x100>;
15 };
16
17 pm660l_pbs: qcom,pbs@7300 {
18 compatible = "qcom,qpnp-pbs";
19 reg = <0x7300 0x100>;
20 };
21
22 qcom,power-on@800 {
23 compatible = "qcom,qpnp-power-on";
24 reg = <0x800 0x100>;
25 qcom,secondary-pon-reset;
26 qcom,hard-reset-poweroff-type =
27 <PON_POWER_OFF_SHUTDOWN>;
28 };
29
30 pm660l_tz: qcom,temp-alarm@2400 {
31 compatible = "qcom,spmi-temp-alarm";
32 reg = <0x2400 0x100>;
33 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
34 #thermal-sensor-cells = <0>;
35 qcom,temperature-threshold-set = <1>;
36 };
37
38 pm660l_gpios: pinctrl@c000 {
39 compatible = "qcom,spmi-gpio";
40 reg = <0xc000 0xc00>;
41 interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
42 <0x2 0xc1 0 IRQ_TYPE_NONE>,
43 <0x2 0xc2 0 IRQ_TYPE_NONE>,
44 <0x2 0xc3 0 IRQ_TYPE_NONE>,
45 <0x2 0xc4 0 IRQ_TYPE_NONE>,
46 <0x2 0xc5 0 IRQ_TYPE_NONE>,
47 <0x2 0xc6 0 IRQ_TYPE_NONE>,
48 <0x2 0xc7 0 IRQ_TYPE_NONE>,
49 <0x2 0xc8 0 IRQ_TYPE_NONE>,
50 <0x2 0xc9 0 IRQ_TYPE_NONE>,
51 <0x2 0xca 0 IRQ_TYPE_NONE>,
52 <0x2 0xcb 0 IRQ_TYPE_NONE>;
53 interrupt-names = "pm660l_gpio1", "pm660l_gpio2",
54 "pm660l_gpio3", "pm660l_gpio4",
55 "pm660l_gpio5", "pm660l_gpio6",
56 "pm660l_gpio7", "pm660l_gpio8",
57 "pm660l_gpio9", "pm660l_gpio10",
58 "pm660l_gpio11", "pm660l_gpio12";
59 gpio-controller;
60 #gpio-cells = <2>;
61 };
62 };
63
64 pm660l_3: qcom,pm660l@3 {
65 compatible ="qcom,spmi-pmic";
66 reg = <0x3 SPMI_USID>;
67 #address-cells = <2>;
68 #size-cells = <0>;
69
70 pm660l_lpg: qcom,pwms@b100 {
71 compatible = "qcom,pwm-lpg";
72 reg = <0xb100 0x300>, <0xb000 0x100>;
73 reg-names = "lpg-base", "lut-base";
74 #pwm-cells = <2>;
75 qcom,num-lpg-channels = <3>;
76 qcom,lut-patterns = <0 10 20 30 40 50 60 70 80 90 100
77 90 80 70 60 50 40 30 20 10 0>;
78
79 lpg1 {
80 qcom,lpg-chan-id = <1>;
81 qcom,ramp-step-ms = <100>;
82 qcom,ramp-pause-hi-count = <2>;
83 qcom,ramp-pause-lo-count = <2>;
84 qcom,ramp-low-index = <0>;
85 qcom,ramp-high-index = <20>;
86 qcom,ramp-from-low-to-high;
87 qcom,ramp-pattern-repeat;
88 };
89 lpg2 {
90 qcom,lpg-chan-id = <2>;
91 qcom,ramp-step-ms = <100>;
92 qcom,ramp-pause-hi-count = <2>;
93 qcom,ramp-pause-lo-count = <2>;
94 qcom,ramp-low-index = <0>;
95 qcom,ramp-high-index = <20>;
96 qcom,ramp-from-low-to-high;
97 qcom,ramp-pattern-repeat;
98 };
99
100 lpg3 {
101 qcom,lpg-chan-id = <3>;
102 qcom,ramp-step-ms = <100>;
103 qcom,ramp-pause-hi-count = <2>;
104 qcom,ramp-pause-lo-count = <2>;
105 qcom,ramp-low-index = <0>;
106 qcom,ramp-high-index = <20>;
107 qcom,ramp-from-low-to-high;
108 qcom,ramp-pattern-repeat;
109 };
110 };
111
112 pm660l_pwm: qcom,pwms@b400 {
113 compatible = "qcom,pwm-lpg";
114 reg = <0xb400 0x100>;
115 reg-names = "lpg-base";
116 #pwm-cells = <2>;
117 qcom,num-lpg-channels = <1>;
118 };
119
120 pm660l_rgb_led: qcom,leds@d000 {
121 compatible = "qcom,tri-led";
122 reg = <0xd000 0x100>;
123 red {
124 label = "red";
125 pwms = <&pm660l_lpg 2 1000000>;
126 led-sources = <0>;
127 linux,default-trigger = "timer";
128 };
129 green {
130 label = "green";
131 pwms = <&pm660l_lpg 1 1000000>;
132 led-sources = <1>;
133 linux,default-trigger = "timer";
134 };
135 blue {
136 label = "blue";
137 pwms = <&pm660l_lpg 0 1000000>;
138 led-sources = <2>;
139 linux,default-trigger = "timer";
140 };
141 };
142
143 pm660l_wled: qcom,leds@d800 {
144 compatible = "qcom,pm660l-spmi-wled";
145 reg = <0xd800 0x100>,
146 <0xd900 0x100>;
147 reg-names = "wled-ctrl-base",
148 "wled-sink-base";
149 interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
150 interrupt-names = "ovp-irq";
151 label = "backlight";
152 qcom,pmic-revid = <&pm660l_revid>;
153 qcom,auto-calibration;
154 qcom,sync-dly = <800>;
155 status = "ok";
156 };
157
158 flash_led: qcom,leds@d300 {
159 compatible = "qcom,qpnp-flash-led-v2";
160 reg = <0xd300 0x100>;
161 label = "flash";
162 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
163 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
164 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
165 interrupt-names = "led-fault-irq",
166 "all-ramp-down-done-irq",
167 "all-ramp-up-done-irq";
168 qcom,hdrm-auto-mode;
169 qcom,short-circuit-det;
170 qcom,open-circuit-det;
171 qcom,vph-droop-det;
172 qcom,thermal-derate-en;
173 qcom,thermal-derate-current = <200 500 1000>;
174 qcom,isc-delay = <192>;
175 qcom,pmic-revid = <&pm660l_revid>;
176
177 pm660l_flash0: qcom,flash_0 {
178 label = "flash";
179 qcom,led-name = "led:flash_0";
180 qcom,max-current = <1500>;
181 qcom,default-led-trigger = "flash0_trigger";
182 qcom,id = <0>;
183 qcom,current-ma = <1000>;
184 qcom,duration-ms = <1280>;
185 qcom,ires-ua = <12500>;
186 qcom,hdrm-voltage-mv = <325>;
187 qcom,hdrm-vol-hi-lo-win-mv = <100>;
188 };
189
190 pm660l_flash1: qcom,flash_1 {
191 label = "flash";
192 qcom,led-name = "led:flash_1";
193 qcom,max-current = <1500>;
194 qcom,default-led-trigger = "flash1_trigger";
195 qcom,id = <1>;
196 qcom,current-ma = <1000>;
197 qcom,duration-ms = <1280>;
198 qcom,ires-ua = <12500>;
199 qcom,hdrm-voltage-mv = <325>;
200 qcom,hdrm-vol-hi-lo-win-mv = <100>;
201 };
202
203 pm660l_flash2: qcom,flash_2 {
204 label = "flash";
205 qcom,led-name = "led:flash_2";
206 qcom,max-current = <750>;
207 qcom,default-led-trigger = "flash2_trigger";
208 qcom,id = <2>;
209 qcom,current-ma = <500>;
210 qcom,duration-ms = <1280>;
211 qcom,ires-ua = <12500>;
212 qcom,hdrm-voltage-mv = <325>;
213 qcom,hdrm-vol-hi-lo-win-mv = <100>;
214 };
215
216 pm660l_torch0: qcom,torch_0 {
217 label = "torch";
218 qcom,led-name = "led:torch_0";
219 qcom,max-current = <500>;
220 qcom,default-led-trigger = "torch0_trigger";
221 qcom,id = <0>;
222 qcom,current-ma = <300>;
223 qcom,ires-ua = <12500>;
224 qcom,hdrm-voltage-mv = <325>;
225 qcom,hdrm-vol-hi-lo-win-mv = <100>;
226 };
227
228 pm660l_torch1: qcom,torch_1 {
229 label = "torch";
230 qcom,led-name = "led:torch_1";
231 qcom,max-current = <500>;
232 qcom,default-led-trigger = "torch1_trigger";
233 qcom,id = <1>;
234 qcom,current-ma = <300>;
235 qcom,ires-ua = <12500>;
236 qcom,hdrm-voltage-mv = <325>;
237 qcom,hdrm-vol-hi-lo-win-mv = <100>;
238 };
239
240 pm660l_torch2: qcom,torch_2 {
241 label = "torch";
242 qcom,led-name = "led:torch_2";
243 qcom,max-current = <500>;
244 qcom,default-led-trigger = "torch2_trigger";
245 qcom,id = <2>;
246 qcom,current-ma = <300>;
247 qcom,ires-ua = <12500>;
248 qcom,hdrm-voltage-mv = <325>;
249 qcom,hdrm-vol-hi-lo-win-mv = <100>;
250 };
251
252 pm660l_switch0: qcom,led_switch_0 {
253 label = "switch";
254 qcom,led-name = "led:switch_0";
255 qcom,led-mask = <3>;
256 qcom,default-led-trigger = "switch0_trigger";
257 };
258
259 pm660l_switch1: qcom,led_switch_1 {
260 label = "switch";
261 qcom,led-name = "led:switch_1";
262 qcom,led-mask = <4>;
263 qcom,default-led-trigger = "switch1_trigger";
264 };
265 };
266
267 pm660l_lcdb: qpnp-lcdb@ec00 {
268 compatible = "qcom,qpnp-lcdb-regulator";
269 #address-cells = <1>;
270 #size-cells = <1>;
271 reg = <0xec00 0x100>;
272 interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>;
273 interrupt-names = "sc-irq";
274
275 qcom,pmic-revid = <&pm660l_revid>;
276
277 lcdb_ldo_vreg: ldo {
278 label = "ldo";
279 regulator-name = "lcdb_ldo";
280 regulator-min-microvolt = <4000000>;
281 regulator-max-microvolt = <6000000>;
282 };
283
284 lcdb_ncp_vreg: ncp {
285 label = "ncp";
286 regulator-name = "lcdb_ncp";
287 regulator-min-microvolt = <4000000>;
288 regulator-max-microvolt = <6000000>;
289 };
290 };
291
292 pm660a_oledb: qpnp-oledb@e000 {
293 compatible = "qcom,qpnp-oledb-regulator";
294 #address-cells = <1>;
295 #size-cells = <1>;
296 qcom,pmic-revid = <&pm660l_revid>;
297 reg = <0xe000 0x100>;
298 qcom,pbs-client = <&pm660l_pbs>;
299
300 label = "oledb";
301 regulator-name = "regulator-oledb";
302 regulator-min-microvolt = <5000000>;
303 regulator-max-microvolt = <8100000>;
304
305 qcom,swire-control;
306 qcom,ext-pin-control;
307 status = "disabled";
308 };
309
310 pm660a_labibb: qpnp-labibb-regulator {
311 compatible = "qcom,qpnp-labibb-regulator";
312 #address-cells = <1>;
313 #size-cells = <1>;
314 qcom,pmic-revid = <&pm660l_revid>;
315 qcom,swire-control;
316 status = "disabled";
317
318 ibb_regulator: qcom,ibb@dc00 {
319 reg = <0xdc00 0x100>;
320 reg-names = "ibb_reg";
321 regulator-name = "ibb_reg";
322
323 regulator-min-microvolt = <4000000>;
324 regulator-max-microvolt = <6300000>;
325
326 qcom,qpnp-ibb-min-voltage = <1400000>;
327 qcom,qpnp-ibb-step-size = <100000>;
328 qcom,qpnp-ibb-slew-rate = <2000000>;
329 qcom,qpnp-ibb-init-voltage = <4000000>;
330 qcom,qpnp-ibb-init-amoled-voltage = <4000000>;
331 };
332
333 lab_regulator: qcom,lab@de00 {
334 reg = <0xde00 0x100>;
335 reg-names = "lab";
336 regulator-name = "lab_reg";
337
338 regulator-min-microvolt = <4600000>;
339 regulator-max-microvolt = <6100000>;
340
341 qcom,qpnp-lab-min-voltage = <4600000>;
342 qcom,qpnp-lab-step-size = <100000>;
343 qcom,qpnp-lab-slew-rate = <5000>;
344 qcom,qpnp-lab-init-voltage = <4600000>;
345 qcom,qpnp-lab-init-amoled-voltage = <4600000>;
346
347 qcom,notify-lab-vreg-ok-sts;
348 };
349 };
350 };
351};
352
353&thermal_zones {
354 pm660l_temp_alarm: pm660l-tz {
355 polling-delay-passive = <0>;
356 polling-delay = <0>;
357 thermal-governor = "step_wise";
358 thermal-sensors = <&pm660l_tz>;
359 wake-capable-sensor;
360
361 trips {
362 pm660l_trip0: trip0 {
363 temperature = <95000>;
364 hysteresis = <0>;
365 type = "passive";
366 };
367 pm660l_trip1: trip1 {
368 temperature = <115000>;
369 hysteresis = <0>;
370 type = "passive";
371 };
372 trip2 {
373 temperature = <145000>;
374 hysteresis = <0>;
375 type = "passive";
376 };
377 };
378 };
379};