Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: BSD-3-Clause |
| 2 | /* |
| 3 | * Copyright (c) 2021, Martin Botka <martin.botka@somainline.org> |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "sm6125.dtsi" |
| 9 | #include "pm6125.dtsi" |
| 10 | #include <dt-bindings/gpio/gpio.h> |
| 11 | #include <dt-bindings/input/gpio-keys.h> |
| 12 | #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> |
| 13 | |
| 14 | / { |
| 15 | /* required for bootloader to select correct board */ |
| 16 | qcom,msm-id = <394 0x10000>; /* sm6125 v1 */ |
| 17 | qcom,board-id = <34 0>; |
| 18 | |
| 19 | model = "Sony Xperia 10 II"; |
| 20 | compatible = "sony,pdx201", "qcom,sm6125"; |
| 21 | chassis-type = "handset"; |
| 22 | |
| 23 | aliases { |
| 24 | mmc0 = &sdhc_1; /* SDC1 eMMC slot */ |
| 25 | mmc1 = &sdhc_2; /* SDC2 SD card slot */ |
| 26 | }; |
| 27 | |
| 28 | chosen { |
| 29 | #address-cells = <2>; |
| 30 | #size-cells = <2>; |
| 31 | ranges; |
| 32 | |
| 33 | framebuffer0: framebuffer@5c000000 { |
| 34 | compatible = "simple-framebuffer"; |
| 35 | reg = <0 0x5c000000 0 (2520 * 1080 * 4)>; |
| 36 | width = <1080>; |
| 37 | height = <2520>; |
| 38 | stride = <(1080 * 4)>; |
| 39 | format = "a8r8g8b8"; |
| 40 | }; |
| 41 | }; |
| 42 | |
| 43 | extcon_usb: extcon-usb { |
| 44 | compatible = "linux,extcon-usb-gpio"; |
| 45 | id-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>; |
| 46 | }; |
| 47 | |
| 48 | gpio-keys { |
| 49 | compatible = "gpio-keys"; |
| 50 | |
| 51 | pinctrl-0 = <&vol_down_n>; |
| 52 | pinctrl-names = "default"; |
| 53 | |
| 54 | key-volume-down { |
| 55 | label = "Volume Down"; |
| 56 | gpios = <&tlmm 47 GPIO_ACTIVE_LOW>; |
| 57 | linux,code = <KEY_VOLUMEDOWN>; |
| 58 | debounce-interval = <15>; |
| 59 | linux,can-disable; |
| 60 | wakeup-source; |
| 61 | }; |
| 62 | }; |
| 63 | |
| 64 | reserved-memory { |
| 65 | #address-cells = <2>; |
| 66 | #size-cells = <2>; |
| 67 | debug_mem: memory@ffb00000 { |
| 68 | reg = <0x0 0xffb00000 0x0 0xc0000>; |
| 69 | no-map; |
| 70 | }; |
| 71 | |
| 72 | last_log_mem: memory@ffbc0000 { |
| 73 | reg = <0x0 0xffbc0000 0x0 0x80000>; |
| 74 | no-map; |
| 75 | }; |
| 76 | |
| 77 | pstore_mem: ramoops@ffc00000 { |
| 78 | compatible = "ramoops"; |
| 79 | reg = <0x0 0xffc40000 0x0 0xc0000>; |
| 80 | record-size = <0x1000>; |
| 81 | console-size = <0x40000>; |
| 82 | pmsg-size = <0x20000>; |
| 83 | }; |
| 84 | |
| 85 | cmdline_mem: memory@ffd00000 { |
| 86 | reg = <0x0 0xffd40000 0x0 0x1000>; |
| 87 | no-map; |
| 88 | }; |
| 89 | }; |
| 90 | |
| 91 | thermal-zones { |
| 92 | rf-pa0-thermal { |
| 93 | polling-delay-passive = <0>; |
| 94 | polling-delay = <0>; |
| 95 | thermal-sensors = <&pm6125_adc_tm 0>; |
| 96 | |
| 97 | trips { |
| 98 | active-config0 { |
| 99 | temperature = <125000>; |
| 100 | hysteresis = <1000>; |
| 101 | type = "critical"; |
| 102 | }; |
| 103 | }; |
| 104 | }; |
| 105 | |
| 106 | quiet-thermal { |
| 107 | polling-delay-passive = <0>; |
| 108 | polling-delay = <5000>; |
| 109 | thermal-sensors = <&pm6125_adc_tm 1>; |
| 110 | |
| 111 | trips { |
| 112 | active-config0 { |
| 113 | temperature = <125000>; |
| 114 | hysteresis = <1000>; |
| 115 | type = "critical"; |
| 116 | }; |
| 117 | }; |
| 118 | }; |
| 119 | |
| 120 | xo-thermal { |
| 121 | polling-delay-passive = <0>; |
| 122 | polling-delay = <0>; |
| 123 | thermal-sensors = <&pm6125_adc_tm 2>; |
| 124 | |
| 125 | trips { |
| 126 | active-config0 { |
| 127 | temperature = <125000>; |
| 128 | hysteresis = <1000>; |
| 129 | type = "critical"; |
| 130 | }; |
| 131 | }; |
| 132 | }; |
| 133 | |
| 134 | rf-pa1-thermal { |
| 135 | polling-delay-passive = <0>; |
| 136 | polling-delay = <0>; |
| 137 | thermal-sensors = <&pm6125_adc_tm 3>; |
| 138 | |
| 139 | trips { |
| 140 | active-config0 { |
| 141 | temperature = <125000>; |
| 142 | hysteresis = <1000>; |
| 143 | type = "critical"; |
| 144 | }; |
| 145 | }; |
| 146 | }; |
| 147 | }; |
| 148 | }; |
| 149 | |
| 150 | &gpi_dma0 { |
| 151 | status = "okay"; |
| 152 | }; |
| 153 | |
| 154 | &hsusb_phy1 { |
| 155 | vdd-supply = <&pm6125_l7>; |
| 156 | vdda-pll-supply = <&pm6125_l10>; |
| 157 | vdda-phy-dpdm-supply = <&pm6125_l15>; |
| 158 | status = "okay"; |
| 159 | }; |
| 160 | |
| 161 | &i2c1 { |
| 162 | clock-frequency = <400000>; |
| 163 | status = "okay"; |
| 164 | |
| 165 | /* NXP PN553 NFC @ 28 */ |
| 166 | }; |
| 167 | |
| 168 | &i2c2 { |
| 169 | clock-frequency = <400000>; |
| 170 | status = "okay"; |
| 171 | |
| 172 | /* Samsung touchscreen @ 48 */ |
| 173 | }; |
| 174 | |
| 175 | &i2c3 { |
| 176 | clock-frequency = <1000000>; |
| 177 | status = "okay"; |
| 178 | |
| 179 | /* Cirrus Logic CS35L41 boosted audio amplifier @ 40 */ |
| 180 | }; |
| 181 | |
| 182 | &mdss { |
| 183 | status = "okay"; |
| 184 | }; |
| 185 | |
| 186 | &mdss_dsi0 { |
| 187 | vdda-supply = <&pm6125_l18>; |
| 188 | status = "okay"; |
| 189 | |
| 190 | panel@0 { |
| 191 | compatible = "samsung,sofef01-m-ams597ut01"; |
| 192 | reg = <0>; |
| 193 | |
| 194 | reset-gpios = <&tlmm 90 GPIO_ACTIVE_LOW>; |
| 195 | |
| 196 | vddio-supply = <&pm6125_l12>; |
| 197 | |
| 198 | pinctrl-0 = <&mdss_dsi_active &mdss_te_active_sleep>; |
| 199 | pinctrl-1 = <&mdss_dsi_sleep &mdss_te_active_sleep>; |
| 200 | pinctrl-names = "default", "sleep"; |
| 201 | |
| 202 | port { |
| 203 | panel_in: endpoint { |
| 204 | remote-endpoint = <&mdss_dsi0_out>; |
| 205 | }; |
| 206 | }; |
| 207 | }; |
| 208 | }; |
| 209 | |
| 210 | &mdss_dsi0_out { |
| 211 | remote-endpoint = <&panel_in>; |
| 212 | data-lanes = <0 1 2 3>; |
| 213 | }; |
| 214 | |
| 215 | &mdss_dsi0_phy { |
| 216 | status = "okay"; |
| 217 | }; |
| 218 | |
| 219 | &pm6125_adc { |
| 220 | pinctrl-names = "default"; |
| 221 | pinctrl-0 = <&camera_flash_therm &emmc_ufs_therm &rf_pa1_therm>; |
| 222 | |
| 223 | channel@4d { |
| 224 | reg = <ADC5_AMUX_THM1_100K_PU>; |
| 225 | qcom,ratiometric; |
| 226 | qcom,hw-settle-time = <200>; |
| 227 | qcom,pre-scaling = <1 1>; |
| 228 | label = "rf_pa0_therm"; |
| 229 | }; |
| 230 | |
| 231 | channel@4e { |
| 232 | reg = <ADC5_AMUX_THM2_100K_PU>; |
| 233 | qcom,ratiometric; |
| 234 | qcom,hw-settle-time = <200>; |
| 235 | qcom,pre-scaling = <1 1>; |
| 236 | label = "quiet_therm"; |
| 237 | }; |
| 238 | |
| 239 | channel@52 { |
| 240 | reg = <ADC5_GPIO1_100K_PU>; |
| 241 | qcom,ratiometric; |
| 242 | qcom,hw-settle-time = <200>; |
| 243 | qcom,pre-scaling = <1 1>; |
| 244 | label = "camera_flash_therm"; |
| 245 | }; |
| 246 | |
| 247 | channel@54 { |
| 248 | reg = <ADC5_GPIO3_100K_PU>; |
| 249 | qcom,ratiometric; |
| 250 | qcom,hw-settle-time = <200>; |
| 251 | qcom,pre-scaling = <1 1>; |
| 252 | label = "emmc_ufs_therm"; |
| 253 | }; |
| 254 | |
| 255 | channel@55 { |
| 256 | reg = <ADC5_GPIO4_100K_PU>; |
| 257 | qcom,ratiometric; |
| 258 | qcom,hw-settle-time = <200>; |
| 259 | qcom,pre-scaling = <1 1>; |
| 260 | label = "rf_pa1_therm"; |
| 261 | }; |
| 262 | }; |
| 263 | |
| 264 | &pm6125_adc_tm { |
| 265 | status = "okay"; |
| 266 | |
| 267 | rf-pa0-therm@0 { |
| 268 | reg = <0>; |
| 269 | io-channels = <&pm6125_adc ADC5_AMUX_THM1_100K_PU>; |
| 270 | qcom,ratiometric; |
| 271 | qcom,hw-settle-time-us = <200>; |
| 272 | }; |
| 273 | |
| 274 | quiet-therm@1 { |
| 275 | reg = <1>; |
| 276 | io-channels = <&pm6125_adc ADC5_AMUX_THM2_100K_PU>; |
| 277 | qcom,ratiometric; |
| 278 | qcom,hw-settle-time-us = <200>; |
| 279 | }; |
| 280 | |
| 281 | xo-therm@2 { |
| 282 | reg = <2>; |
| 283 | io-channels = <&pm6125_adc ADC5_XO_THERM_100K_PU>; |
| 284 | qcom,ratiometric; |
| 285 | qcom,hw-settle-time-us = <200>; |
| 286 | }; |
| 287 | |
| 288 | rf-pa1-therm@3 { |
| 289 | reg = <3>; |
| 290 | io-channels = <&pm6125_adc ADC5_GPIO4_100K_PU>; |
| 291 | qcom,ratiometric; |
| 292 | qcom,hw-settle-time-us = <200>; |
| 293 | }; |
| 294 | }; |
| 295 | |
| 296 | &pm6125_gpios { |
| 297 | camera_flash_therm: camera-flash-therm-state { |
| 298 | pins = "gpio3"; |
| 299 | function = PMIC_GPIO_FUNC_NORMAL; |
| 300 | bias-high-impedance; |
| 301 | }; |
| 302 | |
| 303 | emmc_ufs_therm: emmc-ufs-therm-state { |
| 304 | pins = "gpio6"; |
| 305 | function = PMIC_GPIO_FUNC_NORMAL; |
| 306 | bias-high-impedance; |
| 307 | }; |
| 308 | |
| 309 | rf_pa1_therm: rf-pa1-therm-state { |
| 310 | pins = "gpio7"; |
| 311 | function = PMIC_GPIO_FUNC_NORMAL; |
| 312 | bias-high-impedance; |
| 313 | }; |
| 314 | }; |
| 315 | |
| 316 | &pon_pwrkey { |
| 317 | status = "okay"; |
| 318 | }; |
| 319 | |
| 320 | &pon_resin { |
| 321 | status = "okay"; |
| 322 | linux,code = <KEY_VOLUMEUP>; |
| 323 | }; |
| 324 | |
| 325 | &rpm_requests { |
| 326 | regulators-0 { |
| 327 | compatible = "qcom,rpm-pm6125-regulators"; |
| 328 | |
| 329 | vdd_l2_l3_l4-supply = <&pm6125_l7>; |
| 330 | vdd_l5_l15_l19_l20_l21_l22-supply = <&pm6125_l10>; |
| 331 | |
| 332 | /* |
| 333 | * S3/S4 is VDD_CX |
| 334 | * S5 is VDD_MX/WCSS_MX |
| 335 | */ |
| 336 | |
| 337 | pm6125_s6: s6 { |
| 338 | regulator-min-microvolt = <936000>; |
| 339 | regulator-max-microvolt = <1422000>; |
| 340 | }; |
| 341 | |
| 342 | pm6125_l1: l1 { |
| 343 | regulator-min-microvolt = <1200000>; |
| 344 | regulator-max-microvolt = <1256000>; |
| 345 | }; |
| 346 | |
| 347 | pm6125_l2: l2 { |
| 348 | regulator-min-microvolt = <1000000>; |
| 349 | regulator-max-microvolt = <1056000>; |
| 350 | }; |
| 351 | |
| 352 | pm6125_l3: l3 { |
| 353 | regulator-min-microvolt = <1000000>; |
| 354 | regulator-max-microvolt = <1064000>; |
| 355 | }; |
| 356 | |
| 357 | pm6125_l4: l4 { |
| 358 | regulator-min-microvolt = <872000>; |
| 359 | regulator-max-microvolt = <976000>; |
| 360 | }; |
| 361 | |
| 362 | pm6125_l5: l5 { |
| 363 | regulator-min-microvolt = <1648000>; |
| 364 | regulator-max-microvolt = <2950000>; |
| 365 | regulator-allow-set-load; |
| 366 | }; |
| 367 | |
| 368 | pm6125_l6: l6 { |
| 369 | regulator-min-microvolt = <576000>; |
| 370 | regulator-max-microvolt = <656000>; |
| 371 | }; |
| 372 | |
| 373 | pm6125_l7: l7 { |
| 374 | regulator-min-microvolt = <872000>; |
| 375 | regulator-max-microvolt = <976000>; |
| 376 | }; |
| 377 | |
| 378 | pm6125_l8: l8 { |
| 379 | regulator-min-microvolt = <400000>; |
| 380 | regulator-max-microvolt = <728000>; |
| 381 | }; |
| 382 | |
| 383 | pm6125_l9: l9 { |
| 384 | regulator-min-microvolt = <1800000>; |
| 385 | regulator-max-microvolt = <1896000>; |
| 386 | }; |
| 387 | |
| 388 | pm6125_l10: l10 { |
| 389 | regulator-min-microvolt = <1800000>; |
| 390 | regulator-max-microvolt = <1896000>; |
| 391 | }; |
| 392 | |
| 393 | pm6125_l11: l11 { |
| 394 | regulator-min-microvolt = <1800000>; |
| 395 | regulator-max-microvolt = <1800000>; |
| 396 | regulator-allow-set-load; |
| 397 | }; |
| 398 | |
| 399 | pm6125_l12: l12 { |
| 400 | regulator-min-microvolt = <1800000>; |
| 401 | regulator-max-microvolt = <1996000>; |
| 402 | }; |
| 403 | |
| 404 | pm6125_l13: l13 { |
| 405 | regulator-min-microvolt = <1800000>; |
| 406 | regulator-max-microvolt = <1832000>; |
| 407 | }; |
| 408 | |
| 409 | pm6125_l14: l14 { |
| 410 | regulator-min-microvolt = <1800000>; |
| 411 | regulator-max-microvolt = <1904000>; |
| 412 | }; |
| 413 | |
| 414 | pm6125_l15: l15 { |
| 415 | regulator-min-microvolt = <3104000>; |
| 416 | regulator-max-microvolt = <3232000>; |
| 417 | }; |
| 418 | |
| 419 | pm6125_l16: l16 { |
| 420 | regulator-min-microvolt = <1800000>; |
| 421 | regulator-max-microvolt = <1904000>; |
| 422 | }; |
| 423 | |
| 424 | pm6125_l17: l17 { |
| 425 | regulator-min-microvolt = <1248000>; |
| 426 | regulator-max-microvolt = <1304000>; |
| 427 | }; |
| 428 | |
| 429 | pm6125_l18: l18 { |
| 430 | regulator-min-microvolt = <1200000>; |
| 431 | regulator-max-microvolt = <1264000>; |
| 432 | }; |
| 433 | |
| 434 | pm6125_l19: l19 { |
| 435 | regulator-min-microvolt = <1648000>; |
| 436 | regulator-max-microvolt = <2952000>; |
| 437 | }; |
| 438 | |
| 439 | pm6125_l20: l20 { |
| 440 | regulator-min-microvolt = <1648000>; |
| 441 | regulator-max-microvolt = <2952000>; |
| 442 | }; |
| 443 | |
| 444 | pm6125_l21: l21 { |
| 445 | regulator-min-microvolt = <2600000>; |
| 446 | regulator-max-microvolt = <2856000>; |
| 447 | }; |
| 448 | |
| 449 | pm6125_l22: l22 { |
| 450 | regulator-min-microvolt = <2944000>; |
| 451 | regulator-max-microvolt = <2950000>; |
| 452 | regulator-allow-set-load; |
| 453 | }; |
| 454 | |
| 455 | pm6125_l23: l23 { |
| 456 | regulator-min-microvolt = <3000000>; |
| 457 | regulator-max-microvolt = <3400000>; |
| 458 | }; |
| 459 | |
| 460 | pm6125_l24: l24 { |
| 461 | regulator-min-microvolt = <2944000>; |
| 462 | regulator-max-microvolt = <2950000>; |
| 463 | regulator-allow-set-load; |
| 464 | }; |
| 465 | }; |
| 466 | }; |
| 467 | |
| 468 | &qupv3_id_0 { |
| 469 | status = "okay"; |
| 470 | }; |
| 471 | |
| 472 | &sdc2_off_state { |
| 473 | sd-cd-pins { |
| 474 | pins = "gpio98"; |
| 475 | function = "gpio"; |
| 476 | drive-strength = <2>; |
| 477 | bias-disable; |
| 478 | }; |
| 479 | }; |
| 480 | |
| 481 | &sdc2_on_state { |
| 482 | sd-cd-pins { |
| 483 | pins = "gpio98"; |
| 484 | function = "gpio"; |
| 485 | drive-strength = <2>; |
| 486 | bias-pull-up; |
| 487 | }; |
| 488 | }; |
| 489 | |
| 490 | &sdhc_1 { |
| 491 | vmmc-supply = <&pm6125_l24>; |
| 492 | vqmmc-supply = <&pm6125_l11>; |
| 493 | status = "okay"; |
| 494 | }; |
| 495 | |
| 496 | &sdhc_2 { |
| 497 | cd-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>; |
| 498 | vmmc-supply = <&pm6125_l22>; |
| 499 | vqmmc-supply = <&pm6125_l5>; |
| 500 | no-sdio; |
| 501 | no-mmc; |
| 502 | status = "okay"; |
| 503 | }; |
| 504 | |
| 505 | &tlmm { |
| 506 | gpio-reserved-ranges = <22 2>, <28 6>; |
| 507 | |
| 508 | vol_down_n: vol-down-n-state { |
| 509 | pins = "gpio47"; |
| 510 | function = "gpio"; |
| 511 | drive-strength = <2>; |
| 512 | bias-disable; |
| 513 | }; |
| 514 | |
| 515 | mdss_te_active_sleep: mdss-te-active-sleep-state { |
| 516 | pins = "gpio89"; |
| 517 | function = "mdp_vsync"; |
| 518 | drive-strength = <2>; |
| 519 | bias-pull-down; |
| 520 | }; |
| 521 | |
| 522 | mdss_dsi_active: mdss-dsi-active-state { |
| 523 | pins = "gpio90"; |
| 524 | function = "gpio"; |
| 525 | drive-strength = <8>; |
| 526 | bias-disable; |
| 527 | }; |
| 528 | |
| 529 | mdss_dsi_sleep: mdss-dsi-sleep-state { |
| 530 | pins = "gpio90"; |
| 531 | function = "gpio"; |
| 532 | drive-strength = <2>; |
| 533 | bias-pull-down; |
| 534 | }; |
| 535 | |
| 536 | }; |
| 537 | |
| 538 | &usb3 { |
| 539 | status = "okay"; |
| 540 | }; |
| 541 | |
| 542 | &usb3_dwc3 { |
| 543 | extcon = <&extcon_usb>; |
| 544 | }; |