1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2025, André Apitzsch <git@apitzsch.eu> 4 */ 5 6/dts-v1/; 7 8#include <dt-bindings/leds/common.h> 9 10#include "msm8976.dtsi" 11#include "pm8004.dtsi" 12#include "pm8950.dtsi" 13 14/ { 15 model = "BQ Aquaris X5 Plus (Longcheer L9360)"; 16 compatible = "longcheer,l9360", "qcom,msm8976"; 17 chassis-type = "handset"; 18 19 aliases { 20 mmc0 = &sdhc_1; /* SDC1 eMMC slot */ 21 mmc1 = &sdhc_2; /* SDC2 SD card slot */ 22 }; 23 24 chosen { 25 #address-cells = <2>; 26 #size-cells = <2>; 27 ranges; 28 29 framebuffer0: framebuffer@83200000 { 30 compatible = "simple-framebuffer"; 31 reg = <0x0 0x83200000 0x0 (1080 * 1920 * 3)>; 32 width = <1080>; 33 height = <1920>; 34 stride = <(1080 * 3)>; 35 format = "r8g8b8"; 36 37 power-domains = <&gcc MDSS_GDSC>; 38 39 clocks = <&gcc GCC_MDSS_AHB_CLK>, 40 <&gcc GCC_MDSS_AXI_CLK>, 41 <&gcc GCC_MDSS_VSYNC_CLK>, 42 <&gcc GCC_MDSS_MDP_CLK>, 43 <&gcc GCC_MDSS_BYTE0_CLK>, 44 <&gcc GCC_MDSS_PCLK0_CLK>, 45 <&gcc GCC_MDSS_ESC0_CLK>; 46 }; 47 }; 48 49 gpio-keys { 50 compatible = "gpio-keys"; 51 52 pinctrl-0 = <&hall_sensor_default>, <&volume_up_default>; 53 pinctrl-names = "default"; 54 55 event-hall-sensor { 56 label = "Hall Effect Sensor"; 57 gpios = <&tlmm 107 GPIO_ACTIVE_HIGH>; 58 linux,input-type = <EV_SW>; 59 linux,code = <SW_LID>; 60 linux,can-disable; 61 wakeup-source; 62 }; 63 64 key-volume-up { 65 label = "Volume Up"; 66 gpios = <&tlmm 113 GPIO_ACTIVE_LOW>; 67 linux,code = <KEY_VOLUMEUP>; 68 }; 69 }; 70 71 leds { 72 compatible = "gpio-leds"; 73 74 led-0 { 75 gpios = <&tlmm 101 GPIO_ACTIVE_HIGH>; 76 color = <LED_COLOR_ID_WHITE>; 77 default-state = "off"; 78 function = LED_FUNCTION_KBD_BACKLIGHT; 79 80 pinctrl-0 = <&button_backlight_default>; 81 pinctrl-names = "default"; 82 }; 83 }; 84 85 reg_ts_vdd: regulator-vdd-ts { 86 compatible = "regulator-fixed"; 87 regulator-name = "regulator-vdd-ts"; 88 89 gpio = <&tlmm 33 GPIO_ACTIVE_HIGH>; 90 enable-active-high; 91 }; 92 93 reserved-memory { 94 framebuffer@83000000 { 95 reg = <0x0 0x83000000 0x0 0x2800000>; 96 no-map; 97 }; 98 }; 99 100 vph_pwr: regulator-vph-pwr { 101 compatible = "regulator-fixed"; 102 regulator-name = "vph-pwr"; 103 regulator-always-on; 104 regulator-boot-on; 105 }; 106}; 107 108&blsp1_i2c2 { 109 status = "okay"; 110 111 led-controller@30 { 112 compatible = "kinetic,ktd2026"; 113 reg = <0x30>; 114 #address-cells = <1>; 115 #size-cells = <0>; 116 117 multi-led { 118 color = <LED_COLOR_ID_RGB>; 119 function = LED_FUNCTION_STATUS; 120 121 #address-cells = <1>; 122 #size-cells = <0>; 123 124 led@0 { 125 reg = <0>; 126 color = <LED_COLOR_ID_RED>; 127 }; 128 129 led@1 { 130 reg = <1>; 131 color = <LED_COLOR_ID_GREEN>; 132 }; 133 134 led@2 { 135 reg = <2>; 136 color = <LED_COLOR_ID_BLUE>; 137 }; 138 }; 139 }; 140}; 141 142&blsp1_i2c4 { 143 status = "okay"; 144 145 nfc@28 { 146 compatible = "nxp,pn547", "nxp,nxp-nci-i2c"; 147 reg = <0x28>; 148 149 interrupts-extended = <&tlmm 140 IRQ_TYPE_EDGE_RISING>; 150 151 enable-gpios = <&tlmm 122 GPIO_ACTIVE_HIGH>; 152 firmware-gpios = <&tlmm 109 GPIO_ACTIVE_HIGH>; 153 154 pinctrl-0 = <&nfc_default>; 155 pinctrl-1 = <&nfc_sleep>; 156 pinctrl-names = "default", "sleep"; 157 }; 158}; 159 160&blsp2_i2c2 { 161 status = "okay"; 162 163 touchscreen@20 { 164 reg = <0x20>; 165 compatible = "syna,rmi4-i2c"; 166 167 interrupts-extended = <&tlmm 65 IRQ_TYPE_EDGE_FALLING>; 168 169 pinctrl-0 = <&ts_int_default>, <&ts_reset_default>; 170 pinctrl-1 = <&ts_int_sleep>, <&ts_reset_sleep>; 171 pinctrl-names = "default", "sleep"; 172 173 vdd-supply = <&pm8950_l6>; 174 vio-supply = <®_ts_vdd>; 175 176 reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>; 177 178 syna,reset-delay-ms = <200>; 179 syna,startup-delay-ms = <200>; 180 181 #address-cells = <1>; 182 #size-cells = <0>; 183 184 rmi4-f01@1 { 185 reg = <0x1>; 186 syna,nosleep-mode = <1>; 187 }; 188 189 rmi4-f12@12 { 190 reg = <0x12>; 191 syna,sensor-type = <1>; 192 }; 193 }; 194}; 195 196&blsp2_uart2 { 197 status = "okay"; 198}; 199 200&gcc { 201 vdd_gfx-supply = <&pm8004_s5>; 202}; 203 204&pm8004_spmi_regulators { 205 vdd_s2-supply = <&vph_pwr>; 206 vdd_s5-supply = <&vph_pwr>; 207 208 /* Cluster 1 supply */ 209 pm8004_s2: s2 { 210 /* regulator-min-microvolt = <500000>; */ 211 /* Set .95V to prevent unstabilities until CPR for this SoC is done */ 212 regulator-min-microvolt = <950000>; 213 regulator-max-microvolt = <1165000>; 214 regulator-name = "vdd_apc1"; 215 /* Set always on until the CPU PLL is done */ 216 regulator-always-on; 217 regulator-boot-on; 218 }; 219 220 pm8004_s5: s5 { 221 regulator-min-microvolt = <950000>; 222 regulator-max-microvolt = <1165000>; 223 regulator-enable-ramp-delay = <500>; 224 regulator-name = "vdd_gfx"; 225 /* Hack this on until the gpu driver is ready for it */ 226 regulator-always-on; 227 }; 228}; 229 230&pm8950_resin { 231 linux,code = <KEY_VOLUMEDOWN>; 232 status = "okay"; 233}; 234 235&pm8950_spmi_regulators { 236 vdd_s5-supply = <&vph_pwr>; 237 238 /* Cluster 0 supply */ 239 pm8950_spmi_s5: s5 { 240 /* Set .95V to prevent unstabilities until CPR for this SoC is done */ 241 /* regulator-min-microvolt = <500000>; */ 242 regulator-min-microvolt = <950000>; 243 regulator-max-microvolt = <1165000>; 244 regulator-name = "vdd_apc0"; 245 /* Set always on until the CPU PLL is done */ 246 regulator-always-on; 247 regulator-boot-on; 248 }; 249}; 250 251&rpm_requests { 252 pm8950_regulators: regulators { 253 compatible = "qcom,rpm-pm8950-regulators"; 254 255 vdd_s1-supply = <&vph_pwr>; 256 vdd_s2-supply = <&vph_pwr>; 257 vdd_s3-supply = <&vph_pwr>; 258 vdd_s4-supply = <&vph_pwr>; 259 vdd_s6-supply = <&vph_pwr>; 260 vdd_l1_l19-supply = <&pm8950_s3>; 261 vdd_l2_l23-supply = <&pm8950_s3>; 262 vdd_l3-supply = <&pm8950_s3>; 263 vdd_l5_l6_l7_l16-supply = <&pm8950_s4>; 264 vdd_l8_l11_l12_l17_l22-supply = <&vph_pwr>; 265 266 pm8950_s1: s1 { 267 regulator-min-microvolt = <1000000>; 268 regulator-max-microvolt = <1162500>; 269 }; 270 271 pm8950_s3: s3 { 272 regulator-min-microvolt = <1325000>; 273 regulator-max-microvolt = <1325000>; 274 }; 275 276 pm8950_s4: s4 { 277 regulator-min-microvolt = <2050000>; 278 regulator-max-microvolt = <2050000>; 279 }; 280 281 pm8950_l1: l1 { 282 regulator-min-microvolt = <1200000>; 283 regulator-max-microvolt = <1200000>; 284 }; 285 286 pm8950_l2: l2 { 287 regulator-min-microvolt = <1200000>; 288 regulator-max-microvolt = <1200000>; 289 }; 290 291 pm8950_l3: l3 { 292 regulator-min-microvolt = <1000000>; 293 regulator-max-microvolt = <1100000>; 294 }; 295 296 pm8950_l5: l5 { 297 regulator-min-microvolt = <1800000>; 298 regulator-max-microvolt = <1800000>; 299 }; 300 301 pm8950_l6: l6 { 302 regulator-min-microvolt = <1800000>; 303 regulator-max-microvolt = <1800000>; 304 }; 305 306 pm8950_l7: l7 { 307 regulator-min-microvolt = <1800000>; 308 regulator-max-microvolt = <1800000>; 309 }; 310 311 pm8950_l8: l8 { 312 regulator-min-microvolt = <2900000>; 313 regulator-max-microvolt = <2900000>; 314 }; 315 316 pm8950_l9: l9 { 317 regulator-min-microvolt = <3000000>; 318 regulator-max-microvolt = <3300000>; 319 }; 320 321 pm8950_l10: l10 { 322 regulator-min-microvolt = <2800000>; 323 regulator-max-microvolt = <2800000>; 324 }; 325 326 pm8950_l11: l11 { 327 regulator-min-microvolt = <2950000>; 328 regulator-max-microvolt = <2950000>; 329 }; 330 331 pm8950_l12: l12 { 332 regulator-min-microvolt = <1800000>; 333 regulator-max-microvolt = <2950000>; 334 }; 335 336 pm8950_l13: l13 { 337 regulator-min-microvolt = <3075000>; 338 regulator-max-microvolt = <3075000>; 339 }; 340 341 pm8950_l14: l14 { 342 regulator-min-microvolt = <1800000>; 343 regulator-max-microvolt = <3300000>; 344 }; 345 346 pm8950_l15: l15 { 347 regulator-min-microvolt = <1800000>; 348 regulator-max-microvolt = <3300000>; 349 }; 350 351 pm8950_l16: l16 { 352 regulator-min-microvolt = <1800000>; 353 regulator-max-microvolt = <1800000>; 354 }; 355 356 pm8950_l17: l17 { 357 regulator-min-microvolt = <2850000>; 358 regulator-max-microvolt = <2850000>; 359 }; 360 361 pm8950_l19: l19 { 362 regulator-min-microvolt = <1200000>; 363 regulator-max-microvolt = <1350000>; 364 }; 365 366 pm8950_l22: l22 { 367 regulator-min-microvolt = <2800000>; 368 regulator-max-microvolt = <2800000>; 369 }; 370 371 pm8950_l23: l23 { 372 regulator-min-microvolt = <1200000>; 373 regulator-max-microvolt = <1200000>; 374 }; 375 }; 376}; 377 378&sdhc_1 { 379 bus-width = <8>; 380 non-removable; 381 vmmc-supply = <&pm8950_l8>; 382 vqmmc-supply = <&pm8950_l5>; 383 status = "okay"; 384}; 385 386&sdhc_2 { 387 bus-width = <4>; 388 cd-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; 389 vmmc-supply = <&pm8950_l11>; 390 vqmmc-supply = <&pm8950_l12>; 391 392 pinctrl-0 = <&sdc2_default>, <&sdc2_cd_default>; 393 pinctrl-1 = <&sdc2_sleep>, <&sdc2_cd_sleep>; 394 pinctrl-names = "default", "sleep"; 395 396 status = "okay"; 397}; 398 399&tlmm { 400 gpio-reserved-ranges = <0 4>; 401 402 button_backlight_default: button-backlight-default-state { 403 pins = "gpio101"; 404 function = "gpio"; 405 drive-strength = <2>; 406 bias-disable; 407 }; 408 409 hall_sensor_default: hall-sensor-default-state { 410 pins = "gpio107"; 411 function = "gpio"; 412 drive-strength = <6>; 413 bias-pull-up; 414 }; 415 416 nfc_default: nfc-default-state { 417 pins = "gpio122", "gpio140"; 418 function = "gpio"; 419 drive-strength = <6>; 420 bias-pull-up; 421 }; 422 423 nfc_sleep: nfc-sleep-state { 424 int-pins { 425 pins = "gpio140"; 426 function = "gpio"; 427 drive-strength = <6>; 428 bias-pull-up; 429 }; 430 ven-pins { 431 pins = "gpio122"; 432 function = "gpio"; 433 drive-strength = <6>; 434 bias-disable; 435 }; 436 }; 437 438 sdc2_cd_default: sdc2-cd-default-state { 439 pins = "gpio100"; 440 function = "gpio"; 441 drive-strength = <2>; 442 bias-pull-up; 443 }; 444 445 sdc2_cd_sleep: sdc2-cd-sleep-state { 446 pins = "gpio100"; 447 function = "gpio"; 448 drive-strength = <2>; 449 bias-disable; 450 }; 451 452 ts_int_default: ts-int-state { 453 pins = "gpio65"; 454 function = "gpio"; 455 drive-strength = <2>; 456 bias-pull-down; 457 }; 458 459 ts_int_sleep: ts-int-state { 460 pins = "gpio65"; 461 function = "gpio"; 462 drive-strength = <2>; 463 bias-pull-up; 464 }; 465 466 ts_reset_default: ts-reset-state { 467 pins = "gpio64"; 468 function = "gpio"; 469 drive-strength = <8>; 470 bias-pull-up; 471 }; 472 473 ts_reset_sleep: ts-sleep-state { 474 pins = "gpio64"; 475 function = "gpio"; 476 drive-strength = <2>; 477 bias-pull-down; 478 }; 479 480 volume_up_default: volume-up-default-state { 481 pins = "gpio113"; 482 function = "gpio"; 483 drive-strength = <2>; 484 bias-pull-up; 485 }; 486}; 487 488&xo_board { 489 clock-frequency = <19200000>; 490}; 491