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