Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) |
| 2 | /* |
Nicolas Le Bayon | 79c388e | 2020-09-25 17:25:09 +0200 | [diff] [blame] | 3 | * Copyright (c) 2017-2022, STMicroelectronics - All Rights Reserved |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 4 | * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics. |
| 5 | */ |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 6 | /dts-v1/; |
| 7 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 8 | #include "stm32mp157.dtsi" |
| 9 | #include "stm32mp15xc.dtsi" |
| 10 | #include "stm32mp15-pinctrl.dtsi" |
| 11 | #include "stm32mp15xxaa-pinctrl.dtsi" |
| 12 | #include <dt-bindings/clock/stm32mp1-clksrc.h> |
| 13 | #include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi" |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 14 | |
| 15 | / { |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 16 | model = "STMicroelectronics STM32MP157C eval daughter"; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 17 | compatible = "st,stm32mp157c-ed1", "st,stm32mp157"; |
| 18 | |
| 19 | chosen { |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 20 | stdout-path = "serial0:115200n8"; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 21 | }; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 22 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 23 | memory@c0000000 { |
| 24 | device_type = "memory"; |
| 25 | reg = <0xC0000000 0x40000000>; |
| 26 | }; |
| 27 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 28 | aliases { |
| 29 | serial0 = &uart4; |
| 30 | }; |
| 31 | }; |
| 32 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 33 | &bsec { |
| 34 | board_id: board_id@ec { |
| 35 | reg = <0xec 0x4>; |
Nicolas Le Bayon | 6a7c574 | 2019-09-10 14:18:27 +0200 | [diff] [blame] | 36 | st,non-secure-otp; |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 37 | }; |
| 38 | }; |
| 39 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 40 | &clk_hse { |
| 41 | st,digbypass; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 42 | }; |
| 43 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 44 | &cpu0 { |
| 45 | cpu-supply = <&vddcore>; |
| 46 | }; |
| 47 | |
| 48 | &cpu1 { |
| 49 | cpu-supply = <&vddcore>; |
| 50 | }; |
| 51 | |
| 52 | &cryp1 { |
Yann Gautier | bb053d5 | 2021-10-20 17:22:32 +0200 | [diff] [blame] | 53 | status = "okay"; |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 54 | }; |
| 55 | |
Yann Gautier | 3466d68 | 2020-10-13 18:05:06 +0200 | [diff] [blame] | 56 | &hash1 { |
| 57 | status = "okay"; |
| 58 | }; |
| 59 | |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 60 | &i2c4 { |
| 61 | pinctrl-names = "default"; |
| 62 | pinctrl-0 = <&i2c4_pins_a>; |
| 63 | i2c-scl-rising-time-ns = <185>; |
| 64 | i2c-scl-falling-time-ns = <20>; |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 65 | clock-frequency = <400000>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 66 | status = "okay"; |
| 67 | |
Yann Gautier | a45433b | 2019-01-16 18:31:00 +0100 | [diff] [blame] | 68 | pmic: stpmic@33 { |
| 69 | compatible = "st,stpmic1"; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 70 | reg = <0x33>; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 71 | interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>; |
| 72 | interrupt-controller; |
| 73 | #interrupt-cells = <2>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 74 | status = "okay"; |
| 75 | |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 76 | regulators { |
Yann Gautier | a45433b | 2019-01-16 18:31:00 +0100 | [diff] [blame] | 77 | compatible = "st,stpmic1-regulators"; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 78 | ldo1-supply = <&v3v3>; |
| 79 | ldo2-supply = <&v3v3>; |
| 80 | ldo3-supply = <&vdd_ddr>; |
| 81 | ldo5-supply = <&v3v3>; |
| 82 | ldo6-supply = <&v3v3>; |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 83 | pwr_sw1-supply = <&bst_out>; |
| 84 | pwr_sw2-supply = <&bst_out>; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 85 | |
| 86 | vddcore: buck1 { |
| 87 | regulator-name = "vddcore"; |
Yann Gautier | f3928f6 | 2019-02-14 11:15:03 +0100 | [diff] [blame] | 88 | regulator-min-microvolt = <1200000>; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 89 | regulator-max-microvolt = <1350000>; |
| 90 | regulator-always-on; |
| 91 | regulator-initial-mode = <0>; |
| 92 | regulator-over-current-protection; |
| 93 | }; |
| 94 | |
| 95 | vdd_ddr: buck2 { |
| 96 | regulator-name = "vdd_ddr"; |
| 97 | regulator-min-microvolt = <1350000>; |
| 98 | regulator-max-microvolt = <1350000>; |
| 99 | regulator-always-on; |
| 100 | regulator-initial-mode = <0>; |
| 101 | regulator-over-current-protection; |
| 102 | }; |
| 103 | |
| 104 | vdd: buck3 { |
| 105 | regulator-name = "vdd"; |
| 106 | regulator-min-microvolt = <3300000>; |
| 107 | regulator-max-microvolt = <3300000>; |
| 108 | regulator-always-on; |
| 109 | st,mask-reset; |
| 110 | regulator-initial-mode = <0>; |
| 111 | regulator-over-current-protection; |
| 112 | }; |
| 113 | |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 114 | v3v3: buck4 { |
| 115 | regulator-name = "v3v3"; |
| 116 | regulator-min-microvolt = <3300000>; |
| 117 | regulator-max-microvolt = <3300000>; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 118 | regulator-always-on; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 119 | regulator-over-current-protection; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 120 | regulator-initial-mode = <0>; |
| 121 | }; |
| 122 | |
| 123 | vdda: ldo1 { |
| 124 | regulator-name = "vdda"; |
| 125 | regulator-min-microvolt = <2900000>; |
| 126 | regulator-max-microvolt = <2900000>; |
| 127 | }; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 128 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 129 | v2v8: ldo2 { |
| 130 | regulator-name = "v2v8"; |
| 131 | regulator-min-microvolt = <2800000>; |
| 132 | regulator-max-microvolt = <2800000>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 133 | }; |
| 134 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 135 | vtt_ddr: ldo3 { |
| 136 | regulator-name = "vtt_ddr"; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 137 | regulator-always-on; |
| 138 | regulator-over-current-protection; |
Pascal Paillet | 1b7e8ff | 2021-01-07 18:05:46 +0100 | [diff] [blame] | 139 | st,regulator-sink-source; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 140 | }; |
| 141 | |
| 142 | vdd_usb: ldo4 { |
| 143 | regulator-name = "vdd_usb"; |
Pascal Paillet | 1b7e8ff | 2021-01-07 18:05:46 +0100 | [diff] [blame] | 144 | regulator-min-microvolt = <3300000>; |
| 145 | regulator-max-microvolt = <3300000>; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 146 | }; |
| 147 | |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 148 | vdd_sd: ldo5 { |
| 149 | regulator-name = "vdd_sd"; |
| 150 | regulator-min-microvolt = <2900000>; |
| 151 | regulator-max-microvolt = <2900000>; |
| 152 | regulator-boot-on; |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 153 | }; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 154 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 155 | v1v8: ldo6 { |
| 156 | regulator-name = "v1v8"; |
| 157 | regulator-min-microvolt = <1800000>; |
| 158 | regulator-max-microvolt = <1800000>; |
| 159 | }; |
| 160 | |
| 161 | vref_ddr: vref_ddr { |
| 162 | regulator-name = "vref_ddr"; |
| 163 | regulator-always-on; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 164 | }; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 165 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 166 | bst_out: boost { |
| 167 | regulator-name = "bst_out"; |
| 168 | }; |
Yann Gautier | 3edc7c3 | 2019-05-20 19:17:08 +0200 | [diff] [blame] | 169 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 170 | vbus_otg: pwr_sw1 { |
| 171 | regulator-name = "vbus_otg"; |
Yann Gautier | 2385c95 | 2022-10-21 11:25:49 +0200 | [diff] [blame] | 172 | }; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 173 | |
Yann Gautier | 2385c95 | 2022-10-21 11:25:49 +0200 | [diff] [blame] | 174 | vbus_sw: pwr_sw2 { |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 175 | regulator-name = "vbus_sw"; |
| 176 | regulator-active-discharge = <1>; |
Yann Gautier | 2385c95 | 2022-10-21 11:25:49 +0200 | [diff] [blame] | 177 | }; |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 178 | }; |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 179 | }; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 180 | }; |
| 181 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 182 | &iwdg2 { |
| 183 | timeout-sec = <32>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 184 | status = "okay"; |
| 185 | }; |
| 186 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 187 | &pwr_regulators { |
| 188 | vdd-supply = <&vdd>; |
| 189 | vdd_3v3_usbfs-supply = <&vdd_usb>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 190 | }; |
| 191 | |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 192 | &rcc { |
| 193 | st,clksrc = < |
| 194 | CLK_MPU_PLL1P |
| 195 | CLK_AXI_PLL2P |
Yann Gautier | ed34232 | 2019-02-15 17:33:27 +0100 | [diff] [blame] | 196 | CLK_MCU_PLL3P |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 197 | CLK_PLL12_HSE |
| 198 | CLK_PLL3_HSE |
| 199 | CLK_PLL4_HSE |
| 200 | CLK_RTC_LSE |
| 201 | CLK_MCO1_DISABLED |
| 202 | CLK_MCO2_DISABLED |
| 203 | >; |
| 204 | |
| 205 | st,clkdiv = < |
| 206 | 1 /*MPU*/ |
| 207 | 0 /*AXI*/ |
Yann Gautier | ed34232 | 2019-02-15 17:33:27 +0100 | [diff] [blame] | 208 | 0 /*MCU*/ |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 209 | 1 /*APB1*/ |
| 210 | 1 /*APB2*/ |
| 211 | 1 /*APB3*/ |
| 212 | 1 /*APB4*/ |
| 213 | 2 /*APB5*/ |
| 214 | 23 /*RTC*/ |
| 215 | 0 /*MCO1*/ |
| 216 | 0 /*MCO2*/ |
| 217 | >; |
| 218 | |
| 219 | st,pkcs = < |
| 220 | CLK_CKPER_HSE |
| 221 | CLK_FMC_ACLK |
| 222 | CLK_QSPI_ACLK |
Yann Gautier | dbbf79a | 2021-05-17 11:25:37 +0200 | [diff] [blame] | 223 | CLK_ETH_PLL4P |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 224 | CLK_SDMMC12_PLL4P |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 225 | CLK_DSI_DSIPLL |
| 226 | CLK_STGEN_HSE |
| 227 | CLK_USBPHY_HSE |
| 228 | CLK_SPI2S1_PLL3Q |
| 229 | CLK_SPI2S23_PLL3Q |
| 230 | CLK_SPI45_HSI |
| 231 | CLK_SPI6_HSI |
| 232 | CLK_I2C46_HSI |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 233 | CLK_SDMMC3_PLL4P |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 234 | CLK_USBO_USBPHY |
| 235 | CLK_ADC_CKPER |
| 236 | CLK_CEC_LSE |
| 237 | CLK_I2C12_HSI |
| 238 | CLK_I2C35_HSI |
| 239 | CLK_UART1_HSI |
| 240 | CLK_UART24_HSI |
| 241 | CLK_UART35_HSI |
| 242 | CLK_UART6_HSI |
| 243 | CLK_UART78_HSI |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 244 | CLK_SPDIF_PLL4P |
Antonio Borneo | dd445ab | 2019-07-29 14:46:16 +0200 | [diff] [blame] | 245 | CLK_FDCAN_PLL4R |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 246 | CLK_SAI1_PLL3Q |
| 247 | CLK_SAI2_PLL3Q |
| 248 | CLK_SAI3_PLL3Q |
| 249 | CLK_SAI4_PLL3Q |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 250 | CLK_RNG1_LSI |
| 251 | CLK_RNG2_LSI |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 252 | CLK_LPTIM1_PCLK1 |
| 253 | CLK_LPTIM23_PCLK3 |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 254 | CLK_LPTIM45_LSE |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 255 | >; |
| 256 | |
| 257 | /* VCO = 1300.0 MHz => P = 650 (CPU) */ |
| 258 | pll1: st,pll@0 { |
Yann Gautier | 49b0237 | 2021-05-17 11:25:37 +0200 | [diff] [blame] | 259 | compatible = "st,stm32mp1-pll"; |
| 260 | reg = <0>; |
| 261 | cfg = <2 80 0 0 0 PQR(1,0,0)>; |
| 262 | frac = <0x800>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 263 | }; |
| 264 | |
| 265 | /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */ |
| 266 | pll2: st,pll@1 { |
Yann Gautier | 49b0237 | 2021-05-17 11:25:37 +0200 | [diff] [blame] | 267 | compatible = "st,stm32mp1-pll"; |
| 268 | reg = <1>; |
| 269 | cfg = <2 65 1 0 0 PQR(1,1,1)>; |
| 270 | frac = <0x1400>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 271 | }; |
| 272 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 273 | /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */ |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 274 | pll3: st,pll@2 { |
Yann Gautier | 49b0237 | 2021-05-17 11:25:37 +0200 | [diff] [blame] | 275 | compatible = "st,stm32mp1-pll"; |
| 276 | reg = <2>; |
| 277 | cfg = <1 33 1 16 36 PQR(1,1,1)>; |
| 278 | frac = <0x1a04>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 279 | }; |
| 280 | |
Yann Gautier | 7b7e4bf | 2019-01-17 19:16:03 +0100 | [diff] [blame] | 281 | /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */ |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 282 | pll4: st,pll@3 { |
Yann Gautier | 49b0237 | 2021-05-17 11:25:37 +0200 | [diff] [blame] | 283 | compatible = "st,stm32mp1-pll"; |
| 284 | reg = <3>; |
| 285 | cfg = <3 98 5 7 7 PQR(1,1,1)>; |
Yann Gautier | 6638695 | 2018-07-05 16:49:51 +0200 | [diff] [blame] | 286 | }; |
| 287 | }; |
| 288 | |
Yann Gautier | 4ede20a | 2020-09-18 15:04:14 +0200 | [diff] [blame] | 289 | &rng1 { |
| 290 | status = "okay"; |
| 291 | }; |
| 292 | |
| 293 | &rtc { |
| 294 | status = "okay"; |
| 295 | }; |
| 296 | |
| 297 | &sdmmc1 { |
| 298 | pinctrl-names = "default"; |
| 299 | pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>; |
| 300 | disable-wp; |
| 301 | st,sig-dir; |
| 302 | st,neg-edge; |
| 303 | st,use-ckin; |
| 304 | bus-width = <4>; |
| 305 | vmmc-supply = <&vdd_sd>; |
| 306 | sd-uhs-sdr12; |
| 307 | sd-uhs-sdr25; |
| 308 | sd-uhs-sdr50; |
| 309 | sd-uhs-ddr50; |
| 310 | status = "okay"; |
| 311 | }; |
| 312 | |
| 313 | &sdmmc2 { |
| 314 | pinctrl-names = "default"; |
| 315 | pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>; |
| 316 | non-removable; |
| 317 | no-sd; |
| 318 | no-sdio; |
| 319 | st,neg-edge; |
| 320 | bus-width = <8>; |
| 321 | vmmc-supply = <&v3v3>; |
| 322 | vqmmc-supply = <&vdd>; |
| 323 | mmc-ddr-3_3v; |
| 324 | status = "okay"; |
| 325 | }; |
| 326 | |
| 327 | &uart4 { |
| 328 | pinctrl-names = "default"; |
| 329 | pinctrl-0 = <&uart4_pins_a>; |
| 330 | status = "okay"; |
Yann Gautier | 990ecea | 2019-06-04 17:24:36 +0200 | [diff] [blame] | 331 | }; |