1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2/* 3 * Copyright (C) STMicroelectronics 2017-2024 - All Rights Reserved 4 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics. 5 */ 6/dts-v1/; 7 8#include "stm32mp157.dtsi" 9#include "stm32mp15xc.dtsi" 10#include "stm32mp15-pinctrl.dtsi" 11#include "stm32mp15xxaa-pinctrl.dtsi" 12#include <dt-bindings/gpio/gpio.h> 13#include <dt-bindings/mfd/st,stpmic1.h> 14 15/ { 16 model = "STMicroelectronics STM32MP157C eval daughter"; 17 compatible = "st,stm32mp157c-ed1", "st,stm32mp157"; 18 19 chosen { 20 stdout-path = "serial0:115200n8"; 21 }; 22 23 memory@c0000000 { 24 device_type = "memory"; 25 reg = <0xC0000000 0x40000000>; 26 }; 27 28 reserved-memory { 29 #address-cells = <1>; 30 #size-cells = <1>; 31 ranges; 32 33 mcuram2: mcuram2@10000000 { 34 compatible = "shared-dma-pool"; 35 reg = <0x10000000 0x40000>; 36 no-map; 37 }; 38 39 vdev0vring0: vdev0vring0@10040000 { 40 compatible = "shared-dma-pool"; 41 reg = <0x10040000 0x1000>; 42 no-map; 43 }; 44 45 vdev0vring1: vdev0vring1@10041000 { 46 compatible = "shared-dma-pool"; 47 reg = <0x10041000 0x1000>; 48 no-map; 49 }; 50 51 vdev0buffer: vdev0buffer@10042000 { 52 compatible = "shared-dma-pool"; 53 reg = <0x10042000 0x4000>; 54 no-map; 55 }; 56 57 ipc_shmem: ipc-shmem@1004f000 { 58 compatible = "shared-dma-pool"; 59 reg = <0x10048000 0x8000>; 60 no-map; 61 }; 62 63 mcuram: mcuram@30000000 { 64 compatible = "shared-dma-pool"; 65 reg = <0x30000000 0x40000>; 66 no-map; 67 }; 68 69 retram: retram@38000000 { 70 compatible = "shared-dma-pool"; 71 reg = <0x38000000 0x10000>; 72 no-map; 73 }; 74 75 gpu_reserved: gpu@e8000000 { 76 reg = <0xe8000000 0x8000000>; 77 no-map; 78 }; 79 }; 80 81 aliases { 82 serial0 = &uart4; 83 }; 84 85 sd_switch: regulator-sd_switch { 86 compatible = "regulator-gpio"; 87 regulator-name = "sd_switch"; 88 regulator-min-microvolt = <1800000>; 89 regulator-max-microvolt = <2900000>; 90 regulator-type = "voltage"; 91 regulator-always-on; 92 93 gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>; 94 gpios-states = <0>; 95 states = <1800000 0x1>, 96 <2900000 0x0>; 97 status = "disabled"; 98 }; 99 100 vin: vin { 101 compatible = "regulator-fixed"; 102 regulator-name = "vin"; 103 regulator-min-microvolt = <5000000>; 104 regulator-max-microvolt = <5000000>; 105 regulator-always-on; 106 }; 107}; 108 109&adc { 110 /* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */ 111 pinctrl-0 = <&adc1_in6_pins_a>; 112 pinctrl-names = "default"; 113 vdd-supply = <&vdd>; 114 vdda-supply = <&vdda>; 115 vref-supply = <&vdda>; 116 status = "disabled"; 117 adc1: adc@0 { 118 st,adc-channels = <0 1 6>; 119 /* 16.5 ck_cycles sampling time */ 120 st,min-sample-time-nsecs = <400>; 121 status = "okay"; 122 }; 123}; 124 125&bsec { 126 board_id: board_id@ec { 127 reg = <0xec 0x4>; 128 st,non-secure-otp; 129 }; 130 huk_otp: huk-otp@f0 { 131 reg = <0xf0 0x10>; 132 }; 133}; 134 135&crc1 { 136 status = "disabled"; 137}; 138 139&dac { 140 pinctrl-names = "default"; 141 pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>; 142 vref-supply = <&vdda>; 143 status = "disabled"; 144 dac1: dac@1 { 145 status = "okay"; 146 }; 147 dac2: dac@2 { 148 status = "okay"; 149 }; 150}; 151 152&dts { 153 status = "disabled"; 154}; 155 156&etzpc { 157 st,decprot = 158 <DECPROT(STM32MP1_ETZPC_USART1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 159 <DECPROT(STM32MP1_ETZPC_SPI6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 160 <DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 161 <DECPROT(STM32MP1_ETZPC_I2C6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 162 <DECPROT(STM32MP1_ETZPC_RNG1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 163 <DECPROT(STM32MP1_ETZPC_HASH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 164 <DECPROT(STM32MP1_ETZPC_CRYP1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 165 <DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)>, 166 <DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)>, 167 <DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_LOCK)>, 168 <DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_LOCK)>, 169 <DECPROT(STM32MP1_ETZPC_IWDG1_ID, DECPROT_S_RW, DECPROT_LOCK)>; 170}; 171 172&gpu { 173 contiguous-area = <&gpu_reserved>; 174}; 175 176&hash1 { 177 status = "disabled"; 178}; 179 180&i2c4 { 181 compatible = "st,stm32mp15-i2c-non-secure"; 182 pinctrl-names = "default", "sleep"; 183 pinctrl-0 = <&i2c4_pins_a>; 184 pinctrl-1 = <&i2c4_sleep_pins_a>; 185 i2c-scl-rising-time-ns = <185>; 186 i2c-scl-falling-time-ns = <20>; 187 clock-frequency = <400000>; 188 status = "okay"; 189 /* spare dmas for other usage */ 190 /delete-property/dmas; 191 /delete-property/dma-names; 192 193 pmic: stpmic@33 { 194 compatible = "st,stpmic1"; 195 reg = <0x33>; 196 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>; 197 interrupt-controller; 198 #interrupt-cells = <2>; 199 status = "okay"; 200 201 regulators { 202 compatible = "st,stpmic1-regulators"; 203 buck1-supply = <&vin>; 204 buck2-supply = <&vin>; 205 buck3-supply = <&vin>; 206 buck4-supply = <&vin>; 207 ldo1-supply = <&v3v3>; 208 ldo2-supply = <&v3v3>; 209 ldo3-supply = <&vdd_ddr>; 210 ldo4-supply = <&vin>; 211 ldo5-supply = <&v3v3>; 212 ldo6-supply = <&v3v3>; 213 vref_ddr-supply = <&vin>; 214 boost-supply = <&vin>; 215 pwr_sw1-supply = <&bst_out>; 216 pwr_sw2-supply = <&bst_out>; 217 218 vddcore: buck1 { 219 regulator-name = "vddcore"; 220 regulator-min-microvolt = <1200000>; 221 regulator-max-microvolt = <1350000>; 222 regulator-always-on; 223 regulator-initial-mode = <0>; 224 regulator-over-current-protection; 225 }; 226 227 vdd_ddr: buck2 { 228 regulator-name = "vdd_ddr"; 229 regulator-min-microvolt = <1350000>; 230 regulator-max-microvolt = <1350000>; 231 regulator-always-on; 232 regulator-initial-mode = <0>; 233 regulator-over-current-protection; 234 }; 235 236 vdd: buck3 { 237 regulator-name = "vdd"; 238 regulator-min-microvolt = <3300000>; 239 regulator-max-microvolt = <3300000>; 240 regulator-always-on; 241 st,mask-reset; 242 regulator-initial-mode = <0>; 243 regulator-over-current-protection; 244 }; 245 246 v3v3: buck4 { 247 regulator-name = "v3v3"; 248 regulator-min-microvolt = <3300000>; 249 regulator-max-microvolt = <3300000>; 250 regulator-always-on; 251 regulator-over-current-protection; 252 regulator-initial-mode = <0>; 253 }; 254 255 vdda: ldo1 { 256 regulator-name = "vdda"; 257 regulator-min-microvolt = <2900000>; 258 regulator-max-microvolt = <2900000>; 259 interrupts = <IT_CURLIM_LDO1 0>; 260 }; 261 262 v2v8: ldo2 { 263 regulator-name = "v2v8"; 264 regulator-min-microvolt = <2800000>; 265 regulator-max-microvolt = <2800000>; 266 interrupts = <IT_CURLIM_LDO2 0>; 267 }; 268 269 vtt_ddr: ldo3 { 270 regulator-name = "vtt_ddr"; 271 regulator-min-microvolt = <500000>; 272 regulator-max-microvolt = <750000>; 273 regulator-always-on; 274 regulator-over-current-protection; 275 }; 276 277 vdd_usb: ldo4 { 278 regulator-name = "vdd_usb"; 279 interrupts = <IT_CURLIM_LDO4 0>; 280 regulator-always-on; 281 }; 282 283 vdd_sd: ldo5 { 284 regulator-name = "vdd_sd"; 285 regulator-min-microvolt = <2900000>; 286 regulator-max-microvolt = <2900000>; 287 interrupts = <IT_CURLIM_LDO5 0>; 288 regulator-boot-on; 289 }; 290 291 v1v8: ldo6 { 292 regulator-name = "v1v8"; 293 regulator-min-microvolt = <1800000>; 294 regulator-max-microvolt = <1800000>; 295 interrupts = <IT_CURLIM_LDO6 0>; 296 }; 297 298 vref_ddr: vref_ddr { 299 regulator-name = "vref_ddr"; 300 regulator-always-on; 301 }; 302 303 bst_out: boost { 304 regulator-name = "bst_out"; 305 interrupts = <IT_OCP_BOOST 0>; 306 }; 307 308 vbus_otg: pwr_sw1 { 309 regulator-name = "vbus_otg"; 310 interrupts = <IT_OCP_OTG 0>; 311 }; 312 313 vbus_sw: pwr_sw2 { 314 regulator-name = "vbus_sw"; 315 interrupts = <IT_OCP_SWOUT 0>; 316 regulator-active-discharge = <1>; 317 }; 318 }; 319 320 onkey { 321 compatible = "st,stpmic1-onkey"; 322 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>; 323 interrupt-names = "onkey-falling", "onkey-rising"; 324 power-off-time-sec = <10>; 325 status = "disabled"; 326 }; 327 328 watchdog { 329 compatible = "st,stpmic1-wdt"; 330 status = "disabled"; 331 }; 332 }; 333}; 334 335&ipcc { 336 status = "disabled"; 337}; 338 339&iwdg1 { 340 timeout-sec = <32>; 341 status = "okay"; 342}; 343 344&iwdg2 { 345 timeout-sec = <32>; 346 status = "disabled"; 347}; 348 349&m4_rproc { 350 memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>, 351 <&vdev0vring1>, <&vdev0buffer>, <&ipc_shmem>; 352 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>; 353 mbox-names = "vq0", "vq1", "shutdown", "detach"; 354 interrupt-parent = <&exti>; 355 interrupts = <68 1>; 356 status = "disabled"; 357}; 358 359&pwr_regulators { 360 vdd-supply = <&vdd>; 361 vdd_3v3_usbfs-supply = <&vdd_usb>; 362}; 363 364&rcc { 365 compatible = "st,stm32mp1-rcc"; 366 status = "okay"; 367}; 368 369&rng1 { 370 status = "okay"; 371}; 372 373&rtc { 374 status = "disabled"; 375}; 376 377&sdmmc1 { 378 pinctrl-names = "default", "opendrain", "sleep"; 379 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>; 380 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>; 381 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>; 382 cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 383 disable-wp; 384 st,sig-dir; 385 st,neg-edge; 386 st,use-ckin; 387 bus-width = <4>; 388 vmmc-supply = <&vdd_sd>; 389 vqmmc-supply = <&sd_switch>; 390 sd-uhs-sdr12; 391 sd-uhs-sdr25; 392 sd-uhs-sdr50; 393 sd-uhs-ddr50; 394 status = "disabled"; 395}; 396 397&sdmmc2 { 398 pinctrl-names = "default", "opendrain", "sleep"; 399 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>; 400 pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>; 401 pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>; 402 non-removable; 403 no-sd; 404 no-sdio; 405 st,neg-edge; 406 bus-width = <8>; 407 vmmc-supply = <&v3v3>; 408 vqmmc-supply = <&vdd>; 409 mmc-ddr-3_3v; 410 status = "disabled"; 411}; 412 413&timers6 { 414 status = "disabled"; 415 /* spare dmas for other usage */ 416 /delete-property/dmas; 417 /delete-property/dma-names; 418 timer@5 { 419 status = "okay"; 420 }; 421}; 422 423&uart4 { 424 pinctrl-names = "default", "sleep", "idle"; 425 pinctrl-0 = <&uart4_pins_a>; 426 pinctrl-1 = <&uart4_sleep_pins_a>; 427 pinctrl-2 = <&uart4_idle_pins_a>; 428 /delete-property/dmas; 429 /delete-property/dma-names; 430 status = "okay"; 431}; 432 433&usbotg_hs { 434 vbus-supply = <&vbus_otg>; 435}; 436 437&usbphyc_port0 { 438 phy-supply = <&vdd_usb>; 439}; 440 441&usbphyc_port1 { 442 phy-supply = <&vdd_usb>; 443}; 444