1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2023, Luca Weiss <[email protected]>
4 */
5
6/dts-v1/;
7
8/* PM7250B is configured to use SID8/9 */
9#define PM7250B_SID 8
10#define PM7250B_SID1 9
11
12#include <dt-bindings/iio/qcom,spmi-adc7-pm7325.h>
13#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
14#include <dt-bindings/leds/common.h>
15#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
16#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
17#include "sc7280.dtsi"
18#include "pm7250b.dtsi"
19#include "pm7325.dtsi"
20#include "pm8350c.dtsi" /* PM7350C */
21#include "pmk8350.dtsi" /* PMK7325 */
22
23/delete-node/ &rmtfs_mem;
24
25/ {
26	model = "Fairphone 5";
27	compatible = "fairphone,fp5", "qcom,qcm6490";
28	chassis-type = "handset";
29
30	aliases {
31		serial0 = &uart5;
32		serial1 = &uart7;
33	};
34
35	chosen {
36		#address-cells = <2>;
37		#size-cells = <2>;
38		ranges;
39
40		framebuffer0: framebuffer@a000000 {
41			compatible = "simple-framebuffer";
42			reg = <0x0 0xe1000000 0x0 (2700 * 1224 * 4)>;
43			width = <1224>;
44			height = <2700>;
45			stride = <(1224 * 4)>;
46			format = "a8r8g8b8";
47			clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
48		};
49	};
50
51	gpio-keys {
52		compatible = "gpio-keys";
53
54		pinctrl-0 = <&volume_down_default>, <&hall_sensor_default>;
55		pinctrl-names = "default";
56
57		key-volume-up {
58			label = "Volume up";
59			gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>;
60			linux,code = <KEY_VOLUMEUP>;
61		};
62
63		/* Powered by the always-on vreg_l8c */
64		event-hall-sensor {
65			label = "Hall Effect Sensor";
66			gpios = <&tlmm 155 GPIO_ACTIVE_LOW>;
67			linux,input-type = <EV_SW>;
68			linux,code = <SW_LID>;
69			linux,can-disable;
70			wakeup-source;
71		};
72	};
73
74	pmic-glink {
75		compatible = "qcom,qcm6490-pmic-glink", "qcom,pmic-glink";
76
77		#address-cells = <1>;
78		#size-cells = <0>;
79
80		orientation-gpios = <&tlmm 140 GPIO_ACTIVE_HIGH>;
81
82		connector@0 {
83			compatible = "usb-c-connector";
84			reg = <0>;
85			power-role = "dual";
86			data-role = "dual";
87
88			ports {
89				#address-cells = <1>;
90				#size-cells = <0>;
91
92				port@0 {
93					reg = <0>;
94
95					pmic_glink_hs_in: endpoint {
96						remote-endpoint = <&usb_1_dwc3_hs>;
97					};
98				};
99
100				port@1 {
101					reg = <1>;
102
103					pmic_glink_ss_in: endpoint {
104						remote-endpoint = <&usb_1_dwc3_ss>;
105					};
106				};
107			};
108		};
109	};
110
111	vreg_afvdd_2p8: regulator-afvdd-2p8 {
112		compatible = "regulator-fixed";
113		regulator-name = "AFVDD_2P8";
114		regulator-min-microvolt = <2800000>;
115		regulator-max-microvolt = <2800000>;
116		gpio = <&tlmm 68 GPIO_ACTIVE_HIGH>;
117		enable-active-high;
118		vin-supply = <&vreg_bob>;
119	};
120
121	vreg_ois_avdd0_1p8: regulator-ois-avdd0-1p8 {
122		compatible = "regulator-fixed";
123		regulator-name = "OIS_AVDD0_1P8";
124		regulator-min-microvolt = <1800000>;
125		regulator-max-microvolt = <1800000>;
126		gpio = <&tlmm 157 GPIO_ACTIVE_HIGH>;
127		enable-active-high;
128		vin-supply = <&vreg_bob>;
129	};
130
131	vreg_ois_dvdd_1p1: regulator-ois-dvdd-1p1 {
132		compatible = "regulator-fixed";
133		regulator-name = "OIS_DVDD_1P1";
134		regulator-min-microvolt = <1100000>;
135		regulator-max-microvolt = <1100000>;
136		gpio = <&tlmm 97 GPIO_ACTIVE_HIGH>;
137		enable-active-high;
138		vin-supply = <&vreg_s8b>;
139	};
140
141	reserved-memory {
142		cont_splash_mem: cont-splash@e1000000 {
143			reg = <0x0 0xe1000000 0x0 0x2300000>;
144			no-map;
145		};
146
147		cdsp_mem: cdsp@88f00000 {
148			reg = <0x0 0x88f00000 0x0 0x1e00000>;
149			no-map;
150		};
151
152		removed_mem: removed@c0000000 {
153			reg = <0x0 0xc0000000 0x0 0x5100000>;
154			no-map;
155		};
156
157		rmtfs_mem: memory@f8500000 {
158			compatible = "qcom,rmtfs-mem";
159			reg = <0x0 0xf8500000 0x0 0x600000>;
160			no-map;
161
162			qcom,client-id = <1>;
163			qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>, <QCOM_SCM_VMID_NAV>;
164		};
165	};
166
167	thermal-zones {
168		camera-thermal {
169			polling-delay-passive = <0>;
170
171			thermal-sensors = <&pmk8350_adc_tm 2>;
172
173			trips {
174				active-config0 {
175					temperature = <125000>;
176					hysteresis = <1000>;
177					type = "passive";
178				};
179			};
180		};
181
182		chg-skin-thermal {
183			polling-delay-passive = <0>;
184
185			thermal-sensors = <&pm7250b_adc_tm 0>;
186
187			trips {
188				active-config0 {
189					temperature = <125000>;
190					hysteresis = <1000>;
191					type = "passive";
192				};
193			};
194		};
195
196		conn-thermal {
197			polling-delay-passive = <0>;
198
199			thermal-sensors = <&pm7250b_adc_tm 1>;
200
201			trips {
202				active-config0 {
203					temperature = <125000>;
204					hysteresis = <1000>;
205					type = "passive";
206				};
207			};
208		};
209
210		mem-thermal {
211			polling-delay-passive = <0>;
212
213			thermal-sensors = <&pm7250b_adc_tm 2>;
214
215			trips {
216				active-config0 {
217					temperature = <125000>;
218					hysteresis = <1000>;
219					type = "passive";
220				};
221			};
222		};
223
224		pm8008-thermal {
225			polling-delay-passive = <100>;
226			thermal-sensors = <&pm8008>;
227
228			trips {
229				trip0 {
230					temperature = <95000>;
231					hysteresis = <0>;
232					type = "passive";
233				};
234
235				trip1 {
236					temperature = <115000>;
237					hysteresis = <0>;
238					type = "critical";
239				};
240			};
241		};
242
243		quiet-thermal {
244			polling-delay-passive = <0>;
245
246			thermal-sensors = <&pmk8350_adc_tm 1>;
247
248			trips {
249				active-config0 {
250					temperature = <125000>;
251					hysteresis = <1000>;
252					type = "passive";
253				};
254			};
255		};
256
257		rear-cam-thermal {
258			polling-delay-passive = <0>;
259
260			thermal-sensors = <&pmk8350_adc_tm 4>;
261
262			trips {
263				active-config0 {
264					temperature = <125000>;
265					hysteresis = <1000>;
266					type = "passive";
267				};
268			};
269		};
270
271		sdm-skin-thermal {
272			polling-delay-passive = <0>;
273
274			thermal-sensors = <&pmk8350_adc_tm 3>;
275
276			trips {
277				active-config0 {
278					temperature = <125000>;
279					hysteresis = <1000>;
280					type = "passive";
281				};
282			};
283		};
284
285		xo-thermal {
286			polling-delay-passive = <0>;
287
288			thermal-sensors = <&pmk8350_adc_tm 0>;
289
290			trips {
291				active-config0 {
292					temperature = <125000>;
293					hysteresis = <1000>;
294					type = "passive";
295				};
296			};
297		};
298	};
299};
300
301&apps_rsc {
302	regulators-0 {
303		compatible = "qcom,pm7325-rpmh-regulators";
304		qcom,pmic-id = "b";
305
306		vreg_s1b: smps1 {
307			regulator-name = "vreg_s1b";
308			regulator-min-microvolt = <1840000>;
309			regulator-max-microvolt = <2040000>;
310		};
311
312		vreg_s7b: smps7 {
313			regulator-name = "vreg_s7b";
314			regulator-min-microvolt = <535000>;
315			regulator-max-microvolt = <1120000>;
316		};
317
318		vreg_s8b: smps8 {
319			regulator-name = "vreg_s8b";
320			regulator-min-microvolt = <1200000>;
321			regulator-max-microvolt = <1500000>;
322			regulator-initial-mode = <RPMH_REGULATOR_MODE_RET>;
323		};
324
325		vreg_l1b: ldo1 {
326			regulator-name = "vreg_l1b";
327			regulator-min-microvolt = <825000>;
328			regulator-max-microvolt = <925000>;
329			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
330		};
331
332		vreg_l2b: ldo2 {
333			regulator-name = "vreg_l2b";
334			regulator-min-microvolt = <2700000>;
335			regulator-max-microvolt = <3544000>;
336			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
337		};
338
339		vreg_l3b: ldo3 {
340			regulator-name = "vreg_l3b";
341			regulator-min-microvolt = <312000>;
342			regulator-max-microvolt = <910000>;
343			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
344		};
345
346		vreg_l6b: ldo6 {
347			regulator-name = "vreg_l6b";
348			regulator-min-microvolt = <1140000>;
349			regulator-max-microvolt = <1260000>;
350			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
351		};
352
353		vreg_l7b: ldo7 {
354			regulator-name = "vreg_l7b";
355			/* Constrained for UFS VCC, at least until UFS driver scales voltage */
356			regulator-min-microvolt = <2952000>;
357			regulator-max-microvolt = <2952000>;
358			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
359		};
360
361		vreg_l8b: ldo8 {
362			regulator-name = "vreg_l8b";
363			regulator-min-microvolt = <870000>;
364			regulator-max-microvolt = <970000>;
365			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
366		};
367
368		vreg_l9b: ldo9 {
369			regulator-name = "vreg_l9b";
370			regulator-min-microvolt = <1200000>;
371			regulator-max-microvolt = <1304000>;
372			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
373		};
374
375		vreg_l11b: ldo11 {
376			regulator-name = "vreg_l11b";
377			regulator-min-microvolt = <1504000>;
378			regulator-max-microvolt = <2000000>;
379			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
380		};
381
382		vreg_l12b: ldo12 {
383			regulator-name = "vreg_l12b";
384			regulator-min-microvolt = <751000>;
385			regulator-max-microvolt = <824000>;
386			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
387		};
388
389		vreg_l13b: ldo13 {
390			regulator-name = "vreg_l13b";
391			regulator-min-microvolt = <530000>;
392			regulator-max-microvolt = <824000>;
393			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
394		};
395
396		vreg_l14b: ldo14 {
397			regulator-name = "vreg_l14b";
398			regulator-min-microvolt = <1080000>;
399			regulator-max-microvolt = <1304000>;
400			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
401		};
402
403		vreg_l15b: ldo15 {
404			regulator-name = "vreg_l15b";
405			regulator-min-microvolt = <765000>;
406			regulator-max-microvolt = <1020000>;
407			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
408		};
409
410		vreg_l16b: ldo16 {
411			regulator-name = "vreg_l16b";
412			regulator-min-microvolt = <1100000>;
413			regulator-max-microvolt = <1300000>;
414			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
415		};
416
417		vreg_l17b: ldo17 {
418			regulator-name = "vreg_l17b";
419			regulator-min-microvolt = <1700000>;
420			regulator-max-microvolt = <1900000>;
421			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
422		};
423
424		vreg_l18b: ldo18 {
425			regulator-name = "vreg_l18b";
426			regulator-min-microvolt = <1800000>;
427			regulator-max-microvolt = <2000000>;
428			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
429		};
430
431		vreg_l19b: ldo19 {
432			regulator-name = "vreg_l19b";
433			regulator-min-microvolt = <1800000>;
434			regulator-max-microvolt = <2000000>;
435			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
436		};
437	};
438
439	regulators-1 {
440		compatible = "qcom,pm8350c-rpmh-regulators";
441		qcom,pmic-id = "c";
442
443		vreg_s1c: smps1 {
444			regulator-name = "vreg_s1c";
445			regulator-min-microvolt = <2190000>;
446			regulator-max-microvolt = <2210000>;
447			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
448		};
449
450		vreg_s9c: smps9 {
451			regulator-name = "vreg_s9c";
452			regulator-min-microvolt = <1010000>;
453			regulator-max-microvolt = <1170000>;
454			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
455		};
456
457		vreg_l1c: ldo1 {
458			regulator-name = "vreg_l1c";
459			regulator-min-microvolt = <1800000>;
460			regulator-max-microvolt = <1980000>;
461			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
462		};
463
464		vreg_l2c: ldo2 {
465			regulator-name = "vreg_l2c";
466			regulator-min-microvolt = <1800000>;
467			regulator-max-microvolt = <1950000>;
468			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
469		};
470
471		vreg_l3c: ldo3 {
472			regulator-name = "vreg_l3c";
473			regulator-min-microvolt = <3000000>;
474			regulator-max-microvolt = <3400000>;
475			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
476		};
477
478		vreg_l4c: ldo4 {
479			regulator-name = "vreg_l4c";
480			regulator-min-microvolt = <1620000>;
481			regulator-max-microvolt = <3300000>;
482			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
483		};
484
485		vreg_l5c: ldo5 {
486			regulator-name = "vreg_l5c";
487			regulator-min-microvolt = <1620000>;
488			regulator-max-microvolt = <3300000>;
489			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
490		};
491
492		vreg_l6c: ldo6 {
493			regulator-name = "vreg_l6c";
494			regulator-min-microvolt = <1650000>;
495			regulator-max-microvolt = <3544000>;
496			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
497		};
498
499		vreg_l7c: ldo7 {
500			regulator-name = "vreg_l7c";
501			regulator-min-microvolt = <3000000>;
502			regulator-max-microvolt = <3544000>;
503			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
504		};
505
506		vreg_l8c: ldo8 {
507			regulator-name = "vreg_l8c";
508			regulator-min-microvolt = <1620000>;
509			regulator-max-microvolt = <2000000>;
510			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
511			/* Hall sensor VDD */
512			regulator-always-on;
513		};
514
515		vreg_l9c: ldo9 {
516			regulator-name = "vreg_l9c";
517			regulator-min-microvolt = <2700000>;
518			regulator-max-microvolt = <3544000>;
519			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
520		};
521
522		vreg_l10c: ldo10 {
523			regulator-name = "vreg_l10c";
524			regulator-min-microvolt = <720000>;
525			regulator-max-microvolt = <1050000>;
526			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
527		};
528
529		vreg_l11c: ldo11 {
530			regulator-name = "vreg_l11c";
531			regulator-min-microvolt = <2800000>;
532			regulator-max-microvolt = <3544000>;
533			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
534		};
535
536		vreg_l12c: ldo12 {
537			regulator-name = "vreg_l12c";
538			regulator-min-microvolt = <1650000>;
539			regulator-max-microvolt = <2000000>;
540			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
541		};
542
543		vreg_l13c: ldo13 {
544			regulator-name = "vreg_l13c";
545			regulator-min-microvolt = <2700000>;
546			regulator-max-microvolt = <3544000>;
547			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
548		};
549
550		vreg_bob: bob {
551			regulator-name = "vreg_bob";
552			regulator-min-microvolt = <3008000>;
553			regulator-max-microvolt = <3960000>;
554			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
555		};
556	};
557};
558
559&cci0 {
560	status = "okay";
561};
562
563&cci0_i2c0 {
564	/* IMX800 @ 1a */
565
566	eeprom@50 {
567		compatible = "puya,p24c256c", "atmel,24c256";
568		reg = <0x50>;
569		vcc-supply = <&vreg_l6p>;
570		read-only;
571	};
572};
573
574&cci0_i2c1 {
575	/* IMX858 @ 29 */
576
577	eeprom@54 {
578		compatible = "giantec,gt24p128f", "atmel,24c128";
579		reg = <0x54>;
580		vcc-supply = <&vreg_l6p>;
581		read-only;
582	};
583};
584
585&cci1 {
586	status = "okay";
587};
588
589&cci1_i2c1 {
590	/* S5KJN1SQ03 @ 10 */
591
592	eeprom@51 {
593		compatible = "giantec,gt24p128f", "atmel,24c128";
594		reg = <0x51>;
595		vcc-supply = <&vreg_l6p>;
596		read-only;
597	};
598};
599
600&dispcc {
601	/* Disable for now so simple-framebuffer continues working */
602	status = "disabled";
603};
604
605&gcc {
606	protected-clocks = <GCC_CFG_NOC_LPASS_CLK>,
607			   <GCC_EDP_CLKREF_EN>,
608			   <GCC_MSS_CFG_AHB_CLK>,
609			   <GCC_MSS_GPLL0_MAIN_DIV_CLK_SRC>,
610			   <GCC_MSS_OFFLINE_AXI_CLK>,
611			   <GCC_MSS_Q6SS_BOOT_CLK_SRC>,
612			   <GCC_MSS_Q6_MEMNOC_AXI_CLK>,
613			   <GCC_MSS_SNOC_AXI_CLK>,
614			   <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
615			   <GCC_QSPI_CORE_CLK>,
616			   <GCC_QSPI_CORE_CLK_SRC>,
617			   <GCC_SEC_CTRL_CLK_SRC>,
618			   <GCC_WPSS_AHB_BDG_MST_CLK>,
619			   <GCC_WPSS_AHB_CLK>,
620			   <GCC_WPSS_RSCP_CLK>;
621};
622
623&gpi_dma0 {
624	status = "okay";
625};
626
627&gpi_dma1 {
628	status = "okay";
629};
630
631&i2c1 {
632	status = "okay";
633
634	pm8008: pmic@8 {
635		compatible = "qcom,pm8008";
636		reg = <0x8>;
637
638		interrupts-extended = <&tlmm 25 IRQ_TYPE_EDGE_RISING>;
639		reset-gpios = <&pm8350c_gpios 3 GPIO_ACTIVE_LOW>;
640
641		vdd-l1-l2-supply = <&vreg_s8b>;
642		vdd-l3-l4-supply = <&vreg_bob>;
643		vdd-l5-supply = <&vreg_bob>;
644		vdd-l6-supply = <&vreg_s1b>;
645		vdd-l7-supply = <&vreg_bob>;
646
647		pinctrl-names = "default";
648		pinctrl-0 = <&pm8008_int_default>, <&pm8008_reset_n_default>;
649
650		gpio-controller;
651		#gpio-cells = <2>;
652		gpio-ranges = <&pm8008 0 0 2>;
653
654		interrupt-controller;
655		#interrupt-cells = <2>;
656
657		#thermal-sensor-cells = <0>;
658
659		regulators {
660			vreg_l1p: ldo1 {
661				regulator-name = "vreg_l1p";
662				regulator-min-microvolt = <1000000>;
663				regulator-max-microvolt = <1200000>;
664			};
665
666			vreg_l2p: ldo2 {
667				regulator-name = "vreg_l2p";
668				regulator-min-microvolt = <950000>;
669				regulator-max-microvolt = <1152000>;
670			};
671
672			vreg_l3p: ldo3 {
673				regulator-name = "vreg_l3p";
674				regulator-min-microvolt = <2700000>;
675				regulator-max-microvolt = <3000000>;
676			};
677
678			vreg_l4p: ldo4 {
679				regulator-name = "vreg_l4p";
680				regulator-min-microvolt = <2700000>;
681				regulator-max-microvolt = <2900000>;
682			};
683
684			vreg_l5p: ldo5 {
685				regulator-name = "vreg_l5p";
686				regulator-min-microvolt = <2704000>;
687				regulator-max-microvolt = <2900000>;
688			};
689
690			vreg_l6p: ldo6 {
691				regulator-name = "vreg_l6p";
692				regulator-min-microvolt = <1700000>;
693				regulator-max-microvolt = <1904000>;
694			};
695
696			vreg_l7p: ldo7 {
697				regulator-name = "vreg_l7p";
698				regulator-min-microvolt = <2700000>;
699				regulator-max-microvolt = <3000000>;
700			};
701		};
702	};
703
704	/* Pixelworks @ 26 */
705	/* FSA4480 USB audio switch @ 42 */
706	/* AW86927FCR haptics @ 5a */
707};
708
709&i2c2 {
710	status = "okay";
711
712	/* AW88261FCR amplifier @ 34 */
713	/* AW88261FCR amplifier @ 35 */
714};
715
716&i2c4 {
717	status = "okay";
718
719	/* PTN36502 USB redriver @ 1a */
720};
721
722&i2c9 {
723	status = "okay";
724
725	/* ST21NFC NFC @ 28 */
726	/* VL53L3 ToF @ 29 */
727};
728
729&ipa {
730	qcom,gsi-loader = "self";
731	memory-region = <&ipa_fw_mem>;
732	firmware-name = "qcom/qcm6490/fairphone5/ipa_fws.mbn";
733	status = "okay";
734};
735
736&pm7250b_adc {
737	pinctrl-0 = <&pm7250b_adc_default>;
738	pinctrl-names = "default";
739
740	channel@4d {
741		reg = <ADC5_AMUX_THM1_100K_PU>;
742		qcom,ratiometric;
743		qcom,hw-settle-time = <200>;
744		qcom,pre-scaling = <1 1>;
745		label = "charger_skin_therm";
746	};
747
748	channel@4f {
749		reg = <ADC5_AMUX_THM3_100K_PU>;
750		qcom,ratiometric;
751		qcom,hw-settle-time = <200>;
752		qcom,pre-scaling = <1 1>;
753		label = "conn_therm";
754	};
755
756	channel@53 {
757		reg = <ADC5_GPIO2_100K_PU>;
758		qcom,ratiometric;
759		qcom,hw-settle-time = <200>;
760		qcom,pre-scaling = <1 1>;
761		label = "mem_therm";
762	};
763};
764
765&pm7250b_adc_tm {
766	status = "okay";
767
768	charger-skin-therm@0 {
769		reg = <0>;
770		io-channels = <&pm7250b_adc ADC5_AMUX_THM1_100K_PU>;
771		qcom,ratiometric;
772		qcom,hw-settle-time-us = <200>;
773	};
774
775	conn-therm@1 {
776		reg = <1>;
777		io-channels = <&pm7250b_adc ADC5_AMUX_THM3_100K_PU>;
778		qcom,ratiometric;
779		qcom,hw-settle-time-us = <200>;
780	};
781
782	mem-therm@2 {
783		reg = <2>;
784		io-channels = <&pm7250b_adc ADC5_GPIO2_100K_PU>;
785		qcom,ratiometric;
786		qcom,hw-settle-time-us = <200>;
787	};
788};
789
790&pm7250b_gpios {
791	pm7250b_adc_default: adc-default-state {
792		pins = "gpio12";
793		function = PMIC_GPIO_FUNC_NORMAL;
794		bias-high-impedance;
795	};
796};
797
798&pm7325_gpios {
799	volume_down_default: volume-down-default-state {
800		pins = "gpio6";
801		function = PMIC_GPIO_FUNC_NORMAL;
802		power-source = <1>;
803		bias-pull-up;
804		input-enable;
805	};
806};
807
808&pm8350c_flash {
809	status = "okay";
810
811	led-0 {
812		function = LED_FUNCTION_FLASH;
813		color = <LED_COLOR_ID_WHITE>;
814		led-sources = <1>, <4>;
815		led-max-microamp = <500000>;
816		flash-max-microamp = <1500000>;
817		flash-max-timeout-us = <1280000>;
818	};
819};
820
821&pmk8350_adc_tm {
822	status = "okay";
823
824	xo-therm@0 {
825		reg = <0>;
826		io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
827		qcom,ratiometric;
828		qcom,hw-settle-time-us = <200>;
829	};
830
831	quiet-therm@1 {
832		reg = <1>;
833		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM1_100K_PU>;
834		qcom,ratiometric;
835		qcom,hw-settle-time-us = <200>;
836	};
837
838	cam-flash-therm@2 {
839		reg = <2>;
840		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM2_100K_PU>;
841		qcom,ratiometric;
842		qcom,hw-settle-time-us = <200>;
843	};
844
845	sdm-skin-therm@3 {
846		reg = <3>;
847		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM3_100K_PU>;
848		qcom,ratiometric;
849		qcom,hw-settle-time-us = <200>;
850	};
851
852	wide-rfc-therm@4 {
853		reg = <4>;
854		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM4_100K_PU>;
855		qcom,ratiometric;
856		qcom,hw-settle-time-us = <200>;
857	};
858};
859
860&pm8350c_gpios {
861	pm8008_reset_n_default: pm8008-reset-n-default-state {
862		pins = "gpio3";
863		function = PMIC_GPIO_FUNC_NORMAL;
864		bias-pull-down;
865	};
866};
867
868&pmk8350_rtc {
869	status = "okay";
870};
871
872&pmk8350_vadc {
873	status = "okay";
874
875	channel@44 {
876		reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
877		qcom,ratiometric;
878		qcom,hw-settle-time = <200>;
879		qcom,pre-scaling = <1 1>;
880		label = "pmk8350_xo_therm";
881	};
882
883	channel@144 {
884		reg = <PM7325_ADC7_AMUX_THM1_100K_PU>;
885		qcom,ratiometric;
886		qcom,hw-settle-time = <200>;
887		qcom,pre-scaling = <1 1>;
888		label = "pm7325_quiet_therm";
889	};
890
891	channel@145 {
892		reg = <PM7325_ADC7_AMUX_THM2_100K_PU>;
893		qcom,ratiometric;
894		qcom,hw-settle-time = <200>;
895		qcom,pre-scaling = <1 1>;
896		label = "pm7325_cam_flash_therm";
897	};
898
899	channel@146 {
900		reg = <PM7325_ADC7_AMUX_THM3_100K_PU>;
901		qcom,ratiometric;
902		qcom,hw-settle-time = <200>;
903		qcom,pre-scaling = <1 1>;
904		label = "pm7325_sdm_skin_therm";
905	};
906
907	channel@147 {
908		reg = <PM7325_ADC7_AMUX_THM4_100K_PU>;
909		qcom,ratiometric;
910		qcom,hw-settle-time = <200>;
911		qcom,pre-scaling = <1 1>;
912		label = "pm7325_wide_rfc_therm";
913	};
914};
915
916&pon_pwrkey {
917	status = "okay";
918};
919
920&pon_resin {
921	linux,code = <KEY_VOLUMEDOWN>;
922	status = "okay";
923};
924
925&qup_spi13_cs {
926	drive-strength = <6>;
927	bias-disable;
928};
929
930&qup_spi13_data_clk {
931	drive-strength = <6>;
932	bias-disable;
933};
934
935&qup_uart5_rx {
936	drive-strength = <2>;
937	bias-disable;
938};
939
940&qup_uart5_tx {
941	drive-strength = <2>;
942	bias-disable;
943};
944
945&qupv3_id_0 {
946	status = "okay";
947};
948
949&qupv3_id_1 {
950	status = "okay";
951};
952
953&remoteproc_adsp {
954	firmware-name = "qcom/qcm6490/fairphone5/adsp.mbn";
955	status = "okay";
956};
957
958&remoteproc_cdsp {
959	firmware-name = "qcom/qcm6490/fairphone5/cdsp.mbn";
960	status = "okay";
961};
962
963&remoteproc_mpss {
964	firmware-name = "qcom/qcm6490/fairphone5/modem.mbn";
965	status = "okay";
966};
967
968&remoteproc_wpss {
969	firmware-name = "qcom/qcm6490/fairphone5/wpss.mbn";
970	status = "okay";
971};
972
973&sdc2_clk {
974	drive-strength = <16>;
975	bias-disable;
976};
977
978&sdc2_cmd {
979	drive-strength = <10>;
980	bias-pull-up;
981};
982
983&sdc2_data {
984	drive-strength = <10>;
985	bias-pull-up;
986};
987
988&sdhc_2 {
989	vmmc-supply = <&vreg_l9c>;
990	vqmmc-supply = <&vreg_l6c>;
991
992	pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>;
993	pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>;
994
995	status = "okay";
996};
997
998&spi13 {
999	status = "okay";
1000
1001	/* Goodix touchscreen @ 0 */
1002};
1003
1004&tlmm {
1005	/*
1006	 * 32-33: SMB1394 (SPMI)
1007	 * 56-59: fingerprint reader (SPI)
1008	 */
1009	gpio-reserved-ranges = <32 2>, <56 4>;
1010
1011	bluetooth_enable_default: bluetooth-enable-default-state {
1012		pins = "gpio85";
1013		function = "gpio";
1014		output-low;
1015		bias-disable;
1016	};
1017
1018	hall_sensor_default: hall-sensor-default-state {
1019		pins = "gpio155";
1020		function = "gpio";
1021		drive-strength = <2>;
1022		bias-pull-up;
1023	};
1024
1025	pm8008_int_default: pm8008-int-default-state {
1026		pins = "gpio25";
1027		function = "gpio";
1028		drive-strength = <2>;
1029		bias-disable;
1030	};
1031
1032	qup_uart7_sleep_cts: qup-uart7-sleep-cts-state {
1033		pins = "gpio28";
1034		function = "gpio";
1035		/*
1036		 * Configure a bias-bus-hold on CTS to lower power
1037		 * usage when Bluetooth is turned off. Bus hold will
1038		 * maintain a low power state regardless of whether
1039		 * the Bluetooth module drives the pin in either
1040		 * direction or leaves the pin fully unpowered.
1041		 */
1042		bias-bus-hold;
1043	};
1044
1045	qup_uart7_sleep_rts: qup-uart7-sleep-rts-state {
1046		pins = "gpio29";
1047		function = "gpio";
1048		/*
1049		 * Configure pull-down on RTS. As RTS is active low
1050		 * signal, pull it low to indicate the BT SoC that it
1051		 * can wakeup the system anytime from suspend state by
1052		 * pulling RX low (by sending wakeup bytes).
1053		 */
1054		bias-pull-down;
1055	};
1056
1057	qup_uart7_sleep_tx: qup-uart7-sleep-tx-state {
1058		pins = "gpio30";
1059		function = "gpio";
1060		/*
1061		 * Configure pull-up on TX when it isn't actively driven
1062		 * to prevent BT SoC from receiving garbage during sleep.
1063		 */
1064		bias-pull-up;
1065	};
1066
1067	qup_uart7_sleep_rx: qup-uart7-sleep-rx-state {
1068		pins = "gpio31";
1069		function = "gpio";
1070		/*
1071		 * Configure a pull-up on RX. This is needed to avoid
1072		 * garbage data when the TX pin of the Bluetooth module
1073		 * is floating which may cause spurious wakeups.
1074		 */
1075		bias-pull-up;
1076	};
1077
1078	sw_ctrl_default: sw-ctrl-default-state {
1079		pins = "gpio86";
1080		function = "gpio";
1081		bias-pull-down;
1082	};
1083};
1084
1085&uart5 {
1086	status = "okay";
1087};
1088
1089&uart7 {
1090	/delete-property/interrupts;
1091	interrupts-extended = <&intc GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>,
1092			      <&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
1093
1094	pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
1095	pinctrl-names = "default", "sleep";
1096
1097	status = "okay";
1098
1099	bluetooth: bluetooth {
1100		compatible = "qcom,wcn6750-bt";
1101
1102		pinctrl-0 = <&bluetooth_enable_default>, <&sw_ctrl_default>;
1103		pinctrl-names = "default";
1104
1105		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
1106		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
1107
1108		vddio-supply = <&vreg_l19b>;
1109		vddaon-supply = <&vreg_s7b>;
1110		vddbtcxmx-supply = <&vreg_s7b>;
1111		vddrfacmn-supply = <&vreg_s7b>;
1112		vddrfa0p8-supply = <&vreg_s7b>;
1113		vddrfa1p7-supply = <&vreg_s1b>;
1114		vddrfa1p2-supply = <&vreg_s8b>;
1115		vddrfa2p2-supply = <&vreg_s1c>;
1116		vddasd-supply = <&vreg_l11c>;
1117
1118		max-speed = <3200000>;
1119	};
1120};
1121
1122&ufs_mem_hc {
1123	reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
1124
1125	vcc-supply = <&vreg_l7b>;
1126	vcc-max-microamp = <800000>;
1127	/*
1128	 * Technically l9b enables an eLDO (supplied by s1b) which then powers
1129	 * VCCQ2 of the UFS.
1130	 */
1131	vccq-supply = <&vreg_l9b>;
1132	vccq-max-microamp = <900000>;
1133
1134	status = "okay";
1135};
1136
1137&ufs_mem_phy {
1138	vdda-phy-supply = <&vreg_l10c>;
1139	vdda-pll-supply = <&vreg_l6b>;
1140
1141	status = "okay";
1142};
1143
1144&usb_1 {
1145	status = "okay";
1146};
1147
1148&usb_1_dwc3 {
1149	dr_mode = "otg";
1150	usb-role-switch;
1151};
1152
1153&usb_1_dwc3_hs {
1154	remote-endpoint = <&pmic_glink_hs_in>;
1155};
1156
1157&usb_1_dwc3_ss {
1158	remote-endpoint = <&pmic_glink_ss_in>;
1159};
1160
1161&usb_1_hsphy {
1162	vdda-pll-supply = <&vreg_l10c>;
1163	vdda18-supply = <&vreg_l1c>;
1164	vdda33-supply = <&vreg_l2b>;
1165
1166	qcom,hs-crossover-voltage-microvolt = <28000>;
1167	qcom,hs-output-impedance-micro-ohms = <2600000>;
1168	qcom,hs-rise-fall-time-bp = <5430>;
1169	qcom,hs-disconnect-bp = <1743>;
1170	qcom,hs-amplitude-bp = <2430>;
1171
1172	qcom,pre-emphasis-amplitude-bp = <20000>;
1173	qcom,pre-emphasis-duration-bp = <20000>;
1174
1175	qcom,squelch-detector-bp = <(-2090)>;
1176
1177	status = "okay";
1178};
1179
1180&usb_1_qmpphy {
1181	vdda-phy-supply = <&vreg_l6b>;
1182	vdda-pll-supply = <&vreg_l1b>;
1183
1184	status = "okay";
1185};
1186
1187&venus {
1188	firmware-name = "qcom/qcm6490/fairphone5/venus.mbn";
1189	status = "okay";
1190};
1191
1192&wifi {
1193	qcom,ath11k-calibration-variant = "Fairphone_5";
1194	status = "okay";
1195};
1196