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