1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2021, Linaro Ltd. 4 * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org> 5 * Copyright (c) 2020, AngeloGioacchino Del Regno 6 * <angelogioacchino.delregno@somainline.org> 7 */ 8 9/dts-v1/; 10 11#include "sdm660.dtsi" 12#include "pm660.dtsi" 13#include "pm660l.dtsi" 14 15/ { 16 model = "Inforce 6560 Single Board Computer"; 17 compatible = "inforce,ifc6560", "qcom,sda660"; 18 chassis-type = "embedded"; /* SBC */ 19 20 aliases { 21 serial0 = &blsp1_uart2; 22 serial1 = &blsp2_uart1; 23 }; 24 25 chosen { 26 stdout-path = "serial0:115200n8"; 27 }; 28 29 gpio-keys { 30 compatible = "gpio-keys"; 31 32 key-volup { 33 label = "Volume Up"; 34 gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>; 35 linux,code = <KEY_VOLUMEUP>; 36 debounce-interval = <15>; 37 }; 38 }; 39 40 /* 41 * Until we hook up type-c detection, we 42 * have to stick with this. But it works. 43 */ 44 extcon_usb: extcon-usb { 45 compatible = "linux,extcon-usb-gpio"; 46 id-gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>; 47 }; 48 49 hdmi-out { 50 compatible = "hdmi-connector"; 51 type = "a"; 52 53 port { 54 hdmi_con: endpoint { 55 remote-endpoint = <&adv7533_out>; 56 }; 57 }; 58 }; 59 60 vph_pwr: vph-pwr-regulator { 61 compatible = "regulator-fixed"; 62 regulator-name = "vph_pwr"; 63 regulator-min-microvolt = <3800000>; 64 regulator-max-microvolt = <3800000>; 65 66 regulator-always-on; 67 regulator-boot-on; 68 }; 69 70 v3p3_bck_bst: v3p3-bck-bst-regulator { 71 compatible = "regulator-fixed"; 72 regulator-name = "v3p3_bck_bst"; 73 74 regulator-min-microvolt = <3300000>; 75 regulator-max-microvolt = <3300000>; 76 77 vin-supply = <&vph_pwr>; 78 }; 79 80 v1p2_ldo: v1p2-ldo-regulator { 81 compatible = "regulator-fixed"; 82 regulator-name = "v1p2_ldo"; 83 84 regulator-min-microvolt = <1200000>; 85 regulator-max-microvolt = <1200000>; 86 87 vin-supply = <&vph_pwr>; 88 }; 89 90 v5p0_boost: v5p0-boost-regulator { 91 compatible = "regulator-fixed"; 92 regulator-name = "v5p0_boost"; 93 94 regulator-min-microvolt = <5000000>; 95 regulator-max-microvolt = <5000000>; 96 97 vin-supply = <&vph_pwr>; 98 }; 99 100 /* 101 * this is also used for APC1 CPU power, touching it resets the board 102 */ 103 vreg_l10a_1p8: vreg-l10a-regulator { 104 compatible = "regulator-fixed"; 105 regulator-name = "vreg_l10a_1p8"; 106 regulator-min-microvolt = <1804000>; 107 regulator-max-microvolt = <1804000>; 108 regulator-always-on; 109 regulator-boot-on; 110 }; 111 112 wcn3990-pmu { 113 compatible = "qcom,wcn3990-pmu"; 114 115 pinctrl-0 = <&sw_ctrl_default>; 116 pinctrl-names = "default"; 117 118 vddio-supply = <&vreg_l13a_1p8>; 119 vddxo-supply = <&vreg_l9a_1p8>; 120 vddrf-supply = <&vreg_l6a_1p3>; 121 vddch0-supply = <&vreg_l19a_3p3>; 122 vddch1-supply = <&vreg_l8b_3p3>; 123 124 swctrl-gpios = <&pm660_gpios 5 GPIO_ACTIVE_HIGH>; 125 126 regulators { 127 vreg_pmu_io: ldo0 { 128 regulator-name = "vreg_pmu_io"; 129 }; 130 131 vreg_pmu_xo: ldo1 { 132 regulator-name = "vreg_pmu_xo"; 133 }; 134 135 vreg_pmu_rf: ldo2 { 136 regulator-name = "vreg_pmu_rf"; 137 }; 138 139 vreg_pmu_ch0: ldo3 { 140 regulator-name = "vreg_pmu_ch0"; 141 }; 142 143 vreg_pmu_ch1: ldo4 { 144 regulator-name = "vreg_pmu_ch1"; 145 }; 146 }; 147 }; 148}; 149 150&adreno_gpu { 151 status = "okay"; 152}; 153 154&adreno_gpu_zap { 155 firmware-name = "qcom/sda660/a512_zap.mbn"; 156}; 157 158&adsp_pil { 159 firmware-name = "qcom/sda660/adsp.mbn"; 160}; 161 162&blsp_i2c6 { 163 status = "okay"; 164 165 adv7533: hdmi@39 { 166 compatible = "adi,adv7535"; 167 reg = <0x39>, <0x66>; 168 reg-names = "main", "edid"; 169 170 interrupt-parent = <&pm660l_gpios>; 171 interrupts = <11 IRQ_TYPE_EDGE_FALLING>; 172 173 clocks = <&rpmcc RPM_SMD_BB_CLK2>; 174 clock-names = "cec"; 175 /* 176 * Limit to 3 lanes to prevent the bridge from changing amount 177 * of lanes in the fly. MSM DSI host doesn't like that. 178 */ 179 adi,dsi-lanes = <3>; 180 avdd-supply = <&vreg_l13a_1p8>; 181 dvdd-supply = <&vreg_l13a_1p8>; 182 pvdd-supply = <&vreg_l13a_1p8>; 183 a2vdd-supply = <&vreg_l13a_1p8>; 184 v3p3-supply = <&v3p3_bck_bst>; 185 186 ports { 187 #address-cells = <1>; 188 #size-cells = <0>; 189 190 port@0 { 191 reg = <0>; 192 193 adv7533_in: endpoint { 194 remote-endpoint = <&mdss_dsi0_out>; 195 }; 196 }; 197 198 port@1 { 199 reg = <1>; 200 201 adv7533_out: endpoint { 202 remote-endpoint = <&hdmi_con>; 203 }; 204 }; 205 }; 206 }; 207}; 208 209&blsp1_dma { 210 /* 211 * The board will lock up if we toggle the BLSP clock, unless the 212 * BAM DMA interconnects support is in place. 213 */ 214 /delete-property/ clocks; 215 /delete-property/ clock-names; 216}; 217 218&blsp1_uart2 { 219 status = "okay"; 220}; 221 222&blsp2_dma { 223 /* 224 * The board will lock up if we toggle the BLSP clock, unless the 225 * BAM DMA interconnects support is in place. 226 */ 227 /delete-property/ clocks; 228 /delete-property/ clock-names; 229}; 230 231&blsp2_uart1 { 232 status = "okay"; 233 234 bluetooth { 235 compatible = "qcom,wcn3990-bt"; 236 237 vddio-supply = <&vreg_pmu_io>; 238 vddxo-supply = <&vreg_pmu_xo>; 239 vddrf-supply = <&vreg_pmu_rf>; 240 vddch0-supply = <&vreg_pmu_ch0>; 241 max-speed = <3200000>; 242 }; 243}; 244 245&mdss { 246 status = "okay"; 247}; 248 249&mdss_dsi0 { 250 status = "okay"; 251 vdda-supply = <&vreg_l1a_1p225>; 252}; 253 254&mdss_dsi0_out { 255 remote-endpoint = <&adv7533_in>; 256 data-lanes = <0 1 2 3>; 257}; 258 259&mdss_dsi0_phy { 260 status = "okay"; 261 vcca-supply = <&vreg_l1b_0p925>; 262}; 263 264&mmss_smmu { 265 status = "okay"; 266}; 267 268&pon_pwrkey { 269 status = "okay"; 270}; 271 272&pon_resin { 273 status = "okay"; 274 275 linux,code = <KEY_VOLUMEUP>; 276}; 277 278&pm660_gpios { 279 sw_ctrl_default: sw-ctrl-default-state { 280 pins = "gpio5"; 281 function = "normal"; 282 283 input-enable; 284 bias-pull-down; 285 }; 286}; 287 288&qusb2phy0 { 289 status = "okay"; 290 291 vdd-supply = <&vreg_l1b_0p925>; 292 vdda-pll-supply = <&vreg_l10a_1p8>; 293 vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; 294}; 295 296&qusb2phy1 { 297 status = "okay"; 298 299 vdd-supply = <&vreg_l1b_0p925>; 300 vdda-pll-supply = <&vreg_l10a_1p8>; 301 vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; 302}; 303 304&remoteproc_mss { 305 firmware-name = "qcom/sda660/mba.mbn", "qcom/sda660/modem.mbn"; 306 status = "okay"; 307}; 308 309&rpm_requests { 310 regulators-0 { 311 compatible = "qcom,rpm-pm660-regulators"; 312 313 vdd_s1-supply = <&vph_pwr>; 314 vdd_s2-supply = <&vph_pwr>; 315 vdd_s3-supply = <&vph_pwr>; 316 vdd_s4-supply = <&vph_pwr>; 317 vdd_s5-supply = <&vph_pwr>; 318 vdd_s6-supply = <&vph_pwr>; 319 320 vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>; 321 vdd_l2_l3-supply = <&vreg_s2b_1p05>; 322 vdd_l5-supply = <&vreg_s2b_1p05>; 323 vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>; 324 vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>; 325 326 vreg_s4a_2p04: s4 { 327 regulator-min-microvolt = <1805000>; 328 regulator-max-microvolt = <2040000>; 329 regulator-enable-ramp-delay = <200>; 330 regulator-ramp-delay = <0>; 331 regulator-always-on; 332 }; 333 334 vreg_s5a_1p35: s5 { 335 regulator-min-microvolt = <1224000>; 336 regulator-max-microvolt = <1350000>; 337 regulator-enable-ramp-delay = <200>; 338 regulator-ramp-delay = <0>; 339 }; 340 341 vreg_l1a_1p225: l1 { 342 regulator-min-microvolt = <1150000>; 343 regulator-max-microvolt = <1250000>; 344 regulator-enable-ramp-delay = <250>; 345 regulator-allow-set-load; 346 }; 347 348 vreg_l5a_0p8: l5 { 349 regulator-min-microvolt = <848000>; 350 regulator-max-microvolt = <848000>; 351 }; 352 353 vreg_l6a_1p3: l6 { 354 regulator-min-microvolt = <1304000>; 355 regulator-max-microvolt = <1368000>; 356 regulator-enable-ramp-delay = <250>; 357 regulator-ramp-delay = <0>; 358 regulator-allow-set-load; 359 }; 360 361 vreg_l8a_1p8: l8 { 362 regulator-min-microvolt = <1800000>; 363 regulator-max-microvolt = <1800000>; 364 regulator-enable-ramp-delay = <250>; 365 regulator-ramp-delay = <0>; 366 regulator-system-load = <325000>; 367 regulator-allow-set-load; 368 }; 369 370 vreg_l9a_1p8: l9 { 371 regulator-min-microvolt = <1804000>; 372 regulator-max-microvolt = <1896000>; 373 regulator-enable-ramp-delay = <250>; 374 regulator-ramp-delay = <0>; 375 regulator-allow-set-load; 376 }; 377 378 vreg_l13a_1p8: l13 { 379 /* This gives power to the LPDDR4: never turn it off! */ 380 regulator-min-microvolt = <1800000>; 381 regulator-max-microvolt = <1944000>; 382 regulator-enable-ramp-delay = <250>; 383 regulator-ramp-delay = <0>; 384 regulator-always-on; 385 regulator-boot-on; 386 }; 387 388 vreg_l19a_3p3: l19 { 389 regulator-min-microvolt = <3312000>; 390 regulator-max-microvolt = <3400000>; 391 regulator-enable-ramp-delay = <250>; 392 regulator-ramp-delay = <0>; 393 regulator-allow-set-load; 394 }; 395 }; 396 397 regulators-1 { 398 compatible = "qcom,rpm-pm660l-regulators"; 399 400 vdd_s1-supply = <&vph_pwr>; 401 vdd_s2-supply = <&vph_pwr>; 402 vdd_s3_s4-supply = <&vph_pwr>; 403 vdd_s5-supply = <&vph_pwr>; 404 vdd_s6-supply = <&vph_pwr>; 405 406 vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>; 407 vdd_l2-supply = <&vreg_bob>; 408 vdd_l3_l5_l7_l8-supply = <&vreg_bob>; 409 vdd_l4_l6-supply = <&vreg_bob>; 410 vdd_bob-supply = <&vph_pwr>; 411 412 vreg_s2b_1p05: s2 { 413 regulator-min-microvolt = <1050000>; 414 regulator-max-microvolt = <1050000>; 415 regulator-enable-ramp-delay = <200>; 416 regulator-ramp-delay = <0>; 417 }; 418 419 vreg_l1b_0p925: l1 { 420 regulator-min-microvolt = <800000>; 421 regulator-max-microvolt = <925000>; 422 regulator-enable-ramp-delay = <250>; 423 regulator-allow-set-load; 424 }; 425 426 vreg_l2b_2p95: l2 { 427 regulator-min-microvolt = <1648000>; 428 regulator-max-microvolt = <3100000>; 429 regulator-enable-ramp-delay = <250>; 430 regulator-ramp-delay = <0>; 431 regulator-allow-set-load; 432 }; 433 434 vreg_l4b_2p95: l4 { 435 regulator-min-microvolt = <2944000>; 436 regulator-max-microvolt = <2952000>; 437 regulator-enable-ramp-delay = <250>; 438 regulator-ramp-delay = <0>; 439 440 regulator-min-microamp = <200>; 441 regulator-max-microamp = <600000>; 442 regulator-system-load = <570000>; 443 regulator-allow-set-load; 444 }; 445 446 /* 447 * Downstream specifies a range of 1721-3600mV, 448 * but the only assigned consumers are SDHCI2 VMMC 449 * and Coresight QPDI that both request pinned 2.95V. 450 * Tighten the range to 1.8-3.328 (closest to 3.3) to 451 * make the mmc driver happy. 452 */ 453 vreg_l5b_2p95: l5 { 454 regulator-min-microvolt = <1800000>; 455 regulator-max-microvolt = <3328000>; 456 regulator-enable-ramp-delay = <250>; 457 regulator-system-load = <800000>; 458 regulator-ramp-delay = <0>; 459 regulator-allow-set-load; 460 }; 461 462 vreg_l7b_3p125: l7 { 463 regulator-min-microvolt = <2700000>; 464 regulator-max-microvolt = <3125000>; 465 regulator-enable-ramp-delay = <250>; 466 }; 467 468 vreg_l8b_3p3: l8 { 469 regulator-min-microvolt = <2800000>; 470 regulator-max-microvolt = <3400000>; 471 regulator-enable-ramp-delay = <250>; 472 regulator-ramp-delay = <0>; 473 }; 474 475 vreg_bob: bob { 476 regulator-min-microvolt = <3300000>; 477 regulator-max-microvolt = <3624000>; 478 regulator-enable-ramp-delay = <500>; 479 regulator-ramp-delay = <0>; 480 }; 481 }; 482}; 483 484&sdc2_state_on { 485 sd-cd-pins { 486 pins = "gpio54"; 487 function = "gpio"; 488 bias-pull-up; 489 drive-strength = <2>; 490 }; 491}; 492 493&sdc2_state_off { 494 sd-cd-pins { 495 pins = "gpio54"; 496 function = "gpio"; 497 bias-disable; 498 drive-strength = <2>; 499 }; 500}; 501 502&sdhc_1 { 503 status = "okay"; 504 supports-cqe; 505 506 vmmc-supply = <&vreg_l4b_2p95>; 507 vqmmc-supply = <&vreg_l8a_1p8>; 508 509 mmc-ddr-1_8v; 510 mmc-hs400-1_8v; 511 mmc-hs400-enhanced-strobe; 512}; 513 514&sdhc_2 { 515 status = "okay"; 516 517 vmmc-supply = <&vreg_l5b_2p95>; 518 vqmmc-supply = <&vreg_l2b_2p95>; 519 520 cd-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>; 521 no-sdio; 522 no-mmc; 523}; 524 525&tlmm { 526 gpio-reserved-ranges = <0 4>, <8 4>; 527}; 528 529&usb2 { 530 status = "okay"; 531}; 532 533&usb2_dwc3 { 534 dr_mode = "host"; 535}; 536 537&usb3 { 538 status = "okay"; 539}; 540 541&usb3_dwc3 { 542 dr_mode = "peripheral"; 543 extcon = <&extcon_usb>; 544}; 545 546&usb3_qmpphy { 547 vdda-phy-supply = <&vreg_l1b_0p925>; 548 vdda-pll-supply = <&vreg_l10a_1p8>; 549 status = "okay"; 550}; 551 552&wifi { 553 /* SoC */ 554 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; 555 556 /* WiFi / BT PMU */ 557 vdd-1.8-xo-supply = <&vreg_pmu_xo>; 558 vdd-1.3-rfa-supply = <&vreg_pmu_rf>; 559 vdd-3.3-ch0-supply = <&vreg_pmu_ch0>; 560 vdd-3.3-ch1-supply = <&vreg_pmu_ch1>; 561 562 qcom,calibration-variant = "Inforce_IFC6560"; 563 564 status = "okay"; 565}; 566