stm32mp157c-ed1.dts 6.05 KB
Newer Older
Yann Gautier's avatar
Yann Gautier committed
1
2
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
Yann Gautier's avatar
Yann Gautier committed
3
 * Copyright (C) STMicroelectronics 2017-2019 - All Rights Reserved
Yann Gautier's avatar
Yann Gautier committed
4
5
6
7
 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
 */
/dts-v1/;

8
9
10
11
12
13
#include "stm32mp157.dtsi"
#include "stm32mp15xc.dtsi"
#include "stm32mp15-pinctrl.dtsi"
#include "stm32mp15xxaa-pinctrl.dtsi"
#include <dt-bindings/clock/stm32mp1-clksrc.h>
#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
Yann Gautier's avatar
Yann Gautier committed
14
15

/ {
16
	model = "STMicroelectronics STM32MP157C eval daughter";
Yann Gautier's avatar
Yann Gautier committed
17
18
19
	compatible = "st,stm32mp157c-ed1", "st,stm32mp157";

	chosen {
20
		stdout-path = "serial0:115200n8";
Yann Gautier's avatar
Yann Gautier committed
21
	};
22

23
24
25
26
27
28

	memory@c0000000 {
		device_type = "memory";
		reg = <0xC0000000 0x40000000>;
	};

29
30
31
32
33
	aliases {
		serial0 = &uart4;
	};
};

34
35
36
37
38
39
40
41
&bsec {
	board_id: board_id@ec {
		reg = <0xec 0x4>;
		status = "okay";
		secure-status = "okay";
	};
};

42
43
&clk_hse {
	st,digbypass;
Yann Gautier's avatar
Yann Gautier committed
44
45
};

46
47
48
49
50
51
52
53
54
55
56
57
&cpu0 {
	cpu-supply = <&vddcore>;
};

&cpu1 {
	cpu-supply = <&vddcore>;
};

&cryp1 {
	status="okay";
};

58
59
60
61
&hash1 {
	status = "okay";
};

Yann Gautier's avatar
Yann Gautier committed
62
63
64
65
66
&i2c4 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c4_pins_a>;
	i2c-scl-rising-time-ns = <185>;
	i2c-scl-falling-time-ns = <20>;
67
	clock-frequency = <400000>;
Yann Gautier's avatar
Yann Gautier committed
68
69
	status = "okay";

70
71
	pmic: stpmic@33 {
		compatible = "st,stpmic1";
Yann Gautier's avatar
Yann Gautier committed
72
		reg = <0x33>;
73
74
75
		interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;
		interrupt-controller;
		#interrupt-cells = <2>;
Yann Gautier's avatar
Yann Gautier committed
76
77
78
		status = "okay";

		regulators {
79
			compatible = "st,stpmic1-regulators";
80
81
82
83
84
			ldo1-supply = <&v3v3>;
			ldo2-supply = <&v3v3>;
			ldo3-supply = <&vdd_ddr>;
			ldo5-supply = <&v3v3>;
			ldo6-supply = <&v3v3>;
85
86
			pwr_sw1-supply = <&bst_out>;
			pwr_sw2-supply = <&bst_out>;
87
88
89

			vddcore: buck1 {
				regulator-name = "vddcore";
90
				regulator-min-microvolt = <1200000>;
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-initial-mode = <0>;
				regulator-over-current-protection;
			};

			vdd_ddr: buck2 {
				regulator-name = "vdd_ddr";
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-initial-mode = <0>;
				regulator-over-current-protection;
			};

			vdd: buck3 {
				regulator-name = "vdd";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
				st,mask-reset;
				regulator-initial-mode = <0>;
				regulator-over-current-protection;
			};

Yann Gautier's avatar
Yann Gautier committed
116
117
118
119
			v3v3: buck4 {
				regulator-name = "v3v3";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
120
				regulator-always-on;
Yann Gautier's avatar
Yann Gautier committed
121
				regulator-over-current-protection;
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
				regulator-initial-mode = <0>;
			};

			vdda: ldo1 {
				regulator-name = "vdda";
				regulator-min-microvolt = <2900000>;
				regulator-max-microvolt = <2900000>;
			};

			v2v8: ldo2 {
				regulator-name = "v2v8";
				regulator-min-microvolt = <2800000>;
				regulator-max-microvolt = <2800000>;
			};

			vtt_ddr: ldo3 {
				regulator-name = "vtt_ddr";
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <750000>;
				regulator-always-on;
				regulator-over-current-protection;
			};

			vdd_usb: ldo4 {
				regulator-name = "vdd_usb";
Yann Gautier's avatar
Yann Gautier committed
147
148
149
150
151
152
153
			};

			vdd_sd: ldo5 {
				regulator-name = "vdd_sd";
				regulator-min-microvolt = <2900000>;
				regulator-max-microvolt = <2900000>;
				regulator-boot-on;
154
			};
Yann Gautier's avatar
Yann Gautier committed
155

156
157
158
159
160
161
162
163
164
			v1v8: ldo6 {
				regulator-name = "v1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
			};

			vref_ddr: vref_ddr {
				regulator-name = "vref_ddr";
				regulator-always-on;
Yann Gautier's avatar
Yann Gautier committed
165
166
			};

167
168
169
			bst_out: boost {
				regulator-name = "bst_out";
			};
170

171
172
173
			vbus_otg: pwr_sw1 {
				regulator-name = "vbus_otg";
			 };
Yann Gautier's avatar
Yann Gautier committed
174

175
176
177
178
179
			 vbus_sw: pwr_sw2 {
				regulator-name = "vbus_sw";
				regulator-active-discharge = <1>;
			 };
		};
180

181
182
183
184
185
		onkey {
			compatible = "st,stpmic1-onkey";
			power-off-time-sec = <10>;
			status = "okay";
		};
Yann Gautier's avatar
Yann Gautier committed
186

187
188
189
190
191
		watchdog {
			compatible = "st,stpmic1-wdt";
			status = "disabled";
		};
	};
