blob: 21aa4bfb863cc74b9bb564db3b36c3cfe137beb9 [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>
7#include "stm32mp157-u-boot.dtsi"
8#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
9
10/ {
11 aliases {
12 i2c1 = &i2c2;
13 i2c3 = &i2c4;
14 i2c4 = &i2c5;
15 mmc0 = &sdmmc1;
16 mmc1 = &sdmmc2;
17 spi0 = &qspi;
18 usb0 = &usbotg_hs;
19 };
20
21 config {
22 u-boot,boot-led = "heartbeat";
23 u-boot,error-led = "error";
24 st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
25 st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
26 };
27
28 led {
29 red {
30 label = "error";
31 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
32 default-state = "off";
33 status = "okay";
34 };
35
36 blue {
37 default-state = "on";
38 };
39 };
40};
41
42&i2c4 {
43 u-boot,dm-pre-reloc;
44};
45
46&i2c4_pins_a {
47 u-boot,dm-pre-reloc;
48 pins {
49 u-boot,dm-pre-reloc;
50 };
51};
52
53&pmic {
54 u-boot,dm-pre-reloc;
55};
56
57&flash0 {
58 u-boot,dm-spl;
59};
60
61&qspi {
62 u-boot,dm-spl;
63};
64
65&qspi_clk_pins_a {
66 u-boot,dm-spl;
67 pins {
68 u-boot,dm-spl;
69 };
70};
71
72&qspi_bk1_pins_a {
73 u-boot,dm-spl;
74 pins1 {
75 u-boot,dm-spl;
76 };
77 pins2 {
78 u-boot,dm-spl;
79 };
80};
81
82&qspi_bk2_pins_a {
83 u-boot,dm-spl;
84 pins1 {
85 u-boot,dm-spl;
86 };
87 pins2 {
88 u-boot,dm-spl;
89 };
90};
91
92&rcc {
93 st,clksrc = <
94 CLK_MPU_PLL1P
95 CLK_AXI_PLL2P
96 CLK_MCU_PLL3P
97 CLK_PLL12_HSE
98 CLK_PLL3_HSE
99 CLK_PLL4_HSE
100 CLK_RTC_LSE
101 CLK_MCO1_DISABLED
102 CLK_MCO2_DISABLED
103 >;
104
105 st,clkdiv = <
106 1 /*MPU*/
107 0 /*AXI*/
108 0 /*MCU*/
109 1 /*APB1*/
110 1 /*APB2*/
111 1 /*APB3*/
112 1 /*APB4*/
113 2 /*APB5*/
114 23 /*RTC*/
115 0 /*MCO1*/
116 0 /*MCO2*/
117 >;
118
119 st,pkcs = <
120 CLK_CKPER_HSE
121 CLK_FMC_ACLK
122 CLK_QSPI_ACLK
123 CLK_ETH_PLL4P
124 CLK_SDMMC12_PLL4P
125 CLK_DSI_DSIPLL
126 CLK_STGEN_HSE
127 CLK_USBPHY_HSE
128 CLK_SPI2S1_PLL3Q
129 CLK_SPI2S23_PLL3Q
130 CLK_SPI45_HSI
131 CLK_SPI6_HSI
132 CLK_I2C46_HSI
133 CLK_SDMMC3_PLL4P
134 CLK_USBO_USBPHY
135 CLK_ADC_CKPER
136 CLK_CEC_LSE
137 CLK_I2C12_HSI
138 CLK_I2C35_HSI
139 CLK_UART1_HSI
140 CLK_UART24_HSI
141 CLK_UART35_HSI
142 CLK_UART6_HSI
143 CLK_UART78_HSI
144 CLK_SPDIF_PLL4P
Antonio Borneo84159e82020-01-28 10:11:01 +0100145 CLK_FDCAN_PLL4R
Marek Vasut5ff05292020-01-24 18:39:16 +0100146 CLK_SAI1_PLL3Q
147 CLK_SAI2_PLL3Q
148 CLK_SAI3_PLL3Q
149 CLK_SAI4_PLL3Q
150 CLK_RNG1_LSI
151 CLK_RNG2_LSI
152 CLK_LPTIM1_PCLK1
153 CLK_LPTIM23_PCLK3
154 CLK_LPTIM45_LSE
155 >;
156
157 /* VCO = 1300.0 MHz => P = 650 (CPU) */
158 pll1: st,pll@0 {
159 cfg = < 2 80 0 0 0 PQR(1,0,0) >;
160 frac = < 0x800 >;
161 u-boot,dm-pre-reloc;
162 };
163
164 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
165 pll2: st,pll@1 {
166 cfg = < 2 65 1 0 0 PQR(1,1,1) >;
167 frac = < 0x1400 >;
168 u-boot,dm-pre-reloc;
169 };
170
171 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
172 pll3: st,pll@2 {
173 cfg = < 1 33 1 16 36 PQR(1,1,1) >;
174 frac = < 0x1a04 >;
175 u-boot,dm-pre-reloc;
176 };
177
178 /* VCO = 600.0 MHz => P = 50, Q = 50, R = 50 */
179 pll4: st,pll@3 {
180 cfg = < 1 49 11 11 11 PQR(1,1,1) >;
181 u-boot,dm-pre-reloc;
182 };
183};
184
185&sdmmc1 {
186 u-boot,dm-spl;
187};
188
189&sdmmc1_b4_pins_a {
190 u-boot,dm-spl;
191 pins {
192 u-boot,dm-spl;
193 };
194};
195
196&sdmmc1_dir_pins_a {
197 u-boot,dm-spl;
198 pins1 {
199 u-boot,dm-spl;
200 };
201 pins2 {
202 u-boot,dm-spl;
203 };
204};
205
206&sdmmc2 {
207 u-boot,dm-spl;
208};
209
210&sdmmc2_b4_pins_a {
211 u-boot,dm-spl;
212 pins {
213 u-boot,dm-spl;
214 };
215};
216
217&sdmmc2_d47_pins_a {
218 u-boot,dm-spl;
219 pins {
220 u-boot,dm-spl;
221 };
222};
223
224&uart4 {
225 u-boot,dm-pre-reloc;
226};
227
228&uart4_pins_a {
229 u-boot,dm-pre-reloc;
230 pins1 {
231 u-boot,dm-pre-reloc;
232 };
233 pins2 {
234 u-boot,dm-pre-reloc;
235 /* pull-up on rx to avoid floating level */
236 bias-pull-up;
237 };
238};