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