blob: e59da53502c13027e996f352f232551363361716 [file] [log] [blame]
Marek Vasut19953732020-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 Delaunay1a4f57c2020-03-06 17:54:41 +01007#include "stm32mp15-u-boot.dtsi"
Marek Vasut92ca0f72020-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 Vasut19953732020-01-24 18:39:16 +010011
12/ {
13 aliases {
14 i2c1 = &i2c2;
15 i2c3 = &i2c4;
16 i2c4 = &i2c5;
17 mmc0 = &sdmmc1;
18 mmc1 = &sdmmc2;
19 spi0 = &qspi;
20 usb0 = &usbotg_hs;
21 };
22
23 config {
24 u-boot,boot-led = "heartbeat";
25 u-boot,error-led = "error";
26 st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
27 st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
Marek Vasut731fd502020-04-22 13:18:11 +020028 dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15 0>;
Marek Vasut2d683652020-04-22 13:18:14 +020029 dh,ddr3-coding-gpios = <&gpioz 6 0>, <&gpioz 7 0>;
Marek Vasut19953732020-01-24 18:39:16 +010030 };
31
32 led {
33 red {
34 label = "error";
35 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
36 default-state = "off";
37 status = "okay";
38 };
39
40 blue {
41 default-state = "on";
42 };
43 };
Marek Vasutde80a242020-03-28 02:01:58 +010044
45 /* This is actually on FMC2, but we do not have bus driver for that */
46 ksz8851: ks8851mll@64000000 {
47 compatible = "micrel,ks8851-mll";
48 reg = <0x64000000 0x20000>;
49 };
Marek Vasut19953732020-01-24 18:39:16 +010050};
51
52&i2c4 {
53 u-boot,dm-pre-reloc;
54};
55
56&i2c4_pins_a {
57 u-boot,dm-pre-reloc;
58 pins {
59 u-boot,dm-pre-reloc;
60 };
61};
62
Marek Vasutde80a242020-03-28 02:01:58 +010063&pinctrl {
64 /* These should bound to FMC2 bus driver, but we do not have one */
65 pinctrl-0 = <&fmc_pins_b>;
66 pinctrl-1 = <&fmc_sleep_pins_b>;
67 pinctrl-names = "default", "sleep";
68
69 fmc_pins_b: fmc-0 {
70 pins1 {
71 pinmux = <STM32_PINMUX('D', 4, AF12)>, /* FMC_NOE */
72 <STM32_PINMUX('D', 5, AF12)>, /* FMC_NWE */
73 <STM32_PINMUX('B', 7, AF12)>, /* FMC_NL */
74 <STM32_PINMUX('D', 14, AF12)>, /* FMC_D0 */
75 <STM32_PINMUX('D', 15, AF12)>, /* FMC_D1 */
76 <STM32_PINMUX('D', 0, AF12)>, /* FMC_D2 */
77 <STM32_PINMUX('D', 1, AF12)>, /* FMC_D3 */
78 <STM32_PINMUX('E', 7, AF12)>, /* FMC_D4 */
79 <STM32_PINMUX('E', 8, AF12)>, /* FMC_D5 */
80 <STM32_PINMUX('E', 9, AF12)>, /* FMC_D6 */
81 <STM32_PINMUX('E', 10, AF12)>, /* FMC_D7 */
82 <STM32_PINMUX('E', 11, AF12)>, /* FMC_D8 */
83 <STM32_PINMUX('E', 12, AF12)>, /* FMC_D9 */
84 <STM32_PINMUX('E', 13, AF12)>, /* FMC_D10 */
85 <STM32_PINMUX('E', 14, AF12)>, /* FMC_D11 */
86 <STM32_PINMUX('E', 15, AF12)>, /* FMC_D12 */
87 <STM32_PINMUX('D', 8, AF12)>, /* FMC_D13 */
88 <STM32_PINMUX('D', 9, AF12)>, /* FMC_D14 */
89 <STM32_PINMUX('D', 10, AF12)>, /* FMC_D15 */
90 <STM32_PINMUX('G', 9, AF12)>, /* FMC_NE2_FMC_NCE */
91 <STM32_PINMUX('G', 12, AF12)>; /* FMC_NE4 */
92 bias-disable;
93 drive-push-pull;
94 slew-rate = <3>;
95 };
96 };
97
98 fmc_sleep_pins_b: fmc-sleep-0 {
99 pins {
100 pinmux = <STM32_PINMUX('D', 4, ANALOG)>, /* FMC_NOE */
101 <STM32_PINMUX('D', 5, ANALOG)>, /* FMC_NWE */
102 <STM32_PINMUX('B', 7, ANALOG)>, /* FMC_NL */
103 <STM32_PINMUX('D', 14, ANALOG)>, /* FMC_D0 */
104 <STM32_PINMUX('D', 15, ANALOG)>, /* FMC_D1 */
105 <STM32_PINMUX('D', 0, ANALOG)>, /* FMC_D2 */
106 <STM32_PINMUX('D', 1, ANALOG)>, /* FMC_D3 */
107 <STM32_PINMUX('E', 7, ANALOG)>, /* FMC_D4 */
108 <STM32_PINMUX('E', 8, ANALOG)>, /* FMC_D5 */
109 <STM32_PINMUX('E', 9, ANALOG)>, /* FMC_D6 */
110 <STM32_PINMUX('E', 10, ANALOG)>, /* FMC_D7 */
111 <STM32_PINMUX('E', 11, ANALOG)>, /* FMC_D8 */
112 <STM32_PINMUX('E', 12, ANALOG)>, /* FMC_D9 */
113 <STM32_PINMUX('E', 13, ANALOG)>, /* FMC_D10 */
114 <STM32_PINMUX('E', 14, ANALOG)>, /* FMC_D11 */
115 <STM32_PINMUX('E', 15, ANALOG)>, /* FMC_D12 */
116 <STM32_PINMUX('D', 8, ANALOG)>, /* FMC_D13 */
117 <STM32_PINMUX('D', 9, ANALOG)>, /* FMC_D14 */
118 <STM32_PINMUX('D', 10, ANALOG)>, /* FMC_D15 */
119 <STM32_PINMUX('G', 9, ANALOG)>, /* FMC_NE2_FMC_NCE */
120 <STM32_PINMUX('G', 12, ANALOG)>; /* FMC_NE4 */
121 };
122 };
123};
124
Marek Vasut19953732020-01-24 18:39:16 +0100125&pmic {
126 u-boot,dm-pre-reloc;
127};
128
129&flash0 {
130 u-boot,dm-spl;
131};
132
133&qspi {
134 u-boot,dm-spl;
135};
136
137&qspi_clk_pins_a {
138 u-boot,dm-spl;
139 pins {
140 u-boot,dm-spl;
141 };
142};
143
144&qspi_bk1_pins_a {
145 u-boot,dm-spl;
146 pins1 {
147 u-boot,dm-spl;
148 };
149 pins2 {
150 u-boot,dm-spl;
151 };
152};
153
154&qspi_bk2_pins_a {
155 u-boot,dm-spl;
156 pins1 {
157 u-boot,dm-spl;
158 };
159 pins2 {
160 u-boot,dm-spl;
161 };
162};
163
164&rcc {
165 st,clksrc = <
166 CLK_MPU_PLL1P
167 CLK_AXI_PLL2P
168 CLK_MCU_PLL3P
169 CLK_PLL12_HSE
170 CLK_PLL3_HSE
171 CLK_PLL4_HSE
172 CLK_RTC_LSE
173 CLK_MCO1_DISABLED
174 CLK_MCO2_DISABLED
175 >;
176
177 st,clkdiv = <
178 1 /*MPU*/
179 0 /*AXI*/
180 0 /*MCU*/
181 1 /*APB1*/
182 1 /*APB2*/
183 1 /*APB3*/
184 1 /*APB4*/
185 2 /*APB5*/
186 23 /*RTC*/
187 0 /*MCO1*/
188 0 /*MCO2*/
189 >;
190
191 st,pkcs = <
192 CLK_CKPER_HSE
193 CLK_FMC_ACLK
194 CLK_QSPI_ACLK
195 CLK_ETH_PLL4P
196 CLK_SDMMC12_PLL4P
197 CLK_DSI_DSIPLL
198 CLK_STGEN_HSE
199 CLK_USBPHY_HSE
200 CLK_SPI2S1_PLL3Q
201 CLK_SPI2S23_PLL3Q
202 CLK_SPI45_HSI
203 CLK_SPI6_HSI
204 CLK_I2C46_HSI
205 CLK_SDMMC3_PLL4P
206 CLK_USBO_USBPHY
207 CLK_ADC_CKPER
208 CLK_CEC_LSE
209 CLK_I2C12_HSI
210 CLK_I2C35_HSI
211 CLK_UART1_HSI
212 CLK_UART24_HSI
213 CLK_UART35_HSI
214 CLK_UART6_HSI
215 CLK_UART78_HSI
216 CLK_SPDIF_PLL4P
Antonio Borneodb0cd2d2020-01-28 10:11:01 +0100217 CLK_FDCAN_PLL4R
Marek Vasut19953732020-01-24 18:39:16 +0100218 CLK_SAI1_PLL3Q
219 CLK_SAI2_PLL3Q
220 CLK_SAI3_PLL3Q
221 CLK_SAI4_PLL3Q
222 CLK_RNG1_LSI
223 CLK_RNG2_LSI
224 CLK_LPTIM1_PCLK1
225 CLK_LPTIM23_PCLK3
226 CLK_LPTIM45_LSE
227 >;
228
229 /* VCO = 1300.0 MHz => P = 650 (CPU) */
230 pll1: st,pll@0 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100231 compatible = "st,stm32mp1-pll";
232 reg = <0>;
Marek Vasut19953732020-01-24 18:39:16 +0100233 cfg = < 2 80 0 0 0 PQR(1,0,0) >;
234 frac = < 0x800 >;
235 u-boot,dm-pre-reloc;
236 };
237
238 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
239 pll2: st,pll@1 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100240 compatible = "st,stm32mp1-pll";
241 reg = <1>;
Marek Vasut19953732020-01-24 18:39:16 +0100242 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
243 frac = < 0x1400 >;
244 u-boot,dm-pre-reloc;
245 };
246
247 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
248 pll3: st,pll@2 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100249 compatible = "st,stm32mp1-pll";
250 reg = <2>;
Marek Vasut19953732020-01-24 18:39:16 +0100251 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
252 frac = < 0x1a04 >;
253 u-boot,dm-pre-reloc;
254 };
255
256 /* VCO = 600.0 MHz => P = 50, Q = 50, R = 50 */
257 pll4: st,pll@3 {
Patrick Delaunay8d93a972020-01-28 10:11:03 +0100258 compatible = "st,stm32mp1-pll";
259 reg = <3>;
Marek Vasut19953732020-01-24 18:39:16 +0100260 cfg = < 1 49 11 11 11 PQR(1,1,1) >;
261 u-boot,dm-pre-reloc;
262 };
263};
264
265&sdmmc1 {
266 u-boot,dm-spl;
267};
268
269&sdmmc1_b4_pins_a {
270 u-boot,dm-spl;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100271 pins1 {
272 u-boot,dm-spl;
273 };
274 pins2 {
Marek Vasut19953732020-01-24 18:39:16 +0100275 u-boot,dm-spl;
276 };
277};
278
279&sdmmc1_dir_pins_a {
280 u-boot,dm-spl;
281 pins1 {
282 u-boot,dm-spl;
283 };
284 pins2 {
285 u-boot,dm-spl;
286 };
287};
288
289&sdmmc2 {
290 u-boot,dm-spl;
291};
292
293&sdmmc2_b4_pins_a {
294 u-boot,dm-spl;
295 pins {
296 u-boot,dm-spl;
297 };
298};
299
300&sdmmc2_d47_pins_a {
301 u-boot,dm-spl;
302 pins {
303 u-boot,dm-spl;
304 };
305};
306
307&uart4 {
308 u-boot,dm-pre-reloc;
309};
310
311&uart4_pins_a {
312 u-boot,dm-pre-reloc;
313 pins1 {
314 u-boot,dm-pre-reloc;
315 };
316 pins2 {
317 u-boot,dm-pre-reloc;
318 /* pull-up on rx to avoid floating level */
319 bias-pull-up;
320 };
321};