1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2/* 3 * Copyright (c) 2023 - 2024, Dang Huynh <danct12@riseup.net> 4 */ 5 6/dts-v1/; 7 8#include "sm6115.dtsi" 9#include "pm6125.dtsi" 10#include "pmi632.dtsi" 11#include <dt-bindings/arm/qcom,ids.h> 12#include <dt-bindings/leds/common.h> 13#include <dt-bindings/usb/pd.h> 14 15/ { 16 model = "F(x)tec Pro1X (QX1050)"; 17 compatible = "fxtec,pro1x", "qcom,sm6115"; 18 chassis-type = "handset"; 19 20 qcom,msm-id = <QCOM_ID_SM6115 0x10000>; 21 22 chosen { 23 #address-cells = <2>; 24 #size-cells = <2>; 25 ranges; 26 27 framebuffer0: framebuffer@5c000000 { 28 compatible = "simple-framebuffer"; 29 reg = <0x0 0x5c000000 0x0 (1080 * 2160 * 4)>; 30 width = <1080>; 31 height = <2160>; 32 stride = <(1080 * 4)>; 33 format = "a8r8g8b8"; 34 clocks = <&gcc GCC_DISP_HF_AXI_CLK>; 35 }; 36 }; 37 38 disp_elvdd_supply: disp-elvdd-supply { 39 compatible = "regulator-fixed"; 40 regulator-name = "disp_elvdd_supply"; 41 }; 42 43 disp_elvss_supply: disp-elvss-supply { 44 compatible = "regulator-fixed"; 45 regulator-name = "disp_elvss_supply"; 46 }; 47 48 disp_vcc_supply: disp-vcc-supply { 49 compatible = "regulator-fixed"; 50 regulator-name = "disp_vcc_supply"; 51 }; 52 53 disp_vci_supply: disp-vci-supply { 54 compatible = "regulator-fixed"; 55 regulator-name = "disp_vci_supply"; 56 }; 57 58 gpio-keys { 59 compatible = "gpio-keys"; 60 61 pinctrl-0 = <&hall_sensor_n>, <&key_camera_n>, <&vol_up_n>; 62 pinctrl-names = "default"; 63 64 hall-switch { 65 label = "Hall Switch"; 66 linux,input-type = <EV_SW>; 67 linux,code = <SW_KEYPAD_SLIDE>; 68 gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; 69 debounce-interval = <90>; 70 wakeup-source; 71 }; 72 73 key-camera { 74 label = "Camera Button"; 75 linux,code = <KEY_CAMERA>; 76 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; 77 debounce-interval = <15>; 78 }; 79 80 key-volume-up { 81 label = "Volume Up"; 82 linux,code = <KEY_VOLUMEUP>; 83 gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>; 84 debounce-interval = <15>; 85 linux,can-disable; 86 wakeup-source; 87 }; 88 }; 89 90 gpio-leds { 91 compatible = "gpio-leds"; 92 93 capslock-led { 94 label = "green:capslock"; 95 function = LED_FUNCTION_CAPSLOCK; 96 color = <LED_COLOR_ID_GREEN>; 97 gpios = <&pca9534 1 GPIO_ACTIVE_HIGH>; 98 linux,default-trigger = "kbd-capslock"; 99 default-state = "off"; 100 }; 101 }; 102 103 ts_vdd_supply: ts-vdd-supply { 104 compatible = "regulator-fixed"; 105 regulator-name = "ts_vdd_supply"; 106 gpio = <&pca9534 3 GPIO_ACTIVE_HIGH>; 107 enable-active-high; 108 }; 109 110 ts_vddio_supply: ts-vddio-supply { 111 compatible = "regulator-fixed"; 112 regulator-name = "ts_vddio_supply"; 113 gpio = <&pca9534 2 GPIO_ACTIVE_HIGH>; 114 enable-active-high; 115 }; 116}; 117 118&gpi_dma0 { 119 status = "okay"; 120}; 121 122&gpu { 123 status = "okay"; 124 125 zap-shader { 126 firmware-name = "qcom/sm6115/Fxtec/QX1050/a610_zap.mbn"; 127 }; 128}; 129 130&i2c1 { 131 clock-frequency = <100000>; 132 133 status = "okay"; 134 135 pca9534: gpio@21 { 136 compatible = "nxp,pca9534"; 137 reg = <0x21>; 138 gpio-controller; 139 #gpio-cells = <2>; 140 }; 141}; 142 143&i2c2 { 144 status = "okay"; 145 /* Clock frequency was not specified downstream, let's park it to 100 KHz */ 146 clock-frequency = <100000>; 147 148 touchscreen@14 { 149 compatible = "goodix,gt9286"; 150 reg = <0x14>; 151 152 interrupts-extended = <&tlmm 80 IRQ_TYPE_LEVEL_LOW>; 153 154 irq-gpios = <&tlmm 80 IRQ_TYPE_LEVEL_LOW>; 155 reset-gpios = <&tlmm 71 GPIO_ACTIVE_HIGH>; 156 AVDD28-supply = <&ts_vdd_supply>; 157 VDDIO-supply = <&ts_vddio_supply>; 158 159 pinctrl-0 = <&ts_int_n>, <&ts_rst_n>; 160 pinctrl-names = "default"; 161 }; 162}; 163 164&mdss { 165 status = "okay"; 166}; 167 168&mdss_dsi0 { 169 vdda-supply = <&pm6125_l18a>; 170 status = "okay"; 171 172 panel: panel@0 { 173 compatible = "boe,bf060y8m-aj0"; 174 reg = <0>; 175 176 reset-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>; 177 178 elvdd-supply = <&disp_elvdd_supply>; 179 elvss-supply = <&disp_elvss_supply>; 180 vcc-supply = <&disp_vcc_supply>; 181 vci-supply = <&disp_vci_supply>; 182 vddio-supply = <&pm6125_l9a>; 183 184 pinctrl-0 = <&mdss_dsi_n &panel_en_n>; 185 pinctrl-names = "default"; 186 187 port { 188 panel_in: endpoint { 189 remote-endpoint = <&mdss_dsi0_out>; 190 }; 191 }; 192 }; 193}; 194 195&mdss_dsi0_out { 196 data-lanes = <0 1 2 3>; 197 remote-endpoint = <&panel_in>; 198}; 199 200&mdss_dsi0_phy { 201 status = "okay"; 202}; 203 204&pm6125_gpios { 205 vol_up_n: vol-up-n-state { 206 pins = "gpio5"; 207 function = "normal"; 208 power-source = <0>; 209 bias-pull-up; 210 input-enable; 211 }; 212}; 213 214&pmi632_lpg { 215 status = "okay"; 216 217 multi-led { 218 color = <LED_COLOR_ID_RGB>; 219 function = LED_FUNCTION_STATUS; 220 221 #address-cells = <1>; 222 #size-cells = <0>; 223 224 led@1 { 225 reg = <1>; 226 color = <LED_COLOR_ID_RED>; 227 }; 228 229 led@2 { 230 reg = <2>; 231 color = <LED_COLOR_ID_GREEN>; 232 }; 233 234 led@3 { 235 reg = <3>; 236 color = <LED_COLOR_ID_BLUE>; 237 }; 238 }; 239}; 240 241&pmi632_typec { 242 status = "okay"; 243 244 connector { 245 compatible = "usb-c-connector"; 246 247 power-role = "dual"; 248 data-role = "dual"; 249 self-powered; 250 251 typec-power-opmode = "default"; 252 pd-disable; 253 254 ports { 255 #address-cells = <1>; 256 #size-cells = <0>; 257 258 port@0 { 259 reg = <0>; 260 pmi632_hs_in: endpoint { 261 remote-endpoint = <&usb_dwc3_hs>; 262 }; 263 }; 264 265 port@1 { 266 reg = <1>; 267 pmi632_ss_in: endpoint { 268 remote-endpoint = <&usb_qmpphy_out>; 269 }; 270 }; 271 }; 272 }; 273}; 274 275&pmi632_vbus { 276 regulator-min-microamp = <500000>; 277 regulator-max-microamp = <1000000>; 278 status = "okay"; 279}; 280 281&pon_pwrkey { 282 status = "okay"; 283}; 284 285&pon_resin { 286 linux,code = <KEY_VOLUMEDOWN>; 287 status = "okay"; 288}; 289 290&qupv3_id_0 { 291 status = "okay"; 292}; 293 294&remoteproc_adsp { 295 firmware-name = "qcom/sm6115/Fxtec/QX1050/adsp.mbn"; 296 status = "okay"; 297}; 298 299&remoteproc_cdsp { 300 firmware-name = "qcom/sm6115/Fxtec/QX1050/cdsp.mbn"; 301 status = "okay"; 302}; 303 304&remoteproc_mpss { 305 firmware-name = "qcom/sm6115/Fxtec/QX1050/modem.mbn"; 306 status = "okay"; 307}; 308 309&rpm_requests { 310 regulators-0 { 311 compatible = "qcom,rpm-pm6125-regulators"; 312 313 pm6125_s6a: s6 { 314 regulator-min-microvolt = <304000>; 315 regulator-max-microvolt = <1456000>; 316 }; 317 318 pm6125_s7a: s7 { 319 regulator-min-microvolt = <1280000>; 320 regulator-max-microvolt = <2040000>; 321 }; 322 323 pm6125_s8a: s8 { 324 regulator-min-microvolt = <1064000>; 325 regulator-max-microvolt = <1304000>; 326 }; 327 328 pm6125_l1a: l1 { 329 regulator-min-microvolt = <952000>; 330 regulator-max-microvolt = <1152000>; 331 }; 332 333 pm6125_l4a: l4 { 334 regulator-min-microvolt = <488000>; 335 regulator-max-microvolt = <1000000>; 336 }; 337 338 pm6125_l5a: l5 { 339 regulator-min-microvolt = <1648000>; 340 regulator-max-microvolt = <3056000>; 341 regulator-allow-set-load; 342 }; 343 344 pm6125_l6a: l6 { 345 regulator-min-microvolt = <576000>; 346 regulator-max-microvolt = <656000>; 347 }; 348 349 pm6125_l7a: l7 { 350 regulator-min-microvolt = <1200000>; 351 regulator-max-microvolt = <1304000>; 352 }; 353 354 pm6125_l8a: l8 { 355 regulator-min-microvolt = <400000>; 356 regulator-max-microvolt = <728000>; 357 }; 358 359 pm6125_l9a: l9 { 360 regulator-min-microvolt = <1800000>; 361 regulator-max-microvolt = <2000000>; 362 }; 363 364 pm6125_l10a: l10 { 365 regulator-min-microvolt = <1704000>; 366 regulator-max-microvolt = <1904000>; 367 }; 368 369 pm6125_l11a: l11 { 370 regulator-min-microvolt = <1704000>; 371 regulator-max-microvolt = <1952000>; 372 regulator-allow-set-load; 373 }; 374 375 pm6125_l12a: l12 { 376 regulator-min-microvolt = <1624000>; 377 regulator-max-microvolt = <1984000>; 378 }; 379 380 pm6125_l13a: l13 { 381 regulator-min-microvolt = <1504000>; 382 regulator-max-microvolt = <1952000>; 383 }; 384 385 pm6125_l14a: l14 { 386 regulator-min-microvolt = <1704000>; 387 regulator-max-microvolt = <1904000>; 388 }; 389 390 pm6125_l15a: l15 { 391 regulator-min-microvolt = <2920000>; 392 regulator-max-microvolt = <3232000>; 393 }; 394 395 pm6125_l16a: l16 { 396 regulator-min-microvolt = <1704000>; 397 regulator-max-microvolt = <1904000>; 398 }; 399 400 pm6125_l17a: l17 { 401 regulator-min-microvolt = <1152000>; 402 regulator-max-microvolt = <1384000>; 403 }; 404 405 pm6125_l18a: l18 { 406 regulator-min-microvolt = <1104000>; 407 regulator-max-microvolt = <1312000>; 408 }; 409 410 pm6125_l19a: l19 { 411 regulator-min-microvolt = <1624000>; 412 regulator-max-microvolt = <3304000>; 413 }; 414 415 pm6125_l20a: l20 { 416 regulator-min-microvolt = <1624000>; 417 regulator-max-microvolt = <3304000>; 418 }; 419 420 pm6125_l21a: l21 { 421 regulator-min-microvolt = <2400000>; 422 regulator-max-microvolt = <3600000>; 423 }; 424 425 pm6125_l22a: l22 { 426 regulator-min-microvolt = <2952000>; 427 regulator-max-microvolt = <3304000>; 428 }; 429 430 pm6125_l23a: l23 { 431 regulator-min-microvolt = <3200000>; 432 regulator-max-microvolt = <3400000>; 433 }; 434 435 pm6125_l24a: l24 { 436 regulator-min-microvolt = <2704000>; 437 regulator-max-microvolt = <3600000>; 438 regulator-allow-set-load; 439 }; 440 }; 441}; 442 443&sdc2_state_off { 444 cd-pins { 445 pins = "gpio88"; 446 function = "gpio"; 447 drive-strength = <2>; 448 bias-disable; 449 }; 450}; 451 452&sdc2_state_on { 453 cd-pins { 454 pins = "gpio88"; 455 function = "gpio"; 456 drive-strength = <2>; 457 bias-pull-up; 458 }; 459}; 460 461&sdhc_2 { 462 pinctrl-0 = <&sdc2_state_on>; 463 pinctrl-1 = <&sdc2_state_off>; 464 pinctrl-names = "default", "sleep"; 465 466 cd-gpios = <&tlmm 88 GPIO_ACTIVE_LOW>; 467 468 vmmc-supply = <&pm6125_l22a>; 469 vqmmc-supply = <&pm6125_l5a>; 470 471 status = "okay"; 472}; 473 474&sleep_clk { 475 clock-frequency = <32764>; 476}; 477 478&tlmm { 479 gpio-reserved-ranges = <0 4>, <14 4>; 480 481 key_camera_n: key-camera-n-state { 482 pins = "gpio18"; 483 function = "gpio"; 484 drive-strength = <2>; 485 bias-pull-up; 486 }; 487 488 panel_en_n: panel-en-n-state { 489 pins = "gpio65"; 490 function = "gpio"; 491 bias-disable; 492 }; 493 494 ts_rst_n: ts-rst-n-state { 495 pins = "gpio71"; 496 function = "gpio"; 497 drive-strength = <8>; 498 bias-pull-up; 499 }; 500 501 ts_int_n: ts-int-n-state { 502 pins = "gpio80"; 503 function = "gpio"; 504 drive-strength = <8>; 505 bias-pull-up; 506 }; 507 508 mdss_dsi_n: mdss-dsi-n-state { 509 pins = "gpio82"; 510 function = "gpio"; 511 drive-strength = <8>; 512 bias-disable; 513 }; 514 515 hall_sensor_n: hall-sensor-n-state { 516 pins = "gpio96"; 517 function = "gpio"; 518 drive-strength = <2>; 519 bias-pull-up; 520 }; 521}; 522 523&ufs_mem_hc { 524 vcc-supply = <&pm6125_l24a>; 525 vcc-max-microamp = <600000>; 526 vccq2-supply = <&pm6125_l11a>; 527 vccq2-max-microamp = <600000>; 528 vdd-hba-supply = <&pm6125_l18a>; 529 status = "okay"; 530}; 531 532&ufs_mem_phy { 533 vdda-phy-supply = <&pm6125_l4a>; 534 vdda-pll-supply = <&pm6125_l12a>; 535 status = "okay"; 536}; 537 538&usb { 539 status = "okay"; 540}; 541 542&usb_dwc3_hs { 543 remote-endpoint = <&pmi632_hs_in>; 544}; 545 546&usb_hsphy { 547 vdd-supply = <&pm6125_l4a>; 548 vdda-pll-supply = <&pm6125_l12a>; 549 vdda-phy-dpdm-supply = <&pm6125_l15a>; 550 status = "okay"; 551}; 552 553&usb_qmpphy { 554 vdda-phy-supply = <&pm6125_l4a>; 555 vdda-pll-supply = <&pm6125_l12a>; 556 status = "okay"; 557}; 558 559&usb_qmpphy_out { 560 remote-endpoint = <&pmi632_ss_in>; 561}; 562 563&wifi { 564 vdd-0.8-cx-mx-supply = <&pm6125_l8a>; 565 vdd-1.8-xo-supply = <&pm6125_l16a>; 566 vdd-1.3-rfa-supply = <&pm6125_l17a>; 567 vdd-3.3-ch0-supply = <&pm6125_l23a>; 568 569 qcom,ath10k-calibration-variant = "Fxtec_QX1050"; 570 571 status = "okay"; 572}; 573 574&xo_board { 575 clock-frequency = <19200000>; 576}; 577