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 compatible = "st,stm32mp15-i2c-non-secure"; 246 pinctrl-names = "default", "sleep"; 247 pinctrl-0 = <&i2c4_pins_a>; 248 pinctrl-1 = <&i2c4_sleep_pins_a>; 249 i2c-scl-rising-time-ns = <185>; 250 i2c-scl-falling-time-ns = <20>; 251 clock-frequency = <400000>; 252 status = "okay"; 253 /* spare dmas for other usage */ 254 /delete-property/dmas; 255 /delete-property/dma-names; 256 257 stusb1600@28 { 258 compatible = "st,stusb1600"; 259 reg = <0x28>; 260 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 261 interrupt-parent = <&gpioi>; 262 pinctrl-names = "default"; 263 pinctrl-0 = <&stusb1600_pins_a>; 264 status = "okay"; 265 vdd-supply = <&vin>; 266 267 connector { 268 compatible = "usb-c-connector"; 269 label = "USB-C"; 270 power-role = "dual"; 271 typec-power-opmode = "default"; 272 273 port { 274 con_usbotg_hs_ep: endpoint { 275 remote-endpoint = <&usbotg_hs_ep>; 276 }; 277 }; 278 }; 279 }; 280 281 pmic: stpmic@33 { 282 compatible = "st,stpmic1"; 283 reg = <0x33>; 284 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>; 285 interrupt-controller; 286 #interrupt-cells = <2>; 287 status = "okay"; 288 289 regulators { 290 compatible = "st,stpmic1-regulators"; 291 buck1-supply = <&vin>; 292 buck2-supply = <&vin>; 293 buck3-supply = <&vin>; 294 buck4-supply = <&vin>; 295 ldo1-supply = <&v3v3>; 296 ldo2-supply = <&vin>; 297 ldo3-supply = <&vdd_ddr>; 298 ldo4-supply = <&vin>; 299 ldo5-supply = <&vin>; 300 ldo6-supply = <&v3v3>; 301 vref_ddr-supply = <&vin>; 302 boost-supply = <&vin>; 303 pwr_sw1-supply = <&bst_out>; 304 pwr_sw2-supply = <&bst_out>; 305 306 vddcore: buck1 { 307 regulator-name = "vddcore"; 308 regulator-min-microvolt = <1200000>; 309 regulator-max-microvolt = <1350000>; 310 regulator-always-on; 311 regulator-initial-mode = <0>; 312 regulator-over-current-protection; 313 }; 314 315 vdd_ddr: buck2 { 316 regulator-name = "vdd_ddr"; 317 regulator-min-microvolt = <1350000>; 318 regulator-max-microvolt = <1350000>; 319 regulator-always-on; 320 regulator-initial-mode = <0>; 321 regulator-over-current-protection; 322 }; 323 324 vdd: buck3 { 325 regulator-name = "vdd"; 326 regulator-min-microvolt = <3300000>; 327 regulator-max-microvolt = <3300000>; 328 regulator-always-on; 329 st,mask-reset; 330 regulator-initial-mode = <0>; 331 regulator-over-current-protection; 332 }; 333 334 v3v3: buck4 { 335 regulator-name = "v3v3"; 336 regulator-min-microvolt = <3300000>; 337 regulator-max-microvolt = <3300000>; 338 regulator-always-on; 339 regulator-over-current-protection; 340 regulator-initial-mode = <0>; 341 }; 342 343 v1v8_audio: ldo1 { 344 regulator-name = "v1v8_audio"; 345 regulator-min-microvolt = <1800000>; 346 regulator-max-microvolt = <1800000>; 347 regulator-always-on; 348 interrupts = <IT_CURLIM_LDO1 0>; 349 }; 350 351 v3v3_hdmi: ldo2 { 352 regulator-name = "v3v3_hdmi"; 353 regulator-min-microvolt = <3300000>; 354 regulator-max-microvolt = <3300000>; 355 regulator-always-on; 356 interrupts = <IT_CURLIM_LDO2 0>; 357 }; 358 359 vtt_ddr: ldo3 { 360 regulator-name = "vtt_ddr"; 361 regulator-min-microvolt = <500000>; 362 regulator-max-microvolt = <750000>; 363 regulator-always-on; 364 regulator-over-current-protection; 365 }; 366 367 vdd_usb: ldo4 { 368 regulator-name = "vdd_usb"; 369 interrupts = <IT_CURLIM_LDO4 0>; 370 regulator-always-on; 371 }; 372 373 vdda: ldo5 { 374 regulator-name = "vdda"; 375 regulator-min-microvolt = <2900000>; 376 regulator-max-microvolt = <2900000>; 377 interrupts = <IT_CURLIM_LDO5 0>; 378 regulator-boot-on; 379 }; 380 381 v1v2_hdmi: ldo6 { 382 regulator-name = "v1v2_hdmi"; 383 regulator-min-microvolt = <1200000>; 384 regulator-max-microvolt = <1200000>; 385 regulator-always-on; 386 interrupts = <IT_CURLIM_LDO6 0>; 387 }; 388 389 vref_ddr: vref_ddr { 390 regulator-name = "vref_ddr"; 391 regulator-always-on; 392 }; 393 394 bst_out: boost { 395 regulator-name = "bst_out"; 396 interrupts = <IT_OCP_BOOST 0>; 397 }; 398 399 vbus_otg: pwr_sw1 { 400 regulator-name = "vbus_otg"; 401 interrupts = <IT_OCP_OTG 0>; 402 }; 403 404 vbus_sw: pwr_sw2 { 405 regulator-name = "vbus_sw"; 406 interrupts = <IT_OCP_SWOUT 0>; 407 regulator-active-discharge = <1>; 408 }; 409 }; 410 411 onkey { 412 compatible = "st,stpmic1-onkey"; 413 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>; 414 interrupt-names = "onkey-falling", "onkey-rising"; 415 power-off-time-sec = <10>; 416 status = "okay"; 417 }; 418 419 watchdog { 420 compatible = "st,stpmic1-wdt"; 421 status = "disabled"; 422 }; 423 }; 424}; 425 426&i2c5 { 427 pinctrl-names = "default", "sleep"; 428 pinctrl-0 = <&i2c5_pins_a>; 429 pinctrl-1 = <&i2c5_sleep_pins_a>; 430 i2c-scl-rising-time-ns = <185>; 431 i2c-scl-falling-time-ns = <20>; 432 clock-frequency = <400000>; 433 /* spare dmas for other usage */ 434 /delete-property/dmas; 435 /delete-property/dma-names; 436 status = "disabled"; 437}; 438 439&i2s2 { 440 clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>; 441 clock-names = "pclk", "i2sclk", "x8k", "x11k"; 442 pinctrl-names = "default", "sleep"; 443 pinctrl-0 = <&i2s2_pins_a>; 444 pinctrl-1 = <&i2s2_sleep_pins_a>; 445 status = "disabled"; 446 447 i2s2_port: port { 448 i2s2_endpoint: endpoint { 449 remote-endpoint = <&sii9022_tx_endpoint>; 450 format = "i2s"; 451 mclk-fs = <256>; 452 }; 453 }; 454}; 455 456&ipcc { 457 status = "disabled"; 458}; 459 460&iwdg1 { 461 timeout-sec = <32>; 462 status = "okay"; 463}; 464 465&iwdg2 { 466 timeout-sec = <32>; 467 status = "disabled"; 468}; 469 470<dc { 471 pinctrl-names = "default", "sleep"; 472 pinctrl-0 = <<dc_pins_a>; 473 pinctrl-1 = <<dc_sleep_pins_a>; 474 status = "disabled"; 475 476 port { 477 ltdc_ep0_out: endpoint@0 { 478 reg = <0>; 479 remote-endpoint = <&sii9022_in>; 480 }; 481 }; 482}; 483 484&m4_rproc { 485 memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>, 486 <&vdev0vring1>, <&vdev0buffer>, <&ipc_shmem>; 487 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>; 488 mbox-names = "vq0", "vq1", "shutdown", "detach"; 489 interrupt-parent = <&exti>; 490 interrupts = <68 1>; 491 status = "okay"; 492}; 493 494&pwr_regulators { 495 vdd-supply = <&vdd>; 496 vdd_3v3_usbfs-supply = <&vdd_usb>; 497}; 498 499&rcc { 500 compatible = "st,stm32mp1-rcc"; 501 status = "okay"; 502}; 503 504&rng1 { 505 status = "okay"; 506}; 507 508&rtc { 509 status = "okay"; 510}; 511 512&sai2 { 513 clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; 514 clock-names = "pclk", "x8k", "x11k"; 515 pinctrl-names = "default", "sleep"; 516 pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; 517 pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; 518 status = "disabled"; 519 520 sai2a: audio-controller@4400b004 { 521 #clock-cells = <0>; 522 dma-names = "tx"; 523 clocks = <&rcc SAI2_K>; 524 clock-names = "sai_ck"; 525 status = "okay"; 526 527 sai2a_port: port { 528 sai2a_endpoint: endpoint { 529 remote-endpoint = <&cs42l51_tx_endpoint>; 530 format = "i2s"; 531 mclk-fs = <256>; 532 dai-tdm-slot-num = <2>; 533 dai-tdm-slot-width = <32>; 534 }; 535 }; 536 }; 537 538 sai2b: audio-controller@4400b024 { 539 dma-names = "rx"; 540 st,sync = <&sai2a 2>; 541 clocks = <&rcc SAI2_K>, <&sai2a>; 542 clock-names = "sai_ck", "MCLK"; 543 status = "okay"; 544 545 sai2b_port: port { 546 sai2b_endpoint: endpoint { 547 remote-endpoint = <&cs42l51_rx_endpoint>; 548 format = "i2s"; 549 mclk-fs = <256>; 550 dai-tdm-slot-num = <2>; 551 dai-tdm-slot-width = <32>; 552 }; 553 }; 554 }; 555}; 556 557&sdmmc1 { 558 pinctrl-names = "default", "opendrain", "sleep"; 559 pinctrl-0 = <&sdmmc1_b4_pins_a>; 560 pinctrl-1 = <&sdmmc1_b4_od_pins_a>; 561 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; 562 cd-gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 563 disable-wp; 564 st,neg-edge; 565 bus-width = <4>; 566 vmmc-supply = <&v3v3>; 567 status = "disabled"; 568}; 569 570&sdmmc3 { 571 pinctrl-names = "default", "opendrain", "sleep"; 572 pinctrl-0 = <&sdmmc3_b4_pins_a>; 573 pinctrl-1 = <&sdmmc3_b4_od_pins_a>; 574 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; 575 broken-cd; 576 st,neg-edge; 577 bus-width = <4>; 578 vmmc-supply = <&v3v3>; 579 status = "disabled"; 580}; 581 582&tamp { 583 st,tamp-passive-nb-sample = <4>; 584 st,tamp-passive-sample-clk-div = <16384>; 585}; 586 587&timers1 { 588 /* spare dmas for other usage */ 589 /delete-property/dmas; 590 /delete-property/dma-names; 591 status = "disabled"; 592 pwm { 593 pinctrl-0 = <&pwm1_pins_a>; 594 pinctrl-1 = <&pwm1_sleep_pins_a>; 595 pinctrl-names = "default", "sleep"; 596 status = "okay"; 597 }; 598 timer@0 { 599 status = "okay"; 600 }; 601}; 602 603&timers3 { 604 /delete-property/dmas; 605 /delete-property/dma-names; 606 status = "disabled"; 607 pwm { 608 pinctrl-0 = <&pwm3_pins_a>; 609 pinctrl-1 = <&pwm3_sleep_pins_a>; 610 pinctrl-names = "default", "sleep"; 611 status = "okay"; 612 }; 613 timer@2 { 614 status = "okay"; 615 }; 616}; 617 618&timers4 { 619 /delete-property/dmas; 620 /delete-property/dma-names; 621 status = "disabled"; 622 pwm { 623 pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>; 624 pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>; 625 pinctrl-names = "default", "sleep"; 626 status = "okay"; 627 }; 628 timer@3 { 629 status = "okay"; 630 }; 631}; 632 633&timers5 { 634 /delete-property/dmas; 635 /delete-property/dma-names; 636 status = "disabled"; 637 pwm { 638 pinctrl-0 = <&pwm5_pins_a>; 639 pinctrl-1 = <&pwm5_sleep_pins_a>; 640 pinctrl-names = "default", "sleep"; 641 status = "okay"; 642 }; 643 timer@4 { 644 status = "okay"; 645 }; 646}; 647 648&timers6 { 649 /delete-property/dmas; 650 /delete-property/dma-names; 651 status = "disabled"; 652 timer@5 { 653 status = "okay"; 654 }; 655}; 656 657&timers12 { 658 /delete-property/dmas; 659 /delete-property/dma-names; 660 status = "disabled"; 661 pwm { 662 pinctrl-0 = <&pwm12_pins_a>; 663 pinctrl-1 = <&pwm12_sleep_pins_a>; 664 pinctrl-names = "default", "sleep"; 665 status = "okay"; 666 }; 667 timer@11 { 668 status = "okay"; 669 }; 670}; 671 672&uart4 { 673 pinctrl-names = "default", "sleep", "idle"; 674 pinctrl-0 = <&uart4_pins_a>; 675 pinctrl-1 = <&uart4_sleep_pins_a>; 676 pinctrl-2 = <&uart4_idle_pins_a>; 677 /delete-property/dmas; 678 /delete-property/dma-names; 679 status = "okay"; 680}; 681 682&uart7 { 683 pinctrl-names = "default", "sleep", "idle"; 684 pinctrl-0 = <&uart7_pins_c>; 685 pinctrl-1 = <&uart7_sleep_pins_c>; 686 pinctrl-2 = <&uart7_idle_pins_c>; 687 /delete-property/dmas; 688 /delete-property/dma-names; 689 status = "disabled"; 690}; 691 692&usart3 { 693 pinctrl-names = "default", "sleep", "idle"; 694 pinctrl-0 = <&usart3_pins_c>; 695 pinctrl-1 = <&usart3_sleep_pins_c>; 696 pinctrl-2 = <&usart3_idle_pins_c>; 697 uart-has-rtscts; 698 status = "disabled"; 699}; 700 701&usbh_ehci { 702 phys = <&usbphyc_port0>; 703 status = "disabled"; 704}; 705 706&usbotg_hs { 707 phys = <&usbphyc_port1 0>; 708 phy-names = "usb2-phy"; 709 usb-role-switch; 710 status = "disabled"; 711 712 port { 713 usbotg_hs_ep: endpoint { 714 remote-endpoint = <&con_usbotg_hs_ep>; 715 }; 716 }; 717}; 718 719&usbphyc { 720 status = "disabled"; 721}; 722 723&usbphyc_port0 { 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&usbphyc_port1 { 736 phy-supply = <&vdd_usb>; 737 st,tune-hs-dc-level = <2>; 738 st,enable-fs-rftime-tuning; 739 st,enable-hs-rftime-reduction; 740 st,trim-hs-current = <15>; 741 st,trim-hs-impedance = <1>; 742 st,tune-squelch-level = <3>; 743 st,tune-hs-rx-offset = <2>; 744 st,no-lsfs-sc; 745}; 746 747&vrefbuf { 748 regulator-min-microvolt = <2500000>; 749 regulator-max-microvolt = <2500000>; 750 vdda-supply = <&vdd>; 751 status = "disabled"; 752}; 753