Debian Codegraph @

scripts/dtc/include-prefixes/arm64/qcom/sm7225-fairphone-fp4.dts

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