blob: fe5f464be2f6d4efb8a2a50d723b98af33d6491b [file] [log] [blame]
Yann Gautier587f60f2018-07-05 16:49:51 +02001// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
Yann Gautierb8816d32024-01-04 11:45:31 +01003 * Copyright (c) 2017-2024, STMicroelectronics - All Rights Reserved
Yann Gautier587f60f2018-07-05 16:49:51 +02004 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
5 */
Yann Gautier587f60f2018-07-05 16:49:51 +02006/dts-v1/;
7
Yann Gautier277d6af2020-09-18 15:04:14 +02008#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 Gautier587f60f2018-07-05 16:49:51 +020014
15/ {
Yann Gautierc948f772019-01-17 19:16:03 +010016 model = "STMicroelectronics STM32MP157C eval daughter";
Yann Gautier587f60f2018-07-05 16:49:51 +020017 compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
18
Yann Gautier4c8e8ea2023-10-18 14:17:04 +020019 aliases {
20 serial0 = &uart4;
21 };
22
Yann Gautier587f60f2018-07-05 16:49:51 +020023 chosen {
Yann Gautierc948f772019-01-17 19:16:03 +010024 stdout-path = "serial0:115200n8";
Yann Gautier587f60f2018-07-05 16:49:51 +020025 };
Yann Gautierc948f772019-01-17 19:16:03 +010026
Yann Gautier277d6af2020-09-18 15:04:14 +020027 memory@c0000000 {
28 device_type = "memory";
29 reg = <0xC0000000 0x40000000>;
30 };
Yann Gautierc948f772019-01-17 19:16:03 +010031};
32
Yann Gautier277d6af2020-09-18 15:04:14 +020033&bsec {
Yann Gautierb8816d32024-01-04 11:45:31 +010034 board_id: board-id@ec {
Yann Gautier277d6af2020-09-18 15:04:14 +020035 reg = <0xec 0x4>;
Nicolas Le Bayon375b79b2019-09-10 14:18:27 +020036 st,non-secure-otp;
Yann Gautier277d6af2020-09-18 15:04:14 +020037 };
38};
39
Yann Gautierc948f772019-01-17 19:16:03 +010040&clk_hse {
41 st,digbypass;
Yann Gautier587f60f2018-07-05 16:49:51 +020042};
43
Yann Gautier277d6af2020-09-18 15:04:14 +020044&cpu0 {
45 cpu-supply = <&vddcore>;
46};
47
48&cpu1 {
49 cpu-supply = <&vddcore>;
50};
51
52&cryp1 {
Yann Gautiere8a953a2021-10-20 17:22:32 +020053 status = "okay";
Yann Gautier277d6af2020-09-18 15:04:14 +020054};
55
Yann Gautierb37b52e2020-10-13 18:05:06 +020056&hash1 {
57 status = "okay";
58};
59
Yann Gautier587f60f2018-07-05 16:49:51 +020060&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 Gautier277d6af2020-09-18 15:04:14 +020065 clock-frequency = <400000>;
Yann Gautier587f60f2018-07-05 16:49:51 +020066 status = "okay";
67
Yann Gautier23684d02019-01-16 18:31:00 +010068 pmic: stpmic@33 {
69 compatible = "st,stpmic1";
Yann Gautier587f60f2018-07-05 16:49:51 +020070 reg = <0x33>;
Yann Gautierc948f772019-01-17 19:16:03 +010071 interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;
72 interrupt-controller;
73 #interrupt-cells = <2>;
Yann Gautier587f60f2018-07-05 16:49:51 +020074 status = "okay";
75
Yann Gautier587f60f2018-07-05 16:49:51 +020076 regulators {
Yann Gautier23684d02019-01-16 18:31:00 +010077 compatible = "st,stpmic1-regulators";
Yann Gautierc948f772019-01-17 19:16:03 +010078 ldo1-supply = <&v3v3>;
79 ldo2-supply = <&v3v3>;
80 ldo3-supply = <&vdd_ddr>;
81 ldo5-supply = <&v3v3>;
82 ldo6-supply = <&v3v3>;
Yann Gautier277d6af2020-09-18 15:04:14 +020083 pwr_sw1-supply = <&bst_out>;
84 pwr_sw2-supply = <&bst_out>;
Yann Gautierc948f772019-01-17 19:16:03 +010085
86 vddcore: buck1 {
87 regulator-name = "vddcore";
Yann Gautierd82d4ff2019-02-14 11:15:03 +010088 regulator-min-microvolt = <1200000>;
Yann Gautierc948f772019-01-17 19:16:03 +010089 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 Gautier587f60f2018-07-05 16:49:51 +0200114 v3v3: buck4 {
115 regulator-name = "v3v3";
116 regulator-min-microvolt = <3300000>;
117 regulator-max-microvolt = <3300000>;
Yann Gautierc948f772019-01-17 19:16:03 +0100118 regulator-always-on;
Yann Gautier587f60f2018-07-05 16:49:51 +0200119 regulator-over-current-protection;
Yann Gautierc948f772019-01-17 19:16:03 +0100120 regulator-initial-mode = <0>;
121 };
Yann Gautier587f60f2018-07-05 16:49:51 +0200122
Yann Gautierc948f772019-01-17 19:16:03 +0100123 vdda: ldo1 {
124 regulator-name = "vdda";
125 regulator-min-microvolt = <2900000>;
126 regulator-max-microvolt = <2900000>;
127 };
128
129 v2v8: ldo2 {
130 regulator-name = "v2v8";
131 regulator-min-microvolt = <2800000>;
132 regulator-max-microvolt = <2800000>;
133 };
134
135 vtt_ddr: ldo3 {
136 regulator-name = "vtt_ddr";
Yann Gautierc948f772019-01-17 19:16:03 +0100137 regulator-always-on;
138 regulator-over-current-protection;
Pascal Paillet67d95402021-01-07 18:05:46 +0100139 st,regulator-sink-source;
Yann Gautierc948f772019-01-17 19:16:03 +0100140 };
141
142 vdd_usb: ldo4 {
143 regulator-name = "vdd_usb";
Pascal Paillet67d95402021-01-07 18:05:46 +0100144 regulator-min-microvolt = <3300000>;
145 regulator-max-microvolt = <3300000>;
Yann Gautier587f60f2018-07-05 16:49:51 +0200146 };
147
148 vdd_sd: ldo5 {
149 regulator-name = "vdd_sd";
150 regulator-min-microvolt = <2900000>;
151 regulator-max-microvolt = <2900000>;
152 regulator-boot-on;
Yann Gautierc948f772019-01-17 19:16:03 +0100153 };
Yann Gautier587f60f2018-07-05 16:49:51 +0200154
Yann Gautierc948f772019-01-17 19:16:03 +0100155 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 Gautier587f60f2018-07-05 16:49:51 +0200164 };
Yann Gautier277d6af2020-09-18 15:04:14 +0200165
166 bst_out: boost {
167 regulator-name = "bst_out";
168 };
169
170 vbus_otg: pwr_sw1 {
171 regulator-name = "vbus_otg";
Yann Gautier04339c52022-10-21 11:25:49 +0200172 };
Yann Gautier277d6af2020-09-18 15:04:14 +0200173
Yann Gautier04339c52022-10-21 11:25:49 +0200174 vbus_sw: pwr_sw2 {
Yann Gautier277d6af2020-09-18 15:04:14 +0200175 regulator-name = "vbus_sw";
176 regulator-active-discharge = <1>;
Yann Gautier04339c52022-10-21 11:25:49 +0200177 };
Yann Gautier277d6af2020-09-18 15:04:14 +0200178 };
Yann Gautier587f60f2018-07-05 16:49:51 +0200179 };
180};
181
182&iwdg2 {
Yann Gautier587f60f2018-07-05 16:49:51 +0200183 timeout-sec = <32>;
184 status = "okay";
185};
186
Yann Gautier277d6af2020-09-18 15:04:14 +0200187&pwr_regulators {
188 vdd-supply = <&vdd>;
189 vdd_3v3_usbfs-supply = <&vdd_usb>;
Yann Gautierf33b2432019-05-20 19:17:08 +0200190};
191
Yann Gautier587f60f2018-07-05 16:49:51 +0200192&rcc {
193 st,clksrc = <
194 CLK_MPU_PLL1P
195 CLK_AXI_PLL2P
Yann Gautierb053a222019-02-15 17:33:27 +0100196 CLK_MCU_PLL3P
Valentin Caron33573ea2024-12-11 11:20:04 +0100197 CLK_RTC_LSE
Yann Gautier587f60f2018-07-05 16:49:51 +0200198 CLK_MCO1_DISABLED
199 CLK_MCO2_DISABLED
Yann Gautier587f60f2018-07-05 16:49:51 +0200200 CLK_CKPER_HSE
201 CLK_FMC_ACLK
202 CLK_QSPI_ACLK
Yann Gautier3e881a82021-05-17 11:25:37 +0200203 CLK_ETH_PLL4P
Yann Gautierc948f772019-01-17 19:16:03 +0100204 CLK_SDMMC12_PLL4P
Yann Gautier587f60f2018-07-05 16:49:51 +0200205 CLK_DSI_DSIPLL
206 CLK_STGEN_HSE
207 CLK_USBPHY_HSE
208 CLK_SPI2S1_PLL3Q
209 CLK_SPI2S23_PLL3Q
210 CLK_SPI45_HSI
211 CLK_SPI6_HSI
212 CLK_I2C46_HSI
Yann Gautierc948f772019-01-17 19:16:03 +0100213 CLK_SDMMC3_PLL4P
Yann Gautier587f60f2018-07-05 16:49:51 +0200214 CLK_USBO_USBPHY
215 CLK_ADC_CKPER
216 CLK_CEC_LSE
217 CLK_I2C12_HSI
218 CLK_I2C35_HSI
219 CLK_UART1_HSI
220 CLK_UART24_HSI
221 CLK_UART35_HSI
222 CLK_UART6_HSI
223 CLK_UART78_HSI
Yann Gautierc948f772019-01-17 19:16:03 +0100224 CLK_SPDIF_PLL4P
Antonio Borneo2dc9fe72019-07-29 14:46:16 +0200225 CLK_FDCAN_PLL4R
Yann Gautier587f60f2018-07-05 16:49:51 +0200226 CLK_SAI1_PLL3Q
227 CLK_SAI2_PLL3Q
228 CLK_SAI3_PLL3Q
229 CLK_SAI4_PLL3Q
Lionel Debieved5942392022-02-23 00:05:51 +0100230 CLK_RNG1_CSI
Yann Gautierc948f772019-01-17 19:16:03 +0100231 CLK_RNG2_LSI
Yann Gautier587f60f2018-07-05 16:49:51 +0200232 CLK_LPTIM1_PCLK1
233 CLK_LPTIM23_PCLK3
Yann Gautierc948f772019-01-17 19:16:03 +0100234 CLK_LPTIM45_LSE
Yann Gautier587f60f2018-07-05 16:49:51 +0200235 >;
236
Gabriel Fernandez4391e5e2022-08-16 11:40:03 +0200237 st,clkdiv = <
238 DIV(DIV_MPU, 1)
239 DIV(DIV_AXI, 0)
240 DIV(DIV_MCU, 0)
241 DIV(DIV_APB1, 1)
242 DIV(DIV_APB2, 1)
243 DIV(DIV_APB3, 1)
244 DIV(DIV_APB4, 1)
245 DIV(DIV_APB5, 2)
Valentin Caron33573ea2024-12-11 11:20:04 +0100246 DIV(DIV_RTC, 23)
Gabriel Fernandez4391e5e2022-08-16 11:40:03 +0200247 DIV(DIV_MCO1, 0)
248 DIV(DIV_MCO2, 0)
249 >;
250
251 st,pll_vco {
Gabriel Fernandez4391e5e2022-08-16 11:40:03 +0200252 pll2_vco_1066Mhz: pll2-vco-1066Mhz {
253 src = <CLK_PLL12_HSE>;
254 divmn = <2 65>;
255 frac = <0x1400>;
256 };
257
258 pll3_vco_417Mhz: pll3-vco-417Mhz {
259 src = <CLK_PLL3_HSE>;
260 divmn = <1 33>;
261 frac = <0x1a04>;
262 };
263
264 pll4_vco_594Mhz: pll4-vco-594Mhz {
265 src = <CLK_PLL4_HSE>;
266 divmn = <3 98>;
267 };
268 };
269
Yann Gautier587f60f2018-07-05 16:49:51 +0200270 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
271 pll2: st,pll@1 {
Yann Gautiercdbbb9f2021-05-17 11:25:37 +0200272 compatible = "st,stm32mp1-pll";
273 reg = <1>;
Gabriel Fernandez4391e5e2022-08-16 11:40:03 +0200274
275 st,pll = <&pll2_cfg1>;
276
277 pll2_cfg1: pll2_cfg1 {
278 st,pll_vco = <&pll2_vco_1066Mhz>;
279 st,pll_div_pqr = <1 0 0>;
280 };
Yann Gautier587f60f2018-07-05 16:49:51 +0200281 };
282
Yann Gautierc948f772019-01-17 19:16:03 +0100283 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
Yann Gautier587f60f2018-07-05 16:49:51 +0200284 pll3: st,pll@2 {
Yann Gautiercdbbb9f2021-05-17 11:25:37 +0200285 compatible = "st,stm32mp1-pll";
286 reg = <2>;
Gabriel Fernandez4391e5e2022-08-16 11:40:03 +0200287
288 st,pll = <&pll3_cfg1>;
289
290 pll3_cfg1: pll3_cfg1 {
291 st,pll_vco = <&pll3_vco_417Mhz>;
292 st,pll_div_pqr = <1 16 36>;
293 };
Yann Gautier587f60f2018-07-05 16:49:51 +0200294 };
295
Yann Gautierc948f772019-01-17 19:16:03 +0100296 /* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
Yann Gautier587f60f2018-07-05 16:49:51 +0200297 pll4: st,pll@3 {
Yann Gautiercdbbb9f2021-05-17 11:25:37 +0200298 compatible = "st,stm32mp1-pll";
299 reg = <3>;
Gabriel Fernandez4391e5e2022-08-16 11:40:03 +0200300
301 st,pll = <&pll4_cfg1>;
302
303 pll4_cfg1: pll4_cfg1 {
304 st,pll_vco = <&pll4_vco_594Mhz>;
305 st,pll_div_pqr = <5 7 7>;
306 };
Yann Gautier587f60f2018-07-05 16:49:51 +0200307 };
308};
309
Yann Gautier277d6af2020-09-18 15:04:14 +0200310&rng1 {
311 status = "okay";
312};
313
314&rtc {
315 status = "okay";
316};
317
318&sdmmc1 {
319 pinctrl-names = "default";
320 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
321 disable-wp;
322 st,sig-dir;
323 st,neg-edge;
324 st,use-ckin;
325 bus-width = <4>;
326 vmmc-supply = <&vdd_sd>;
327 sd-uhs-sdr12;
328 sd-uhs-sdr25;
329 sd-uhs-sdr50;
330 sd-uhs-ddr50;
331 status = "okay";
332};
333
334&sdmmc2 {
335 pinctrl-names = "default";
336 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
337 non-removable;
338 no-sd;
339 no-sdio;
340 st,neg-edge;
341 bus-width = <8>;
342 vmmc-supply = <&v3v3>;
343 vqmmc-supply = <&vdd>;
344 mmc-ddr-3_3v;
345 status = "okay";
346};
347
348&uart4 {
349 pinctrl-names = "default";
350 pinctrl-0 = <&uart4_pins_a>;
351 status = "okay";
Yann Gautierf2378222019-06-04 17:24:36 +0200352};