1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2/* 3 * Copyright (C) STMicroelectronics 2019 - All Rights Reserved 4 * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics. 5 */ 6 7#include <dt-bindings/gpio/gpio.h> 8#include <dt-bindings/mfd/st,stpmic1.h> 9 10/ { 11 memory@c0000000 { 12 device_type = "memory"; 13 reg = <0xc0000000 0x20000000>; 14 }; 15 16 reserved-memory { 17 #address-cells = <1>; 18 #size-cells = <1>; 19 ranges; 20 21 mcuram2: mcuram2@10000000 { 22 compatible = "shared-dma-pool"; 23 reg = <0x10000000 0x40000>; 24 no-map; 25 }; 26 27 vdev0vring0: vdev0vring0@10040000 { 28 compatible = "shared-dma-pool"; 29 reg = <0x10040000 0x1000>; 30 no-map; 31 }; 32 33 vdev0vring1: vdev0vring1@10041000 { 34 compatible = "shared-dma-pool"; 35 reg = <0x10041000 0x1000>; 36 no-map; 37 }; 38 39 vdev0buffer: vdev0buffer@10042000 { 40 compatible = "shared-dma-pool"; 41 reg = <0x10042000 0x4000>; 42 no-map; 43 }; 44 45 mcuram: mcuram@30000000 { 46 compatible = "shared-dma-pool"; 47 reg = <0x30000000 0x40000>; 48 no-map; 49 }; 50 51 retram: retram@38000000 { 52 compatible = "shared-dma-pool"; 53 reg = <0x38000000 0x10000>; 54 no-map; 55 }; 56 57 gpu_reserved: gpu@d4000000 { 58 reg = <0xd4000000 0x4000000>; 59 no-map; 60 }; 61 }; 62 63 led { 64 compatible = "gpio-leds"; 65 led-blue { 66 label = "heartbeat"; 67 gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>; 68 linux,default-trigger = "heartbeat"; 69 default-state = "off"; 70 status = "disabled"; 71 }; 72 }; 73 74 sound { 75 compatible = "audio-graph-card"; 76 label = "STM32MP1-DK"; 77 routing = 78 "Playback" , "MCLK", 79 "Capture" , "MCLK", 80 "MICL" , "Mic Bias"; 81 dais = <&sai2a_port &sai2b_port &i2s2_port>; 82 status = "disabled"; 83 }; 84 85 vin: vin { 86 compatible = "regulator-fixed"; 87 regulator-name = "vin"; 88 regulator-min-microvolt = <5000000>; 89 regulator-max-microvolt = <5000000>; 90 regulator-always-on; 91 }; 92}; 93 94&adc { 95 pinctrl-names = "default"; 96 pinctrl-0 = <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>; 97 vdd-supply = <&vdd>; 98 vdda-supply = <&vdd>; 99 vref-supply = <&vrefbuf>; 100 status = "disabled"; 101 adc1: adc@0 { 102 /* 103 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19. 104 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C: 105 * 5 * (56 + 47kOhms) * 5pF => 2.5us. 106 * Use arbitrary margin here (e.g. 5us). 107 */ 108 st,min-sample-time-nsecs = <5000>; 109 /* AIN connector, USB Type-C CC1 & CC2 */ 110 st,adc-channels = <0 1 6 13 18 19>; 111 status = "okay"; 112 }; 113 adc2: adc@100 { 114 /* AIN connector, USB Type-C CC1 & CC2 */ 115 st,adc-channels = <0 1 2 6 18 19>; 116 st,min-sample-time-nsecs = <5000>; 117 status = "okay"; 118 }; 119}; 120 121&cec { 122 pinctrl-names = "default", "sleep"; 123 pinctrl-0 = <&cec_pins_b>; 124 pinctrl-1 = <&cec_sleep_pins_b>; 125 status = "disabled"; 126}; 127 128&crc1 { 129 status = "disabled"; 130}; 131 132&dts { 133 status = "disabled"; 134}; 135 136ðernet0 { 137 status = "disabled"; 138 pinctrl-0 = <ðernet0_rgmii_pins_a>; 139 pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>; 140 pinctrl-names = "default", "sleep"; 141 phy-mode = "rgmii-id"; 142 max-speed = <1000>; 143 phy-handle = <&phy0>; 144 145 mdio0 { 146 #address-cells = <1>; 147 #size-cells = <0>; 148 compatible = "snps,dwmac-mdio"; 149 phy0: ethernet-phy@0 { 150 reg = <0>; 151 }; 152 }; 153}; 154 155&gpu { 156 contiguous-area = <&gpu_reserved>; 157}; 158 159&hash1 { 160 status = "disabled"; 161}; 162 163&i2c1 { 164 pinctrl-names = "default", "sleep"; 165 pinctrl-0 = <&i2c1_pins_a>; 166 pinctrl-1 = <&i2c1_sleep_pins_a>; 167 i2c-scl-rising-time-ns = <100>; 168 i2c-scl-falling-time-ns = <7>; 169 status = "disabled"; 170 /delete-property/dmas; 171 /delete-property/dma-names; 172 173 hdmi-transmitter@39 { 174 compatible = "sil,sii9022"; 175 reg = <0x39>; 176 iovcc-supply = <&v3v3_hdmi>; 177 cvcc12-supply = <&v1v2_hdmi>; 178 reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>; 179 interrupts = <1 IRQ_TYPE_EDGE_FALLING>; 180 interrupt-parent = <&gpiog>; 181 #sound-dai-cells = <0>; 182 status = "okay"; 183 184 ports { 185 #address-cells = <1>; 186 #size-cells = <0>; 187 188 port@0 { 189 reg = <0>; 190 sii9022_in: endpoint { 191 remote-endpoint = <<dc_ep0_out>; 192 }; 193 }; 194 195 port@3 { 196 reg = <3>; 197 sii9022_tx_endpoint: endpoint { 198 remote-endpoint = <&i2s2_endpoint>; 199 }; 200 }; 201 }; 202 }; 203 204 cs42l51: cs42l51@4a { 205 compatible = "cirrus,cs42l51"; 206 reg = <0x4a>; 207 #sound-dai-cells = <0>; 208 VL-supply = <&v3v3>; 209 VD-supply = <&v1v8_audio>; 210 VA-supply = <&v1v8_audio>; 211 VAHP-supply = <&v1v8_audio>; 212 reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>; 213 clocks = <&sai2a>; 214 clock-names = "MCLK"; 215 status = "okay"; 216 217 cs42l51_port: port { 218 #address-cells = <1>; 219 #size-cells = <0>; 220 221 cs42l51_tx_endpoint: endpoint@0 { 222 reg = <0>; 223 remote-endpoint = <&sai2a_endpoint>; 224 frame-master = <&cs42l51_tx_endpoint>; 225 bitclock-master = <&cs42l51_tx_endpoint>; 226 }; 227 228 cs42l51_rx_endpoint: endpoint@1 { 229 reg = <1>; 230 remote-endpoint = <&sai2b_endpoint>; 231 frame-master = <&cs42l51_rx_endpoint>; 232 bitclock-master = <&cs42l51_rx_endpoint>; 233 }; 234 }; 235 }; 236}; 237 238&i2c4 { 239 pinctrl-names = "default", "sleep"; 240 pinctrl-0 = <&i2c4_pins_a>; 241 pinctrl-1 = <&i2c4_sleep_pins_a>; 242 i2c-scl-rising-time-ns = <185>; 243 i2c-scl-falling-time-ns = <20>; 244 clock-frequency = <400000>; 245 status = "okay"; 246 /* spare dmas for other usage */ 247 /delete-property/dmas; 248 /delete-property/dma-names; 249 250 stusb1600@28 { 251 compatible = "st,stusb1600"; 252 reg = <0x28>; 253 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 254 interrupt-parent = <&gpioi>; 255 pinctrl-names = "default"; 256 pinctrl-0 = <&stusb1600_pins_a>; 257 status = "okay"; 258 vdd-supply = <&vin>; 259 260 connector { 261 compatible = "usb-c-connector"; 262 label = "USB-C"; 263 power-role = "dual"; 264 typec-power-opmode = "default"; 265 266 port { 267 con_usbotg_hs_ep: endpoint { 268 remote-endpoint = <&usbotg_hs_ep>; 269 }; 270 }; 271 }; 272 }; 273 274 pmic: stpmic@33 { 275 compatible = "st,stpmic1"; 276 reg = <0x33>; 277 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>; 278 interrupt-controller; 279 #interrupt-cells = <2>; 280 status = "okay"; 281 282 regulators { 283 compatible = "st,stpmic1-regulators"; 284 buck1-supply = <&vin>; 285 buck2-supply = <&vin>; 286 buck3-supply = <&vin>; 287 buck4-supply = <&vin>; 288 ldo1-supply = <&v3v3>; 289 ldo2-supply = <&vin>; 290 ldo3-supply = <&vdd_ddr>; 291 ldo4-supply = <&vin>; 292 ldo5-supply = <&vin>; 293 ldo6-supply = <&v3v3>; 294 vref_ddr-supply = <&vin>; 295 boost-supply = <&vin>; 296 pwr_sw1-supply = <&bst_out>; 297 pwr_sw2-supply = <&bst_out>; 298 299 vddcore: buck1 { 300 regulator-name = "vddcore"; 301 regulator-min-microvolt = <1200000>; 302 regulator-max-microvolt = <1350000>; 303 regulator-always-on; 304 regulator-initial-mode = <0>; 305 regulator-over-current-protection; 306 }; 307 308 vdd_ddr: buck2 { 309 regulator-name = "vdd_ddr"; 310 regulator-min-microvolt = <1350000>; 311 regulator-max-microvolt = <1350000>; 312 regulator-always-on; 313 regulator-initial-mode = <0>; 314 regulator-over-current-protection; 315 }; 316 317 vdd: buck3 { 318 regulator-name = "vdd"; 319 regulator-min-microvolt = <3300000>; 320 regulator-max-microvolt = <3300000>; 321 regulator-always-on; 322 st,mask-reset; 323 regulator-initial-mode = <0>; 324 regulator-over-current-protection; 325 }; 326 327 v3v3: buck4 { 328 regulator-name = "v3v3"; 329 regulator-min-microvolt = <3300000>; 330 regulator-max-microvolt = <3300000>; 331 regulator-always-on; 332 regulator-over-current-protection; 333 regulator-initial-mode = <0>; 334 }; 335 336 v1v8_audio: ldo1 { 337 regulator-name = "v1v8_audio"; 338 regulator-min-microvolt = <1800000>; 339 regulator-max-microvolt = <1800000>; 340 regulator-always-on; 341 interrupts = <IT_CURLIM_LDO1 0>; 342 }; 343 344 v3v3_hdmi: ldo2 { 345 regulator-name = "v3v3_hdmi"; 346 regulator-min-microvolt = <3300000>; 347 regulator-max-microvolt = <3300000>; 348 regulator-always-on; 349 interrupts = <IT_CURLIM_LDO2 0>; 350 }; 351 352 vtt_ddr: ldo3 { 353 regulator-name = "vtt_ddr"; 354 regulator-min-microvolt = <500000>; 355 regulator-max-microvolt = <750000>; 356 regulator-always-on; 357 regulator-over-current-protection; 358 }; 359 360 vdd_usb: ldo4 { 361 regulator-name = "vdd_usb"; 362 interrupts = <IT_CURLIM_LDO4 0>; 363 regulator-always-on; 364 }; 365 366 vdda: ldo5 { 367 regulator-name = "vdda"; 368 regulator-min-microvolt = <2900000>; 369 regulator-max-microvolt = <2900000>; 370 interrupts = <IT_CURLIM_LDO5 0>; 371 regulator-boot-on; 372 }; 373 374 v1v2_hdmi: ldo6 { 375 regulator-name = "v1v2_hdmi"; 376 regulator-min-microvolt = <1200000>; 377 regulator-max-microvolt = <1200000>; 378 regulator-always-on; 379 interrupts = <IT_CURLIM_LDO6 0>; 380 }; 381 382 vref_ddr: vref_ddr { 383 regulator-name = "vref_ddr"; 384 regulator-always-on; 385 }; 386 387 bst_out: boost { 388 regulator-name = "bst_out"; 389 interrupts = <IT_OCP_BOOST 0>; 390 }; 391 392 vbus_otg: pwr_sw1 { 393 regulator-name = "vbus_otg"; 394 interrupts = <IT_OCP_OTG 0>; 395 }; 396 397 vbus_sw: pwr_sw2 { 398 regulator-name = "vbus_sw"; 399 interrupts = <IT_OCP_SWOUT 0>; 400 regulator-active-discharge = <1>; 401 }; 402 }; 403 404 onkey { 405 compatible = "st,stpmic1-onkey"; 406 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>; 407 interrupt-names = "onkey-falling", "onkey-rising"; 408 power-off-time-sec = <10>; 409 status = "okay"; 410 }; 411 412 watchdog { 413 compatible = "st,stpmic1-wdt"; 414 status = "disabled"; 415 }; 416 }; 417}; 418 419&i2c5 { 420 pinctrl-names = "default", "sleep"; 421 pinctrl-0 = <&i2c5_pins_a>; 422 pinctrl-1 = <&i2c5_sleep_pins_a>; 423 i2c-scl-rising-time-ns = <185>; 424 i2c-scl-falling-time-ns = <20>; 425 clock-frequency = <400000>; 426 /* spare dmas for other usage */ 427 /delete-property/dmas; 428 /delete-property/dma-names; 429 status = "disabled"; 430}; 431 432&i2s2 { 433 clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; 434 clock-names = "pclk", "i2sclk", "x8k", "x11k"; 435 pinctrl-names = "default", "sleep"; 436 pinctrl-0 = <&i2s2_pins_a>; 437 pinctrl-1 = <&i2s2_sleep_pins_a>; 438 status = "disabled"; 439 440 i2s2_port: port { 441 i2s2_endpoint: endpoint { 442 remote-endpoint = <&sii9022_tx_endpoint>; 443 format = "i2s"; 444 mclk-fs = <256>; 445 }; 446 }; 447}; 448 449&ipcc { 450 status = "disabled"; 451}; 452 453&iwdg1 { 454 timeout-sec = <32>; 455}; 456 457&iwdg2 { 458 timeout-sec = <32>; 459 status = "okay"; 460 secure-status = "disabled"; 461}; 462 463<dc { 464 pinctrl-names = "default", "sleep"; 465 pinctrl-0 = <<dc_pins_a>; 466 pinctrl-1 = <<dc_sleep_pins_a>; 467 status = "disabled"; 468 469 port { 470 ltdc_ep0_out: endpoint@0 { 471 reg = <0>; 472 remote-endpoint = <&sii9022_in>; 473 }; 474 }; 475}; 476 477&m4_rproc { 478 memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>, 479 <&vdev0vring1>, <&vdev0buffer>; 480 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>; 481 mbox-names = "vq0", "vq1", "shutdown", "detach"; 482 interrupt-parent = <&exti>; 483 interrupts = <68 1>; 484 status = "okay"; 485}; 486 487&pwr_regulators { 488 vdd-supply = <&vdd>; 489 vdd_3v3_usbfs-supply = <&vdd_usb>; 490}; 491 492&rcc { 493 compatible = "st,stm32mp1-rcc-secure"; 494 status = "okay"; 495}; 496 497&rng1 { 498 status = "okay"; 499}; 500 501&rtc { 502 status = "okay"; 503}; 504 505&sai2 { 506 clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; 507 clock-names = "pclk", "x8k", "x11k"; 508 pinctrl-names = "default", "sleep"; 509 pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; 510 pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; 511 status = "disabled"; 512 513 sai2a: audio-controller@4400b004 { 514 #clock-cells = <0>; 515 dma-names = "tx"; 516 clocks = <&rcc SAI2_K>; 517 clock-names = "sai_ck"; 518 status = "okay"; 519 520 sai2a_port: port { 521 sai2a_endpoint: endpoint { 522 remote-endpoint = <&cs42l51_tx_endpoint>; 523 format = "i2s"; 524 mclk-fs = <256>; 525 dai-tdm-slot-num = <2>; 526 dai-tdm-slot-width = <32>; 527 }; 528 }; 529 }; 530 531 sai2b: audio-controller@4400b024 { 532 dma-names = "rx"; 533 st,sync = <&sai2a 2>; 534 clocks = <&rcc SAI2_K>, <&sai2a>; 535 clock-names = "sai_ck", "MCLK"; 536 status = "okay"; 537 538 sai2b_port: port { 539 sai2b_endpoint: endpoint { 540 remote-endpoint = <&cs42l51_rx_endpoint>; 541 format = "i2s"; 542 mclk-fs = <256>; 543 dai-tdm-slot-num = <2>; 544 dai-tdm-slot-width = <32>; 545 }; 546 }; 547 }; 548}; 549 550&sdmmc1 { 551 pinctrl-names = "default", "opendrain", "sleep"; 552 pinctrl-0 = <&sdmmc1_b4_pins_a>; 553 pinctrl-1 = <&sdmmc1_b4_od_pins_a>; 554 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; 555 cd-gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 556 disable-wp; 557 st,neg-edge; 558 bus-width = <4>; 559 vmmc-supply = <&v3v3>; 560 status = "disabled"; 561}; 562 563&sdmmc3 { 564 pinctrl-names = "default", "opendrain", "sleep"; 565 pinctrl-0 = <&sdmmc3_b4_pins_a>; 566 pinctrl-1 = <&sdmmc3_b4_od_pins_a>; 567 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; 568 broken-cd; 569 st,neg-edge; 570 bus-width = <4>; 571 vmmc-supply = <&v3v3>; 572 status = "disabled"; 573}; 574 575&timers1 { 576 /* spare dmas for other usage */ 577 /delete-property/dmas; 578 /delete-property/dma-names; 579 status = "disabled"; 580 pwm { 581 pinctrl-0 = <&pwm1_pins_a>; 582 pinctrl-1 = <&pwm1_sleep_pins_a>; 583 pinctrl-names = "default", "sleep"; 584 status = "okay"; 585 }; 586 timer@0 { 587 status = "okay"; 588 }; 589}; 590 591&timers3 { 592 /delete-property/dmas; 593 /delete-property/dma-names; 594 status = "disabled"; 595 pwm { 596 pinctrl-0 = <&pwm3_pins_a>; 597 pinctrl-1 = <&pwm3_sleep_pins_a>; 598 pinctrl-names = "default", "sleep"; 599 status = "okay"; 600 }; 601 timer@2 { 602 status = "okay"; 603 }; 604}; 605 606&timers4 { 607 /delete-property/dmas; 608 /delete-property/dma-names; 609 status = "disabled"; 610 pwm { 611 pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>; 612 pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>; 613 pinctrl-names = "default", "sleep"; 614 status = "okay"; 615 }; 616 timer@3 { 617 status = "okay"; 618 }; 619}; 620 621&timers5 { 622 /delete-property/dmas; 623 /delete-property/dma-names; 624 status = "disabled"; 625 pwm { 626 pinctrl-0 = <&pwm5_pins_a>; 627 pinctrl-1 = <&pwm5_sleep_pins_a>; 628 pinctrl-names = "default", "sleep"; 629 status = "okay"; 630 }; 631 timer@4 { 632 status = "okay"; 633 }; 634}; 635 636&timers6 { 637 /delete-property/dmas; 638 /delete-property/dma-names; 639 status = "disabled"; 640 timer@5 { 641 status = "okay"; 642 }; 643}; 644 645&timers12 { 646 /delete-property/dmas; 647 /delete-property/dma-names; 648 status = "disabled"; 649 pwm { 650 pinctrl-0 = <&pwm12_pins_a>; 651 pinctrl-1 = <&pwm12_sleep_pins_a>; 652 pinctrl-names = "default", "sleep"; 653 status = "okay"; 654 }; 655 timer@11 { 656 status = "okay"; 657 }; 658}; 659 660&uart4 { 661 pinctrl-names = "default", "sleep", "idle"; 662 pinctrl-0 = <&uart4_pins_a>; 663 pinctrl-1 = <&uart4_sleep_pins_a>; 664 pinctrl-2 = <&uart4_idle_pins_a>; 665 /delete-property/dmas; 666 /delete-property/dma-names; 667 status = "okay"; 668}; 669 670&uart7 { 671 pinctrl-names = "default", "sleep", "idle"; 672 pinctrl-0 = <&uart7_pins_c>; 673 pinctrl-1 = <&uart7_sleep_pins_c>; 674 pinctrl-2 = <&uart7_idle_pins_c>; 675 /delete-property/dmas; 676 /delete-property/dma-names; 677 status = "disabled"; 678}; 679 680&usart3 { 681 pinctrl-names = "default", "sleep", "idle"; 682 pinctrl-0 = <&usart3_pins_c>; 683 pinctrl-1 = <&usart3_sleep_pins_c>; 684 pinctrl-2 = <&usart3_idle_pins_c>; 685 uart-has-rtscts; 686 status = "disabled"; 687}; 688 689&usbh_ehci { 690 phys = <&usbphyc_port0>; 691 status = "disabled"; 692}; 693 694&usbotg_hs { 695 phys = <&usbphyc_port1 0>; 696 phy-names = "usb2-phy"; 697 usb-role-switch; 698 status = "disabled"; 699 700 port { 701 usbotg_hs_ep: endpoint { 702 remote-endpoint = <&con_usbotg_hs_ep>; 703 }; 704 }; 705}; 706 707&usbphyc { 708 status = "disabled"; 709}; 710 711&usbphyc_port0 { 712 phy-supply = <&vdd_usb>; 713 st,tune-hs-dc-level = <2>; 714 st,enable-fs-rftime-tuning; 715 st,enable-hs-rftime-reduction; 716 st,trim-hs-current = <15>; 717 st,trim-hs-impedance = <1>; 718 st,tune-squelch-level = <3>; 719 st,tune-hs-rx-offset = <2>; 720 st,no-lsfs-sc; 721}; 722 723&usbphyc_port1 { 724 phy-supply = <&vdd_usb>; 725 st,tune-hs-dc-level = <2>; 726 st,enable-fs-rftime-tuning; 727 st,enable-hs-rftime-reduction; 728 st,trim-hs-current = <15>; 729 st,trim-hs-impedance = <1>; 730 st,tune-squelch-level = <3>; 731 st,tune-hs-rx-offset = <2>; 732 st,no-lsfs-sc; 733}; 734 735&vrefbuf { 736 regulator-min-microvolt = <2500000>; 737 regulator-max-microvolt = <2500000>; 738 vdda-supply = <&vdd>; 739 status = "okay"; 740}; 741