1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (C) 2021, Microsoft Corporation 4 */ 5 6/dts-v1/; 7 8#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 9#include <dt-bindings/gpio/gpio.h> 10#include "sm8150.dtsi" 11#include "pm8150.dtsi" 12#include "pm8150b.dtsi" 13#include "pm8150l.dtsi" 14 15/ { 16 model = "Microsoft Surface Duo"; 17 compatible = "microsoft,surface-duo", "qcom,sm8150"; 18 19 aliases { 20 serial0 = &uart2; 21 }; 22 23 chosen { 24 stdout-path = "serial0:115200n8"; 25 }; 26 27 vph_pwr: vph-pwr-regulator { 28 compatible = "regulator-fixed"; 29 regulator-name = "vph_pwr"; 30 regulator-min-microvolt = <3700000>; 31 regulator-max-microvolt = <3700000>; 32 }; 33 34 /* 35 * Apparently RPMh does not provide support for PM8150 S4 because it 36 * is always-on; model it as a fixed regulator. 37 */ 38 vreg_s4a_1p8: pm8150-s4 { 39 compatible = "regulator-fixed"; 40 regulator-name = "vreg_s4a_1p8"; 41 42 regulator-min-microvolt = <1800000>; 43 regulator-max-microvolt = <1800000>; 44 45 regulator-always-on; 46 regulator-boot-on; 47 48 vin-supply = <&vph_pwr>; 49 }; 50 51 gpio_keys { 52 compatible = "gpio-keys"; 53 54 vol_up { 55 label = "Volume Up"; 56 gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>; 57 linux,code = <KEY_VOLUMEUP>; 58 }; 59 }; 60}; 61 62&apps_rsc { 63 pm8150-rpmh-regulators { 64 compatible = "qcom,pm8150-rpmh-regulators"; 65 qcom,pmic-id = "a"; 66 67 vdd-s1-supply = <&vph_pwr>; 68 vdd-s2-supply = <&vph_pwr>; 69 vdd-s3-supply = <&vph_pwr>; 70 vdd-s4-supply = <&vph_pwr>; 71 vdd-s5-supply = <&vph_pwr>; 72 vdd-s6-supply = <&vph_pwr>; 73 vdd-s7-supply = <&vph_pwr>; 74 vdd-s8-supply = <&vph_pwr>; 75 vdd-s9-supply = <&vph_pwr>; 76 vdd-s10-supply = <&vph_pwr>; 77 78 vdd-l1-l8-l11-supply = <&vreg_s6a_0p9>; 79 vdd-l2-l10-supply = <&vreg_bob>; 80 vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p9>; 81 vdd-l6-l9-supply = <&vreg_s8c_1p3>; 82 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p0>; 83 vdd-l13-l16-l17-supply = <&vreg_bob>; 84 85 vreg_s5a_2p0: smps5 { 86 regulator-min-microvolt = <1904000>; 87 regulator-max-microvolt = <2000000>; 88 }; 89 90 vreg_s6a_0p9: smps6 { 91 regulator-min-microvolt = <920000>; 92 regulator-max-microvolt = <1128000>; 93 }; 94 95 vdda_wcss_pll: 96 vreg_l1a_0p75: ldo1 { 97 regulator-min-microvolt = <752000>; 98 regulator-max-microvolt = <752000>; 99 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 100 }; 101 102 vdd_pdphy: 103 vdda_usb_hs_3p1: 104 vreg_l2a_3p1: ldo2 { 105 regulator-min-microvolt = <3072000>; 106 regulator-max-microvolt = <3072000>; 107 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 108 }; 109 110 vreg_l3a_0p8: ldo3 { 111 regulator-min-microvolt = <480000>; 112 regulator-max-microvolt = <932000>; 113 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 114 }; 115 116 vdd_usb_hs_core: 117 vdda_csi_0_0p9: 118 vdda_csi_1_0p9: 119 vdda_csi_2_0p9: 120 vdda_csi_3_0p9: 121 vdda_dsi_0_0p9: 122 vdda_dsi_1_0p9: 123 vdda_dsi_0_pll_0p9: 124 vdda_dsi_1_pll_0p9: 125 vdda_pcie_1ln_core: 126 vdda_pcie_2ln_core: 127 vdda_pll_hv_cc_ebi01: 128 vdda_pll_hv_cc_ebi23: 129 vdda_qrefs_0p875_5: 130 vdda_sp_sensor: 131 vdda_ufs_2ln_core_1: 132 vdda_ufs_2ln_core_2: 133 vdda_usb_ss_dp_core_1: 134 vdda_usb_ss_dp_core_2: 135 vdda_qlink_lv: 136 vdda_qlink_lv_ck: 137 vreg_l5a_0p875: ldo5 { 138 regulator-min-microvolt = <880000>; 139 regulator-max-microvolt = <880000>; 140 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 141 }; 142 143 vreg_l6a_1p2: ldo6 { 144 regulator-min-microvolt = <1200000>; 145 regulator-max-microvolt = <1200000>; 146 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 147 }; 148 149 vreg_l7a_1p8: ldo7 { 150 regulator-min-microvolt = <1800000>; 151 regulator-max-microvolt = <1800000>; 152 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 153 }; 154 155 vddpx_10: 156 vreg_l9a_1p2: ldo9 { 157 regulator-min-microvolt = <1200000>; 158 regulator-max-microvolt = <1200000>; 159 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 160 }; 161 162 vreg_l10a_2p5: ldo10 { 163 regulator-min-microvolt = <2504000>; 164 regulator-max-microvolt = <2960000>; 165 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 166 }; 167 168 vreg_l11a_0p8: ldo11 { 169 regulator-min-microvolt = <800000>; 170 regulator-max-microvolt = <800000>; 171 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 172 }; 173 174 vdd_qfprom: 175 vdd_qfprom_sp: 176 vdda_apc_cs_1p8: 177 vdda_gfx_cs_1p8: 178 vdda_usb_hs_1p8: 179 vdda_qrefs_vref_1p8: 180 vddpx_10_a: 181 vreg_l12a_1p8: ldo12 { 182 regulator-min-microvolt = <1800000>; 183 regulator-max-microvolt = <1800000>; 184 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 185 }; 186 187 vreg_l13a_2p7: ldo13 { 188 regulator-min-microvolt = <2704000>; 189 regulator-max-microvolt = <2704000>; 190 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 191 }; 192 193 vreg_l14a_1p8: ldo14 { 194 regulator-min-microvolt = <1800000>; 195 regulator-max-microvolt = <1880000>; 196 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 197 }; 198 199 vreg_l15a_1p7: ldo15 { 200 regulator-min-microvolt = <1704000>; 201 regulator-max-microvolt = <1704000>; 202 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 203 }; 204 205 vreg_l16a_2p7: ldo16 { 206 regulator-min-microvolt = <2704000>; 207 regulator-max-microvolt = <2960000>; 208 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 209 }; 210 211 vreg_l17a_3p0: ldo17 { 212 regulator-min-microvolt = <2856000>; 213 regulator-max-microvolt = <3008000>; 214 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 215 }; 216 }; 217 218 pm8150l-rpmh-regulators { 219 compatible = "qcom,pm8150l-rpmh-regulators"; 220 qcom,pmic-id = "c"; 221 222 vdd-s1-supply = <&vph_pwr>; 223 vdd-s2-supply = <&vph_pwr>; 224 vdd-s3-supply = <&vph_pwr>; 225 vdd-s4-supply = <&vph_pwr>; 226 vdd-s5-supply = <&vph_pwr>; 227 vdd-s6-supply = <&vph_pwr>; 228 vdd-s7-supply = <&vph_pwr>; 229 vdd-s8-supply = <&vph_pwr>; 230 231 vdd-l1-l8-supply = <&vreg_s4a_1p8>; 232 vdd-l2-l3-supply = <&vreg_s8c_1p3>; 233 vdd-l4-l5-l6-supply = <&vreg_bob>; 234 vdd-l7-l11-supply = <&vreg_bob>; 235 vdd-l9-l10-supply = <&vreg_bob>; 236 237 vdd-bob-supply = <&vph_pwr>; 238 vdd-flash-supply = <&vreg_bob>; 239 vdd-rgb-supply = <&vreg_bob>; 240 241 vreg_bob: bob { 242 regulator-min-microvolt = <3008000>; 243 regulator-max-microvolt = <4000000>; 244 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 245 regulator-allow-bypass; 246 }; 247 248 vreg_s8c_1p3: smps8 { 249 regulator-min-microvolt = <1352000>; 250 regulator-max-microvolt = <1352000>; 251 }; 252 253 vreg_l1c_1p8: ldo1 { 254 regulator-min-microvolt = <1800000>; 255 regulator-max-microvolt = <1800000>; 256 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 257 }; 258 259 vdda_wcss_adcdac_1: 260 vdda_wcss_adcdac_22: 261 vreg_l2c_1p3: ldo2 { 262 regulator-min-microvolt = <1304000>; 263 regulator-max-microvolt = <1304000>; 264 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 265 }; 266 267 vdda_hv_ebi0: 268 vdda_hv_ebi1: 269 vdda_hv_ebi2: 270 vdda_hv_ebi3: 271 vdda_hv_refgen0: 272 vdda_qlink_hv_ck: 273 vreg_l3c_1p2: ldo3 { 274 regulator-min-microvolt = <1200000>; 275 regulator-max-microvolt = <1200000>; 276 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 277 }; 278 279 vddpx_5: 280 vreg_l4c_1p8: ldo4 { 281 regulator-min-microvolt = <1704000>; 282 regulator-max-microvolt = <2928000>; 283 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 284 }; 285 286 vddpx_6: 287 vreg_l5c_1p8: ldo5 { 288 regulator-min-microvolt = <1704000>; 289 regulator-max-microvolt = <2928000>; 290 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 291 }; 292 293 vddpx_2: 294 vreg_l6c_2p9: ldo6 { 295 regulator-min-microvolt = <1800000>; 296 regulator-max-microvolt = <2960000>; 297 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 298 }; 299 300 vreg_l7c_3p0: ldo7 { 301 regulator-min-microvolt = <2856000>; 302 regulator-max-microvolt = <3104000>; 303 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 304 }; 305 306 vreg_l8c_1p8: ldo8 { 307 regulator-min-microvolt = <1800000>; 308 regulator-max-microvolt = <1800000>; 309 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 310 }; 311 312 vreg_l9c_2p9: ldo9 { 313 regulator-min-microvolt = <2704000>; 314 regulator-max-microvolt = <2960000>; 315 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 316 }; 317 318 vreg_l10c_3p3: ldo10 { 319 regulator-min-microvolt = <3000000>; 320 regulator-max-microvolt = <3312000>; 321 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 322 }; 323 324 vreg_l11c_3p3: ldo11 { 325 regulator-min-microvolt = <3000000>; 326 regulator-max-microvolt = <3312000>; 327 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 328 }; 329 }; 330 331 pm8009-rpmh-regulators { 332 compatible = "qcom,pm8009-rpmh-regulators"; 333 qcom,pmic-id = "f"; 334 335 vdd-s1-supply = <&vph_pwr>; 336 vdd-s2-supply = <&vreg_bob>; 337 338 vdd-l2-supply = <&vreg_s8c_1p3>; 339 vdd-l5-l6-supply = <&vreg_bob>; 340 341 vreg_l2f_1p2: ldo2 { 342 regulator-min-microvolt = <1200000>; 343 regulator-max-microvolt = <1200000>; 344 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 345 }; 346 347 vreg_l5f_2p85: ldo5 { 348 regulator-min-microvolt = <2800000>; 349 regulator-max-microvolt = <2800000>; 350 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 351 }; 352 353 vreg_l6f_2p85: ldo6 { 354 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 355 regulator-min-microvolt = <2856000>; 356 regulator-max-microvolt = <2856000>; 357 }; 358 }; 359}; 360 361&i2c1 { 362 status = "okay"; 363 clock-frequency = <400000>; 364 365 bq27742@55 { 366 compatible = "ti,bq27742"; 367 reg = <0x55>; 368 }; 369 370 da7280@4a { 371 compatible = "dlg,da7280"; 372 reg = <0x4a>; 373 interrupts-extended = <&tlmm 42 IRQ_TYPE_LEVEL_LOW>; 374 pinctrl-names = "da7280_default"; 375 pinctrl-0 = <&da7280_intr_default>; 376 377 dlg,actuator-type = "LRA"; 378 dlg,dlg,const-op-mode = <1>; 379 dlg,dlg,periodic-op-mode = <1>; 380 dlg,nom-microvolt = <2000000>; 381 dlg,abs-max-microvolt = <2000000>; 382 dlg,imax-microamp = <129000>; 383 dlg,resonant-freq-hz = <180>; 384 dlg,impd-micro-ohms = <14300000>; 385 dlg,freq-track-enable; 386 dlg,bemf-sens-enable; 387 dlg,mem-array = < 388 0x06 0x08 0x10 0x11 0x12 0x13 0x14 0x15 0x1c 0x2a 389 0x33 0x3c 0x42 0x4b 0x4c 0x4e 0x17 0x19 0x27 0x29 390 0x17 0x19 0x03 0x84 0x5e 0x04 0x08 0x84 0x5d 0x01 391 0x84 0x5e 0x02 0x00 0xa4 0x5d 0x03 0x84 0x5e 0x06 392 0x08 0x84 0x5d 0x05 0x84 0x5d 0x06 0x84 0x5e 0x08 393 0x84 0x5e 0x05 0x8c 0x5e 0x24 0x84 0x5f 0x10 0x84 394 0x5e 0x05 0x84 0x5e 0x08 0x84 0x5f 0x01 0x8c 0x5e 395 0x04 0x84 0x5e 0x08 0x84 0x5f 0x11 0x19 0x88 0x00 396 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 397 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 398 >; 399 }; 400 401 /* SMB1381 @ 0x44 */ 402 /* MAX34417 @ 0x1c */ 403}; 404 405&i2c4 { 406 status = "okay"; 407 clock-frequency = <400000>; 408 409 /* SMB1355 @ 0x0c */ 410 /* SMB1390 @ 0x10 */ 411}; 412 413&i2c17 { 414 status = "okay"; 415 clock-frequency = <400000>; 416 417 bq27742@55 { 418 compatible = "ti,bq27742"; 419 reg = <0x55>; 420 }; 421}; 422 423&i2c19 { 424 status = "okay"; 425 clock-frequency = <400000>; 426 427 /* MAX34417 @ 0x12 */ 428 /* MAX34417 @ 0x1a */ 429 /* MAX34417 @ 0x1e */ 430}; 431 432&pon { 433 pwrkey { 434 status = "okay"; 435 }; 436 437 resin { 438 compatible = "qcom,pm8941-resin"; 439 interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>; 440 debounce = <15625>; 441 bias-pull-up; 442 linux,code = <KEY_VOLUMEDOWN>; 443 }; 444}; 445 446&qupv3_id_0 { 447 status = "okay"; 448}; 449 450&qupv3_id_1 { 451 status = "okay"; 452}; 453 454&qupv3_id_2 { 455 status = "okay"; 456}; 457 458&remoteproc_adsp { 459 status = "okay"; 460 firmware-name = "qcom/sm8150/microsoft/adsp.mdt"; 461}; 462 463&remoteproc_cdsp { 464 status = "okay"; 465 firmware-name = "qcom/sm8150/microsoft/cdsp.mdt"; 466}; 467 468&remoteproc_mpss { 469 status = "okay"; 470 firmware-name = "qcom/sm8150/microsoft/modem.mdt"; 471}; 472 473&remoteproc_slpi { 474 status = "okay"; 475 firmware-name = "qcom/sm8150/microsoft/slpi.mdt"; 476}; 477 478&tlmm { 479 gpio-reserved-ranges = <126 4>; 480 481 da7280_intr_default: da7280-intr-default { 482 pins = "gpio42"; 483 function = "gpio"; 484 bias-pull-up; 485 input-enable; 486 }; 487}; 488 489&uart2 { 490 status = "okay"; 491}; 492 493&ufs_mem_hc { 494 status = "okay"; 495 496 reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; 497 498 vcc-supply = <&vreg_l10a_2p5>; 499 vcc-max-microamp = <750000>; 500 vccq-supply = <&vreg_l9a_1p2>; 501 vccq-max-microamp = <700000>; 502 vccq2-supply = <&vreg_s4a_1p8>; 503 vccq2-max-microamp = <750000>; 504}; 505 506&ufs_mem_phy { 507 status = "okay"; 508 509 vdda-phy-supply = <&vdda_ufs_2ln_core_1>; 510 vdda-max-microamp = <90200>; 511 vdda-pll-supply = <&vreg_l3c_1p2>; 512 vdda-pll-max-microamp = <19000>; 513}; 514 515&usb_1_hsphy { 516 status = "okay"; 517 vdda-pll-supply = <&vdd_usb_hs_core>; 518 vdda33-supply = <&vdda_usb_hs_3p1>; 519 vdda18-supply = <&vdda_usb_hs_1p8>; 520}; 521 522&usb_1_qmpphy { 523 status = "okay"; 524 vdda-phy-supply = <&vreg_l3c_1p2>; 525 vdda-pll-supply = <&vdda_usb_ss_dp_core_1>; 526}; 527 528&usb_1 { 529 status = "okay"; 530}; 531 532&usb_1_dwc3 { 533 dr_mode = "peripheral"; 534}; 535 536&wifi { 537 status = "okay"; 538 539 vdd-0.8-cx-mx-supply = <&vdda_wcss_pll>; 540 vdd-1.8-xo-supply = <&vreg_l7a_1p8>; 541 vdd-1.3-rfa-supply = <&vdda_wcss_adcdac_1>; 542 vdd-3.3-ch0-supply = <&vreg_l11c_3p3>; 543}; 544