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