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