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