blob: ee747a52bb7ca8833c01772dcfeb2ef0eedbe412 [file] [log] [blame]
Marek Vasut5ff05292020-01-24 18:39:16 +01001// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2/*
3 * Copyright (C) 2019 Marek Vasut <marex@denx.de>
4 */
5
6#include <dt-bindings/clock/stm32mp1-clksrc.h>
Patrick Delaunay48c5e902020-03-06 17:54:41 +01007#include "stm32mp15-u-boot.dtsi"
Marek Vasut272198e2020-04-29 15:08:38 +02008#include "stm32mp15-ddr3-dhsom-2x1Gb-1066-binG.dtsi"
9#include "stm32mp15-ddr3-dhsom-2x2Gb-1066-binG.dtsi"
10#include "stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi"
Marek Vasut5ff05292020-01-24 18:39:16 +010011
Marek Vasut7d2757f2021-12-30 23:46:47 +010012/delete-node/ &ksz8851;
13
Marek Vasut5ff05292020-01-24 18:39:16 +010014/ {
15 aliases {
16 i2c1 = &i2c2;
17 i2c3 = &i2c4;
18 i2c4 = &i2c5;
19 mmc0 = &sdmmc1;
20 mmc1 = &sdmmc2;
21 spi0 = &qspi;
22 usb0 = &usbotg_hs;
Marek Vasut7d2757f2021-12-30 23:46:47 +010023 eeprom0 = &eeprom0;
24 ethernet1 = &ks8851;
Marek Vasut5ff05292020-01-24 18:39:16 +010025 };
26
27 config {
28 u-boot,boot-led = "heartbeat";
29 u-boot,error-led = "error";
Marek Vasut47b98ba2020-04-22 13:18:11 +020030 dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15 0>;
Marek Vasut39221b52020-04-22 13:18:14 +020031 dh,ddr3-coding-gpios = <&gpioz 6 0>, <&gpioz 7 0>;
Marek Vasut5ff05292020-01-24 18:39:16 +010032 };
33
Marek Vasut0839ea92020-03-28 02:01:58 +010034 /* This is actually on FMC2, but we do not have bus driver for that */
Marek Vasut7d2757f2021-12-30 23:46:47 +010035 ks8851: ks8851mll@64000000 {
Marek Vasut0839ea92020-03-28 02:01:58 +010036 compatible = "micrel,ks8851-mll";
37 reg = <0x64000000 0x20000>;
38 };
Marek Vasut5ff05292020-01-24 18:39:16 +010039};
40
Marek Vasut7d2757f2021-12-30 23:46:47 +010041&ethernet0 {
42 phy-reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
43 /delete-property/ st,eth-ref-clk-sel;
44};
45
46&ethernet0_rmii_pins_a {
47 pins1 {
48 pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH1_RMII_TXD0 */
49 <STM32_PINMUX('G', 14, AF11)>, /* ETH1_RMII_TXD1 */
50 <STM32_PINMUX('B', 11, AF11)>, /* ETH1_RMII_TX_EN */
51 <STM32_PINMUX('A', 1, AF11)>, /* ETH1_RMII_REF_CLK */
52 <STM32_PINMUX('A', 2, AF11)>, /* ETH1_MDIO */
53 <STM32_PINMUX('C', 1, AF11)>; /* ETH1_MDC */
54 };
55};
56
Marek Vasut5ff05292020-01-24 18:39:16 +010057&i2c4 {
58 u-boot,dm-pre-reloc;
Marek Vasut8b642302022-03-14 13:35:54 +010059 u-boot,dm-spl;
Marek Vasut7d2757f2021-12-30 23:46:47 +010060
61 eeprom0: eeprom@50 {
62 };
Marek Vasut5ff05292020-01-24 18:39:16 +010063};
64
65&i2c4_pins_a {
66 u-boot,dm-pre-reloc;
67 pins {
68 u-boot,dm-pre-reloc;
69 };
70};
71
Marek Vasut7d2757f2021-12-30 23:46:47 +010072&phy0 {
73 /delete-property/ reset-gpios;
74};
75
Marek Vasut0839ea92020-03-28 02:01:58 +010076&pinctrl {
77 /* These should bound to FMC2 bus driver, but we do not have one */
Marek Vasutccfcde32020-12-01 11:34:48 +010078 pinctrl-0 = <&fmc_pins_b &mco2_pins_a>;
79 pinctrl-1 = <&fmc_sleep_pins_b &mco2_sleep_pins_a>;
Marek Vasut0839ea92020-03-28 02:01:58 +010080 pinctrl-names = "default", "sleep";
81
Marek Vasutccfcde32020-12-01 11:34:48 +010082 mco2_pins_a: mco2-0 {
83 pins {
84 pinmux = <STM32_PINMUX('G', 2, AF1)>; /* MCO2 */
85 bias-disable;
86 drive-push-pull;
87 slew-rate = <2>;
88 };
89 };
90
91 mco2_sleep_pins_a: mco2-sleep-0 {
92 pins {
93 pinmux = <STM32_PINMUX('G', 2, ANALOG)>; /* MCO2 */
94 };
95 };
Marek Vasut0839ea92020-03-28 02:01:58 +010096};
97
Marek Vasut5ff05292020-01-24 18:39:16 +010098&pmic {
99 u-boot,dm-pre-reloc;
Marek Vasut8b642302022-03-14 13:35:54 +0100100 u-boot,dm-spl;
101
102 regulators {
103 u-boot,dm-spl;
104 };
Marek Vasut5ff05292020-01-24 18:39:16 +0100105};
106
107&flash0 {
108 u-boot,dm-spl;
109};
110
111&qspi {
112 u-boot,dm-spl;
113};
114
115&qspi_clk_pins_a {
116 u-boot,dm-spl;
117 pins {
118 u-boot,dm-spl;
119 };
120};
121
122&qspi_bk1_pins_a {
123 u-boot,dm-spl;
124 pins1 {
125 u-boot,dm-spl;
126 };
127 pins2 {
128 u-boot,dm-spl;
129 };
130};
131
132&qspi_bk2_pins_a {
133 u-boot,dm-spl;
134 pins1 {
135 u-boot,dm-spl;
136 };
137 pins2 {
138 u-boot,dm-spl;
139 };
140};
141
142&rcc {
143 st,clksrc = <
144 CLK_MPU_PLL1P
145 CLK_AXI_PLL2P
146 CLK_MCU_PLL3P
147 CLK_PLL12_HSE
148 CLK_PLL3_HSE
149 CLK_PLL4_HSE
150 CLK_RTC_LSE
151 CLK_MCO1_DISABLED
Marek Vasutccfcde32020-12-01 11:34:48 +0100152 CLK_MCO2_PLL4P
Marek Vasut5ff05292020-01-24 18:39:16 +0100153 >;
154
155 st,clkdiv = <
156 1 /*MPU*/
157 0 /*AXI*/
158 0 /*MCU*/
159 1 /*APB1*/
160 1 /*APB2*/
161 1 /*APB3*/
162 1 /*APB4*/
163 2 /*APB5*/
164 23 /*RTC*/
165 0 /*MCO1*/
Marek Vasutccfcde32020-12-01 11:34:48 +0100166 1 /*MCO2*/
Marek Vasut5ff05292020-01-24 18:39:16 +0100167 >;
168
169 st,pkcs = <
170 CLK_CKPER_HSE
171 CLK_FMC_ACLK
172 CLK_QSPI_ACLK
173 CLK_ETH_PLL4P
174 CLK_SDMMC12_PLL4P
175 CLK_DSI_DSIPLL
176 CLK_STGEN_HSE
177 CLK_USBPHY_HSE
178 CLK_SPI2S1_PLL3Q
179 CLK_SPI2S23_PLL3Q
180 CLK_SPI45_HSI
181 CLK_SPI6_HSI
182 CLK_I2C46_HSI
183 CLK_SDMMC3_PLL4P
184 CLK_USBO_USBPHY
185 CLK_ADC_CKPER
186 CLK_CEC_LSE
187 CLK_I2C12_HSI
188 CLK_I2C35_HSI
189 CLK_UART1_HSI
190 CLK_UART24_HSI
191 CLK_UART35_HSI
192 CLK_UART6_HSI
193 CLK_UART78_HSI
194 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100195 CLK_FDCAN_PLL4R
Marek Vasut5ff05292020-01-24 18:39:16 +0100196 CLK_SAI1_PLL3Q
197 CLK_SAI2_PLL3Q
198 CLK_SAI3_PLL3Q
199 CLK_SAI4_PLL3Q
200 CLK_RNG1_LSI
201 CLK_RNG2_LSI
202 CLK_LPTIM1_PCLK1
203 CLK_LPTIM23_PCLK3
204 CLK_LPTIM45_LSE
205 >;
206
Marek Vasut5ff05292020-01-24 18:39:16 +0100207 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
208 pll2: st,pll@1 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100209 compatible = "st,stm32mp1-pll";
210 reg = <1>;
Marek Vasut5ff05292020-01-24 18:39:16 +0100211 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
212 frac = < 0x1400 >;
213 u-boot,dm-pre-reloc;
214 };
215
216 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
217 pll3: st,pll@2 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100218 compatible = "st,stm32mp1-pll";
219 reg = <2>;
Marek Vasut5ff05292020-01-24 18:39:16 +0100220 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
221 frac = < 0x1a04 >;
222 u-boot,dm-pre-reloc;
223 };
224
225 /* VCO = 600.0 MHz => P = 50, Q = 50, R = 50 */
226 pll4: st,pll@3 {
Patrick Delaunayc22caac2020-01-28 10:11:03 +0100227 compatible = "st,stm32mp1-pll";
228 reg = <3>;
Marek Vasutccfcde32020-12-01 11:34:48 +0100229 cfg = < 1 49 5 11 11 PQR(1,1,1) >;
Marek Vasut5ff05292020-01-24 18:39:16 +0100230 u-boot,dm-pre-reloc;
231 };
232};
233
234&sdmmc1 {
235 u-boot,dm-spl;
Marek Vasut5f5ce602021-11-13 03:29:44 +0100236 st,use-ckin;
237 st,cmd-gpios = <&gpiod 2 0>;
238 st,ck-gpios = <&gpioc 12 0>;
239 st,ckin-gpios = <&gpioe 4 0>;
Marek Vasut5ff05292020-01-24 18:39:16 +0100240};
241
242&sdmmc1_b4_pins_a {
243 u-boot,dm-spl;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100244 pins1 {
245 u-boot,dm-spl;
246 };
247 pins2 {
Marek Vasut5ff05292020-01-24 18:39:16 +0100248 u-boot,dm-spl;
249 };
250};
251
252&sdmmc1_dir_pins_a {
253 u-boot,dm-spl;
254 pins1 {
255 u-boot,dm-spl;
256 };
257 pins2 {
258 u-boot,dm-spl;
259 };
260};
261
262&sdmmc2 {
263 u-boot,dm-spl;
264};
265
266&sdmmc2_b4_pins_a {
267 u-boot,dm-spl;
268 pins {
269 u-boot,dm-spl;
270 };
271};
272
273&sdmmc2_d47_pins_a {
274 u-boot,dm-spl;
275 pins {
276 u-boot,dm-spl;
277 };
278};
279
280&uart4 {
281 u-boot,dm-pre-reloc;
282};
283
284&uart4_pins_a {
285 u-boot,dm-pre-reloc;
286 pins1 {
287 u-boot,dm-pre-reloc;
288 };
289 pins2 {
290 u-boot,dm-pre-reloc;
291 /* pull-up on rx to avoid floating level */
292 bias-pull-up;
293 };
294};
Marek Vasut8b642302022-03-14 13:35:54 +0100295
296&reg11 {
297 u-boot,dm-spl;
298};
299
300&reg18 {
301 u-boot,dm-spl;
302};
303
304&usb33 {
305 u-boot,dm-spl;
306};
307
308&usbotg_hs_pins_a {
309 u-boot,dm-spl;
310};
311
312&usbotg_hs {
313 u-boot,dm-spl;
314};
315
316&usbphyc {
317 u-boot,dm-spl;
318};
319
320&usbphyc_port0 {
321 u-boot,dm-spl;
322};
323
324&usbphyc_port1 {
325 u-boot,dm-spl;
326};
327
328&vdd_usb {
329 u-boot,dm-spl;
330};