1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2023, Linaro Limited 4 */ 5 6/dts-v1/; 7 8#include <dt-bindings/gpio/gpio.h> 9#include <dt-bindings/leds/common.h> 10#include <dt-bindings/sound/qcom,q6afe.h> 11#include <dt-bindings/sound/qcom,q6asm.h> 12#include <dt-bindings/usb/pd.h> 13#include "sm4250.dtsi" 14#include "pm6125.dtsi" 15#include "pmi632.dtsi" 16 17/ { 18 model = "Qualcomm Technologies, Inc. QRB4210 RB2"; 19 compatible = "qcom,qrb4210-rb2", "qcom,qrb4210", "qcom,sm4250"; 20 21 aliases { 22 serial0 = &uart4; 23 serial1 = &uart3; 24 }; 25 26 chosen { 27 stdout-path = "serial0:115200n8"; 28 }; 29 30 clocks { 31 clk40m: can-clk { 32 compatible = "fixed-clock"; 33 clock-frequency = <40000000>; 34 #clock-cells = <0>; 35 }; 36 }; 37 38 gpio-keys { 39 compatible = "gpio-keys"; 40 label = "gpio-keys"; 41 42 pinctrl-0 = <&kypd_vol_up_n>; 43 pinctrl-names = "default"; 44 45 key-volume-up { 46 label = "Volume Up"; 47 linux,code = <KEY_VOLUMEUP>; 48 gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>; 49 debounce-interval = <15>; 50 linux,can-disable; 51 wakeup-source; 52 }; 53 }; 54 55 hdmi-connector { 56 compatible = "hdmi-connector"; 57 type = "a"; 58 59 port { 60 hdmi_con: endpoint { 61 remote-endpoint = <<9611_out>; 62 }; 63 }; 64 }; 65 66 i2c2_gpio: i2c { 67 compatible = "i2c-gpio"; 68 69 sda-gpios = <&tlmm 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 70 scl-gpios = <&tlmm 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 71 #address-cells = <1>; 72 #size-cells = <0>; 73 74 status = "disabled"; 75 }; 76 77 leds { 78 compatible = "gpio-leds"; 79 80 led-bt { 81 label = "blue:bt"; 82 function = LED_FUNCTION_BLUETOOTH; 83 color = <LED_COLOR_ID_BLUE>; 84 gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>; 85 linux,default-trigger = "bluetooth-power"; 86 default-state = "off"; 87 }; 88 89 led-user0 { 90 label = "green:user0"; 91 function = LED_FUNCTION_INDICATOR; 92 color = <LED_COLOR_ID_GREEN>; 93 gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>; 94 linux,default-trigger = "none"; 95 default-state = "off"; 96 panic-indicator; 97 }; 98 99 led-wlan { 100 label = "yellow:wlan"; 101 function = LED_FUNCTION_WLAN; 102 color = <LED_COLOR_ID_YELLOW>; 103 gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>; 104 linux,default-trigger = "phy0tx"; 105 default-state = "off"; 106 }; 107 }; 108 109 sound { 110 compatible = "qcom,qrb4210-rb2-sndcard"; 111 pinctrl-0 = <&lpi_i2s2_active>; 112 pinctrl-names = "default"; 113 model = "Qualcomm-RB2-WSA8815-Speakers-DMIC0"; 114 115 mm1-dai-link { 116 link-name = "MultiMedia1"; 117 118 cpu { 119 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 120 }; 121 }; 122 123 mm2-dai-link { 124 link-name = "MultiMedia2"; 125 126 cpu { 127 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; 128 }; 129 }; 130 131 mm3-dai-link { 132 link-name = "MultiMedia3"; 133 134 cpu { 135 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; 136 }; 137 }; 138 139 hdmi-dai-link { 140 link-name = "HDMI Playback"; 141 142 cpu { 143 sound-dai = <&q6afedai SECONDARY_MI2S_RX>; 144 }; 145 146 platform { 147 sound-dai = <&q6routing>; 148 }; 149 150 codec { 151 sound-dai = <<9611_codec 0>; 152 }; 153 }; 154 }; 155 156 vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 { 157 compatible = "regulator-fixed"; 158 regulator-name = "VREG_HDMI_OUT_1P2"; 159 regulator-min-microvolt = <1200000>; 160 regulator-max-microvolt = <1200000>; 161 vin-supply = <&vdc_1v2>; 162 regulator-always-on; 163 regulator-boot-on; 164 }; 165 166 lt9611_3v3: regulator-lt9611-3v3 { 167 compatible = "regulator-fixed"; 168 regulator-name = "LT9611_3V3"; 169 regulator-min-microvolt = <3300000>; 170 regulator-max-microvolt = <3300000>; 171 vin-supply = <&vdc_3v3>; 172 regulator-always-on; 173 regulator-boot-on; 174 }; 175 176 /* Main barrel jack input */ 177 vdc_12v: regulator-vdc-12v { 178 compatible = "regulator-fixed"; 179 regulator-name = "DC_12V"; 180 regulator-min-microvolt = <12000000>; 181 regulator-max-microvolt = <12000000>; 182 regulator-always-on; 183 regulator-boot-on; 184 }; 185 186 /* 1.2V supply stepped down from the barrel jack input */ 187 vdc_1v2: regulator-vdc-1v2 { 188 compatible = "regulator-fixed"; 189 regulator-name = "VDC_1V2"; 190 regulator-min-microvolt = <1200000>; 191 regulator-max-microvolt = <1200000>; 192 vin-supply = <&vdc_12v>; 193 regulator-always-on; 194 regulator-boot-on; 195 }; 196 197 /* 3.3V supply stepped down from the barrel jack input */ 198 vdc_3v3: regulator-vdc-3v3 { 199 compatible = "regulator-fixed"; 200 regulator-name = "VDC_3V3"; 201 regulator-min-microvolt = <3300000>; 202 regulator-max-microvolt = <3300000>; 203 vin-supply = <&vdc_12v>; 204 regulator-always-on; 205 regulator-boot-on; 206 }; 207 208 /* 5V supply stepped down from the barrel jack input */ 209 vdc_5v: regulator-vdc-5v { 210 compatible = "regulator-fixed"; 211 regulator-name = "VDC_5V"; 212 213 regulator-min-microvolt = <5000000>; 214 regulator-max-microvolt = <5000000>; 215 regulator-always-on; 216 regulator-boot-on; 217 }; 218 219 /* "Battery" voltage for the SoM, stepped down from the barrel jack input */ 220 vdc_vbat_som: regulator-vdc-vbat { 221 compatible = "regulator-fixed"; 222 regulator-name = "VBAT_SOM"; 223 regulator-min-microvolt = <4200000>; 224 regulator-max-microvolt = <4200000>; 225 regulator-always-on; 226 regulator-boot-on; 227 }; 228 229 /* PMI632 charger out, supplied by VBAT */ 230 vph_pwr: regulator-vph-pwr { 231 compatible = "regulator-fixed"; 232 regulator-name = "vph_pwr"; 233 regulator-min-microvolt = <3700000>; 234 regulator-max-microvolt = <3700000>; 235 vin-supply = <&vdc_vbat_som>; 236 237 regulator-always-on; 238 regulator-boot-on; 239 }; 240}; 241 242&gpi_dma0 { 243 status = "okay"; 244}; 245 246&gpu { 247 status = "okay"; 248 249 zap-shader { 250 firmware-name = "qcom/qrb4210/a610_zap.mbn"; 251 }; 252}; 253 254&i2c2_gpio { 255 clock-frequency = <400000>; 256 status = "okay"; 257 258 lt9611_codec: hdmi-bridge@2b { 259 compatible = "lontium,lt9611uxc"; 260 reg = <0x2b>; 261 interrupts-extended = <&tlmm 46 IRQ_TYPE_EDGE_FALLING>; 262 reset-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>; 263 264 vdd-supply = <&vreg_hdmi_out_1p2>; 265 vcc-supply = <<9611_3v3>; 266 267 pinctrl-0 = <<9611_irq_pin <9611_rst_pin>; 268 pinctrl-names = "default"; 269 #sound-dai-cells = <1>; 270 271 ports { 272 #address-cells = <1>; 273 #size-cells = <0>; 274 275 port@0 { 276 reg = <0>; 277 278 lt9611_a: endpoint { 279 remote-endpoint = <&mdss_dsi0_out>; 280 }; 281 }; 282 283 port@2 { 284 reg = <2>; 285 286 lt9611_out: endpoint { 287 remote-endpoint = <&hdmi_con>; 288 }; 289 }; 290 }; 291 }; 292}; 293 294&mdss { 295 status = "okay"; 296}; 297 298&mdss_dsi0 { 299 vdda-supply = <&vreg_l18a_1p232>; 300 status = "okay"; 301}; 302 303&mdss_dsi0_out { 304 remote-endpoint = <<9611_a>; 305 data-lanes = <0 1 2 3>; 306}; 307 308&mdss_dsi0_phy { 309 status = "okay"; 310}; 311 312&pm6125_gpios { 313 kypd_vol_up_n: kypd-vol-up-n-state { 314 pins = "gpio5"; 315 function = "normal"; 316 power-source = <0>; 317 bias-pull-up; 318 input-enable; 319 }; 320}; 321 322&pmi632_typec { 323 status = "okay"; 324 325 connector { 326 compatible = "usb-c-connector"; 327 328 power-role = "dual"; 329 data-role = "dual"; 330 self-powered; 331 332 typec-power-opmode = "default"; 333 pd-disable; 334 335 ports { 336 #address-cells = <1>; 337 #size-cells = <0>; 338 339 port@0 { 340 reg = <0>; 341 pmi632_hs_in: endpoint { 342 remote-endpoint = <&usb_dwc3_hs>; 343 }; 344 }; 345 346 port@1 { 347 reg = <1>; 348 pmi632_ss_in: endpoint { 349 remote-endpoint = <&usb_qmpphy_out>; 350 }; 351 }; 352 }; 353 }; 354}; 355 356&pmi632_vbus { 357 regulator-min-microamp = <500000>; 358 regulator-max-microamp = <1000000>; 359 status = "okay"; 360}; 361 362&pon_pwrkey { 363 status = "okay"; 364}; 365 366&pon_resin { 367 linux,code = <KEY_VOLUMEDOWN>; 368 status = "okay"; 369}; 370 371/* SECONDARY I2S uses 1 I2S SD Line for audio on LT9611UXC HDMI Bridge */ 372&q6afedai { 373 dai@20 { 374 reg = <SECONDARY_MI2S_RX>; 375 qcom,sd-lines = <0>; 376 }; 377}; 378 379&qupv3_id_0 { 380 status = "okay"; 381}; 382 383&remoteproc_adsp { 384 firmware-name = "qcom/qrb4210/adsp.mbn"; 385 386 status = "okay"; 387}; 388 389&remoteproc_cdsp { 390 firmware-name = "qcom/qrb4210/cdsp.mbn"; 391 392 status = "okay"; 393}; 394 395&remoteproc_mpss { 396 firmware-name = "qcom/qrb4210/modem.mbn"; 397 398 status = "okay"; 399}; 400 401&rpm_requests { 402 regulators { 403 compatible = "qcom,rpm-pm6125-regulators"; 404 405 vdd-s1-supply = <&vph_pwr>; 406 vdd-s2-supply = <&vph_pwr>; 407 vdd-s3-supply = <&vph_pwr>; 408 vdd-s4-supply = <&vph_pwr>; 409 vdd-s5-supply = <&vph_pwr>; 410 vdd-s6-supply = <&vph_pwr>; 411 vdd-s7-supply = <&vph_pwr>; 412 vdd-s8-supply = <&vph_pwr>; 413 vdd-s9-supply = <&vph_pwr>; 414 vdd-s10-supply = <&vph_pwr>; 415 416 vdd-l1-l7-l17-l18-supply = <&vreg_s6a_1p352>; 417 vdd-l2-l3-l4-supply = <&vreg_s6a_1p352>; 418 vdd-l5-l15-l19-l20-l21-l22-supply = <&vph_pwr>; 419 vdd-l6-l8-supply = <&vreg_s5a_0p848>; 420 vdd-l9-l11-supply = <&vreg_s7a_2p04>; 421 vdd-l10-l13-l14-supply = <&vreg_s7a_2p04>; 422 vdd-l12-l16-supply = <&vreg_s7a_2p04>; 423 vdd-l23-l24-supply = <&vph_pwr>; 424 425 vreg_s5a_0p848: s5 { 426 regulator-min-microvolt = <920000>; 427 regulator-max-microvolt = <1128000>; 428 }; 429 430 vreg_s6a_1p352: s6 { 431 regulator-min-microvolt = <304000>; 432 regulator-max-microvolt = <1456000>; 433 }; 434 435 vreg_s7a_2p04: s7 { 436 regulator-min-microvolt = <1280000>; 437 regulator-max-microvolt = <2080000>; 438 }; 439 440 vreg_l1a_1p0: l1 { 441 regulator-min-microvolt = <952000>; 442 regulator-max-microvolt = <1152000>; 443 }; 444 445 vreg_l4a_0p9: l4 { 446 regulator-min-microvolt = <488000>; 447 regulator-max-microvolt = <1000000>; 448 }; 449 450 vreg_l5a_2p96: l5 { 451 regulator-min-microvolt = <1648000>; 452 regulator-max-microvolt = <3056000>; 453 regulator-allow-set-load; 454 }; 455 456 vreg_l6a_0p6: l6 { 457 regulator-min-microvolt = <576000>; 458 regulator-max-microvolt = <656000>; 459 }; 460 461 vreg_l7a_1p256: l7 { 462 regulator-min-microvolt = <1200000>; 463 regulator-max-microvolt = <1304000>; 464 }; 465 466 vreg_l8a_0p664: l8 { 467 regulator-min-microvolt = <640000>; 468 regulator-max-microvolt = <640000>; 469 }; 470 471 vreg_l9a_1p8: l9 { 472 regulator-min-microvolt = <1800000>; 473 regulator-max-microvolt = <1800000>; 474 regulator-allow-set-load; 475 regulator-always-on; 476 regulator-boot-on; 477 }; 478 479 vreg_l10a_1p8: l10 { 480 regulator-min-microvolt = <1704000>; 481 regulator-max-microvolt = <1904000>; 482 }; 483 484 vreg_l11a_1p8: l11 { 485 regulator-min-microvolt = <1704000>; 486 regulator-max-microvolt = <1952000>; 487 regulator-allow-set-load; 488 }; 489 490 vreg_l12a_1p8: l12 { 491 regulator-min-microvolt = <1624000>; 492 regulator-max-microvolt = <1984000>; 493 }; 494 495 vreg_l13a_1p8: l13 { 496 regulator-min-microvolt = <1504000>; 497 regulator-max-microvolt = <1952000>; 498 }; 499 500 vreg_l14a_1p8: l14 { 501 regulator-min-microvolt = <1704000>; 502 regulator-max-microvolt = <1904000>; 503 }; 504 505 vreg_l15a_3p128: l15 { 506 regulator-min-microvolt = <2920000>; 507 regulator-max-microvolt = <3232000>; 508 }; 509 510 vreg_l16a_1p3: l16 { 511 regulator-min-microvolt = <1704000>; 512 regulator-max-microvolt = <1904000>; 513 regulator-allow-set-load; 514 }; 515 516 vreg_l17a_1p3: l17 { 517 regulator-min-microvolt = <1152000>; 518 regulator-max-microvolt = <1384000>; 519 regulator-allow-set-load; 520 }; 521 522 vreg_l18a_1p232: l18 { 523 regulator-min-microvolt = <1104000>; 524 regulator-max-microvolt = <1312000>; 525 }; 526 527 vreg_l19a_1p8: l19 { 528 regulator-min-microvolt = <1624000>; 529 regulator-max-microvolt = <3304000>; 530 }; 531 532 vreg_l20a_1p8: l20 { 533 regulator-min-microvolt = <1624000>; 534 regulator-max-microvolt = <3304000>; 535 }; 536 537 vreg_l21a_2p704: l21 { 538 regulator-min-microvolt = <2400000>; 539 regulator-max-microvolt = <3600000>; 540 }; 541 542 vreg_l22a_2p96: l22 { 543 regulator-min-microvolt = <2952000>; 544 regulator-max-microvolt = <3304000>; 545 regulator-system-load = <100000>; 546 regulator-allow-set-load; 547 }; 548 549 vreg_l23a_3p3: l23 { 550 regulator-min-microvolt = <3312000>; 551 regulator-max-microvolt = <3312000>; 552 regulator-allow-set-load; 553 }; 554 555 vreg_l24a_2p96: l24 { 556 regulator-min-microvolt = <2704000>; 557 regulator-max-microvolt = <3600000>; 558 regulator-system-load = <100000>; 559 regulator-allow-set-load; 560 }; 561 }; 562}; 563 564&sdhc_1 { 565 pinctrl-0 = <&sdc1_state_on>; 566 pinctrl-1 = <&sdc1_state_off>; 567 pinctrl-names = "default", "sleep"; 568 569 vmmc-supply = <&vreg_l24a_2p96>; 570 vqmmc-supply = <&vreg_l11a_1p8>; 571 no-sdio; 572 non-removable; 573 574 status = "okay"; 575}; 576 577&sdhc_2 { 578 cd-gpios = <&tlmm 88 GPIO_ACTIVE_LOW>; /* card detect gpio */ 579 580 pinctrl-0 = <&sdc2_state_on &sdc2_card_det_n>; 581 pinctrl-1 = <&sdc2_state_off &sdc2_card_det_n>; 582 pinctrl-names = "default", "sleep"; 583 584 vmmc-supply = <&vreg_l22a_2p96>; 585 vqmmc-supply = <&vreg_l5a_2p96>; 586 no-sdio; 587 588 status = "okay"; 589}; 590 591&spi5 { 592 status = "okay"; 593 594 can@0 { 595 compatible = "microchip,mcp2518fd"; 596 reg = <0>; 597 interrupts-extended = <&tlmm 39 IRQ_TYPE_LEVEL_LOW>; 598 clocks = <&clk40m>; 599 spi-max-frequency = <10000000>; 600 vdd-supply = <&vdc_5v>; 601 xceiver-supply = <&vdc_5v>; 602 }; 603}; 604 605&sleep_clk { 606 clock-frequency = <32764>; 607}; 608 609&tlmm { 610 gpio-reserved-ranges = <43 2>, <49 1>, <54 1>, 611 <56 3>, <61 2>, <64 1>, 612 <68 1>, <72 8>, <96 1>; 613 614 uart3_default: uart3-default-state { 615 cts-pins { 616 pins = "gpio8"; 617 function = "qup3"; 618 drive-strength = <2>; 619 bias-bus-hold; 620 }; 621 622 rts-pins { 623 pins = "gpio9"; 624 function = "qup3"; 625 drive-strength = <2>; 626 bias-disable; 627 }; 628 629 tx-pins { 630 pins = "gpio10"; 631 function = "qup3"; 632 drive-strength = <2>; 633 bias-disable; 634 }; 635 636 rx-pins { 637 pins = "gpio11"; 638 function = "qup3"; 639 drive-strength = <2>; 640 bias-pull-up; 641 }; 642 }; 643 644 uart3_sleep: uart3-sleep-state { 645 cts-pins { 646 pins = "gpio8"; 647 function = "gpio"; 648 drive-strength = <2>; 649 bias-bus-hold; 650 }; 651 652 rts-pins { 653 pins = "gpio9"; 654 function = "gpio"; 655 drive-strength = <2>; 656 bias-pull-down; 657 }; 658 659 tx-pins { 660 pins = "gpio10"; 661 function = "gpio"; 662 drive-strength = <2>; 663 bias-pull-up; 664 }; 665 666 rx-pins { 667 pins = "gpio11"; 668 function = "gpio"; 669 drive-strength = <2>; 670 bias-pull-up; 671 }; 672 }; 673 674 lt9611_rst_pin: lt9611-rst-state { 675 pins = "gpio41"; 676 function = "gpio"; 677 input-disable; 678 output-high; 679 }; 680 681 lt9611_irq_pin: lt9611-irq-state { 682 pins = "gpio46"; 683 function = "gpio"; 684 bias-disable; 685 }; 686 687 sdc2_card_det_n: sd-card-det-n-state { 688 pins = "gpio88"; 689 function = "gpio"; 690 drive-strength = <2>; 691 bias-pull-up; 692 }; 693}; 694 695&uart3 { 696 interrupts-extended = <&intc GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>, 697 <&tlmm 11 IRQ_TYPE_LEVEL_HIGH>; 698 pinctrl-0 = <&uart3_default>; 699 pinctrl-1 = <&uart3_sleep>; 700 pinctrl-names = "default", "sleep"; 701 status = "okay"; 702 703 bluetooth { 704 compatible = "qcom,wcn3988-bt"; 705 706 vddio-supply = <&vreg_l9a_1p8>; 707 vddxo-supply = <&vreg_l16a_1p3>; 708 vddrf-supply = <&vreg_l17a_1p3>; 709 vddch0-supply = <&vreg_l23a_3p3>; 710 enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>; 711 max-speed = <3200000>; 712 }; 713}; 714 715&uart4 { 716 status = "okay"; 717}; 718 719&usb { 720 status = "okay"; 721}; 722 723&usb_dwc3_hs { 724 remote-endpoint = <&pmi632_hs_in>; 725}; 726 727&usb_hsphy { 728 vdd-supply = <&vreg_l4a_0p9>; 729 vdda-pll-supply = <&vreg_l12a_1p8>; 730 vdda-phy-dpdm-supply = <&vreg_l15a_3p128>; 731 732 status = "okay"; 733}; 734 735&usb_qmpphy { 736 vdda-phy-supply = <&vreg_l4a_0p9>; 737 vdda-pll-supply = <&vreg_l12a_1p8>; 738 739 status = "okay"; 740}; 741 742&usb_qmpphy_out { 743 remote-endpoint = <&pmi632_ss_in>; 744}; 745 746&wifi { 747 vdd-0.8-cx-mx-supply = <&vreg_l8a_0p664>; 748 vdd-1.8-xo-supply = <&vreg_l16a_1p3>; 749 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>; 750 vdd-3.3-ch0-supply = <&vreg_l23a_3p3>; 751 qcom,calibration-variant = "Thundercomm_RB2"; 752 firmware-name = "qrb4210"; 753 754 status = "okay"; 755}; 756 757&xo_board { 758 clock-frequency = <19200000>; 759}; 760