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