xref: /linux/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts (revision d53b8e36925256097a08d7cb749198d85cbf9b2b)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
4 */
5
6/dts-v1/;
7
8/* PM7250B is configured to use SID2/3 */
9#define PM7250B_SID 2
10#define PM7250B_SID1 3
11
12/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */
13#define PMK8350_SID 6
14
15#include <dt-bindings/firmware/qcom,scm.h>
16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
18#include <dt-bindings/input/input.h>
19#include <dt-bindings/leds/common.h>
20#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
21#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
22#include <dt-bindings/usb/pd.h>
23#include "sm7225.dtsi"
24#include "pm6150l.dtsi"
25#include "pm6350.dtsi"
26#include "pm7250b.dtsi"
27#include "pmk8350.dtsi"
28
29/ {
30	model = "Fairphone 4";
31	compatible = "fairphone,fp4", "qcom,sm7225";
32	chassis-type = "handset";
33
34	/* required for bootloader to select correct board */
35	qcom,msm-id = <434 0x10000>, <459 0x10000>;
36	qcom,board-id = <8 32>;
37
38	aliases {
39		serial0 = &uart9;
40		serial1 = &uart1;
41	};
42
43	chosen {
44		#address-cells = <2>;
45		#size-cells = <2>;
46		ranges;
47
48		stdout-path = "serial0:115200n8";
49
50		framebuffer0: framebuffer@a000000 {
51			compatible = "simple-framebuffer";
52			reg = <0 0xa0000000 0 (2340 * 1080 * 4)>;
53			width = <1080>;
54			height = <2340>;
55			stride = <(1080 * 4)>;
56			format = "a8r8g8b8";
57		};
58	};
59
60	gpio-keys {
61		compatible = "gpio-keys";
62		pinctrl-names = "default";
63		pinctrl-0 = <&gpio_keys_pin>;
64
65		key-volume-up {
66			label = "volume_up";
67			linux,code = <KEY_VOLUMEUP>;
68			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
69		};
70	};
71
72	/* Dummy regulator until PM6150L has LCDB VSP/VSN support */
73	lcdb_dummy: regulator-lcdb-dummy {
74		compatible = "regulator-fixed";
75		regulator-name = "lcdb_dummy";
76		regulator-min-microvolt = <5500000>;
77		regulator-max-microvolt = <5500000>;
78	};
79
80	reserved-memory {
81		/*
82		 * The rmtfs memory region in downstream is 'dynamically allocated'
83		 * but given the same address every time. Hard code it as this address is
84		 * where the modem firmware expects it to be.
85		 */
86		memory@efe01000 {
87			compatible = "qcom,rmtfs-mem";
88			reg = <0 0xefe01000 0 0x600000>;
89			no-map;
90
91			qcom,client-id = <1>;
92			qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
93		};
94	};
95
96	msm_therm_sensor: thermal-sensor-msm {
97		compatible = "generic-adc-thermal";
98		#thermal-sensor-cells = <0>;
99		io-channels = <&pm6150l_adc ADC5_AMUX_THM2_100K_PU>;
100		io-channel-names = "sensor-channel";
101	};
102
103	rear_cam_sensor: thermal-sensor-rear-cam {
104		compatible = "generic-adc-thermal";
105		#thermal-sensor-cells = <0>;
106		io-channels = <&pm6150l_adc ADC5_GPIO2_100K_PU>;
107		io-channel-names = "sensor-channel";
108	};
109
110	thermal-zones {
111		chg-skin-thermal {
112			thermal-sensors = <&pm7250b_adc_tm 0>;
113
114			trips {
115				active-config0 {
116					temperature = <125000>;
117					hysteresis = <1000>;
118					type = "passive";
119				};
120			};
121		};
122
123		conn-thermal {
124			thermal-sensors = <&pm7250b_adc_tm 1>;
125
126			trips {
127				active-config0 {
128					temperature = <125000>;
129					hysteresis = <1000>;
130					type = "passive";
131				};
132			};
133		};
134
135		pa0-thermal {
136			thermal-sensors = <&pm6150l_adc_tm 1>;
137
138			trips {
139				active-config0 {
140					temperature = <125000>;
141					hysteresis = <1000>;
142					type = "passive";
143				};
144			};
145		};
146
147		pa1-thermal {
148			thermal-sensors = <&pm6150l_adc_tm 0>;
149
150			trips {
151				active-config0 {
152					temperature = <125000>;
153					hysteresis = <1000>;
154					type = "passive";
155				};
156			};
157		};
158
159		pm8008-thermal {
160			polling-delay-passive = <100>;
161			thermal-sensors = <&pm8008>;
162
163			trips {
164				trip0 {
165					temperature = <95000>;
166					hysteresis = <0>;
167					type = "passive";
168				};
169
170				trip1 {
171					temperature = <115000>;
172					hysteresis = <0>;
173					type = "critical";
174				};
175			};
176		};
177
178		quiet-thermal {
179			thermal-sensors = <&pm6150l_adc_tm 3>;
180
181			trips {
182				active-config0 {
183					temperature = <125000>;
184					hysteresis = <1000>;
185					type = "passive";
186				};
187			};
188		};
189
190		rear-cam-thermal {
191			polling-delay-passive = <1000>;
192			polling-delay = <5000>;
193			thermal-sensors = <&rear_cam_sensor>;
194
195			trips {
196				active-config0 {
197					temperature = <125000>;
198					hysteresis = <1000>;
199					type = "passive";
200				};
201			};
202		};
203
204		rfc-flash-thermal {
205			thermal-sensors = <&pm6150l_adc_tm 2>;
206
207			trips {
208				active-config0 {
209					temperature = <125000>;
210					hysteresis = <1000>;
211					type = "passive";
212				};
213			};
214		};
215
216		sdm-skin-thermal {
217			polling-delay-passive = <1000>;
218			polling-delay = <5000>;
219			thermal-sensors = <&msm_therm_sensor>;
220
221			trips {
222				trip0 {
223					temperature = <45000>;
224					hysteresis = <0>;
225					type = "passive";
226				};
227
228				trip1 {
229					temperature = <55000>;
230					hysteresis = <0>;
231					type = "critical";
232				};
233			};
234		};
235
236		xo-thermal {
237			thermal-sensors = <&pmk8350_adc_tm 0>;
238
239			trips {
240				active-config0 {
241					temperature = <125000>;
242					hysteresis = <1000>;
243					type = "passive";
244				};
245			};
246		};
247	};
248};
249
250&adsp {
251	firmware-name = "qcom/sm7225/fairphone4/adsp.mbn";
252	status = "okay";
253};
254
255&apps_rsc {
256	regulators-0 {
257		compatible = "qcom,pm6350-rpmh-regulators";
258		qcom,pmic-id = "a";
259
260		vreg_s1a: smps1 {
261			regulator-name = "vreg_s1a";
262			regulator-min-microvolt = <1000000>;
263			regulator-max-microvolt = <1200000>;
264		};
265
266		vreg_s2a: smps2 {
267			regulator-name = "vreg_s2a";
268			regulator-min-microvolt = <1503000>;
269			regulator-max-microvolt = <2048000>;
270		};
271
272		vreg_l2a: ldo2 {
273			regulator-name = "vreg_l2a";
274			regulator-min-microvolt = <1503000>;
275			regulator-max-microvolt = <1980000>;
276			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
277		};
278
279		vreg_l3a: ldo3 {
280			regulator-name = "vreg_l3a";
281			regulator-min-microvolt = <2700000>;
282			regulator-max-microvolt = <3300000>;
283			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
284		};
285
286		vreg_l4a: ldo4 {
287			regulator-name = "vreg_l4a";
288			regulator-min-microvolt = <352000>;
289			regulator-max-microvolt = <801000>;
290			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
291		};
292
293		vreg_l5a: ldo5 {
294			regulator-name = "vreg_l5a";
295			regulator-min-microvolt = <1503000>;
296			regulator-max-microvolt = <1980000>;
297			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
298		};
299
300		vreg_l6a: ldo6 {
301			regulator-name = "vreg_l6a";
302			regulator-min-microvolt = <1710000>;
303			regulator-max-microvolt = <3544000>;
304			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
305		};
306
307		vreg_l7a: ldo7 {
308			regulator-name = "vreg_l7a";
309			regulator-min-microvolt = <1620000>;
310			regulator-max-microvolt = <1980000>;
311			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
312		};
313
314		vreg_l8a: ldo8 {
315			regulator-name = "vreg_l8a";
316			regulator-min-microvolt = <2800000>;
317			regulator-max-microvolt = <2800000>;
318			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
319		};
320
321		vreg_l9a: ldo9 {
322			regulator-name = "vreg_l9a";
323			regulator-min-microvolt = <1650000>;
324			regulator-max-microvolt = <3401000>;
325			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
326		};
327
328		vreg_l11a: ldo11 {
329			regulator-name = "vreg_l11a";
330			regulator-min-microvolt = <1800000>;
331			regulator-max-microvolt = <2000000>;
332			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
333		};
334
335		vreg_l12a: ldo12 {
336			regulator-name = "vreg_l12a";
337			regulator-min-microvolt = <1620000>;
338			regulator-max-microvolt = <1980000>;
339			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
340		};
341
342		vreg_l13a: ldo13 {
343			regulator-name = "vreg_l13a";
344			regulator-min-microvolt = <570000>;
345			regulator-max-microvolt = <650000>;
346			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
347		};
348
349		vreg_l14a: ldo14 {
350			regulator-name = "vreg_l14a";
351			regulator-min-microvolt = <1700000>;
352			regulator-max-microvolt = <1900000>;
353			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
354		};
355
356		vreg_l15a: ldo15 {
357			regulator-name = "vreg_l15a";
358			regulator-min-microvolt = <1100000>;
359			regulator-max-microvolt = <1305000>;
360			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
361		};
362
363		vreg_l16a: ldo16 {
364			regulator-name = "vreg_l16a";
365			regulator-min-microvolt = <830000>;
366			regulator-max-microvolt = <921000>;
367			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
368		};
369
370		vreg_l18a: ldo18 {
371			regulator-name = "vreg_l18a";
372			regulator-min-microvolt = <788000>;
373			regulator-max-microvolt = <1049000>;
374			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
375		};
376
377		vreg_l19a: ldo19 {
378			regulator-name = "vreg_l19a";
379			regulator-min-microvolt = <1080000>;
380			regulator-max-microvolt = <1305000>;
381			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
382		};
383
384		vreg_l20a: ldo20 {
385			regulator-name = "vreg_l20a";
386			regulator-min-microvolt = <530000>;
387			regulator-max-microvolt = <801000>;
388			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
389		};
390
391		vreg_l21a: ldo21 {
392			regulator-name = "vreg_l21a";
393			regulator-min-microvolt = <751000>;
394			regulator-max-microvolt = <825000>;
395			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
396		};
397
398		vreg_l22a: ldo22 {
399			regulator-name = "vreg_l22a";
400			regulator-min-microvolt = <1080000>;
401			regulator-max-microvolt = <1305000>;
402			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
403		};
404	};
405
406	regulators-1 {
407		compatible = "qcom,pm6150l-rpmh-regulators";
408		qcom,pmic-id = "e";
409
410		vreg_s8e: smps8 {
411			regulator-name = "vreg_s8e";
412			regulator-min-microvolt = <313000>;
413			regulator-max-microvolt = <1395000>;
414		};
415
416		vreg_l1e: ldo1 {
417			regulator-name = "vreg_l1e";
418			regulator-min-microvolt = <1620000>;
419			regulator-max-microvolt = <1980000>;
420			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
421		};
422
423		vreg_l2e: ldo2 {
424			regulator-name = "vreg_l2e";
425			regulator-min-microvolt = <1170000>;
426			regulator-max-microvolt = <1305000>;
427			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
428		};
429
430		vreg_l3e: ldo3 {
431			regulator-name = "vreg_l3e";
432			regulator-min-microvolt = <1100000>;
433			regulator-max-microvolt = <1299000>;
434			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
435		};
436
437		vreg_l4e: ldo4 {
438			regulator-name = "vreg_l4e";
439			regulator-min-microvolt = <1620000>;
440			regulator-max-microvolt = <3300000>;
441			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
442		};
443
444		vreg_l5e: ldo5 {
445			regulator-name = "vreg_l5e";
446			regulator-min-microvolt = <1620000>;
447			regulator-max-microvolt = <3300000>;
448			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
449		};
450
451		vreg_l6e: ldo6 {
452			regulator-name = "vreg_l6e";
453			regulator-min-microvolt = <1700000>;
454			regulator-max-microvolt = <2950000>;
455			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
456			regulator-allow-set-load;
457			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
458						   RPMH_REGULATOR_MODE_HPM>;
459		};
460
461		vreg_l7e: ldo7 {
462			regulator-name = "vreg_l7e";
463			regulator-min-microvolt = <2700000>;
464			regulator-max-microvolt = <3544000>;
465			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
466		};
467
468		vreg_l8e: ldo8 {
469			regulator-name = "vreg_l8e";
470			regulator-min-microvolt = <1620000>;
471			regulator-max-microvolt = <2000000>;
472			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
473		};
474
475		vreg_l9e: ldo9 {
476			regulator-name = "vreg_l9e";
477			regulator-min-microvolt = <2700000>;
478			regulator-max-microvolt = <2960000>;
479			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
480			regulator-allow-set-load;
481			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
482						   RPMH_REGULATOR_MODE_HPM>;
483		};
484
485		vreg_l10e: ldo10 {
486			regulator-name = "vreg_l10e";
487			regulator-min-microvolt = <3000000>;
488			regulator-max-microvolt = <3401000>;
489			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
490		};
491
492		vreg_l11e: ldo11 {
493			regulator-name = "vreg_l11e";
494			regulator-min-microvolt = <3000000>;
495			regulator-max-microvolt = <3401000>;
496			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
497		};
498
499		vreg_bob: bob {
500			regulator-name = "vreg_bob";
501			regulator-min-microvolt = <1620000>;
502			regulator-max-microvolt = <5492000>;
503			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
504			regulator-allow-bypass;
505		};
506	};
507};
508
509&cci0 {
510	status = "okay";
511};
512
513&cci0_i2c0 {
514	/* IMX582 @ 0x1a */
515};
516
517&cci0_i2c1 {
518	/* IMX582 @ 0x1a */
519};
520
521&cci1 {
522	status = "okay";
523};
524
525&cci1_i2c0 {
526	/* IMX576 @ 0x10 */
527};
528
529&cdsp {
530	firmware-name = "qcom/sm7225/fairphone4/cdsp.mbn";
531	status = "okay";
532};
533
534&gpi_dma0 {
535	status = "okay";
536};
537
538&gpi_dma1 {
539	status = "okay";
540};
541
542&gpu {
543	status = "okay";
544};
545
546&gpu_zap_shader {
547	firmware-name = "qcom/sm7225/fairphone4/a615_zap.mbn";
548};
549
550&i2c0 {
551	clock-frequency = <400000>;
552	status = "okay";
553
554	/* ST21NFCD NFC @ 8 */
555	/* VL53L3 ToF @ 29 */
556	/* AW88264A amplifier @ 34 */
557	/* AW88264A amplifier @ 35 */
558};
559
560&i2c8 {
561	clock-frequency = <400000>;
562	status = "okay";
563
564	/* HX83112A touchscreen @ 48 */
565};
566
567&i2c10 {
568	clock-frequency = <400000>;
569	status = "okay";
570
571	pm8008: pmic@8 {
572		compatible = "qcom,pm8008";
573		reg = <0x8>;
574
575		interrupts-extended = <&tlmm 59 IRQ_TYPE_EDGE_RISING>;
576		reset-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
577
578		vdd-l1-l2-supply = <&vreg_s8e>;
579		vdd-l3-l4-supply = <&vreg_bob>;
580		vdd-l5-supply = <&vreg_bob>;
581		vdd-l6-supply = <&vreg_s2a>;
582		vdd-l7-supply = <&vreg_bob>;
583
584		pinctrl-names = "default";
585		pinctrl-0 = <&pm8008_default>;
586
587		gpio-controller;
588		#gpio-cells = <2>;
589		gpio-ranges = <&pm8008 0 0 2>;
590
591		interrupt-controller;
592		#interrupt-cells = <2>;
593
594		#thermal-sensor-cells = <0>;
595
596		regulators {
597			vreg_l1p: ldo1 {
598				regulator-name = "vreg_l1p";
599				regulator-min-microvolt = <528000>;
600				regulator-max-microvolt = <1200000>;
601			};
602
603			vreg_l2p: ldo2 {
604				regulator-name = "vreg_l2p";
605				regulator-min-microvolt = <528000>;
606				regulator-max-microvolt = <1200000>;
607			};
608
609			vreg_l3p: ldo3 {
610				regulator-name = "vreg_l3p";
611				regulator-min-microvolt = <1500000>;
612				regulator-max-microvolt = <2800000>;
613			};
614
615			vreg_l4p: ldo4 {
616				regulator-name = "vreg_l4p";
617				regulator-min-microvolt = <1500000>;
618				regulator-max-microvolt = <2904000>;
619			};
620
621			vreg_l5p: ldo5 {
622				regulator-name = "vreg_l5p";
623				regulator-min-microvolt = <1500000>;
624				regulator-max-microvolt = <2900000>;
625			};
626
627			vreg_l6p: ldo6 {
628				regulator-name = "vreg_l6p";
629				regulator-min-microvolt = <1500000>;
630				regulator-max-microvolt = <1800000>;
631			};
632
633			vreg_l7p: ldo7 {
634				regulator-name = "vreg_l7p";
635				regulator-min-microvolt = <1500000>;
636				regulator-max-microvolt = <3140000>;
637			};
638		};
639	};
640
641	/* PX8618 @ 26 */
642	/* SMB1395 PMIC @ 34 */
643	/* awinic,aw8695 @ 5a */
644};
645
646&ipa {
647	qcom,gsi-loader = "self";
648	memory-region = <&pil_ipa_fw_mem>;
649	firmware-name = "qcom/sm7225/fairphone4/ipa_fws.mbn";
650	status = "okay";
651};
652
653&mdss {
654	status = "okay";
655};
656
657&mdss_dsi0 {
658	vdda-supply = <&vreg_l22a>;
659	status = "okay";
660
661	panel@0 {
662		compatible = "djn,9a-3r063-1102b";
663		reg = <0>;
664
665		backlight = <&pm6150l_wled>;
666		reset-gpios = <&pm6150l_gpios 9 GPIO_ACTIVE_LOW>;
667
668		vdd1-supply = <&vreg_l1e>;
669		vsn-supply = <&lcdb_dummy>;
670		vsp-supply = <&lcdb_dummy>;
671
672		port {
673			panel_in: endpoint {
674				remote-endpoint = <&mdss_dsi0_out>;
675			};
676		};
677	};
678};
679
680&mdss_dsi0_out {
681	data-lanes = <0 1 2 3>;
682	remote-endpoint = <&panel_in>;
683};
684
685&mdss_dsi0_phy {
686	vdds-supply = <&vreg_l18a>;
687	status = "okay";
688};
689
690&mpss {
691	firmware-name = "qcom/sm7225/fairphone4/modem.mbn";
692	status = "okay";
693};
694
695&pm6150l_adc {
696	pinctrl-0 = <&pm6150l_adc_default>;
697	pinctrl-names = "default";
698
699	channel@4d {
700		reg = <ADC5_AMUX_THM1_100K_PU>;
701		label = "pa_therm1";
702		qcom,hw-settle-time = <200>;
703		qcom,pre-scaling = <1 1>;
704		qcom,ratiometric;
705	};
706
707	channel@4e {
708		reg = <ADC5_AMUX_THM2_100K_PU>;
709		label = "msm_therm";
710		qcom,hw-settle-time = <200>;
711		qcom,pre-scaling = <1 1>;
712		qcom,ratiometric;
713	};
714
715	channel@4f {
716		reg = <ADC5_AMUX_THM3_100K_PU>;
717		label = "pa_therm0";
718		qcom,hw-settle-time = <200>;
719		qcom,pre-scaling = <1 1>;
720		qcom,ratiometric;
721	};
722
723	channel@53 {
724		reg = <ADC5_GPIO2_100K_PU>;
725		label = "rear_cam_therm";
726		qcom,hw-settle-time = <200>;
727		qcom,pre-scaling = <1 1>;
728		qcom,ratiometric;
729	};
730
731	channel@54 {
732		reg = <ADC5_GPIO3_100K_PU>;
733		label = "rear_cam_flash_therm";
734		qcom,hw-settle-time = <200>;
735		qcom,pre-scaling = <1 1>;
736		qcom,ratiometric;
737	};
738
739	channel@55 {
740		reg = <ADC5_GPIO4_100K_PU>;
741		label = "quiet_therm";
742		qcom,hw-settle-time = <200>;
743		qcom,pre-scaling = <1 1>;
744		qcom,ratiometric;
745	};
746};
747
748&pm6150l_adc_tm {
749	status = "okay";
750
751	pa-therm1@0 {
752		reg = <0>;
753		io-channels = <&pm6150l_adc ADC5_AMUX_THM1_100K_PU>;
754		qcom,hw-settle-time-us = <200>;
755		qcom,ratiometric;
756	};
757
758	pa-therm0@1 {
759		reg = <1>;
760		io-channels = <&pm6150l_adc ADC5_AMUX_THM3_100K_PU>;
761		qcom,hw-settle-time-us = <200>;
762		qcom,ratiometric;
763	};
764
765	rear-cam-flash-therm@2 {
766		reg = <2>;
767		io-channels = <&pm6150l_adc ADC5_GPIO3_100K_PU>;
768		qcom,hw-settle-time-us = <200>;
769		qcom,ratiometric;
770	};
771
772	quiet-therm@3 {
773		reg = <3>;
774		io-channels = <&pm6150l_adc ADC5_GPIO4_100K_PU>;
775		qcom,hw-settle-time-us = <200>;
776		qcom,ratiometric;
777	};
778};
779
780&pm6150l_flash {
781	status = "okay";
782
783	led-0 {
784		function = LED_FUNCTION_FLASH;
785		color = <LED_COLOR_ID_YELLOW>;
786		led-sources = <1>;
787		led-max-microamp = <180000>;
788		flash-max-microamp = <1000000>;
789		flash-max-timeout-us = <1280000>;
790	};
791
792	led-1 {
793		function = LED_FUNCTION_FLASH;
794		color = <LED_COLOR_ID_WHITE>;
795		led-sources = <2>;
796		led-max-microamp = <180000>;
797		flash-max-microamp = <1000000>;
798		flash-max-timeout-us = <1280000>;
799	};
800};
801
802&pm6150l_gpios {
803	pm6150l_adc_default: adc-default-state {
804		pins = "gpio6", "gpio7", "gpio10";
805		function = PMIC_GPIO_FUNC_NORMAL;
806		bias-high-impedance;
807	};
808};
809
810&pm6150l_wled {
811	qcom,switching-freq = <800>;
812	qcom,current-limit-microamp = <20000>;
813	qcom,num-strings = <2>;
814
815	status = "okay";
816};
817
818&pm6350_gpios {
819	gpio_keys_pin: gpio-keys-state {
820		pins = "gpio2";
821		function = PMIC_GPIO_FUNC_NORMAL;
822		bias-pull-up;
823		input-enable;
824		power-source = <0>;
825	};
826};
827
828&pm6350_resin {
829	linux,code = <KEY_VOLUMEDOWN>;
830	status = "okay";
831};
832
833&pm7250b_adc {
834	channel@4d {
835		reg = <ADC5_AMUX_THM1_100K_PU>;
836		qcom,ratiometric;
837		qcom,hw-settle-time = <200>;
838		qcom,pre-scaling = <1 1>;
839		label = "charger_skin_therm";
840	};
841
842	channel@4f {
843		reg = <ADC5_AMUX_THM3_100K_PU>;
844		qcom,ratiometric;
845		qcom,hw-settle-time = <200>;
846		qcom,pre-scaling = <1 1>;
847		label = "conn_therm";
848	};
849};
850
851&pm7250b_adc_tm {
852	status = "okay";
853
854	charger-skin-therm@0 {
855		reg = <0>;
856		io-channels = <&pm7250b_adc ADC5_AMUX_THM1_100K_PU>;
857		qcom,ratiometric;
858		qcom,hw-settle-time-us = <200>;
859	};
860
861	conn-therm@1 {
862		reg = <1>;
863		io-channels = <&pm7250b_adc ADC5_AMUX_THM3_100K_PU>;
864		qcom,ratiometric;
865		qcom,hw-settle-time-us = <200>;
866	};
867};
868
869&pm7250b_typec {
870	vdd-pdphy-supply = <&vreg_l3a>;
871
872	status = "okay";
873
874	connector {
875		compatible = "usb-c-connector";
876
877		power-role = "dual";
878		data-role = "dual";
879		self-powered;
880
881		/*
882		 * Disable USB Power Delivery for now, seems to need extra work
883		 * to support role switching while also letting the battery
884		 * charge still - without charger driver
885		 */
886		typec-power-opmode = "default";
887		pd-disable;
888
889		ports {
890			#address-cells = <1>;
891			#size-cells = <0>;
892
893			port@0 {
894				reg = <0>;
895				pm7250b_hs_in: endpoint {
896					remote-endpoint = <&usb_1_dwc3_hs_out>;
897				};
898			};
899
900			port@1 {
901				reg = <1>;
902				pm7250b_ss_in: endpoint {
903					remote-endpoint = <&usb_1_qmpphy_out>;
904				};
905			};
906		};
907	};
908};
909
910&pm7250b_vbus {
911	regulator-min-microamp = <500000>;
912	regulator-max-microamp = <1500000>;
913	status = "okay";
914};
915
916&pmk8350_adc_tm {
917	status = "okay";
918
919	xo-therm@0 {
920		reg = <0>;
921		io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
922		qcom,hw-settle-time-us = <200>;
923		qcom,ratiometric;
924	};
925};
926
927&pmk8350_rtc {
928	status = "okay";
929};
930
931&pmk8350_vadc {
932	channel@644 {
933		reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
934		qcom,ratiometric;
935		qcom,hw-settle-time = <200>;
936		qcom,pre-scaling = <1 1>;
937		label = "xo_therm";
938	};
939};
940
941&qup_uart1_cts {
942	/*
943	 * Configure a bias-bus-hold on CTS to lower power
944	 * usage when Bluetooth is turned off. Bus hold will
945	 * maintain a low power state regardless of whether
946	 * the Bluetooth module drives the pin in either
947	 * direction or leaves the pin fully unpowered.
948	 */
949	bias-bus-hold;
950};
951
952&qup_uart1_rts {
953	/* We'll drive RTS, so no pull */
954	drive-strength = <2>;
955	bias-disable;
956};
957
958&qup_uart1_rx {
959	/*
960	 * Configure a pull-up on RX. This is needed to avoid
961	 * garbage data when the TX pin of the Bluetooth module is
962	 * in tri-state (module powered off or not driving the
963	 * signal yet).
964	 */
965	bias-pull-up;
966};
967
968&qup_uart1_tx {
969	/* We'll drive TX, so no pull */
970	drive-strength = <2>;
971	bias-disable;
972};
973
974&qupv3_id_0 {
975	status = "okay";
976};
977
978&qupv3_id_1 {
979	status = "okay";
980};
981
982&sdc2_off_state {
983	sd-cd-pins {
984		pins = "gpio94";
985		function = "gpio";
986		drive-strength = <2>;
987		bias-disable;
988	};
989};
990
991&sdc2_on_state {
992	sd-cd-pins {
993		pins = "gpio94";
994		function = "gpio";
995		drive-strength = <2>;
996		bias-pull-up;
997	};
998};
999
1000&sdhc_2 {
1001	vmmc-supply = <&vreg_l9e>;
1002	vqmmc-supply = <&vreg_l6e>;
1003
1004	cd-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
1005
1006	status = "okay";
1007};
1008
1009&tlmm {
1010	gpio-reserved-ranges = <13 4>, <56 2>;
1011
1012	qup_uart1_sleep_cts: qup-uart1-sleep-cts-state {
1013		pins = "gpio61";
1014		function = "gpio";
1015		/*
1016		 * Configure a bias-bus-hold on CTS to lower power
1017		 * usage when Bluetooth is turned off. Bus hold will
1018		 * maintain a low power state regardless of whether
1019		 * the Bluetooth module drives the pin in either
1020		 * direction or leaves the pin fully unpowered.
1021		 */
1022		bias-bus-hold;
1023	};
1024
1025	qup_uart1_sleep_rts: qup-uart1-sleep-rts-state {
1026		pins = "gpio62";
1027		function = "gpio";
1028		/*
1029		 * Configure pull-down on RTS. As RTS is active low
1030		 * signal, pull it low to indicate the BT SoC that it
1031		 * can wakeup the system anytime from suspend state by
1032		 * pulling RX low (by sending wakeup bytes).
1033		 */
1034		bias-pull-down;
1035	};
1036
1037	qup_uart1_sleep_rx: qup-uart1-sleep-rx-state {
1038		pins = "gpio64";
1039		function = "gpio";
1040		/*
1041		 * Configure a pull-up on RX. This is needed to avoid
1042		 * garbage data when the TX pin of the Bluetooth module
1043		 * is floating which may cause spurious wakeups.
1044		 */
1045		bias-pull-up;
1046	};
1047
1048	qup_uart1_sleep_tx: qup-uart1-sleep-tx-state {
1049		pins = "gpio63";
1050		function = "gpio";
1051		/*
1052		 * Configure pull-up on TX when it isn't actively driven
1053		 * to prevent BT SoC from receiving garbage during sleep.
1054		 */
1055		bias-pull-up;
1056	};
1057
1058	pm8008_default: pm8008-default-state {
1059		int-pins {
1060			pins = "gpio59";
1061			function = "gpio";
1062			drive-strength = <2>;
1063			bias-pull-down;
1064		};
1065
1066		reset-n-pins {
1067			pins = "gpio58";
1068			function = "gpio";
1069			drive-strength = <2>;
1070			bias-disable;
1071		};
1072	};
1073};
1074
1075&uart1 {
1076	/delete-property/ interrupts;
1077	interrupts-extended = <&intc GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
1078			      <&tlmm 64 IRQ_TYPE_EDGE_FALLING>;
1079
1080	pinctrl-names = "default", "sleep";
1081	pinctrl-1 = <&qup_uart1_sleep_cts>, <&qup_uart1_sleep_rts>, <&qup_uart1_sleep_tx>, <&qup_uart1_sleep_rx>;
1082
1083	status = "okay";
1084
1085	bluetooth {
1086		compatible = "qcom,wcn3988-bt";
1087
1088		vddio-supply = <&vreg_l11a>;
1089		vddxo-supply = <&vreg_l7a>;
1090		vddrf-supply = <&vreg_l2e>;
1091		vddch0-supply = <&vreg_l10e>;
1092		swctrl-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
1093
1094		max-speed = <3200000>;
1095	};
1096};
1097
1098&uart9 {
1099	status = "okay";
1100};
1101
1102&ufs_mem_hc {
1103	reset-gpios = <&tlmm 156 GPIO_ACTIVE_LOW>;
1104
1105	vcc-supply = <&vreg_l7e>;
1106	vcc-max-microamp = <800000>;
1107	vccq2-supply = <&vreg_l12a>;
1108	vccq2-max-microamp = <800000>;
1109
1110	status = "okay";
1111};
1112
1113&ufs_mem_phy {
1114	vdda-phy-supply = <&vreg_l18a>;
1115	vdda-pll-supply = <&vreg_l22a>;
1116
1117	status = "okay";
1118};
1119
1120&usb_1 {
1121	status = "okay";
1122};
1123
1124&usb_1_dwc3 {
1125	maximum-speed = "super-speed";
1126	dr_mode = "otg";
1127};
1128
1129&usb_1_dwc3_hs_out {
1130	remote-endpoint = <&pm7250b_hs_in>;
1131};
1132
1133&usb_1_hsphy {
1134	vdd-supply = <&vreg_l18a>;
1135	vdda-pll-supply = <&vreg_l2a>;
1136	vdda-phy-dpdm-supply = <&vreg_l3a>;
1137
1138	status = "okay";
1139};
1140
1141&usb_1_qmpphy {
1142	vdda-phy-supply = <&vreg_l22a>;
1143	vdda-pll-supply = <&vreg_l16a>;
1144
1145	status = "okay";
1146};
1147
1148&usb_1_qmpphy_out {
1149	remote-endpoint = <&pm7250b_ss_in>;
1150};
1151
1152&wifi {
1153	vdd-0.8-cx-mx-supply = <&vreg_l4a>;
1154	vdd-1.8-xo-supply = <&vreg_l7a>;
1155	vdd-1.3-rfa-supply = <&vreg_l2e>;
1156	vdd-3.3-ch0-supply = <&vreg_l10e>;
1157	vdd-3.3-ch1-supply = <&vreg_l11e>;
1158
1159	status = "okay";
1160};
1161