| 1 |
// SPDX-License-Identifier: BSD-3-Clause |
| 2 |
/* |
| 3 |
* Copyright (c) 2021, Martin Botka <[email protected]> |
| 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 |
thermal-sensors = <&pm6125_adc_tm 0>; |
| 94 |
|
| 95 |
trips { |
| 96 |
active-config0 { |
| 97 |
temperature = <125000>; |
| 98 |
hysteresis = <1000>; |
| 99 |
type = "critical"; |
| 100 |
}; |
| 101 |
}; |
| 102 |
}; |
| 103 |
|
| 104 |
quiet-thermal { |
| 105 |
thermal-sensors = <&pm6125_adc_tm 1>; |
| 106 |
|
| 107 |
trips { |
| 108 |
active-config0 { |
| 109 |
temperature = <125000>; |
| 110 |
hysteresis = <1000>; |
| 111 |
type = "critical"; |
| 112 |
}; |
| 113 |
}; |
| 114 |
}; |
| 115 |
|
| 116 |
xo-thermal { |
| 117 |
thermal-sensors = <&pm6125_adc_tm 2>; |
| 118 |
|
| 119 |
trips { |
| 120 |
active-config0 { |
| 121 |
temperature = <125000>; |
| 122 |
hysteresis = <1000>; |
| 123 |
type = "critical"; |
| 124 |
}; |
| 125 |
}; |
| 126 |
}; |
| 127 |
|
| 128 |
rf-pa1-thermal { |
| 129 |
thermal-sensors = <&pm6125_adc_tm 3>; |
| 130 |
|
| 131 |
trips { |
| 132 |
active-config0 { |
| 133 |
temperature = <125000>; |
| 134 |
hysteresis = <1000>; |
| 135 |
type = "critical"; |
| 136 |
}; |
| 137 |
}; |
| 138 |
}; |
| 139 |
}; |
| 140 |
}; |
| 141 |
|
| 142 |
&gpi_dma0 { |
| 143 |
status = "okay"; |
| 144 |
}; |
| 145 |
|
| 146 |
&hsusb_phy1 { |
| 147 |
vdd-supply = <&pm6125_l7>; |
| 148 |
vdda-pll-supply = <&pm6125_l10>; |
| 149 |
vdda-phy-dpdm-supply = <&pm6125_l15>; |
| 150 |
status = "okay"; |
| 151 |
}; |
| 152 |
|
| 153 |
&i2c1 { |
| 154 |
clock-frequency = <400000>; |
| 155 |
status = "okay"; |
| 156 |
|
| 157 |
/* NXP PN553 NFC @ 28 */ |
| 158 |
}; |
| 159 |
|
| 160 |
&i2c2 { |
| 161 |
clock-frequency = <400000>; |
| 162 |
status = "okay"; |
| 163 |
|
| 164 |
/* Samsung touchscreen @ 48 */ |
| 165 |
}; |
| 166 |
|
| 167 |
&i2c3 { |
| 168 |
clock-frequency = <1000000>; |
| 169 |
status = "okay"; |
| 170 |
|
| 171 |
/* Cirrus Logic CS35L41 boosted audio amplifier @ 40 */ |
| 172 |
}; |
| 173 |
|
| 174 |
&mdss { |
| 175 |
status = "okay"; |
| 176 |
}; |
| 177 |
|
| 178 |
&mdss_dsi0 { |
| 179 |
vdda-supply = <&pm6125_l18>; |
| 180 |
status = "okay"; |
| 181 |
|
| 182 |
panel@0 { |
| 183 |
compatible = "samsung,sofef01-m-ams597ut01"; |
| 184 |
reg = <0>; |
| 185 |
|
| 186 |
reset-gpios = <&tlmm 90 GPIO_ACTIVE_LOW>; |
| 187 |
|
| 188 |
vddio-supply = <&pm6125_l12>; |
| 189 |
|
| 190 |
pinctrl-0 = <&mdss_dsi_active &mdss_te_active_sleep>; |
| 191 |
pinctrl-1 = <&mdss_dsi_sleep &mdss_te_active_sleep>; |
| 192 |
pinctrl-names = "default", "sleep"; |
| 193 |
|
| 194 |
port { |
| 195 |
panel_in: endpoint { |
| 196 |
remote-endpoint = <&mdss_dsi0_out>; |
| 197 |
}; |
| 198 |
}; |
| 199 |
}; |
| 200 |
}; |
| 201 |
|
| 202 |
&mdss_dsi0_out { |
| 203 |
remote-endpoint = <&panel_in>; |
| 204 |
data-lanes = <0 1 2 3>; |
| 205 |
}; |
| 206 |
|
| 207 |
&mdss_dsi0_phy { |
| 208 |
status = "okay"; |
| 209 |
}; |
| 210 |
|
| 211 |
&pm6125_adc { |
| 212 |
pinctrl-names = "default"; |
| 213 |
pinctrl-0 = <&camera_flash_therm &emmc_ufs_therm &rf_pa1_therm>; |
| 214 |
|
| 215 |
channel@4d { |
| 216 |
reg = <ADC5_AMUX_THM1_100K_PU>; |
| 217 |
qcom,ratiometric; |
| 218 |
qcom,hw-settle-time = <200>; |
| 219 |
qcom,pre-scaling = <1 1>; |
| 220 |
label = "rf_pa0_therm"; |
| 221 |
}; |
| 222 |
|
| 223 |
channel@4e { |
| 224 |
reg = <ADC5_AMUX_THM2_100K_PU>; |
| 225 |
qcom,ratiometric; |
| 226 |
qcom,hw-settle-time = <200>; |
| 227 |
qcom,pre-scaling = <1 1>; |
| 228 |
label = "quiet_therm"; |
| 229 |
}; |
| 230 |
|
| 231 |
channel@52 { |
| 232 |
reg = <ADC5_GPIO1_100K_PU>; |
| 233 |
qcom,ratiometric; |
| 234 |
qcom,hw-settle-time = <200>; |
| 235 |
qcom,pre-scaling = <1 1>; |
| 236 |
label = "camera_flash_therm"; |
| 237 |
}; |
| 238 |
|
| 239 |
channel@54 { |
| 240 |
reg = <ADC5_GPIO3_100K_PU>; |
| 241 |
qcom,ratiometric; |
| 242 |
qcom,hw-settle-time = <200>; |
| 243 |
qcom,pre-scaling = <1 1>; |
| 244 |
label = "emmc_ufs_therm"; |
| 245 |
}; |
| 246 |
|
| 247 |
channel@55 { |
| 248 |
reg = <ADC5_GPIO4_100K_PU>; |
| 249 |
qcom,ratiometric; |
| 250 |
qcom,hw-settle-time = <200>; |
| 251 |
qcom,pre-scaling = <1 1>; |
| 252 |
label = "rf_pa1_therm"; |
| 253 |
}; |
| 254 |
}; |
| 255 |
|
| 256 |
&pm6125_adc_tm { |
| 257 |
status = "okay"; |
| 258 |
|
| 259 |
rf-pa0-therm@0 { |
| 260 |
reg = <0>; |
| 261 |
io-channels = <&pm6125_adc ADC5_AMUX_THM1_100K_PU>; |
| 262 |
qcom,ratiometric; |
| 263 |
qcom,hw-settle-time-us = <200>; |
| 264 |
}; |
| 265 |
|
| 266 |
quiet-therm@1 { |
| 267 |
reg = <1>; |
| 268 |
io-channels = <&pm6125_adc ADC5_AMUX_THM2_100K_PU>; |
| 269 |
qcom,ratiometric; |
| 270 |
qcom,hw-settle-time-us = <200>; |
| 271 |
}; |
| 272 |
|
| 273 |
xo-therm@2 { |
| 274 |
reg = <2>; |
| 275 |
io-channels = <&pm6125_adc ADC5_XO_THERM_100K_PU>; |
| 276 |
qcom,ratiometric; |
| 277 |
qcom,hw-settle-time-us = <200>; |
| 278 |
}; |
| 279 |
|
| 280 |
rf-pa1-therm@3 { |
| 281 |
reg = <3>; |
| 282 |
io-channels = <&pm6125_adc ADC5_GPIO4_100K_PU>; |
| 283 |
qcom,ratiometric; |
| 284 |
qcom,hw-settle-time-us = <200>; |
| 285 |
}; |
| 286 |
}; |
| 287 |
|
| 288 |
&pm6125_gpios { |
| 289 |
camera_flash_therm: camera-flash-therm-state { |
| 290 |
pins = "gpio3"; |
| 291 |
function = PMIC_GPIO_FUNC_NORMAL; |
| 292 |
bias-high-impedance; |
| 293 |
}; |
| 294 |
|
| 295 |
emmc_ufs_therm: emmc-ufs-therm-state { |
| 296 |
pins = "gpio6"; |
| 297 |
function = PMIC_GPIO_FUNC_NORMAL; |
| 298 |
bias-high-impedance; |
| 299 |
}; |
| 300 |
|
| 301 |
rf_pa1_therm: rf-pa1-therm-state { |
| 302 |
pins = "gpio7"; |
| 303 |
function = PMIC_GPIO_FUNC_NORMAL; |
| 304 |
bias-high-impedance; |
| 305 |
}; |
| 306 |
}; |
| 307 |
|
| 308 |
&pon_pwrkey { |
| 309 |
status = "okay"; |
| 310 |
}; |
| 311 |
|
| 312 |
&pon_resin { |
| 313 |
status = "okay"; |
| 314 |
linux,code = <KEY_VOLUMEUP>; |
| 315 |
}; |
| 316 |
|
| 317 |
&rpm_requests { |
| 318 |
regulators-0 { |
| 319 |
compatible = "qcom,rpm-pm6125-regulators"; |
| 320 |
|
| 321 |
vdd_l2_l3_l4-supply = <&pm6125_l7>; |
| 322 |
vdd_l5_l15_l19_l20_l21_l22-supply = <&pm6125_l10>; |
| 323 |
|
| 324 |
/* |
| 325 |
* S3/S4 is VDD_CX |
| 326 |
* S5 is VDD_MX/WCSS_MX |
| 327 |
*/ |
| 328 |
|
| 329 |
pm6125_s6: s6 { |
| 330 |
regulator-min-microvolt = <936000>; |
| 331 |
regulator-max-microvolt = <1422000>; |
| 332 |
}; |
| 333 |
|
| 334 |
pm6125_l1: l1 { |
| 335 |
regulator-min-microvolt = <1200000>; |
| 336 |
regulator-max-microvolt = <1256000>; |
| 337 |
}; |
| 338 |
|
| 339 |
pm6125_l2: l2 { |
| 340 |
regulator-min-microvolt = <1000000>; |
| 341 |
regulator-max-microvolt = <1056000>; |
| 342 |
}; |
| 343 |
|
| 344 |
pm6125_l3: l3 { |
| 345 |
regulator-min-microvolt = <1000000>; |
| 346 |
regulator-max-microvolt = <1064000>; |
| 347 |
}; |
| 348 |
|
| 349 |
pm6125_l4: l4 { |
| 350 |
regulator-min-microvolt = <872000>; |
| 351 |
regulator-max-microvolt = <976000>; |
| 352 |
}; |
| 353 |
|
| 354 |
pm6125_l5: l5 { |
| 355 |
regulator-min-microvolt = <1648000>; |
| 356 |
regulator-max-microvolt = <2950000>; |
| 357 |
regulator-allow-set-load; |
| 358 |
}; |
| 359 |
|
| 360 |
pm6125_l6: l6 { |
| 361 |
regulator-min-microvolt = <576000>; |
| 362 |
regulator-max-microvolt = <656000>; |
| 363 |
}; |
| 364 |
|
| 365 |
pm6125_l7: l7 { |
| 366 |
regulator-min-microvolt = <872000>; |
| 367 |
regulator-max-microvolt = <976000>; |
| 368 |
}; |
| 369 |
|
| 370 |
pm6125_l8: l8 { |
| 371 |
regulator-min-microvolt = <400000>; |
| 372 |
regulator-max-microvolt = <728000>; |
| 373 |
}; |
| 374 |
|
| 375 |
pm6125_l9: l9 { |
| 376 |
regulator-min-microvolt = <1800000>; |
| 377 |
regulator-max-microvolt = <1896000>; |
| 378 |
}; |
| 379 |
|
| 380 |
pm6125_l10: l10 { |
| 381 |
regulator-min-microvolt = <1800000>; |
| 382 |
regulator-max-microvolt = <1896000>; |
| 383 |
}; |
| 384 |
|
| 385 |
pm6125_l11: l11 { |
| 386 |
regulator-min-microvolt = <1800000>; |
| 387 |
regulator-max-microvolt = <1800000>; |
| 388 |
regulator-allow-set-load; |
| 389 |
}; |
| 390 |
|
| 391 |
pm6125_l12: l12 { |
| 392 |
regulator-min-microvolt = <1800000>; |
| 393 |
regulator-max-microvolt = <1996000>; |
| 394 |
}; |
| 395 |
|
| 396 |
pm6125_l13: l13 { |
| 397 |
regulator-min-microvolt = <1800000>; |
| 398 |
regulator-max-microvolt = <1832000>; |
| 399 |
}; |
| 400 |
|
| 401 |
pm6125_l14: l14 { |
| 402 |
regulator-min-microvolt = <1800000>; |
| 403 |
regulator-max-microvolt = <1904000>; |
| 404 |
}; |
| 405 |
|
| 406 |
pm6125_l15: l15 { |
| 407 |
regulator-min-microvolt = <3104000>; |
| 408 |
regulator-max-microvolt = <3232000>; |
| 409 |
}; |
| 410 |
|
| 411 |
pm6125_l16: l16 { |
| 412 |
regulator-min-microvolt = <1800000>; |
| 413 |
regulator-max-microvolt = <1904000>; |
| 414 |
}; |
| 415 |
|
| 416 |
pm6125_l17: l17 { |
| 417 |
regulator-min-microvolt = <1248000>; |
| 418 |
regulator-max-microvolt = <1304000>; |
| 419 |
}; |
| 420 |
|
| 421 |
pm6125_l18: l18 { |
| 422 |
regulator-min-microvolt = <1200000>; |
| 423 |
regulator-max-microvolt = <1264000>; |
| 424 |
}; |
| 425 |
|
| 426 |
pm6125_l19: l19 { |
| 427 |
regulator-min-microvolt = <1648000>; |
| 428 |
regulator-max-microvolt = <2952000>; |
| 429 |
}; |
| 430 |
|
| 431 |
pm6125_l20: l20 { |
| 432 |
regulator-min-microvolt = <1648000>; |
| 433 |
regulator-max-microvolt = <2952000>; |
| 434 |
}; |
| 435 |
|
| 436 |
pm6125_l21: l21 { |
| 437 |
regulator-min-microvolt = <2600000>; |
| 438 |
regulator-max-microvolt = <2856000>; |
| 439 |
}; |
| 440 |
|
| 441 |
pm6125_l22: l22 { |
| 442 |
regulator-min-microvolt = <2944000>; |
| 443 |
regulator-max-microvolt = <2950000>; |
| 444 |
regulator-allow-set-load; |
| 445 |
}; |
| 446 |
|
| 447 |
pm6125_l23: l23 { |
| 448 |
regulator-min-microvolt = <3000000>; |
| 449 |
regulator-max-microvolt = <3400000>; |
| 450 |
}; |
| 451 |
|
| 452 |
pm6125_l24: l24 { |
| 453 |
regulator-min-microvolt = <2944000>; |
| 454 |
regulator-max-microvolt = <2950000>; |
| 455 |
regulator-allow-set-load; |
| 456 |
}; |
| 457 |
}; |
| 458 |
}; |
| 459 |
|
| 460 |
&qupv3_id_0 { |
| 461 |
status = "okay"; |
| 462 |
}; |
| 463 |
|
| 464 |
&sdc2_off_state { |
| 465 |
sd-cd-pins { |
| 466 |
pins = "gpio98"; |
| 467 |
function = "gpio"; |
| 468 |
drive-strength = <2>; |
| 469 |
bias-disable; |
| 470 |
}; |
| 471 |
}; |
| 472 |
|
| 473 |
&sdc2_on_state { |
| 474 |
sd-cd-pins { |
| 475 |
pins = "gpio98"; |
| 476 |
function = "gpio"; |
| 477 |
drive-strength = <2>; |
| 478 |
bias-pull-up; |
| 479 |
}; |
| 480 |
}; |
| 481 |
|
| 482 |
&sdhc_1 { |
| 483 |
vmmc-supply = <&pm6125_l24>; |
| 484 |
vqmmc-supply = <&pm6125_l11>; |
| 485 |
status = "okay"; |
| 486 |
}; |
| 487 |
|
| 488 |
&sdhc_2 { |
| 489 |
cd-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>; |
| 490 |
vmmc-supply = <&pm6125_l22>; |
| 491 |
vqmmc-supply = <&pm6125_l5>; |
| 492 |
no-sdio; |
| 493 |
no-mmc; |
| 494 |
status = "okay"; |
| 495 |
}; |
| 496 |
|
| 497 |
&tlmm { |
| 498 |
gpio-reserved-ranges = <22 2>, <28 6>; |
| 499 |
|
| 500 |
vol_down_n: vol-down-n-state { |
| 501 |
pins = "gpio47"; |
| 502 |
function = "gpio"; |
| 503 |
drive-strength = <2>; |
| 504 |
bias-disable; |
| 505 |
}; |
| 506 |
|
| 507 |
mdss_te_active_sleep: mdss-te-active-sleep-state { |
| 508 |
pins = "gpio89"; |
| 509 |
function = "mdp_vsync"; |
| 510 |
drive-strength = <2>; |
| 511 |
bias-pull-down; |
| 512 |
}; |
| 513 |
|
| 514 |
mdss_dsi_active: mdss-dsi-active-state { |
| 515 |
pins = "gpio90"; |
| 516 |
function = "gpio"; |
| 517 |
drive-strength = <8>; |
| 518 |
bias-disable; |
| 519 |
}; |
| 520 |
|
| 521 |
mdss_dsi_sleep: mdss-dsi-sleep-state { |
| 522 |
pins = "gpio90"; |
| 523 |
function = "gpio"; |
| 524 |
drive-strength = <2>; |
| 525 |
bias-pull-down; |
| 526 |
}; |
| 527 |
|
| 528 |
}; |
| 529 |
|
| 530 |
&usb3 { |
| 531 |
status = "okay"; |
| 532 |
}; |
| 533 |
|
| 534 |
&usb3_dwc3 { |
| 535 |
extcon = <&extcon_usb>; |
| 536 |
}; |