1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2021, Linaro Limited 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 "pmm8155au_1.dtsi" 12#include "pmm8155au_2.dtsi" 13 14/ { 15 model = "Qualcomm Technologies, Inc. SA8155P ADP"; 16 compatible = "qcom,sa8155p-adp", "qcom,sa8155p"; 17 18 aliases { 19 serial0 = &uart2; 20 }; 21 22 chosen { 23 stdout-path = "serial0:115200n8"; 24 }; 25 26 vreg_3p3: vreg_3p3_regulator { 27 compatible = "regulator-fixed"; 28 regulator-name = "vreg_3p3"; 29 regulator-min-microvolt = <3300000>; 30 regulator-max-microvolt = <3300000>; 31 }; 32 33 /* 34 * S4A is always on and not controllable through RPMh. 35 * So model it as a fixed regulator. 36 */ 37 vreg_s4a_1p8: smps4 { 38 compatible = "regulator-fixed"; 39 regulator-name = "vreg_s4a_1p8"; 40 41 regulator-min-microvolt = <1800000>; 42 regulator-max-microvolt = <1800000>; 43 44 regulator-always-on; 45 regulator-boot-on; 46 47 vin-supply = <&vreg_3p3>; 48 }; 49 50 mtl_rx_setup: rx-queues-config { 51 snps,rx-queues-to-use = <1>; 52 snps,rx-sched-sp; 53 54 queue0 { 55 snps,dcb-algorithm; 56 snps,map-to-dma-channel = <0x0>; 57 snps,route-up; 58 snps,priority = <0x1>; 59 }; 60 }; 61 62 mtl_tx_setup: tx-queues-config { 63 snps,tx-queues-to-use = <1>; 64 snps,tx-sched-wrr; 65 66 queue0 { 67 snps,weight = <0x10>; 68 snps,dcb-algorithm; 69 snps,priority = <0x0>; 70 }; 71 }; 72}; 73 74&apps_rsc { 75 pmm8155au-1-rpmh-regulators { 76 compatible = "qcom,pmm8155au-rpmh-regulators"; 77 qcom,pmic-id = "a"; 78 79 vdd-s1-supply = <&vreg_3p3>; 80 vdd-s2-supply = <&vreg_3p3>; 81 vdd-s3-supply = <&vreg_3p3>; 82 vdd-s4-supply = <&vreg_3p3>; 83 vdd-s5-supply = <&vreg_3p3>; 84 vdd-s6-supply = <&vreg_3p3>; 85 vdd-s7-supply = <&vreg_3p3>; 86 vdd-s8-supply = <&vreg_3p3>; 87 vdd-s9-supply = <&vreg_3p3>; 88 vdd-s10-supply = <&vreg_3p3>; 89 90 vdd-l1-l8-l11-supply = <&vreg_s6a_0p92>; 91 vdd-l2-l10-supply = <&vreg_3p3>; 92 vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p92>; 93 vdd-l6-l9-supply = <&vreg_s6a_0p92>; 94 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>; 95 vdd-l13-l16-l17-supply = <&vreg_3p3>; 96 97 vreg_s5a_2p04: smps5 { 98 regulator-name = "vreg_s5a_2p04"; 99 regulator-min-microvolt = <1904000>; 100 regulator-max-microvolt = <2000000>; 101 }; 102 103 vreg_s6a_0p92: smps6 { 104 regulator-name = "vreg_s6a_0p92"; 105 regulator-min-microvolt = <920000>; 106 regulator-max-microvolt = <1128000>; 107 }; 108 109 vreg_l1a_0p752: ldo1 { 110 regulator-name = "vreg_l1a_0p752"; 111 regulator-min-microvolt = <752000>; 112 regulator-max-microvolt = <752000>; 113 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 114 }; 115 116 vdda_usb_hs_3p1: 117 vreg_l2a_3p072: ldo2 { 118 regulator-name = "vreg_l2a_3p072"; 119 regulator-min-microvolt = <3072000>; 120 regulator-max-microvolt = <3072000>; 121 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 122 }; 123 124 vreg_l3a_0p8: ldo3 { 125 regulator-name = "vreg_l3a_0p8"; 126 regulator-min-microvolt = <800000>; 127 regulator-max-microvolt = <800000>; 128 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 129 }; 130 131 vdd_usb_hs_core: 132 vdda_usb_ss_dp_core_1: 133 vreg_l5a_0p88: ldo5 { 134 regulator-name = "vreg_l5a_0p88"; 135 regulator-min-microvolt = <880000>; 136 regulator-max-microvolt = <880000>; 137 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 138 regulator-allow-set-load; 139 regulator-allowed-modes = 140 <RPMH_REGULATOR_MODE_LPM 141 RPMH_REGULATOR_MODE_HPM>; 142 }; 143 144 vreg_l7a_1p8: ldo7 { 145 regulator-name = "vreg_l7a_1p8"; 146 regulator-min-microvolt = <1800000>; 147 regulator-max-microvolt = <1800000>; 148 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 149 }; 150 151 vreg_l10a_2p96: ldo10 { 152 regulator-name = "vreg_l10a_2p96"; 153 regulator-min-microvolt = <2504000>; 154 regulator-max-microvolt = <2960000>; 155 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 156 regulator-allow-set-load; 157 regulator-allowed-modes = 158 <RPMH_REGULATOR_MODE_LPM 159 RPMH_REGULATOR_MODE_HPM>; 160 }; 161 162 vreg_l11a_0p8: ldo11 { 163 regulator-name = "vreg_l11a_0p8"; 164 regulator-min-microvolt = <800000>; 165 regulator-max-microvolt = <800000>; 166 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 167 }; 168 169 vdda_usb_hs_1p8: 170 vreg_l12a_1p8: ldo12 { 171 regulator-name = "vreg_l12a_1p8"; 172 regulator-min-microvolt = <1800000>; 173 regulator-max-microvolt = <1800000>; 174 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 175 }; 176 177 vreg_l13a_2p7: ldo13 { 178 regulator-name = "vreg_l13a_2p7"; 179 regulator-min-microvolt = <2704000>; 180 regulator-max-microvolt = <2704000>; 181 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 182 }; 183 184 vreg_l15a_1p7: ldo15 { 185 regulator-name = "vreg_l15a_1p7"; 186 regulator-min-microvolt = <1704000>; 187 regulator-max-microvolt = <1704000>; 188 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 189 }; 190 191 vreg_l16a_2p7: ldo16 { 192 regulator-name = "vreg_l16a_2p7"; 193 regulator-min-microvolt = <2704000>; 194 regulator-max-microvolt = <2960000>; 195 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 196 }; 197 198 vreg_l17a_2p96: ldo17 { 199 regulator-name = "vreg_l17a_2p96"; 200 regulator-min-microvolt = <2504000>; 201 regulator-max-microvolt = <2960000>; 202 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 203 }; 204 }; 205 206 pmm8155au-2-rpmh-regulators { 207 compatible = "qcom,pmm8155au-rpmh-regulators"; 208 qcom,pmic-id = "c"; 209 210 vdd-s1-supply = <&vreg_3p3>; 211 vdd-s2-supply = <&vreg_3p3>; 212 vdd-s3-supply = <&vreg_3p3>; 213 vdd-s4-supply = <&vreg_3p3>; 214 vdd-s5-supply = <&vreg_3p3>; 215 vdd-s6-supply = <&vreg_3p3>; 216 vdd-s7-supply = <&vreg_3p3>; 217 vdd-s8-supply = <&vreg_3p3>; 218 vdd-s9-supply = <&vreg_3p3>; 219 vdd-s10-supply = <&vreg_3p3>; 220 221 vdd-l1-l8-l11-supply = <&vreg_s4c_1p352>; 222 vdd-l2-l10-supply = <&vreg_3p3>; 223 vdd-l3-l4-l5-l18-supply = <&vreg_s4c_1p352>; 224 vdd-l6-l9-supply = <&vreg_s6c_1p128>; 225 vdd-l7-l12-l14-l15-supply = <&vreg_s5c_2p04>; 226 vdd-l13-l16-l17-supply = <&vreg_3p3>; 227 228 vreg_s4c_1p352: smps4 { 229 regulator-name = "vreg_s4c_1p352"; 230 regulator-min-microvolt = <1352000>; 231 regulator-max-microvolt = <1352000>; 232 }; 233 234 vreg_s5c_2p04: smps5 { 235 regulator-name = "vreg_s5c_2p04"; 236 regulator-min-microvolt = <1904000>; 237 regulator-max-microvolt = <2000000>; 238 }; 239 240 vreg_s6c_1p128: smps6 { 241 regulator-name = "vreg_s6c_1p128"; 242 regulator-min-microvolt = <1128000>; 243 regulator-max-microvolt = <1128000>; 244 }; 245 246 vreg_l1c_1p304: ldo1 { 247 regulator-name = "vreg_l1c_1p304"; 248 regulator-min-microvolt = <1304000>; 249 regulator-max-microvolt = <1304000>; 250 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 251 }; 252 253 vreg_l2c_1p808: ldo2 { 254 regulator-name = "vreg_l2c_1p808"; 255 regulator-min-microvolt = <1704000>; 256 regulator-max-microvolt = <2928000>; 257 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 258 }; 259 260 vreg_l5c_1p2: ldo5 { 261 regulator-name = "vreg_l5c_1p2"; 262 regulator-min-microvolt = <1200000>; 263 regulator-max-microvolt = <1200000>; 264 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 265 regulator-allow-set-load; 266 regulator-allowed-modes = 267 <RPMH_REGULATOR_MODE_LPM 268 RPMH_REGULATOR_MODE_HPM>; 269 }; 270 271 vreg_l7c_1p8: ldo7 { 272 regulator-name = "vreg_l7c_1p8"; 273 regulator-min-microvolt = <1800000>; 274 regulator-max-microvolt = <1800000>; 275 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 276 }; 277 278 vreg_l8c_1p2: ldo8 { 279 regulator-name = "vreg_l8c_1p2"; 280 regulator-min-microvolt = <1200000>; 281 regulator-max-microvolt = <1200000>; 282 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 283 regulator-allow-set-load; 284 regulator-allowed-modes = 285 <RPMH_REGULATOR_MODE_LPM 286 RPMH_REGULATOR_MODE_HPM>; 287 }; 288 289 vreg_l10c_3p3: ldo10 { 290 regulator-name = "vreg_l10c_3p3"; 291 regulator-min-microvolt = <3000000>; 292 regulator-max-microvolt = <3312000>; 293 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 294 }; 295 296 vreg_l11c_0p8: ldo11 { 297 regulator-name = "vreg_l11c_0p8"; 298 regulator-min-microvolt = <800000>; 299 regulator-max-microvolt = <800000>; 300 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 301 }; 302 303 vreg_l12c_1p808: ldo12 { 304 regulator-name = "vreg_l12c_1p808"; 305 regulator-min-microvolt = <1704000>; 306 regulator-max-microvolt = <2928000>; 307 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 308 }; 309 310 vreg_l13c_2p96: ldo13 { 311 regulator-name = "vreg_l13c_2p96"; 312 regulator-min-microvolt = <2504000>; 313 regulator-max-microvolt = <2960000>; 314 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 315 }; 316 317 vreg_l15c_1p9: ldo15 { 318 regulator-name = "vreg_l15c_1p9"; 319 regulator-min-microvolt = <1704000>; 320 regulator-max-microvolt = <2928000>; 321 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 322 }; 323 324 vreg_l16c_3p008: ldo16 { 325 regulator-name = "vreg_l16c_3p008"; 326 regulator-min-microvolt = <3008000>; 327 regulator-max-microvolt = <3008000>; 328 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 329 }; 330 331 vreg_l18c_0p88: ldo18 { 332 regulator-name = "vreg_l18c_0p88"; 333 regulator-min-microvolt = <880000>; 334 regulator-max-microvolt = <880000>; 335 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 336 }; 337 }; 338}; 339 340ðernet { 341 status = "okay"; 342 343 snps,reset-gpio = <&tlmm 79 GPIO_ACTIVE_LOW>; 344 snps,reset-active-low; 345 snps,reset-delays-us = <0 11000 70000>; 346 347 snps,mtl-rx-config = <&mtl_rx_setup>; 348 snps,mtl-tx-config = <&mtl_tx_setup>; 349 350 pinctrl-names = "default"; 351 pinctrl-0 = <ðernet_defaults>; 352 353 phy-handle = <&rgmii_phy>; 354 phy-mode = "rgmii"; 355 max-speed = <1000>; 356 357 mdio { 358 #address-cells = <0x1>; 359 #size-cells = <0x0>; 360 361 compatible = "snps,dwmac-mdio"; 362 363 /* Micrel KSZ9031RNZ PHY */ 364 rgmii_phy: phy@7 { 365 reg = <0x7>; 366 367 interrupt-parent = <&tlmm>; 368 interrupts-extended = <&tlmm 124 IRQ_TYPE_EDGE_FALLING>; /* phy intr */ 369 device_type = "ethernet-phy"; 370 compatible = "ethernet-phy-ieee802.3-c22"; 371 }; 372 }; 373}; 374 375&qupv3_id_1 { 376 status = "okay"; 377}; 378 379&remoteproc_adsp { 380 status = "okay"; 381 firmware-name = "qcom/sa8155p/adsp.mdt"; 382}; 383 384&remoteproc_cdsp { 385 status = "okay"; 386 firmware-name = "qcom/sa8155p/cdsp.mdt"; 387}; 388 389&sdhc_2 { 390 status = "okay"; 391 392 cd-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; 393 pinctrl-names = "default", "sleep"; 394 pinctrl-0 = <&sdc2_on>; 395 pinctrl-1 = <&sdc2_off>; 396 vqmmc-supply = <&vreg_l13c_2p96>; /* IO line power */ 397 vmmc-supply = <&vreg_l17a_2p96>; /* Card power line */ 398 bus-width = <4>; 399 no-sdio; 400 no-emmc; 401}; 402 403&uart2 { 404 status = "okay"; 405}; 406 407&ufs_mem_hc { 408 status = "okay"; 409 410 reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; 411 412 vcc-supply = <&vreg_l10a_2p96>; 413 vcc-max-microamp = <750000>; 414 vccq-supply = <&vreg_l5c_1p2>; 415 vccq-max-microamp = <700000>; 416 vccq2-supply = <&vreg_s4a_1p8>; 417 vccq2-max-microamp = <750000>; 418}; 419 420&ufs_mem_phy { 421 status = "okay"; 422 423 vdda-phy-supply = <&vreg_l8c_1p2>; 424 vdda-pll-supply = <&vreg_l5a_0p88>; 425}; 426 427&usb_1 { 428 status = "okay"; 429}; 430 431&usb_1_dwc3 { 432 dr_mode = "host"; 433 434 pinctrl-names = "default"; 435 pinctrl-0 = <&usb2phy_ac_en1_default>; 436}; 437 438&usb_1_hsphy { 439 status = "okay"; 440 vdda-pll-supply = <&vdd_usb_hs_core>; 441 vdda33-supply = <&vdda_usb_hs_3p1>; 442 vdda18-supply = <&vdda_usb_hs_1p8>; 443}; 444 445&usb_1_qmpphy { 446 status = "disabled"; 447}; 448 449&usb_2 { 450 status = "okay"; 451}; 452 453&usb_2_dwc3 { 454 dr_mode = "host"; 455 456 pinctrl-names = "default"; 457 pinctrl-0 = <&usb2phy_ac_en2_default>; 458}; 459 460&usb_2_hsphy { 461 status = "okay"; 462 vdda-pll-supply = <&vdd_usb_hs_core>; 463 vdda33-supply = <&vdda_usb_hs_3p1>; 464 vdda18-supply = <&vdda_usb_hs_1p8>; 465}; 466 467&usb_2_qmpphy { 468 status = "okay"; 469 vdda-phy-supply = <&vreg_l8c_1p2>; 470 vdda-pll-supply = <&vdda_usb_ss_dp_core_1>; 471}; 472 473&pcie0 { 474 status = "okay"; 475}; 476 477&pcie0_phy { 478 status = "okay"; 479 vdda-phy-supply = <&vreg_l18c_0p88>; 480 vdda-pll-supply = <&vreg_l8c_1p2>; 481}; 482 483&pcie1_phy { 484 vdda-phy-supply = <&vreg_l18c_0p88>; 485 vdda-pll-supply = <&vreg_l8c_1p2>; 486}; 487 488&tlmm { 489 gpio-reserved-ranges = <0 4>; 490 491 sdc2_on: sdc2_on { 492 clk { 493 pins = "sdc2_clk"; 494 bias-disable; /* No pull */ 495 drive-strength = <16>; /* 16 MA */ 496 }; 497 498 cmd { 499 pins = "sdc2_cmd"; 500 bias-pull-up; /* pull up */ 501 drive-strength = <16>; /* 16 MA */ 502 }; 503 504 data { 505 pins = "sdc2_data"; 506 bias-pull-up; /* pull up */ 507 drive-strength = <16>; /* 16 MA */ 508 }; 509 510 sd-cd { 511 pins = "gpio96"; 512 function = "gpio"; 513 bias-pull-up; /* pull up */ 514 drive-strength = <2>; /* 2 MA */ 515 }; 516 }; 517 518 sdc2_off: sdc2_off { 519 clk { 520 pins = "sdc2_clk"; 521 bias-disable; /* No pull */ 522 drive-strength = <2>; /* 2 MA */ 523 }; 524 525 cmd { 526 pins = "sdc2_cmd"; 527 bias-pull-up; /* pull up */ 528 drive-strength = <2>; /* 2 MA */ 529 }; 530 531 data { 532 pins = "sdc2_data"; 533 bias-pull-up; /* pull up */ 534 drive-strength = <2>; /* 2 MA */ 535 }; 536 537 sd-cd { 538 pins = "gpio96"; 539 function = "gpio"; 540 bias-pull-up; /* pull up */ 541 drive-strength = <2>; /* 2 MA */ 542 }; 543 }; 544 545 usb2phy_ac_en1_default: usb2phy_ac_en1_default { 546 mux { 547 pins = "gpio113"; 548 function = "usb2phy_ac"; 549 bias-disable; 550 drive-strength = <2>; 551 }; 552 }; 553 554 usb2phy_ac_en2_default: usb2phy_ac_en2_default { 555 mux { 556 pins = "gpio123"; 557 function = "usb2phy_ac"; 558 bias-disable; 559 drive-strength = <2>; 560 }; 561 }; 562 563 ethernet_defaults: ethernet-defaults { 564 mdc { 565 pins = "gpio7"; 566 function = "rgmii"; 567 bias-pull-up; 568 }; 569 570 mdio { 571 pins = "gpio59"; 572 function = "rgmii"; 573 bias-pull-up; 574 }; 575 576 rgmii-rx { 577 pins = "gpio117", "gpio118", "gpio119", "gpio120", "gpio115", "gpio116"; 578 function = "rgmii"; 579 bias-disable; 580 drive-strength = <2>; 581 }; 582 583 rgmii-tx { 584 pins = "gpio122", "gpio4", "gpio5", "gpio6", "gpio114", "gpio121"; 585 function = "rgmii"; 586 bias-pull-up; 587 drive-strength = <16>; 588 }; 589 590 phy-intr { 591 pins = "gpio124"; 592 function = "emac_phy"; 593 bias-disable; 594 drive-strength = <8>; 595 }; 596 597 pps { 598 pins = "gpio81"; 599 function = "emac_pps"; 600 bias-disable; 601 drive-strength = <8>; 602 }; 603 604 phy-reset { 605 pins = "gpio79"; 606 function = "gpio"; 607 bias-pull-up; 608 drive-strength = <16>; 609 }; 610 }; 611}; 612