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