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&adsp_pil { 102 firmware-name = "qcom/sda660/adsp.mbn"; 103}; 104 105&blsp_i2c6 { 106 status = "okay"; 107 108 adv7533: hdmi@39 { 109 compatible = "adi,adv7535"; 110 reg = <0x39>, <0x66>; 111 reg-names = "main", "edid"; 112 113 interrupt-parent = <&pm660l_gpios>; 114 interrupts = <11 IRQ_TYPE_EDGE_FALLING>; 115 116 clocks = <&rpmcc RPM_SMD_BB_CLK2>; 117 clock-names = "cec"; 118 /* 119 * Limit to 3 lanes to prevent the bridge from changing amount 120 * of lanes in the fly. MSM DSI host doesn't like that. 121 */ 122 adi,dsi-lanes = <3>; 123 avdd-supply = <&vreg_l13a_1p8>; 124 dvdd-supply = <&vreg_l13a_1p8>; 125 pvdd-supply = <&vreg_l13a_1p8>; 126 a2vdd-supply = <&vreg_l13a_1p8>; 127 v3p3-supply = <&v3p3_bck_bst>; 128 129 ports { 130 #address-cells = <1>; 131 #size-cells = <0>; 132 133 port@0 { 134 reg = <0>; 135 136 adv7533_in: endpoint { 137 remote-endpoint = <&mdss_dsi0_out>; 138 }; 139 }; 140 141 port@1 { 142 reg = <1>; 143 144 adv7533_out: endpoint { 145 remote-endpoint = <&hdmi_con>; 146 }; 147 }; 148 }; 149 }; 150}; 151 152&blsp1_dma { 153 /* 154 * The board will lock up if we toggle the BLSP clock, unless the 155 * BAM DMA interconnects support is in place. 156 */ 157 /delete-property/ clocks; 158 /delete-property/ clock-names; 159}; 160 161&blsp1_uart2 { 162 status = "okay"; 163}; 164 165&blsp2_dma { 166 /* 167 * The board will lock up if we toggle the BLSP clock, unless the 168 * BAM DMA interconnects support is in place. 169 */ 170 /delete-property/ clocks; 171 /delete-property/ clock-names; 172}; 173 174&blsp2_uart1 { 175 status = "okay"; 176 177 bluetooth { 178 compatible = "qcom,wcn3990-bt"; 179 180 vddio-supply = <&vreg_l13a_1p8>; 181 vddxo-supply = <&vreg_l9a_1p8>; 182 vddrf-supply = <&vreg_l6a_1p3>; 183 vddch0-supply = <&vreg_l19a_3p3>; 184 max-speed = <3200000>; 185 }; 186}; 187 188&mdss { 189 status = "okay"; 190}; 191 192&mdss_dsi0 { 193 status = "okay"; 194 vdda-supply = <&vreg_l1a_1p225>; 195}; 196 197&mdss_dsi0_out { 198 remote-endpoint = <&adv7533_in>; 199 data-lanes = <0 1 2 3>; 200}; 201 202&mdss_dsi0_phy { 203 status = "okay"; 204 vcca-supply = <&vreg_l1b_0p925>; 205}; 206 207&mmss_smmu { 208 status = "okay"; 209}; 210 211&pon_pwrkey { 212 status = "okay"; 213}; 214 215&pon_resin { 216 status = "okay"; 217 218 linux,code = <KEY_VOLUMEUP>; 219}; 220 221&qusb2phy0 { 222 status = "okay"; 223 224 vdd-supply = <&vreg_l1b_0p925>; 225 vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; 226}; 227 228&qusb2phy1 { 229 status = "okay"; 230 231 vdd-supply = <&vreg_l1b_0p925>; 232 vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; 233}; 234 235&rpm_requests { 236 regulators-0 { 237 compatible = "qcom,rpm-pm660-regulators"; 238 239 vdd_s1-supply = <&vph_pwr>; 240 vdd_s2-supply = <&vph_pwr>; 241 vdd_s3-supply = <&vph_pwr>; 242 vdd_s4-supply = <&vph_pwr>; 243 vdd_s5-supply = <&vph_pwr>; 244 vdd_s6-supply = <&vph_pwr>; 245 246 vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>; 247 vdd_l2_l3-supply = <&vreg_s2b_1p05>; 248 vdd_l5-supply = <&vreg_s2b_1p05>; 249 vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>; 250 vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>; 251 252 vreg_s4a_2p04: s4 { 253 regulator-min-microvolt = <1805000>; 254 regulator-max-microvolt = <2040000>; 255 regulator-enable-ramp-delay = <200>; 256 regulator-ramp-delay = <0>; 257 regulator-always-on; 258 }; 259 260 vreg_s5a_1p35: s5 { 261 regulator-min-microvolt = <1224000>; 262 regulator-max-microvolt = <1350000>; 263 regulator-enable-ramp-delay = <200>; 264 regulator-ramp-delay = <0>; 265 }; 266 267 vreg_l1a_1p225: l1 { 268 regulator-min-microvolt = <1150000>; 269 regulator-max-microvolt = <1250000>; 270 regulator-enable-ramp-delay = <250>; 271 regulator-allow-set-load; 272 }; 273 274 vreg_l6a_1p3: l6 { 275 regulator-min-microvolt = <1304000>; 276 regulator-max-microvolt = <1368000>; 277 regulator-enable-ramp-delay = <250>; 278 regulator-ramp-delay = <0>; 279 regulator-allow-set-load; 280 }; 281 282 vreg_l8a_1p8: l8 { 283 regulator-min-microvolt = <1800000>; 284 regulator-max-microvolt = <1800000>; 285 regulator-enable-ramp-delay = <250>; 286 regulator-ramp-delay = <0>; 287 regulator-system-load = <325000>; 288 regulator-allow-set-load; 289 }; 290 291 vreg_l9a_1p8: l9 { 292 regulator-min-microvolt = <1804000>; 293 regulator-max-microvolt = <1896000>; 294 regulator-enable-ramp-delay = <250>; 295 regulator-ramp-delay = <0>; 296 regulator-allow-set-load; 297 }; 298 299 vreg_l13a_1p8: l13 { 300 /* This gives power to the LPDDR4: never turn it off! */ 301 regulator-min-microvolt = <1800000>; 302 regulator-max-microvolt = <1944000>; 303 regulator-enable-ramp-delay = <250>; 304 regulator-ramp-delay = <0>; 305 regulator-always-on; 306 regulator-boot-on; 307 }; 308 309 vreg_l19a_3p3: l19 { 310 regulator-min-microvolt = <3312000>; 311 regulator-max-microvolt = <3400000>; 312 regulator-enable-ramp-delay = <250>; 313 regulator-ramp-delay = <0>; 314 regulator-allow-set-load; 315 }; 316 }; 317 318 regulators-1 { 319 compatible = "qcom,rpm-pm660l-regulators"; 320 321 vdd_s1-supply = <&vph_pwr>; 322 vdd_s2-supply = <&vph_pwr>; 323 vdd_s3_s4-supply = <&vph_pwr>; 324 vdd_s5-supply = <&vph_pwr>; 325 vdd_s6-supply = <&vph_pwr>; 326 327 vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>; 328 vdd_l2-supply = <&vreg_bob>; 329 vdd_l3_l5_l7_l8-supply = <&vreg_bob>; 330 vdd_l4_l6-supply = <&vreg_bob>; 331 vdd_bob-supply = <&vph_pwr>; 332 333 vreg_s2b_1p05: s2 { 334 regulator-min-microvolt = <1050000>; 335 regulator-max-microvolt = <1050000>; 336 regulator-enable-ramp-delay = <200>; 337 regulator-ramp-delay = <0>; 338 }; 339 340 vreg_l1b_0p925: l1 { 341 regulator-min-microvolt = <800000>; 342 regulator-max-microvolt = <925000>; 343 regulator-enable-ramp-delay = <250>; 344 regulator-allow-set-load; 345 }; 346 347 vreg_l2b_2p95: l2 { 348 regulator-min-microvolt = <1648000>; 349 regulator-max-microvolt = <3100000>; 350 regulator-enable-ramp-delay = <250>; 351 regulator-ramp-delay = <0>; 352 regulator-allow-set-load; 353 }; 354 355 vreg_l4b_2p95: l4 { 356 regulator-min-microvolt = <2944000>; 357 regulator-max-microvolt = <2952000>; 358 regulator-enable-ramp-delay = <250>; 359 regulator-ramp-delay = <0>; 360 361 regulator-min-microamp = <200>; 362 regulator-max-microamp = <600000>; 363 regulator-system-load = <570000>; 364 regulator-allow-set-load; 365 }; 366 367 /* 368 * Downstream specifies a range of 1721-3600mV, 369 * but the only assigned consumers are SDHCI2 VMMC 370 * and Coresight QPDI that both request pinned 2.95V. 371 * Tighten the range to 1.8-3.328 (closest to 3.3) to 372 * make the mmc driver happy. 373 */ 374 vreg_l5b_2p95: l5 { 375 regulator-min-microvolt = <1800000>; 376 regulator-max-microvolt = <3328000>; 377 regulator-enable-ramp-delay = <250>; 378 regulator-system-load = <800000>; 379 regulator-ramp-delay = <0>; 380 regulator-allow-set-load; 381 }; 382 383 vreg_l7b_3p125: l7 { 384 regulator-min-microvolt = <2700000>; 385 regulator-max-microvolt = <3125000>; 386 regulator-enable-ramp-delay = <250>; 387 }; 388 389 vreg_l8b_3p3: l8 { 390 regulator-min-microvolt = <2800000>; 391 regulator-max-microvolt = <3400000>; 392 regulator-enable-ramp-delay = <250>; 393 regulator-ramp-delay = <0>; 394 }; 395 396 vreg_bob: bob { 397 regulator-min-microvolt = <3300000>; 398 regulator-max-microvolt = <3624000>; 399 regulator-enable-ramp-delay = <500>; 400 regulator-ramp-delay = <0>; 401 }; 402 }; 403}; 404 405&sdc2_state_on { 406 sd-cd-pins { 407 pins = "gpio54"; 408 function = "gpio"; 409 bias-pull-up; 410 drive-strength = <2>; 411 }; 412}; 413 414&sdc2_state_off { 415 sd-cd-pins { 416 pins = "gpio54"; 417 function = "gpio"; 418 bias-disable; 419 drive-strength = <2>; 420 }; 421}; 422 423&sdhc_1 { 424 status = "okay"; 425 supports-cqe; 426 427 vmmc-supply = <&vreg_l4b_2p95>; 428 vqmmc-supply = <&vreg_l8a_1p8>; 429 430 mmc-ddr-1_8v; 431 mmc-hs400-1_8v; 432 mmc-hs400-enhanced-strobe; 433}; 434 435&sdhc_2 { 436 status = "okay"; 437 438 vmmc-supply = <&vreg_l5b_2p95>; 439 vqmmc-supply = <&vreg_l2b_2p95>; 440 441 cd-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>; 442 no-sdio; 443 no-mmc; 444}; 445 446&tlmm { 447 gpio-reserved-ranges = <0 4>, <8 4>; 448}; 449 450&usb2 { 451 status = "okay"; 452}; 453 454&usb2_dwc3 { 455 dr_mode = "host"; 456}; 457 458&usb3 { 459 status = "okay"; 460}; 461 462&usb3_dwc3 { 463 dr_mode = "peripheral"; 464 extcon = <&extcon_usb>; 465}; 466