1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2/* 3 * Copyright (C) STMicroelectronics 2021-2024 - All Rights Reserved 4 * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics. 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/clock/stm32mp13-clksrc.h> 10#include <dt-bindings/firewall/stm32mp13-tzc400.h> 11#include <dt-bindings/gpio/gpio.h> 12#include <dt-bindings/gpio/stm32mp_gpio.h> 13#include <dt-bindings/regulator/st,stm32mp13-regulator.h> 14#include "stm32mp135.dtsi" 15#include "stm32mp13xf.dtsi" 16#include "stm32mp13-pinctrl.dtsi" 17 18/ { 19 model = "STMicroelectronics STM32MP135F-DK Discovery Board"; 20 compatible = "st,stm32mp135f-dk", "st,stm32mp135"; 21 22 aliases { 23 serial0 = &uart4; 24 serial1 = &usart1; 25 }; 26 27 chosen { 28 stdout-path = "serial0:115200n8"; 29 }; 30 31 memory@c0000000 { 32 device_type = "memory"; 33 reg = <0xc0000000 0x20000000>; 34 }; 35 36 reserved-memory { 37 #address-cells = <1>; 38 #size-cells = <1>; 39 ranges; 40 41 optee_framebuffer: optee-framebuffer@dd000000 { 42 /* Secure framebuffer memory */ 43 reg = <0xdd000000 0x1000000>; 44 st,protreg = <DT_TZC_REGION_S_RDWR 0>; 45 no-map; 46 }; 47 }; 48 49 vin: vin { 50 compatible = "regulator-fixed"; 51 regulator-name = "vin"; 52 regulator-min-microvolt = <5000000>; 53 regulator-max-microvolt = <5000000>; 54 regulator-always-on; 55 }; 56 57 v3v3_ao: v3v3_ao { 58 compatible = "regulator-fixed"; 59 regulator-name = "v3v3_ao"; 60 regulator-min-microvolt = <3300000>; 61 regulator-max-microvolt = <3300000>; 62 regulator-always-on; 63 }; 64}; 65 66&bsec { 67 board_id: board_id@f0 { 68 reg = <0xf0 0x4>; 69 st,non-secure-otp; 70 }; 71}; 72 73&etzpc { 74 st,decprot = 75 <DECPROT(STM32MP1_ETZPC_ADC1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 76 <DECPROT(STM32MP1_ETZPC_ADC2_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 77 <DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 78 <DECPROT(STM32MP1_ETZPC_CRYP_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 79 <DECPROT(STM32MP1_ETZPC_DCMIPP_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 80 <DECPROT(STM32MP1_ETZPC_DDRCTRLPHY_ID, DECPROT_NS_R_S_W, DECPROT_UNLOCK)>, 81 <DECPROT(STM32MP1_ETZPC_ETH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 82 <DECPROT(STM32MP1_ETZPC_ETH2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 83 <DECPROT(STM32MP1_ETZPC_FMC_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 84 <DECPROT(STM32MP1_ETZPC_HASH_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 85 <DECPROT(STM32MP1_ETZPC_I2C3_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 86 <DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 87 <DECPROT(STM32MP1_ETZPC_I2C5_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 88 <DECPROT(STM32MP1_ETZPC_IWDG1_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 89 <DECPROT(STM32MP1_ETZPC_LPTIM2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 90 <DECPROT(STM32MP1_ETZPC_LPTIM3_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 91 <DECPROT(STM32MP1_ETZPC_LTDC_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 92 <DECPROT(STM32MP1_ETZPC_MCE_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 93 <DECPROT(STM32MP1_ETZPC_OTG_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 94 <DECPROT(STM32MP1_ETZPC_PKA_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 95 <DECPROT(STM32MP1_ETZPC_QSPI_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 96 <DECPROT(STM32MP1_ETZPC_RNG_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 97 <DECPROT(STM32MP1_ETZPC_SAES_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 98 <DECPROT(STM32MP1_ETZPC_SDMMC1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 99 <DECPROT(STM32MP1_ETZPC_SDMMC2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 100 <DECPROT(STM32MP1_ETZPC_SPI4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 101 <DECPROT(STM32MP1_ETZPC_SPI5_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 102 <DECPROT(STM32MP1_ETZPC_SRAM1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 103 <DECPROT(STM32MP1_ETZPC_SRAM2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 104 <DECPROT(STM32MP1_ETZPC_SRAM3_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 105 <DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 106 <DECPROT(STM32MP1_ETZPC_TIM12_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 107 <DECPROT(STM32MP1_ETZPC_TIM13_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 108 <DECPROT(STM32MP1_ETZPC_TIM14_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 109 <DECPROT(STM32MP1_ETZPC_TIM15_ID, DECPROT_S_RW, DECPROT_UNLOCK)>, 110 <DECPROT(STM32MP1_ETZPC_TIM16_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 111 <DECPROT(STM32MP1_ETZPC_TIM17_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 112 <DECPROT(STM32MP1_ETZPC_USART1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 113 <DECPROT(STM32MP1_ETZPC_USART2_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 114 <DECPROT(STM32MP1_ETZPC_USBPHYCTRL_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>, 115 <DECPROT(STM32MP1_ETZPC_VREFBUF_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>; 116}; 117 118&gpiob { 119 st,protreg = <TZPROT(9)>; 120}; 121 122&gpiod { 123 st,protreg = <TZPROT(7)>; 124}; 125 126&gpioe { 127 st,protreg = <TZPROT(15)>; 128}; 129 130&i2c4 { 131 pinctrl-names = "default"; 132 pinctrl-0 = <&i2c4_pins_a>; 133 i2c-scl-rising-time-ns = <185>; 134 i2c-scl-falling-time-ns = <20>; 135 clock-frequency = <400000>; 136 status = "okay"; 137 138 pmic: stpmic@33 { 139 compatible = "st,stpmic1"; 140 reg = <0x33>; 141 status = "okay"; 142 st,wakeup-pin-number = <1>; 143 st,notif-it-id = <0>; 144 145 regulators { 146 compatible = "st,stpmic1-regulators"; 147 buck1-supply = <&vin>; 148 buck2-supply = <&vin>; 149 buck3-supply = <&vin>; 150 buck4-supply = <&vin>; 151 ldo1-supply = <&vin>; 152 ldo4-supply = <&vin>; 153 ldo5-supply = <&vin>; 154 ldo6-supply = <&vin>; 155 vref_ddr-supply = <&vin>; 156 pwr_sw1-supply = <&bst_out>; 157 pwr_sw2-supply = <&v3v3_ao>; 158 159 vddcpu: buck1 { 160 regulator-name = "vddcpu"; 161 regulator-min-microvolt = <1250000>; 162 regulator-max-microvolt = <1350000>; 163 regulator-always-on; 164 regulator-over-current-protection; 165 166 lp-stop { 167 regulator-suspend-microvolt = <1250000>; 168 }; 169 lplv-stop { 170 regulator-suspend-microvolt = <900000>; 171 }; 172 lplv-stop2 { 173 regulator-off-in-suspend; 174 }; 175 standby-ddr-sr { 176 regulator-off-in-suspend; 177 }; 178 standby-ddr-off { 179 regulator-off-in-suspend; 180 }; 181 }; 182 183 vdd_ddr: buck2 { 184 regulator-name = "vdd_ddr"; 185 regulator-min-microvolt = <1350000>; 186 regulator-max-microvolt = <1350000>; 187 regulator-always-on; 188 regulator-over-current-protection; 189 190 standby-ddr-off { 191 regulator-off-in-suspend; 192 }; 193 }; 194 195 vdd: buck3 { 196 regulator-name = "vdd"; 197 regulator-min-microvolt = <3300000>; 198 regulator-max-microvolt = <3300000>; 199 regulator-always-on; 200 st,mask-reset; 201 regulator-over-current-protection; 202 }; 203 204 vddcore: buck4 { 205 regulator-name = "vddcore"; 206 regulator-min-microvolt = <1250000>; 207 regulator-max-microvolt = <1250000>; 208 regulator-always-on; 209 regulator-over-current-protection; 210 211 lplv-stop { 212 regulator-suspend-microvolt = <900000>; 213 }; 214 lplv-stop2 { 215 regulator-suspend-microvolt = <900000>; 216 }; 217 standby-ddr-sr { 218 regulator-off-in-suspend; 219 }; 220 standby-ddr-off { 221 regulator-off-in-suspend; 222 }; 223 }; 224 225 vdd_adc: ldo1 { 226 regulator-name = "vdd_adc"; 227 regulator-min-microvolt = <3300000>; 228 regulator-max-microvolt = <3300000>; 229 230 standby-ddr-sr { 231 regulator-off-in-suspend; 232 }; 233 standby-ddr-off { 234 regulator-off-in-suspend; 235 }; 236 }; 237 238 unused1: ldo2 { 239 regulator-name = "ldo2"; 240 }; 241 242 unused2: ldo3 { 243 regulator-name = "ldo3"; 244 }; 245 246 vdd_usb: ldo4 { 247 regulator-name = "vdd_usb"; 248 regulator-min-microvolt = <3300000>; 249 regulator-max-microvolt = <3300000>; 250 251 standby-ddr-sr { 252 regulator-off-in-suspend; 253 }; 254 standby-ddr-off { 255 regulator-off-in-suspend; 256 }; 257 }; 258 259 vdd_sd: ldo5 { 260 regulator-name = "vdd_sd"; 261 regulator-min-microvolt = <3300000>; 262 regulator-max-microvolt = <3300000>; 263 regulator-boot-on; 264 265 standby-ddr-sr { 266 regulator-off-in-suspend; 267 }; 268 standby-ddr-off { 269 regulator-off-in-suspend; 270 }; 271 }; 272 273 v1v8_periph: ldo6 { 274 regulator-name = "v1v8_periph"; 275 regulator-min-microvolt = <1800000>; 276 regulator-max-microvolt = <1800000>; 277 278 standby-ddr-sr { 279 regulator-off-in-suspend; 280 }; 281 standby-ddr-off { 282 regulator-off-in-suspend; 283 }; 284 }; 285 286 vref_ddr: vref_ddr { 287 regulator-name = "vref_ddr"; 288 regulator-always-on; 289 290 standby-ddr-sr { 291 regulator-off-in-suspend; 292 }; 293 standby-ddr-off { 294 regulator-off-in-suspend; 295 }; 296 }; 297 298 bst_out: boost { 299 regulator-name = "bst_out"; 300 }; 301 302 v3v3_sw: pwr_sw2 { 303 regulator-name = "v3v3_sw"; 304 regulator-active-discharge = <1>; 305 regulator-min-microvolt = <3300000>; 306 regulator-max-microvolt = <3300000>; 307 }; 308 }; 309 }; 310}; 311 312&iwdg1 { 313 timeout-sec = <32>; 314 status = "okay"; 315}; 316 317&oem_enc_key { 318 st,non-secure-otp-provisioning; 319}; 320 321&pka { 322 status = "okay"; 323}; 324 325&pwr_regulators { 326 vdd-supply = <&vdd>; 327 vdd_3v3_usbfs-supply = <&vdd_usb>; 328}; 329 330&rcc { 331 compatible = "st,stm32mp13-rcc", "syscon"; 332 333 st,clksrc = < 334 CLK_MPU_PLL1P 335 CLK_AXI_PLL2P 336 CLK_MLAHBS_PLL3 337 CLK_RTC_LSE 338 CLK_MCO1_HSE 339 CLK_MCO2_DISABLED 340 CLK_CKPER_HSE 341 CLK_ETH1_PLL4P 342 CLK_ETH2_PLL4P 343 CLK_SDMMC1_PLL4P 344 CLK_SDMMC2_PLL4P 345 CLK_STGEN_HSE 346 CLK_USBPHY_HSE 347 CLK_I2C4_HSI 348 CLK_I2C5_HSI 349 CLK_USBO_USBPHY 350 CLK_ADC2_CKPER 351 CLK_I2C12_HSI 352 CLK_UART1_HSI 353 CLK_UART2_HSI 354 CLK_UART35_HSI 355 CLK_UART4_HSI 356 CLK_UART6_HSI 357 CLK_UART78_HSI 358 CLK_SAES_AXI 359 CLK_DCMIPP_PLL2Q 360 CLK_LPTIM3_PCLK3 361 CLK_RNG1_PLL4R 362 >; 363 364 st,clkdiv = < 365 DIV(DIV_MPU, 1) 366 DIV(DIV_AXI, 0) 367 DIV(DIV_MLAHB, 0) 368 DIV(DIV_APB1, 1) 369 DIV(DIV_APB2, 1) 370 DIV(DIV_APB3, 1) 371 DIV(DIV_APB4, 1) 372 DIV(DIV_APB5, 2) 373 DIV(DIV_APB6, 1) 374 DIV(DIV_RTC, 0) 375 DIV(DIV_MCO1, 0) 376 DIV(DIV_MCO2, 0) 377 >; 378 379 st,pll_vco { 380 pll1_vco_2000Mhz: pll1-vco-2000Mhz { 381 src = <CLK_PLL12_HSE>; 382 divmn = <1 82>; 383 frac = <0xAAA>; 384 }; 385 386 pll1_vco_1300Mhz: pll1-vco-1300Mhz { 387 src = <CLK_PLL12_HSE>; 388 divmn = <2 80>; 389 frac = <0x800>; 390 }; 391 392 pll2_vco_1066Mhz: pll2-vco-1066Mhz { 393 src = <CLK_PLL12_HSE>; 394 divmn = <2 65>; 395 frac = <0x1400>; 396 }; 397 398 pll3_vco_417Mhz: pll3-vco-417Mhz { 399 src = <CLK_PLL3_HSE>; 400 divmn = <1 33>; 401 frac = <0x1a04>; 402 }; 403 404 pll4_vco_600Mhz: pll4-vco-600Mhz { 405 src = <CLK_PLL4_HSE>; 406 divmn = <1 49>; 407 }; 408 }; 409 410 /* VCO = 1300.0 MHz => P = 650 (CPU) */ 411 pll1: st,pll@0 { 412 compatible = "st,stm32mp1-pll"; 413 reg = <0>; 414 415 st,pll = <&pll1_cfg1>; 416 417 pll1_cfg1: pll1_cfg1 { 418 st,pll_vco = <&pll1_vco_1300Mhz>; 419 st,pll_div_pqr = <0 1 1>; 420 }; 421 422 pll1_cfg2: pll1_cfg2 { 423 st,pll_vco = <&pll1_vco_2000Mhz>; 424 st,pll_div_pqr = <0 1 1>; 425 }; 426 }; 427 428 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 266, R = 533 (DDR) */ 429 pll2: st,pll@1 { 430 compatible = "st,stm32mp1-pll"; 431 reg = <1>; 432 433 st,pll = <&pll2_cfg1>; 434 435 pll2_cfg1: pll2_cfg1 { 436 st,pll_vco = <&pll2_vco_1066Mhz>; 437 st,pll_div_pqr = <1 1 0>; 438 }; 439 }; 440 441 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ 442 pll3: st,pll@2 { 443 compatible = "st,stm32mp1-pll"; 444 reg = <2>; 445 446 st,pll = <&pll3_cfg1>; 447 448 pll3_cfg1: pll3_cfg1 { 449 st,pll_vco = <&pll3_vco_417Mhz>; 450 st,pll_div_pqr = <1 16 36>; 451 }; 452 }; 453 454 /* VCO = 600.0 MHz => P = 50, Q = 10, R = 50 */ 455 pll4: st,pll@3 { 456 compatible = "st,stm32mp1-pll"; 457 reg = <3>; 458 st,pll = <&pll4_cfg1>; 459 460 pll4_cfg1: pll4_cfg1 { 461 st,pll_vco = <&pll4_vco_600Mhz>; 462 st,pll_div_pqr = <11 59 11>; 463 }; 464 }; 465 466 st,clk_opp { 467 /* CK_MPU clock config for MP13 */ 468 st,ck_mpu { 469 470 cfg_1 { 471 hz = <650000000>; 472 st,clksrc = <CLK_MPU_PLL1P>; 473 st,pll = <&pll1_cfg1>; 474 }; 475 476 cfg_2 { 477 hz = <1000000000>; 478 st,clksrc = <CLK_MPU_PLL1P>; 479 st,pll = <&pll1_cfg2>; 480 }; 481 }; 482 }; 483}; 484 485&rng { 486 status = "okay"; 487 clock-error-detect; 488}; 489 490&rtc { 491 status = "okay"; 492}; 493 494&saes { 495 status = "okay"; 496}; 497 498&sdmmc1_io { 499 vddsd1-supply = <&vdd>; 500}; 501 502&sdmmc2_io { 503 vddsd2-supply = <&vdd>; 504}; 505 506&tzc400 { 507 memory-region = <&optee_framebuffer>; 508}; 509 510&uart4 { 511 pinctrl-names = "default"; 512 pinctrl-0 = <&uart4_pins_a>; 513 status = "okay"; 514}; 515 516&usart1 { 517 pinctrl-names = "default"; 518 pinctrl-0 = <&usart1_pins_a>; 519 uart-has-rtscts; 520 status = "disabled"; 521}; 522