1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
8 /* PM7250B is configured to use SID2/3 */
10 #define PM7250B_SID1 3
12 /* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */
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 "sm7225.dtsi"
23 #include "pm6150l.dtsi"
24 #include "pm6350.dtsi"
25 #include "pm7250b.dtsi"
26 #include "pmk8350.dtsi"
29 model = "Fairphone 4";
30 compatible = "fairphone,fp4", "qcom,sm7225";
31 chassis-type = "handset";
33 /* required for bootloader to select correct board */
34 qcom,msm-id = <434 0x10000>, <459 0x10000>;
35 qcom,board-id = <8 32>;
47 stdout-path = "serial0:115200n8";
49 framebuffer0: framebuffer@a000000 {
50 compatible = "simple-framebuffer";
51 reg = <0 0xa0000000 0 (2340 * 1080 * 4)>;
54 stride = <(1080 * 4)>;
60 compatible = "gpio-keys";
61 pinctrl-names = "default";
62 pinctrl-0 = <&gpio_keys_pin>;
66 linux,code = <KEY_VOLUMEUP>;
67 gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
73 * The rmtfs memory region in downstream is 'dynamically allocated'
74 * but given the same address every time. Hard code it as this address is
75 * where the modem firmware expects it to be.
78 compatible = "qcom,rmtfs-mem";
79 reg = <0 0xefe01000 0 0x600000>;
83 qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
89 polling-delay-passive = <0>;
91 thermal-sensors = <&pm7250b_adc_tm 0>;
95 temperature = <125000>;
103 polling-delay-passive = <0>;
105 thermal-sensors = <&pm7250b_adc_tm 1>;
109 temperature = <125000>;
119 firmware-name = "/*(DEBLOBBED)*/";
125 compatible = "qcom,pm6350-rpmh-regulators";
129 regulator-min-microvolt = <1000000>;
130 regulator-max-microvolt = <1200000>;
134 regulator-min-microvolt = <1503000>;
135 regulator-max-microvolt = <2048000>;
139 regulator-min-microvolt = <1503000>;
140 regulator-max-microvolt = <1980000>;
141 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
145 regulator-min-microvolt = <2700000>;
146 regulator-max-microvolt = <3300000>;
147 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
151 regulator-min-microvolt = <352000>;
152 regulator-max-microvolt = <801000>;
153 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
157 regulator-min-microvolt = <1503000>;
158 regulator-max-microvolt = <1980000>;
159 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
163 regulator-min-microvolt = <1710000>;
164 regulator-max-microvolt = <3544000>;
165 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
169 regulator-min-microvolt = <1620000>;
170 regulator-max-microvolt = <1980000>;
171 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
175 regulator-min-microvolt = <2800000>;
176 regulator-max-microvolt = <2800000>;
177 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
181 regulator-min-microvolt = <1650000>;
182 regulator-max-microvolt = <3401000>;
183 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
187 regulator-min-microvolt = <1800000>;
188 regulator-max-microvolt = <2000000>;
189 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
193 regulator-min-microvolt = <1620000>;
194 regulator-max-microvolt = <1980000>;
195 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
199 regulator-min-microvolt = <570000>;
200 regulator-max-microvolt = <650000>;
201 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
205 regulator-min-microvolt = <1700000>;
206 regulator-max-microvolt = <1900000>;
207 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
211 regulator-min-microvolt = <1100000>;
212 regulator-max-microvolt = <1305000>;
213 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
217 regulator-min-microvolt = <830000>;
218 regulator-max-microvolt = <921000>;
219 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
223 regulator-min-microvolt = <788000>;
224 regulator-max-microvolt = <1049000>;
225 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
229 regulator-min-microvolt = <1080000>;
230 regulator-max-microvolt = <1305000>;
231 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
235 regulator-min-microvolt = <530000>;
236 regulator-max-microvolt = <801000>;
237 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
241 regulator-min-microvolt = <751000>;
242 regulator-max-microvolt = <825000>;
243 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
247 regulator-min-microvolt = <1080000>;
248 regulator-max-microvolt = <1305000>;
249 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
254 compatible = "qcom,pm6150l-rpmh-regulators";
258 regulator-min-microvolt = <313000>;
259 regulator-max-microvolt = <1395000>;
263 regulator-min-microvolt = <1620000>;
264 regulator-max-microvolt = <1980000>;
265 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
269 regulator-min-microvolt = <1170000>;
270 regulator-max-microvolt = <1305000>;
271 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
275 regulator-min-microvolt = <1100000>;
276 regulator-max-microvolt = <1299000>;
277 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
281 regulator-min-microvolt = <1620000>;
282 regulator-max-microvolt = <3300000>;
283 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
287 regulator-min-microvolt = <1620000>;
288 regulator-max-microvolt = <3300000>;
289 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
293 regulator-min-microvolt = <1700000>;
294 regulator-max-microvolt = <2950000>;
295 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
296 regulator-allow-set-load;
297 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
298 RPMH_REGULATOR_MODE_HPM>;
302 regulator-min-microvolt = <2700000>;
303 regulator-max-microvolt = <3544000>;
304 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
308 regulator-min-microvolt = <1620000>;
309 regulator-max-microvolt = <2000000>;
310 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
314 regulator-min-microvolt = <2700000>;
315 regulator-max-microvolt = <2960000>;
316 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
317 regulator-allow-set-load;
318 regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
319 RPMH_REGULATOR_MODE_HPM>;
323 regulator-min-microvolt = <3000000>;
324 regulator-max-microvolt = <3401000>;
325 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
329 regulator-min-microvolt = <3000000>;
330 regulator-max-microvolt = <3401000>;
331 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
335 regulator-min-microvolt = <1620000>;
336 regulator-max-microvolt = <5492000>;
337 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
338 regulator-allow-bypass;
364 firmware-name = "/*(DEBLOBBED)*/";
377 clock-frequency = <400000>;
380 /* ST21NFCD NFC @ 8 */
381 /* VL53L3 ToF @ 29 */
382 /* AW88264A amplifier @ 34 */
383 /* AW88264A amplifier @ 35 */
387 clock-frequency = <400000>;
390 /* HX83112A touchscreen @ 48 */
394 /* PM8008 PMIC @ 8 and 9 */
396 /* SMB1395 PMIC @ 34 */
397 /* awinic,aw8695 @ 5a */
401 qcom,gsi-loader = "self";
402 memory-region = <&pil_ipa_fw_mem>;
403 firmware-name = "/*(DEBLOBBED)*/";
408 firmware-name = "/*(DEBLOBBED)*/";
416 function = LED_FUNCTION_FLASH;
417 color = <LED_COLOR_ID_YELLOW>;
419 led-max-microamp = <180000>;
420 flash-max-microamp = <1000000>;
421 flash-max-timeout-us = <1280000>;
425 function = LED_FUNCTION_FLASH;
426 color = <LED_COLOR_ID_WHITE>;
428 led-max-microamp = <180000>;
429 flash-max-microamp = <1000000>;
430 flash-max-timeout-us = <1280000>;
435 qcom,switching-freq = <800>;
436 qcom,current-limit-microamp = <20000>;
437 qcom,num-strings = <2>;
443 gpio_keys_pin: gpio-keys-state {
445 function = PMIC_GPIO_FUNC_NORMAL;
453 linux,code = <KEY_VOLUMEDOWN>;
459 reg = <ADC5_AMUX_THM1_100K_PU>;
461 qcom,hw-settle-time = <200>;
462 qcom,pre-scaling = <1 1>;
463 label = "charger_skin_therm";
467 reg = <ADC5_AMUX_THM3_100K_PU>;
469 qcom,hw-settle-time = <200>;
470 qcom,pre-scaling = <1 1>;
471 label = "conn_therm";
478 charger-skin-therm@0 {
480 io-channels = <&pm7250b_adc ADC5_AMUX_THM1_100K_PU>;
482 qcom,hw-settle-time-us = <200>;
487 io-channels = <&pm7250b_adc ADC5_AMUX_THM3_100K_PU>;
489 qcom,hw-settle-time-us = <200>;
499 reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
501 qcom,hw-settle-time = <200>;
502 qcom,pre-scaling = <1 1>;
509 * Configure a bias-bus-hold on CTS to lower power
510 * usage when Bluetooth is turned off. Bus hold will
511 * maintain a low power state regardless of whether
512 * the Bluetooth module drives the pin in either
513 * direction or leaves the pin fully unpowered.
519 /* We'll drive RTS, so no pull */
520 drive-strength = <2>;
526 * Configure a pull-up on RX. This is needed to avoid
527 * garbage data when the TX pin of the Bluetooth module is
528 * in tri-state (module powered off or not driving the
535 /* We'll drive TX, so no pull */
536 drive-strength = <2>;
552 drive-strength = <2>;
561 drive-strength = <2>;
567 vmmc-supply = <&vreg_l9e>;
568 vqmmc-supply = <&vreg_l6e>;
570 cd-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
576 gpio-reserved-ranges = <13 4>, <56 2>;
578 qup_uart1_sleep_cts: qup-uart1-sleep-cts-state {
582 * Configure a bias-bus-hold on CTS to lower power
583 * usage when Bluetooth is turned off. Bus hold will
584 * maintain a low power state regardless of whether
585 * the Bluetooth module drives the pin in either
586 * direction or leaves the pin fully unpowered.
591 qup_uart1_sleep_rts: qup-uart1-sleep-rts-state {
595 * Configure pull-down on RTS. As RTS is active low
596 * signal, pull it low to indicate the BT SoC that it
597 * can wakeup the system anytime from suspend state by
598 * pulling RX low (by sending wakeup bytes).
603 qup_uart1_sleep_rx: qup-uart1-sleep-rx-state {
607 * Configure a pull-up on RX. This is needed to avoid
608 * garbage data when the TX pin of the Bluetooth module
609 * is floating which may cause spurious wakeups.
614 qup_uart1_sleep_tx: qup-uart1-sleep-tx-state {
618 * Configure pull-up on TX when it isn't actively driven
619 * to prevent BT SoC from receiving garbage during sleep.
626 /delete-property/ interrupts;
627 interrupts-extended = <&intc GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
628 <&tlmm 64 IRQ_TYPE_EDGE_FALLING>;
630 pinctrl-names = "default", "sleep";
631 pinctrl-1 = <&qup_uart1_sleep_cts>, <&qup_uart1_sleep_rts>, <&qup_uart1_sleep_tx>, <&qup_uart1_sleep_rx>;
636 compatible = "qcom,wcn3988-bt";
638 vddio-supply = <&vreg_l11a>;
639 vddxo-supply = <&vreg_l7a>;
640 vddrf-supply = <&vreg_l2e>;
641 vddch0-supply = <&vreg_l10e>;
642 swctrl-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
644 max-speed = <3200000>;
653 reset-gpios = <&tlmm 156 GPIO_ACTIVE_LOW>;
655 vcc-supply = <&vreg_l7e>;
656 vcc-max-microamp = <800000>;
657 vccq2-supply = <&vreg_l12a>;
658 vccq2-max-microamp = <800000>;
664 vdda-phy-supply = <&vreg_l18a>;
665 vdda-pll-supply = <&vreg_l22a>;
675 maximum-speed = "super-speed";
676 dr_mode = "peripheral";
680 vdd-supply = <&vreg_l18a>;
681 vdda-pll-supply = <&vreg_l2a>;
682 vdda-phy-dpdm-supply = <&vreg_l3a>;
688 vdda-phy-supply = <&vreg_l22a>;
689 vdda-pll-supply = <&vreg_l16a>;
695 vdd-0.8-cx-mx-supply = <&vreg_l4a>;
696 vdd-1.8-xo-supply = <&vreg_l7a>;
697 vdd-1.3-rfa-supply = <&vreg_l2e>;
698 vdd-3.3-ch0-supply = <&vreg_l10e>;
699 vdd-3.3-ch1-supply = <&vreg_l11e>;