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 "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		connector@0 {
81			compatible = "usb-c-connector";
82			reg = <0>;
83			power-role = "dual";
84			data-role = "dual";
85
86			ports {
87				#address-cells = <1>;
88				#size-cells = <0>;
89
90				port@0 {
91					reg = <0>;
92
93					pmic_glink_hs_in: endpoint {
94						remote-endpoint = <&usb_1_dwc3_hs>;
95					};
96				};
97
98				port@1 {
99					reg = <1>;
100
101					pmic_glink_ss_in: endpoint {
102						remote-endpoint = <&usb_1_dwc3_ss>;
103					};
104				};
105			};
106		};
107	};
108
109	reserved-memory {
110		cont_splash_mem: cont-splash@e1000000 {
111			reg = <0x0 0xe1000000 0x0 0x2300000>;
112			no-map;
113		};
114
115		cdsp_mem: cdsp@88f00000 {
116			reg = <0x0 0x88f00000 0x0 0x1e00000>;
117			no-map;
118		};
119
120		removed_mem: removed@c0000000 {
121			reg = <0x0 0xc0000000 0x0 0x5100000>;
122			no-map;
123		};
124
125		rmtfs_mem: memory@f8500000 {
126			compatible = "qcom,rmtfs-mem";
127			reg = <0x0 0xf8500000 0x0 0x600000>;
128			no-map;
129
130			qcom,client-id = <1>;
131			qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>, <QCOM_SCM_VMID_NAV>;
132		};
133	};
134
135	ois_avdd0_1p8: regulator-ois-avdd0-1p8 {
136		compatible = "regulator-fixed";
137		regulator-name = "OIS_AVDD0_1P8";
138		regulator-min-microvolt = <1800000>;
139		regulator-max-microvolt = <1800000>;
140		gpio = <&tlmm 157 GPIO_ACTIVE_HIGH>;
141		enable-active-high;
142		vin-supply = <&vreg_bob>;
143	};
144
145	ois_dvdd_1p1: regulator-ois-dvdd-1p1 {
146		compatible = "regulator-fixed";
147		regulator-name = "OIS_DVDD_1P1";
148		regulator-min-microvolt = <1100000>;
149		regulator-max-microvolt = <1100000>;
150		gpio = <&tlmm 97 GPIO_ACTIVE_HIGH>;
151		enable-active-high;
152		vin-supply = <&vreg_s8b>;
153	};
154
155	afvdd_2p8: regulator-afvdd-2p8 {
156		compatible = "regulator-fixed";
157		regulator-name = "AFVDD_2P8";
158		regulator-min-microvolt = <2800000>;
159		regulator-max-microvolt = <2800000>;
160		gpio = <&tlmm 68 GPIO_ACTIVE_HIGH>;
161		enable-active-high;
162		vin-supply = <&vreg_bob>;
163	};
164
165	thermal-zones {
166		camera-thermal {
167			polling-delay-passive = <0>;
168			polling-delay = <0>;
169			thermal-sensors = <&pmk8350_adc_tm 2>;
170
171			trips {
172				active-config0 {
173					temperature = <125000>;
174					hysteresis = <1000>;
175					type = "passive";
176				};
177			};
178		};
179
180		chg-skin-thermal {
181			polling-delay-passive = <0>;
182			polling-delay = <0>;
183			thermal-sensors = <&pm7250b_adc_tm 0>;
184
185			trips {
186				active-config0 {
187					temperature = <125000>;
188					hysteresis = <1000>;
189					type = "passive";
190				};
191			};
192		};
193
194		conn-thermal {
195			polling-delay-passive = <0>;
196			polling-delay = <0>;
197			thermal-sensors = <&pm7250b_adc_tm 1>;
198
199			trips {
200				active-config0 {
201					temperature = <125000>;
202					hysteresis = <1000>;
203					type = "passive";
204				};
205			};
206		};
207
208		quiet-thermal {
209			polling-delay-passive = <0>;
210			polling-delay = <0>;
211			thermal-sensors = <&pmk8350_adc_tm 1>;
212
213			trips {
214				active-config0 {
215					temperature = <125000>;
216					hysteresis = <1000>;
217					type = "passive";
218				};
219			};
220		};
221
222		rear-cam-thermal {
223			polling-delay-passive = <0>;
224			polling-delay = <0>;
225			thermal-sensors = <&pmk8350_adc_tm 4>;
226
227			trips {
228				active-config0 {
229					temperature = <125000>;
230					hysteresis = <1000>;
231					type = "passive";
232				};
233			};
234		};
235
236		sdm-skin-thermal {
237			polling-delay-passive = <0>;
238			polling-delay = <0>;
239			thermal-sensors = <&pmk8350_adc_tm 3>;
240
241			trips {
242				active-config0 {
243					temperature = <125000>;
244					hysteresis = <1000>;
245					type = "passive";
246				};
247			};
248		};
249
250		xo-thermal {
251			polling-delay-passive = <0>;
252			polling-delay = <0>;
253			thermal-sensors = <&pmk8350_adc_tm 0>;
254
255			trips {
256				active-config0 {
257					temperature = <125000>;
258					hysteresis = <1000>;
259					type = "passive";
260				};
261			};
262		};
263	};
264};
265
266&apps_rsc {
267	regulators-0 {
268		compatible = "qcom,pm7325-rpmh-regulators";
269		qcom,pmic-id = "b";
270
271		vreg_s1b: smps1 {
272			regulator-min-microvolt = <1840000>;
273			regulator-max-microvolt = <2040000>;
274		};
275
276		vreg_s7b: smps7 {
277			regulator-min-microvolt = <535000>;
278			regulator-max-microvolt = <1120000>;
279		};
280
281		vreg_s8b: smps8 {
282			regulator-min-microvolt = <1200000>;
283			regulator-max-microvolt = <1500000>;
284			regulator-initial-mode = <RPMH_REGULATOR_MODE_RET>;
285		};
286
287		vreg_l1b: ldo1 {
288			regulator-min-microvolt = <825000>;
289			regulator-max-microvolt = <925000>;
290			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
291		};
292
293		vreg_l2b: ldo2 {
294			regulator-min-microvolt = <2700000>;
295			regulator-max-microvolt = <3544000>;
296			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
297		};
298
299		vreg_l3b: ldo3 {
300			regulator-min-microvolt = <312000>;
301			regulator-max-microvolt = <910000>;
302			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
303		};
304
305		vreg_l6b: ldo6 {
306			regulator-min-microvolt = <1140000>;
307			regulator-max-microvolt = <1260000>;
308			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
309		};
310
311		vreg_l7b: ldo7 {
312			/* Constrained for UFS VCC, at least until UFS driver scales voltage */
313			regulator-min-microvolt = <2952000>;
314			regulator-max-microvolt = <2952000>;
315			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
316		};
317
318		vreg_l8b: ldo8 {
319			regulator-min-microvolt = <870000>;
320			regulator-max-microvolt = <970000>;
321			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
322		};
323
324		vreg_l9b: ldo9 {
325			regulator-min-microvolt = <1200000>;
326			regulator-max-microvolt = <1304000>;
327			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
328		};
329
330		vreg_l11b: ldo11 {
331			regulator-min-microvolt = <1504000>;
332			regulator-max-microvolt = <2000000>;
333			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
334		};
335
336		vreg_l12b: ldo12 {
337			regulator-min-microvolt = <751000>;
338			regulator-max-microvolt = <824000>;
339			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
340		};
341
342		vreg_l13b: ldo13 {
343			regulator-min-microvolt = <530000>;
344			regulator-max-microvolt = <824000>;
345			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
346		};
347
348		vreg_l14b: ldo14 {
349			regulator-min-microvolt = <1080000>;
350			regulator-max-microvolt = <1304000>;
351			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
352		};
353
354		vreg_l15b: ldo15 {
355			regulator-min-microvolt = <765000>;
356			regulator-max-microvolt = <1020000>;
357			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
358		};
359
360		vreg_l16b: ldo16 {
361			regulator-min-microvolt = <1100000>;
362			regulator-max-microvolt = <1300000>;
363			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
364		};
365
366		vreg_l17b: ldo17 {
367			regulator-min-microvolt = <1700000>;
368			regulator-max-microvolt = <1900000>;
369			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
370		};
371
372		vreg_l18b: ldo18 {
373			regulator-min-microvolt = <1800000>;
374			regulator-max-microvolt = <2000000>;
375			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
376		};
377
378		vreg_l19b: ldo19 {
379			regulator-min-microvolt = <1800000>;
380			regulator-max-microvolt = <2000000>;
381			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
382		};
383	};
384
385	regulators-1 {
386		compatible = "qcom,pm8350c-rpmh-regulators";
387		qcom,pmic-id = "c";
388
389		vreg_s1c: smps1 {
390			regulator-min-microvolt = <2190000>;
391			regulator-max-microvolt = <2210000>;
392			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
393		};
394
395		vreg_s9c: smps9 {
396			regulator-min-microvolt = <1010000>;
397			regulator-max-microvolt = <1170000>;
398			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
399		};
400
401		vreg_l1c: ldo1 {
402			regulator-min-microvolt = <1800000>;
403			regulator-max-microvolt = <1980000>;
404			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
405		};
406
407		vreg_l2c: ldo2 {
408			regulator-min-microvolt = <1800000>;
409			regulator-max-microvolt = <1950000>;
410			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
411		};
412
413		vreg_l3c: ldo3 {
414			regulator-min-microvolt = <3000000>;
415			regulator-max-microvolt = <3400000>;
416			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
417		};
418
419		vreg_l4c: ldo4 {
420			regulator-min-microvolt = <1620000>;
421			regulator-max-microvolt = <3300000>;
422			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
423		};
424
425		vreg_l5c: ldo5 {
426			regulator-min-microvolt = <1620000>;
427			regulator-max-microvolt = <3300000>;
428			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
429		};
430
431		vreg_l6c: ldo6 {
432			regulator-min-microvolt = <1650000>;
433			regulator-max-microvolt = <3544000>;
434			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
435		};
436
437		vreg_l7c: ldo7 {
438			regulator-min-microvolt = <3000000>;
439			regulator-max-microvolt = <3544000>;
440			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
441		};
442
443		vreg_l8c: ldo8 {
444			regulator-min-microvolt = <1620000>;
445			regulator-max-microvolt = <2000000>;
446			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
447			/* Hall sensor VDD */
448			regulator-always-on;
449		};
450
451		vreg_l9c: ldo9 {
452			regulator-min-microvolt = <2700000>;
453			regulator-max-microvolt = <3544000>;
454			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
455		};
456
457		vreg_l10c: ldo10 {
458			regulator-min-microvolt = <720000>;
459			regulator-max-microvolt = <1050000>;
460			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
461		};
462
463		vreg_l11c: ldo11 {
464			regulator-min-microvolt = <2800000>;
465			regulator-max-microvolt = <3544000>;
466			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
467		};
468
469		vreg_l12c: ldo12 {
470			regulator-min-microvolt = <1650000>;
471			regulator-max-microvolt = <2000000>;
472			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
473		};
474
475		vreg_l13c: ldo13 {
476			regulator-min-microvolt = <2700000>;
477			regulator-max-microvolt = <3544000>;
478			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
479		};
480
481		vreg_bob: bob {
482			regulator-min-microvolt = <3008000>;
483			regulator-max-microvolt = <3960000>;
484			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
485		};
486	};
487};
488
489&dispcc {
490	/* Disable for now so simple-framebuffer continues working */
491	status = "disabled";
492};
493
494&gcc {
495	protected-clocks = <GCC_CFG_NOC_LPASS_CLK>,
496			   <GCC_EDP_CLKREF_EN>,
497			   <GCC_MSS_CFG_AHB_CLK>,
498			   <GCC_MSS_GPLL0_MAIN_DIV_CLK_SRC>,
499			   <GCC_MSS_OFFLINE_AXI_CLK>,
500			   <GCC_MSS_Q6SS_BOOT_CLK_SRC>,
501			   <GCC_MSS_Q6_MEMNOC_AXI_CLK>,
502			   <GCC_MSS_SNOC_AXI_CLK>,
503			   <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
504			   <GCC_QSPI_CORE_CLK>,
505			   <GCC_QSPI_CORE_CLK_SRC>,
506			   <GCC_SEC_CTRL_CLK_SRC>,
507			   <GCC_WPSS_AHB_BDG_MST_CLK>,
508			   <GCC_WPSS_AHB_CLK>,
509			   <GCC_WPSS_RSCP_CLK>;
510};
511
512&gpi_dma0 {
513	status = "okay";
514};
515
516&gpi_dma1 {
517	status = "okay";
518};
519
520&i2c1 {
521	status = "okay";
522
523	/* PM8008 PMIC @ 8 and 9 */
524	/* Pixelworks @ 26 */
525	/* FSA4480 USB audio switch @ 42 */
526	/* AW86927FCR haptics @ 5a */
527};
528
529&i2c2 {
530	status = "okay";
531
532	/* AW88261FCR amplifier @ 34 */
533	/* AW88261FCR amplifier @ 35 */
534};
535
536&i2c4 {
537	status = "okay";
538
539	/* PTN36502 USB redriver @ 1a */
540};
541
542&i2c9 {
543	status = "okay";
544
545	/* ST21NFC NFC @ 28 */
546	/* VL53L3 ToF @ 29 */
547};
548
549&ipa {
550	qcom,gsi-loader = "self";
551	memory-region = <&ipa_fw_mem>;
552	firmware-name = "qcom/qcm6490/fairphone5/ipa_fws.mdt";
553	status = "okay";
554};
555
556&pm7250b_adc {
557	channel@4d {
558		reg = <ADC5_AMUX_THM1_100K_PU>;
559		qcom,ratiometric;
560		qcom,hw-settle-time = <200>;
561		qcom,pre-scaling = <1 1>;
562		label = "charger_skin_therm";
563	};
564
565	channel@4f {
566		reg = <ADC5_AMUX_THM3_100K_PU>;
567		qcom,ratiometric;
568		qcom,hw-settle-time = <200>;
569		qcom,pre-scaling = <1 1>;
570		label = "conn_therm";
571	};
572};
573
574&pm7250b_adc_tm {
575	status = "okay";
576
577	charger-skin-therm@0 {
578		reg = <0>;
579		io-channels = <&pm7250b_adc ADC5_AMUX_THM1_100K_PU>;
580		qcom,ratiometric;
581		qcom,hw-settle-time-us = <200>;
582	};
583
584	conn-therm@1 {
585		reg = <1>;
586		io-channels = <&pm7250b_adc ADC5_AMUX_THM3_100K_PU>;
587		qcom,ratiometric;
588		qcom,hw-settle-time-us = <200>;
589	};
590};
591
592&pm7325_gpios {
593	volume_down_default: volume-down-default-state {
594		pins = "gpio6";
595		function = PMIC_GPIO_FUNC_NORMAL;
596		power-source = <1>;
597		bias-pull-up;
598		input-enable;
599	};
600};
601
602&pm8350c_flash {
603	status = "okay";
604
605	led-0 {
606		function = LED_FUNCTION_FLASH;
607		color = <LED_COLOR_ID_WHITE>;
608		led-sources = <1>, <4>;
609		led-max-microamp = <500000>;
610		flash-max-microamp = <1500000>;
611		flash-max-timeout-us = <1280000>;
612	};
613};
614
615&pmk8350_adc_tm {
616	status = "okay";
617
618	xo-therm@0 {
619		reg = <0>;
620		io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
621		qcom,ratiometric;
622		qcom,hw-settle-time-us = <200>;
623	};
624
625	quiet-therm@1 {
626		reg = <1>;
627		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM1_100K_PU>;
628		qcom,ratiometric;
629		qcom,hw-settle-time-us = <200>;
630	};
631
632	cam-flash-therm@2 {
633		reg = <2>;
634		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM2_100K_PU>;
635		qcom,ratiometric;
636		qcom,hw-settle-time-us = <200>;
637	};
638
639	sdm-skin-therm@3 {
640		reg = <3>;
641		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM3_100K_PU>;
642		qcom,ratiometric;
643		qcom,hw-settle-time-us = <200>;
644	};
645
646	wide-rfc-therm@4 {
647		reg = <4>;
648		io-channels = <&pmk8350_vadc PM7325_ADC7_AMUX_THM4_100K_PU>;
649		qcom,ratiometric;
650		qcom,hw-settle-time-us = <200>;
651	};
652};
653
654&pmk8350_rtc {
655	status = "okay";
656};
657
658&pmk8350_vadc {
659	status = "okay";
660
661	channel@44 {
662		reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
663		qcom,ratiometric;
664		qcom,hw-settle-time = <200>;
665		qcom,pre-scaling = <1 1>;
666		label = "pmk8350_xo_therm";
667	};
668
669	channel@144 {
670		reg = <PM7325_ADC7_AMUX_THM1_100K_PU>;
671		qcom,ratiometric;
672		qcom,hw-settle-time = <200>;
673		qcom,pre-scaling = <1 1>;
674		label = "pm7325_quiet_therm";
675	};
676
677	channel@145 {
678		reg = <PM7325_ADC7_AMUX_THM2_100K_PU>;
679		qcom,ratiometric;
680		qcom,hw-settle-time = <200>;
681		qcom,pre-scaling = <1 1>;
682		label = "pm7325_cam_flash_therm";
683	};
684
685	channel@146 {
686		reg = <PM7325_ADC7_AMUX_THM3_100K_PU>;
687		qcom,ratiometric;
688		qcom,hw-settle-time = <200>;
689		qcom,pre-scaling = <1 1>;
690		label = "pm7325_sdm_skin_therm";
691	};
692
693	channel@147 {
694		reg = <PM7325_ADC7_AMUX_THM4_100K_PU>;
695		qcom,ratiometric;
696		qcom,hw-settle-time = <200>;
697		qcom,pre-scaling = <1 1>;
698		label = "pm7325_wide_rfc_therm";
699	};
700};
701
702&pon_pwrkey {
703	status = "okay";
704};
705
706&pon_resin {
707	linux,code = <KEY_VOLUMEDOWN>;
708	status = "okay";
709};
710
711&qup_spi13_cs {
712	drive-strength = <6>;
713	bias-disable;
714};
715
716&qup_spi13_data_clk {
717	drive-strength = <6>;
718	bias-disable;
719};
720
721&qup_uart5_rx {
722	drive-strength = <2>;
723	bias-disable;
724};
725
726&qup_uart5_tx {
727	drive-strength = <2>;
728	bias-disable;
729};
730
731&qupv3_id_0 {
732	status = "okay";
733};
734
735&qupv3_id_1 {
736	status = "okay";
737};
738
739&remoteproc_adsp {
740	firmware-name = "qcom/qcm6490/fairphone5/adsp.mbn";
741	status = "okay";
742};
743
744&remoteproc_cdsp {
745	firmware-name = "qcom/qcm6490/fairphone5/cdsp.mbn";
746	status = "okay";
747};
748
749&remoteproc_mpss {
750	firmware-name = "qcom/qcm6490/fairphone5/modem.mbn";
751	status = "okay";
752};
753
754&remoteproc_wpss {
755	firmware-name = "qcom/qcm6490/fairphone5/wpss.mbn";
756	status = "okay";
757};
758
759&sdc2_clk {
760	drive-strength = <16>;
761	bias-disable;
762};
763
764&sdc2_cmd {
765	drive-strength = <10>;
766	bias-pull-up;
767};
768
769&sdc2_data {
770	drive-strength = <10>;
771	bias-pull-up;
772};
773
774&sdhc_2 {
775	vmmc-supply = <&vreg_l9c>;
776	vqmmc-supply = <&vreg_l6c>;
777
778	pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>;
779	pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>;
780
781	status = "okay";
782};
783
784&spi13 {
785	status = "okay";
786
787	/* Goodix touchscreen @ 0 */
788};
789
790&tlmm {
791	/*
792	 * 32-33: SMB1394 (SPMI)
793	 * 56-59: fingerprint reader (SPI)
794	 */
795	gpio-reserved-ranges = <32 2>, <56 4>;
796
797	bluetooth_enable_default: bluetooth-enable-default-state {
798		pins = "gpio85";
799		function = "gpio";
800		output-low;
801		bias-disable;
802	};
803
804	hall_sensor_default: hall-sensor-default-state {
805		pins = "gpio155";
806		function = "gpio";
807		drive-strength = <2>;
808		bias-pull-up;
809	};
810
811	qup_uart7_sleep_cts: qup-uart7-sleep-cts-state {
812		pins = "gpio28";
813		function = "gpio";
814		/*
815		 * Configure a bias-bus-hold on CTS to lower power
816		 * usage when Bluetooth is turned off. Bus hold will
817		 * maintain a low power state regardless of whether
818		 * the Bluetooth module drives the pin in either
819		 * direction or leaves the pin fully unpowered.
820		 */
821		bias-bus-hold;
822	};
823
824	qup_uart7_sleep_rts: qup-uart7-sleep-rts-state {
825		pins = "gpio29";
826		function = "gpio";
827		/*
828		 * Configure pull-down on RTS. As RTS is active low
829		 * signal, pull it low to indicate the BT SoC that it
830		 * can wakeup the system anytime from suspend state by
831		 * pulling RX low (by sending wakeup bytes).
832		 */
833		bias-pull-down;
834	};
835
836	qup_uart7_sleep_tx: qup-uart7-sleep-tx-state {
837		pins = "gpio30";
838		function = "gpio";
839		/*
840		 * Configure pull-up on TX when it isn't actively driven
841		 * to prevent BT SoC from receiving garbage during sleep.
842		 */
843		bias-pull-up;
844	};
845
846	qup_uart7_sleep_rx: qup-uart7-sleep-rx-state {
847		pins = "gpio31";
848		function = "gpio";
849		/*
850		 * Configure a pull-up on RX. This is needed to avoid
851		 * garbage data when the TX pin of the Bluetooth module
852		 * is floating which may cause spurious wakeups.
853		 */
854		bias-pull-up;
855	};
856
857	sw_ctrl_default: sw-ctrl-default-state {
858		pins = "gpio86";
859		function = "gpio";
860		bias-pull-down;
861	};
862};
863
864&uart5 {
865	compatible = "qcom,geni-debug-uart";
866	status = "okay";
867};
868
869&uart7 {
870	/delete-property/interrupts;
871	interrupts-extended = <&intc GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>,
872			      <&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
873
874	pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
875	pinctrl-names = "default", "sleep";
876
877	status = "okay";
878
879	bluetooth: bluetooth {
880		compatible = "qcom,wcn6750-bt";
881
882		pinctrl-0 = <&bluetooth_enable_default>, <&sw_ctrl_default>;
883		pinctrl-names = "default";
884
885		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
886		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
887
888		vddio-supply = <&vreg_l19b>;
889		vddaon-supply = <&vreg_s7b>;
890		vddbtcxmx-supply = <&vreg_s7b>;
891		vddrfacmn-supply = <&vreg_s7b>;
892		vddrfa0p8-supply = <&vreg_s7b>;
893		vddrfa1p7-supply = <&vreg_s1b>;
894		vddrfa1p2-supply = <&vreg_s8b>;
895		vddrfa2p2-supply = <&vreg_s1c>;
896		vddasd-supply = <&vreg_l11c>;
897
898		max-speed = <3200000>;
899	};
900};
901
902&ufs_mem_hc {
903	reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
904
905	vcc-supply = <&vreg_l7b>;
906	vcc-max-microamp = <800000>;
907	/*
908	 * Technically l9b enables an eLDO (supplied by s1b) which then powers
909	 * VCCQ2 of the UFS.
910	 */
911	vccq-supply = <&vreg_l9b>;
912	vccq-max-microamp = <900000>;
913
914	status = "okay";
915};
916
917&ufs_mem_phy {
918	vdda-phy-supply = <&vreg_l10c>;
919	vdda-pll-supply = <&vreg_l6b>;
920
921	status = "okay";
922};
923
924&usb_1 {
925	status = "okay";
926};
927
928&usb_1_dwc3 {
929	dr_mode = "otg";
930	usb-role-switch;
931};
932
933&usb_1_dwc3_hs {
934	remote-endpoint = <&pmic_glink_hs_in>;
935};
936
937&usb_1_dwc3_ss {
938	remote-endpoint = <&pmic_glink_ss_in>;
939};
940
941&usb_1_hsphy {
942	vdda-pll-supply = <&vreg_l10c>;
943	vdda18-supply = <&vreg_l1c>;
944	vdda33-supply = <&vreg_l2b>;
945
946	qcom,hs-crossover-voltage-microvolt = <28000>;
947	qcom,hs-output-impedance-micro-ohms = <2600000>;
948	qcom,hs-rise-fall-time-bp = <5430>;
949	qcom,hs-disconnect-bp = <1743>;
950	qcom,hs-amplitude-bp = <2430>;
951
952	qcom,pre-emphasis-amplitude-bp = <20000>;
953	qcom,pre-emphasis-duration-bp = <20000>;
954
955	qcom,squelch-detector-bp = <(-2090)>;
956
957	status = "okay";
958};
959
960&usb_1_qmpphy {
961	vdda-phy-supply = <&vreg_l6b>;
962	vdda-pll-supply = <&vreg_l1b>;
963
964	status = "okay";
965};
966
967&venus {
968	firmware-name = "qcom/qcm6490/fairphone5/venus.mbn";
969	status = "okay";
970};
971
972&wifi {
973	qcom,ath11k-calibration-variant = "Fairphone_5";
974	status = "okay";
975};
976