Yann Gautier's avatar
Yann Gautier committed
192
193
};

194
195
&iwdg2 {
	timeout-sec = <32>;
Yann Gautier's avatar
Yann Gautier committed
196
197
198
	status = "okay";
};

199
200
201
&pwr_regulators {
	vdd-supply = <&vdd>;
	vdd_3v3_usbfs-supply = <&vdd_usb>;
Yann Gautier's avatar
Yann Gautier committed
202
203
204
};

&rcc {
205
	secure-status = "disabled";
Yann Gautier's avatar
Yann Gautier committed
206
207
208
	st,clksrc = <
		CLK_MPU_PLL1P
		CLK_AXI_PLL2P
209
		CLK_MCU_PLL3P
Yann Gautier's avatar
Yann Gautier committed
210
211
212
213
214
215
216
217
218
219
220
		CLK_PLL12_HSE
		CLK_PLL3_HSE
		CLK_PLL4_HSE
		CLK_RTC_LSE
		CLK_MCO1_DISABLED
		CLK_MCO2_DISABLED
	>;

	st,clkdiv = <
		1 /*MPU*/
		0 /*AXI*/
221
		0 /*MCU*/
Yann Gautier's avatar
Yann Gautier committed
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
		1 /*APB1*/
		1 /*APB2*/
		1 /*APB3*/
		1 /*APB4*/
		2 /*APB5*/
		23 /*RTC*/
		0 /*MCO1*/
		0 /*MCO2*/
	>;

	st,pkcs = <
		CLK_CKPER_HSE
		CLK_FMC_ACLK
		CLK_QSPI_ACLK
		CLK_ETH_DISABLED
237
		CLK_SDMMC12_PLL4P
Yann Gautier's avatar
Yann Gautier committed
238
239
240
241
242
243
244
245
		CLK_DSI_DSIPLL
		CLK_STGEN_HSE
		CLK_USBPHY_HSE
		CLK_SPI2S1_PLL3Q
		CLK_SPI2S23_PLL3Q
		CLK_SPI45_HSI
		CLK_SPI6_HSI
		CLK_I2C46_HSI
246
		CLK_SDMMC3_PLL4P
Yann Gautier's avatar
Yann Gautier committed
247
248
249
250
251
252
253
254
255
256
		CLK_USBO_USBPHY
		CLK_ADC_CKPER
		CLK_CEC_LSE
		CLK_I2C12_HSI
		CLK_I2C35_HSI
		CLK_UART1_HSI
		CLK_UART24_HSI
		CLK_UART35_HSI
		CLK_UART6_HSI
		CLK_UART78_HSI
257
		CLK_SPDIF_PLL4P
258
		CLK_FDCAN_PLL4R
Yann Gautier's avatar
Yann Gautier committed
259
260
261
262
		CLK_SAI1_PLL3Q
		CLK_SAI2_PLL3Q
		CLK_SAI3_PLL3Q
		CLK_SAI4_PLL3Q
263
264
		CLK_RNG1_LSI
		CLK_RNG2_LSI
Yann Gautier's avatar
Yann Gautier committed
265
266
		CLK_LPTIM1_PCLK1
		CLK_LPTIM23_PCLK3
267
		CLK_LPTIM45_LSE
Yann Gautier's avatar
Yann Gautier committed
268
269
270
271
272
273
274
275
276
277
278
279
280
281
	>;

	/* VCO = 1300.0 MHz => P = 650 (CPU) */
	pll1: st,pll@0 {
		cfg = < 2 80 0 0 0 PQR(1,0,0) >;
		frac = < 0x800 >;
	};

	/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
	pll2: st,pll@1 {
		cfg = < 2 65 1 0 0 PQR(1,1,1) >;
		frac = < 0x1400 >;
	};

282
	/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
Yann Gautier's avatar
Yann Gautier committed
283
	pll3: st,pll@2 {
284
285
		cfg = < 1 33 1 16 36 PQR(1,1,1) >;
		frac = < 0x1a04 >;
Yann Gautier's avatar
Yann Gautier committed
286
287
	};

288
	/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
Yann Gautier's avatar
Yann Gautier committed
289
	pll4: st,pll@3 {
290
		cfg = < 3 98 5 7 7 PQR(1,1,1) >;
Yann Gautier's avatar
Yann Gautier committed
291
292
293
	};
};

294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
&rng1 {
	status = "okay";
};

&rtc {
	status = "okay";
};

&sdmmc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
	disable-wp;
	st,sig-dir;
	st,neg-edge;
	st,use-ckin;
	bus-width = <4>;
	vmmc-supply = <&vdd_sd>;
	sd-uhs-sdr12;
	sd-uhs-sdr25;
	sd-uhs-sdr50;
	sd-uhs-ddr50;
	status = "okay";
};

&sdmmc2 {
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
	non-removable;
	no-sd;
	no-sdio;
	st,neg-edge;
	bus-width = <8>;
	vmmc-supply = <&v3v3>;
	vqmmc-supply = <&vdd>;
	mmc-ddr-3_3v;
	status = "okay";
};

&uart4 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart4_pins_a>;
	status = "okay";
336
};