0001 // SPDX-License-Identifier: BSD-3-Clause
0002 /*
0003 * Copyright (c) 2021, AngeloGioacchino Del Regno
0004 * <angelogioacchino.delregno@somainline.org>
0005 */
0006
0007 /dts-v1/;
0008
0009 #include <dt-bindings/input/input.h>
0010 #include <dt-bindings/leds/common.h>
0011 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0012 #include "msm8998.dtsi"
0013 #include "pm8005.dtsi"
0014 #include "pm8998.dtsi"
0015 #include "pmi8998.dtsi"
0016
0017 / {
0018 model = "F(x)tec Pro1 (QX1000)";
0019 compatible = "fxtec,pro1", "qcom,msm8998";
0020 chassis-type = "handset";
0021 qcom,board-id = <0x02000b 0x10>;
0022
0023 aliases {
0024 serial0 = &blsp2_uart1;
0025 serial1 = &blsp1_uart3;
0026 };
0027
0028 /*
0029 * Until we hook up type-c detection, we
0030 * have to stick with this. But it works.
0031 */
0032 extcon_usb: extcon-usb {
0033 compatible = "linux,extcon-usb-gpio";
0034 id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>;
0035 };
0036
0037 gpio-hall-sensors {
0038 compatible = "gpio-keys";
0039 label = "Hall sensors";
0040 pinctrl-names = "default";
0041 pinctrl-0 = <&hall_sensor1_default>;
0042
0043 event-hall-sensor1 {
0044 label = "Keyboard Hall Sensor";
0045 gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>;
0046 debounce-interval = <15>;
0047 gpio-key,wakeup;
0048 linux,input-type = <EV_SW>;
0049 linux,code = <SW_KEYPAD_SLIDE>;
0050 };
0051 };
0052
0053 gpio-kb-extra-keys {
0054 compatible = "gpio-keys";
0055 label = "Keyboard extra keys";
0056 pinctrl-names = "default";
0057 pinctrl-0 = <&gpio_kb_pins_extra>;
0058
0059 key-home {
0060 label = "Home";
0061 gpios = <&tlmm 21 GPIO_ACTIVE_LOW>;
0062 linux,code = <KEY_HOMEPAGE>;
0063 debounce-interval = <15>;
0064 linux,can-disable;
0065 };
0066
0067 key-super-l {
0068 label = "Super Left";
0069 gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
0070 linux,code = <KEY_FN>;
0071 debounce-interval = <15>;
0072 linux,can-disable;
0073 };
0074
0075 key-super-r {
0076 label = "Super Right";
0077 gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
0078 linux,code = <KEY_FN>;
0079 debounce-interval = <15>;
0080 linux,can-disable;
0081 };
0082
0083 key-shift {
0084 label = "Shift";
0085 gpios = <&tlmm 114 GPIO_ACTIVE_LOW>;
0086 linux,code = <KEY_RIGHTSHIFT>;
0087 debounce-interval = <15>;
0088 linux,can-disable;
0089 };
0090
0091 key-ctrl {
0092 label = "Ctrl";
0093 gpios = <&tlmm 128 GPIO_ACTIVE_LOW>;
0094 linux,code = <KEY_LEFTCTRL>;
0095 debounce-interval = <15>;
0096 linux,can-disable;
0097 };
0098
0099 key-alt {
0100 label = "Alt";
0101 gpios = <&tlmm 129 GPIO_ACTIVE_LOW>;
0102 linux,code = <KEY_LEFTALT>;
0103 debounce-interval = <15>;
0104 linux,can-disable;
0105 };
0106 };
0107
0108 gpio-keys {
0109 compatible = "gpio-keys";
0110 label = "Side buttons";
0111 pinctrl-names = "default";
0112 pinctrl-0 = <&vol_up_pin_a>, <&cam_focus_pin_a>,
0113 <&cam_snapshot_pin_a>;
0114 button-vol-up {
0115 label = "Volume Up";
0116 gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
0117 linux,input-type = <EV_KEY>;
0118 linux,code = <KEY_VOLUMEUP>;
0119 gpio-key,wakeup;
0120 debounce-interval = <15>;
0121 };
0122
0123 button-camera-snapshot {
0124 label = "Camera Snapshot";
0125 gpios = <&pm8998_gpio 7 GPIO_ACTIVE_LOW>;
0126 linux,input-type = <EV_KEY>;
0127 linux,code = <KEY_CAMERA>;
0128 debounce-interval = <15>;
0129 };
0130
0131 button-camera-focus {
0132 label = "Camera Focus";
0133 gpios = <&pm8998_gpio 8 GPIO_ACTIVE_LOW>;
0134 linux,input-type = <EV_KEY>;
0135 linux,code = <KEY_CAMERA_FOCUS>;
0136 debounce-interval = <15>;
0137 };
0138 };
0139
0140 keyboard-leds {
0141 compatible = "gpio-leds";
0142
0143 led-0 {
0144 color = <LED_COLOR_ID_WHITE>;
0145 default-state = "off";
0146 function = LED_FUNCTION_KBD_BACKLIGHT;
0147 gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
0148 label = "white:kbd_backlight";
0149 retain-state-suspended;
0150 };
0151
0152 led-1 {
0153 color = <LED_COLOR_ID_YELLOW>;
0154 default-state = "off";
0155 function = LED_FUNCTION_CAPSLOCK;
0156 gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
0157 label = "yellow:capslock";
0158 linux,default-trigger = "kbd-capslock";
0159 };
0160 };
0161
0162 reserved-memory {
0163 cont_splash_mem: memory@9d400000 {
0164 reg = <0x0 0x9d400000 0x0 0x2000000>;
0165 no-map;
0166 };
0167
0168 zap_shader_region: memory@f6400000 {
0169 compatible = "shared-dma-pool";
0170 reg = <0x0 0xf6400000 0x0 0x2000>;
0171 no-map;
0172 };
0173
0174 ramoops@ffc00000 {
0175 compatible = "ramoops";
0176 reg = <0x0 0xffc00000 0x0 0x100000>;
0177 console-size = <0x60000>;
0178 ecc-size = <16>;
0179 ftrace-size = <0x10000>;
0180 pmsg-size = <0x20000>;
0181 record-size = <0x10000>;
0182 };
0183 };
0184
0185 ts_vio_vreg: ts-vio-vreg {
0186 compatible = "regulator-fixed";
0187 regulator-name = "ts_vio_reg";
0188 startup-delay-us = <2>;
0189 enable-active-high;
0190 gpio = <&tlmm 81 GPIO_ACTIVE_HIGH>;
0191 pinctrl-names = "default";
0192 pinctrl-0 = <&ts_vio_default>;
0193 regulator-always-on;
0194 };
0195
0196 vph_pwr: vph-pwr-regulator {
0197 compatible = "regulator-fixed";
0198 regulator-name = "vph_pwr";
0199 regulator-always-on;
0200 regulator-boot-on;
0201 };
0202 };
0203
0204 &blsp1_uart3 {
0205 status = "okay";
0206
0207 bluetooth {
0208 compatible = "qcom,wcn3990-bt";
0209
0210 vddio-supply = <&vreg_s4a_1p8>;
0211 vddxo-supply = <&vreg_l7a_1p8>;
0212 vddrf-supply = <&vreg_l17a_1p3>;
0213 vddch0-supply = <&vreg_l25a_3p3>;
0214 max-speed = <3200000>;
0215 };
0216 };
0217
0218 &blsp1_uart3_on {
0219 rx {
0220 /delete-property/ bias-disable;
0221 /*
0222 * Configure a pull-up on 45 (RX). This is needed to
0223 * avoid garbage data when the TX pin of the Bluetooth
0224 * module is in tri-state (module powered off or not
0225 * driving the signal yet).
0226 */
0227 bias-pull-up;
0228 };
0229
0230 cts {
0231 /delete-property/ bias-disable;
0232 /*
0233 * Configure a pull-down on 47 (CTS) to match the pull
0234 * of the Bluetooth module.
0235 */
0236 bias-pull-down;
0237 };
0238 };
0239
0240 &blsp2_uart1 {
0241 status = "okay";
0242 };
0243
0244 &blsp2_i2c1 {
0245 status = "okay";
0246
0247 touchscreen@14 {
0248 compatible = "goodix,gt9286";
0249 reg = <0x14>;
0250 interrupt-parent = <&tlmm>;
0251 interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
0252 reset-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>;
0253 AVDD28-supply = <&vreg_l28_3p0>;
0254 VDDIO-supply = <&ts_vio_vreg>;
0255 pinctrl-names = "active";
0256 pinctrl-0 = <&ts_rst_n>, <&ts_int_n>;
0257 };
0258 };
0259
0260 &etf {
0261 status = "okay";
0262 };
0263
0264 &etm1 {
0265 status = "okay";
0266 };
0267
0268 &etm2 {
0269 status = "okay";
0270 };
0271
0272 &etm3 {
0273 status = "okay";
0274 };
0275
0276 &etm4 {
0277 status = "okay";
0278 };
0279
0280 &etm5 {
0281 status = "okay";
0282 };
0283
0284 &etm6 {
0285 status = "okay";
0286 };
0287
0288 &etm7 {
0289 status = "okay";
0290 };
0291
0292 &etm8 {
0293 status = "okay";
0294 };
0295
0296 &etr {
0297 status = "okay";
0298 };
0299
0300 &funnel1 {
0301 status = "okay";
0302 };
0303
0304 &funnel2 {
0305 status = "okay";
0306 };
0307
0308 &funnel3 {
0309 status = "okay";
0310 };
0311
0312 &funnel4 {
0313 // FIXME: Figure out why clock late_initcall crashes the board with
0314 // this enabled.
0315 // status = "okay";
0316 };
0317
0318 &funnel5 {
0319 // FIXME: Figure out why clock late_initcall crashes the board with
0320 // this enabled.
0321 // status = "okay";
0322 };
0323
0324 &pcie0 {
0325 status = "okay";
0326 };
0327
0328 &pcie_phy {
0329 status = "okay";
0330 };
0331
0332 &pm8005_regulators {
0333 vdd_s1-supply = <&vph_pwr>;
0334
0335 pm8005_s1: s1 { /* VDD_GFX supply */
0336 regulator-min-microvolt = <524000>;
0337 regulator-max-microvolt = <1100000>;
0338 regulator-enable-ramp-delay = <500>;
0339
0340 /* Hack until we rig up the gpu consumer */
0341 regulator-always-on;
0342 };
0343 };
0344
0345 &pm8998_gpio {
0346 vol_up_pin_a: vol-up-active-state {
0347 pins = "gpio6";
0348 function = "normal";
0349 bias-pull-up;
0350 input-enable;
0351 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0352 };
0353
0354 cam_focus_pin_a: cam-focus-btn-active-state {
0355 pins = "gpio7";
0356 function = "normal";
0357 bias-pull-up;
0358 input-enable;
0359 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0360 };
0361
0362 cam_snapshot_pin_a: cam-snapshot-btn-active-state {
0363 pins = "gpio8";
0364 function = "normal";
0365 bias-pull-up;
0366 input-enable;
0367 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0368 };
0369 };
0370
0371 &pm8998_pon {
0372 resin {
0373 compatible = "qcom,pm8941-resin";
0374 interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>;
0375 bias-pull-up;
0376 debounce = <15625>;
0377 linux,code = <KEY_VOLUMEDOWN>;
0378 };
0379 };
0380
0381 &qusb2phy {
0382 status = "okay";
0383
0384 vdda-pll-supply = <&vreg_l12a_1p8>;
0385 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
0386 };
0387
0388 &replicator1 {
0389 status = "okay";
0390 };
0391
0392 &rpm_requests {
0393 pm8998-regulators {
0394 compatible = "qcom,rpm-pm8998-regulators";
0395
0396 vdd_s1-supply = <&vph_pwr>;
0397 vdd_s2-supply = <&vph_pwr>;
0398 vdd_s3-supply = <&vph_pwr>;
0399 vdd_s4-supply = <&vph_pwr>;
0400 vdd_s5-supply = <&vph_pwr>;
0401 vdd_s6-supply = <&vph_pwr>;
0402 vdd_s7-supply = <&vph_pwr>;
0403 vdd_s8-supply = <&vph_pwr>;
0404 vdd_s9-supply = <&vph_pwr>;
0405 vdd_s10-supply = <&vph_pwr>;
0406 vdd_s11-supply = <&vph_pwr>;
0407 vdd_s12-supply = <&vph_pwr>;
0408 vdd_s13-supply = <&vph_pwr>;
0409 vdd_l1_l27-supply = <&vreg_s7a_1p025>;
0410 vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>;
0411 vdd_l3_l11-supply = <&vreg_s7a_1p025>;
0412 vdd_l4_l5-supply = <&vreg_s7a_1p025>;
0413 vdd_l6-supply = <&vreg_s5a_2p04>;
0414 vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>;
0415 vdd_l9-supply = <&vreg_bob>;
0416 vdd_l10_l23_l25-supply = <&vreg_bob>;
0417 vdd_l13_l19_l21-supply = <&vreg_bob>;
0418 vdd_l16_l28-supply = <&vreg_bob>;
0419 vdd_l18_l22-supply = <&vreg_bob>;
0420 vdd_l20_l24-supply = <&vreg_bob>;
0421 vdd_l26-supply = <&vreg_s3a_1p35>;
0422 vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
0423
0424 vreg_s3a_1p35: s3 {
0425 regulator-min-microvolt = <1352000>;
0426 regulator-max-microvolt = <1352000>;
0427 };
0428
0429 vreg_s4a_1p8: s4 {
0430 regulator-min-microvolt = <1800000>;
0431 regulator-max-microvolt = <1800000>;
0432 regulator-allow-set-load;
0433 };
0434
0435 vreg_s5a_2p04: s5 {
0436 regulator-min-microvolt = <1904000>;
0437 regulator-max-microvolt = <2040000>;
0438 };
0439
0440 vreg_s7a_1p025: s7 {
0441 regulator-min-microvolt = <900000>;
0442 regulator-max-microvolt = <1028000>;
0443 };
0444
0445 vreg_l1a_0p875: l1 {
0446 regulator-min-microvolt = <880000>;
0447 regulator-max-microvolt = <880000>;
0448 };
0449
0450 vreg_l2a_1p2: l2 {
0451 regulator-min-microvolt = <1200000>;
0452 regulator-max-microvolt = <1200000>;
0453 };
0454
0455 vreg_l3a_1p0: l3 {
0456 regulator-min-microvolt = <1000000>;
0457 regulator-max-microvolt = <1000000>;
0458 };
0459
0460 vreg_l5a_0p8: l5 {
0461 regulator-min-microvolt = <800000>;
0462 regulator-max-microvolt = <800000>;
0463 };
0464
0465 vreg_l6a_1p8: l6 {
0466 regulator-min-microvolt = <1808000>;
0467 regulator-max-microvolt = <1808000>;
0468 };
0469
0470 vreg_l7a_1p8: l7 {
0471 regulator-min-microvolt = <1800000>;
0472 regulator-max-microvolt = <1800000>;
0473 };
0474
0475 vreg_l8a_1p2: l8 {
0476 regulator-min-microvolt = <1200000>;
0477 regulator-max-microvolt = <1200000>;
0478 };
0479
0480 vreg_l9a_1p8: l9 {
0481 regulator-min-microvolt = <1808000>;
0482 regulator-max-microvolt = <2960000>;
0483 };
0484
0485 vreg_l10a_1p8: l10 {
0486 regulator-min-microvolt = <1808000>;
0487 regulator-max-microvolt = <2960000>;
0488 };
0489
0490 vreg_l11a_1p0: l11 {
0491 regulator-min-microvolt = <1000000>;
0492 regulator-max-microvolt = <1000000>;
0493 };
0494
0495 vreg_l12a_1p8: l12 {
0496 regulator-min-microvolt = <1800000>;
0497 regulator-max-microvolt = <1800000>;
0498 };
0499
0500 vreg_l13a_2p95: l13 {
0501 regulator-min-microvolt = <1808000>;
0502 regulator-max-microvolt = <2960000>;
0503 };
0504
0505 vreg_l14a_1p88: l14 {
0506 regulator-min-microvolt = <1880000>;
0507 regulator-max-microvolt = <1880000>;
0508 };
0509
0510 vreg_l15a_1p8: l15 {
0511 regulator-min-microvolt = <1800000>;
0512 regulator-max-microvolt = <1800000>;
0513 };
0514
0515 vreg_l16a_2p7: l16 {
0516 regulator-min-microvolt = <2704000>;
0517 regulator-max-microvolt = <2704000>;
0518 };
0519
0520 vreg_l17a_1p3: l17 {
0521 regulator-min-microvolt = <1304000>;
0522 regulator-max-microvolt = <1304000>;
0523 };
0524
0525 vreg_l18a_2p7: l18 {
0526 regulator-min-microvolt = <2704000>;
0527 regulator-max-microvolt = <2704000>;
0528 };
0529
0530 vreg_l19a_3p0: l19 {
0531 regulator-min-microvolt = <3008000>;
0532 regulator-max-microvolt = <3008000>;
0533 };
0534
0535 vreg_l20a_2p95: l20 {
0536 regulator-min-microvolt = <2960000>;
0537 regulator-max-microvolt = <2960000>;
0538 regulator-allow-set-load;
0539 };
0540
0541 vreg_l21a_2p95: l21 {
0542 regulator-min-microvolt = <2960000>;
0543 regulator-max-microvolt = <2960000>;
0544 regulator-system-load = <800000>;
0545 regulator-allow-set-load;
0546 };
0547
0548 vreg_l22a_2p85: l22 {
0549 regulator-min-microvolt = <2864000>;
0550 regulator-max-microvolt = <2864000>;
0551 };
0552
0553 vreg_l23a_3p3: l23 {
0554 regulator-min-microvolt = <3312000>;
0555 regulator-max-microvolt = <3312000>;
0556 };
0557
0558 vreg_l24a_3p075: l24 {
0559 regulator-min-microvolt = <3088000>;
0560 regulator-max-microvolt = <3088000>;
0561 };
0562
0563 vreg_l25a_3p3: l25 {
0564 regulator-min-microvolt = <3104000>;
0565 regulator-max-microvolt = <3312000>;
0566 };
0567
0568 vreg_l26a_1p2: l26 {
0569 regulator-min-microvolt = <1200000>;
0570 regulator-max-microvolt = <1200000>;
0571 regulator-allow-set-load;
0572 };
0573
0574 vreg_l28_3p0: l28 {
0575 regulator-min-microvolt = <3008000>;
0576 regulator-max-microvolt = <3008000>;
0577 };
0578
0579 vreg_lvs1a_1p8: lvs1 {
0580 regulator-min-microvolt = <1800000>;
0581 regulator-max-microvolt = <1800000>;
0582 };
0583
0584 vreg_lvs2a_1p8: lvs2 {
0585 regulator-min-microvolt = <1800000>;
0586 regulator-max-microvolt = <1800000>;
0587 };
0588
0589 };
0590
0591 pmi8998-regulators {
0592 compatible = "qcom,rpm-pmi8998-regulators";
0593
0594 vdd_bob-supply = <&vph_pwr>;
0595
0596 vreg_bob: bob {
0597 regulator-min-microvolt = <3312000>;
0598 regulator-max-microvolt = <3600000>;
0599 };
0600 };
0601 };
0602
0603 &remoteproc_adsp {
0604 status = "okay";
0605 };
0606
0607 &remoteproc_mss {
0608 status = "okay";
0609 };
0610
0611 &remoteproc_slpi {
0612 status = "okay";
0613 };
0614
0615 &tlmm {
0616 gpio-reserved-ranges = <0 4>;
0617
0618 mdp_vsync_n: mdp-vsync-n {
0619 pins = "gpio10";
0620 function = "mdp_vsync_a";
0621 bias-pull-down;
0622 drive-strength = <2>;
0623 };
0624
0625 gpio_kb_pins_extra: gpio-kb-pins-extra {
0626 pins = "gpio21", "gpio32", "gpio33", "gpio114",
0627 "gpio128", "gpio129";
0628 function = "gpio";
0629 drive-strength = <2>;
0630 bias-pull-up;
0631 };
0632
0633 ts_vio_default: ts-vio-def {
0634 pins = "gpio81";
0635 function = "gpio";
0636 bias-disable;
0637 drive-strength = <2>;
0638 };
0639
0640 ts_rst_n: ts-rst-n {
0641 pins = "gpio89";
0642 function = "gpio";
0643 bias-pull-up;
0644 drive-strength = <8>;
0645 };
0646
0647 hall_sensor1_default: hall-sensor1-def {
0648 pins = "gpio124";
0649 function = "gpio";
0650 bias-disable;
0651 drive-strength = <2>;
0652 input-enable;
0653 };
0654
0655 ts_int_n: ts-int-n {
0656 pins = "gpio125";
0657 function = "gpio";
0658 bias-disable;
0659 drive-strength = <8>;
0660 };
0661 };
0662
0663 &sdhc2 {
0664 status = "okay";
0665 cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>;
0666
0667 vmmc-supply = <&vreg_l21a_2p95>;
0668 vqmmc-supply = <&vreg_l13a_2p95>;
0669
0670 pinctrl-names = "default", "sleep";
0671 pinctrl-0 = <&sdc2_on &sdc2_cd>;
0672 pinctrl-1 = <&sdc2_off &sdc2_cd>;
0673 };
0674
0675 &stm {
0676 status = "okay";
0677 };
0678
0679 &ufshc {
0680 status = "okay";
0681 vcc-supply = <&vreg_l20a_2p95>;
0682 vccq-supply = <&vreg_l26a_1p2>;
0683 vccq2-supply = <&vreg_s4a_1p8>;
0684 vcc-max-microamp = <750000>;
0685 vccq-max-microamp = <560000>;
0686 vccq2-max-microamp = <750000>;
0687 };
0688
0689 &ufsphy {
0690 status = "okay";
0691 vdda-phy-supply = <&vreg_l1a_0p875>;
0692 vdda-pll-supply = <&vreg_l2a_1p2>;
0693 vddp-ref-clk-supply = <&vreg_l26a_1p2>;
0694 };
0695
0696 &usb3 {
0697 status = "okay";
0698 };
0699
0700 &usb3_dwc3 {
0701 dr_mode = "peripheral";
0702 extcon = <&extcon_usb>;
0703 };
0704
0705 &usb3phy {
0706 status = "okay";
0707
0708 vdda-phy-supply = <&vreg_l1a_0p875>;
0709 vdda-pll-supply = <&vreg_l2a_1p2>;
0710 };
0711
0712 /* GT9286 analog supply */
0713 &vreg_l28_3p0 {
0714 regulator-min-microvolt = <2800000>;
0715 regulator-max-microvolt = <2800000>;
0716 };
0717
0718 &wifi {
0719 status = "okay";
0720
0721 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
0722 vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
0723 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
0724 vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
0725 };