blob: 47ba9fa4a7830e3f2b5dbfaacd380e2ce8a79c66 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Patrice Chotardcb1c9382017-12-12 09:49:43 +01002/*
3 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
Patrice Chotard90e82782021-01-04 17:00:56 +01004 * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
Patrice Chotardcb1c9382017-12-12 09:49:43 +01005 */
6
7#include <dt-bindings/memory/stm32-sdram.h>
8/{
9 clocks {
Simon Glassd3a98cb2023-02-13 08:56:33 -070010 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010011 };
12
13 aliases {
14 /* Aliases for gpios so as to use sequence */
15 gpio0 = &gpioa;
16 gpio1 = &gpiob;
17 gpio2 = &gpioc;
18 gpio3 = &gpiod;
19 gpio4 = &gpioe;
20 gpio5 = &gpiof;
21 gpio6 = &gpiog;
22 gpio7 = &gpioh;
23 gpio8 = &gpioi;
24 gpio9 = &gpioj;
25 gpio10 = &gpiok;
Patrice Chotard265fa122019-04-30 16:08:06 +020026 spi0 = &qspi;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010027 };
28
29 soc {
Simon Glassd3a98cb2023-02-13 08:56:33 -070030 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010031
32 fmc: fmc@A0000000 {
33 compatible = "st,stm32-fmc";
Patrice Chotard1bd7de82021-11-15 11:39:17 +010034 reg = <0xa0000000 0x1000>;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010035 clocks = <&rcc 0 STM32F4_AHB3_CLOCK(FMC)>;
36 st,syscfg = <&syscfg>;
37 pinctrl-0 = <&fmc_pins_d32>;
38 pinctrl-names = "default";
39 st,mem_remap = <4>;
Simon Glassd3a98cb2023-02-13 08:56:33 -070040 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010041
42 /*
43 * Memory configuration from sdram
44 * MICRON MT48LC4M32B2B5-6A
45 */
46 bank0: bank@0 {
47 st,sdram-control = /bits/ 8 <NO_COL_8
48 NO_ROW_12
49 MWIDTH_32
50 BANKS_4
51 CAS_3
52 SDCLK_2
53 RD_BURST_EN
54 RD_PIPE_DL_0>;
55 st,sdram-timing = /bits/ 8 <TMRD_2
56 TXSR_6
57 TRAS_4
58 TRC_6
59 TWR_2
60 TRP_2
61 TRCD_2>;
62 st,sdram-refcount = < 1292 >;
63 };
64 };
Patrice Chotard265fa122019-04-30 16:08:06 +020065
Patrice Chotard62f56162020-11-06 08:11:58 +010066 qspi: spi@A0001000 {
Patrice Chotard482ab7a2019-06-28 15:02:59 +020067 compatible = "st,stm32f469-qspi";
Patrice Chotard265fa122019-04-30 16:08:06 +020068 #address-cells = <1>;
69 #size-cells = <0>;
Patrice Chotard1bd7de82021-11-15 11:39:17 +010070 reg = <0xa0001000 0x1000>, <0x90000000 0x10000000>;
Patrice Chotard265fa122019-04-30 16:08:06 +020071 reg-names = "qspi", "qspi_mm";
72 interrupts = <91>;
73 spi-max-frequency = <108000000>;
74 clocks = <&rcc 0 STM32F4_AHB3_CLOCK(QSPI)>;
75 resets = <&rcc STM32F4_AHB3_RESET(QSPI)>;
76 pinctrl-0 = <&qspi_pins>;
77 };
Patrice Chotardcb1c9382017-12-12 09:49:43 +010078 };
79};
80
81&clk_hse {
Simon Glassd3a98cb2023-02-13 08:56:33 -070082 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010083};
84
Patrice Chotardcb1c9382017-12-12 09:49:43 +010085&clk_i2s_ckin {
Simon Glassd3a98cb2023-02-13 08:56:33 -070086 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010087};
88
Patrice Chotardcfad1262019-02-18 22:46:25 +010089&clk_lse {
Simon Glassd3a98cb2023-02-13 08:56:33 -070090 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010091};
92
Dario Binacchic650e982023-12-11 23:05:53 +010093&dsi {
94 clocks = <&rcc 0 STM32F4_APB2_CLOCK(DSI)>,
Dario Binacchi2a3c2ea2023-12-11 23:05:54 +010095 <&rcc 0 STM32F4_APB2_CLOCK(LTDC)>,
Dario Binacchic650e982023-12-11 23:05:53 +010096 <&clk_hse>;
Dario Binacchi2a3c2ea2023-12-11 23:05:54 +010097 clock-names = "pclk", "px_clk", "ref";
Dario Binacchic650e982023-12-11 23:05:53 +010098};
99
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100100&gpioa {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700101 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100102};
103
104&gpiob {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700105 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100106};
107
108&gpioc {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700109 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100110};
111
112&gpiod {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700113 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100114};
115
116&gpioe {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700117 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100118};
119
120&gpiof {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700121 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100122};
123
124&gpiog {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700125 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100126};
127
128&gpioh {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700129 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100130};
131
132&gpioi {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700133 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100134};
135
136&gpioj {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700137 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100138};
139
140&gpiok {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700141 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100142};
143
Dario Binacchid971e092023-12-11 23:05:52 +0100144&ltdc {
Dario Binacchi2a3c2ea2023-12-11 23:05:54 +0100145 bootph-all;
146
Dario Binacchid971e092023-12-11 23:05:52 +0100147 clocks = <&rcc 0 STM32F4_APB2_CLOCK(LTDC)>;
148};
149
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100150&pinctrl {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700151 bootph-all;
Patrice Chotard83975322022-09-23 13:20:33 +0200152
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100153 fmc_pins_d32: fmc_d32@0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700154 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100155 pins
156 {
157 pinmux = <STM32_PINMUX('I',10, AF12)>, /* D31 */
158 <STM32_PINMUX('I', 9, AF12)>, /* D30 */
159 <STM32_PINMUX('I', 7, AF12)>, /* D29 */
160 <STM32_PINMUX('I', 6, AF12)>, /* D28 */
161 <STM32_PINMUX('I', 3, AF12)>, /* D27 */
162 <STM32_PINMUX('I', 2, AF12)>, /* D26 */
163 <STM32_PINMUX('I', 1, AF12)>, /* D25 */
164 <STM32_PINMUX('I', 0, AF12)>, /* D24 */
165 <STM32_PINMUX('H',15, AF12)>, /* D23 */
166 <STM32_PINMUX('H',14, AF12)>, /* D22 */
167 <STM32_PINMUX('H',13, AF12)>, /* D21 */
168 <STM32_PINMUX('H',12, AF12)>, /* D20 */
169 <STM32_PINMUX('H',11, AF12)>, /* D19 */
170 <STM32_PINMUX('H',10, AF12)>, /* D18 */
171 <STM32_PINMUX('H', 9, AF12)>, /* D17 */
172 <STM32_PINMUX('H', 8, AF12)>, /* D16 */
173
174 <STM32_PINMUX('D',10, AF12)>, /* D15 */
175 <STM32_PINMUX('D', 9, AF12)>, /* D14 */
176 <STM32_PINMUX('D', 8, AF12)>, /* D13 */
177 <STM32_PINMUX('E',15, AF12)>, /* D12 */
178 <STM32_PINMUX('E',14, AF12)>, /* D11 */
179 <STM32_PINMUX('E',13, AF12)>, /* D10 */
180 <STM32_PINMUX('E',12, AF12)>, /* D09 */
181 <STM32_PINMUX('E',11, AF12)>, /* D08 */
182 <STM32_PINMUX('E',10, AF12)>, /* D07 */
183 <STM32_PINMUX('E', 9, AF12)>, /* D06 */
184 <STM32_PINMUX('E', 8, AF12)>, /* D05 */
185 <STM32_PINMUX('E', 7, AF12)>, /* D04 */
186 <STM32_PINMUX('D', 1, AF12)>, /* D03 */
187 <STM32_PINMUX('D', 0, AF12)>, /* D02 */
188 <STM32_PINMUX('D',15, AF12)>, /* D01 */
189 <STM32_PINMUX('D',14, AF12)>, /* D00 */
190
191 <STM32_PINMUX('E', 0, AF12)>, /* NBL0 */
192 <STM32_PINMUX('E', 1, AF12)>, /* NBL1 */
193 <STM32_PINMUX('I', 4, AF12)>, /* NBL2 */
194 <STM32_PINMUX('I', 5, AF12)>, /* NBL3 */
195
196 <STM32_PINMUX('G', 5, AF12)>, /* BA1 */
197 <STM32_PINMUX('G', 4, AF12)>, /* BA0 */
198
199 <STM32_PINMUX('G', 1, AF12)>, /* A11 */
200 <STM32_PINMUX('G', 0, AF12)>, /* A10 */
201 <STM32_PINMUX('F',15, AF12)>, /* A09 */
202 <STM32_PINMUX('F',14, AF12)>, /* A08 */
203 <STM32_PINMUX('F',13, AF12)>, /* A07 */
204 <STM32_PINMUX('F',12, AF12)>, /* A06 */
205 <STM32_PINMUX('F', 5, AF12)>, /* A05 */
206 <STM32_PINMUX('F', 4, AF12)>, /* A04 */
207 <STM32_PINMUX('F', 3, AF12)>, /* A03 */
208 <STM32_PINMUX('F', 2, AF12)>, /* A02 */
209 <STM32_PINMUX('F', 1, AF12)>, /* A01 */
210 <STM32_PINMUX('F', 0, AF12)>, /* A00 */
211
212 <STM32_PINMUX('H', 3, AF12)>, /* SDNE0 */
213 <STM32_PINMUX('C', 0, AF12)>, /* SDNWE */
214 <STM32_PINMUX('F',11, AF12)>, /* SDNRAS */
215 <STM32_PINMUX('G',15, AF12)>, /* SDNCAS */
216 <STM32_PINMUX('H', 2, AF12)>, /* SDCKE0 */
217 <STM32_PINMUX('G', 8, AF12)>; /* SDCLK> */
218 slew-rate = <2>;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700219 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100220 };
221 };
Patrice Chotardcfad1262019-02-18 22:46:25 +0100222
Patrice Chotard265fa122019-04-30 16:08:06 +0200223 qspi_pins: qspi@0 {
224 pins {
225 pinmux = <STM32_PINMUX('F',10, AF9)>, /* CLK */
226 <STM32_PINMUX('B', 6, AF10)>, /* BK1_NCS */
227 <STM32_PINMUX('F', 8, AF10)>, /* BK1_IO0 */
228 <STM32_PINMUX('F', 9, AF10)>, /* BK1_IO1 */
229 <STM32_PINMUX('F', 7, AF9)>, /* BK1_IO2 */
230 <STM32_PINMUX('F', 6, AF9)>; /* BK1_IO3 */
231 slew-rate = <2>;
232 };
233 };
234
Patrice Chotard62f56162020-11-06 08:11:58 +0100235 usart3_pins_a: usart3-0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700236 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100237 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700238 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100239 };
240 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700241 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100242 };
243 };
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100244};
Patrice Chotardcfad1262019-02-18 22:46:25 +0100245
246&pwrcfg {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700247 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100248};
249
Patrice Chotard265fa122019-04-30 16:08:06 +0200250&qspi {
Patrice Chotard1bd7de82021-11-15 11:39:17 +0100251 reg = <0xa0001000 0x1000>, <0x90000000 0x1000000>;
Patrice Chotard62f56162020-11-06 08:11:58 +0100252 flash0: n25q128a@0 {
Patrice Chotard265fa122019-04-30 16:08:06 +0200253 #address-cells = <1>;
254 #size-cells = <1>;
255 compatible = "jedec,spi-nor";
256 spi-max-frequency = <108000000>;
257 spi-tx-bus-width = <4>;
258 spi-rx-bus-width = <4>;
259 reg = <0>;
260 };
261};
Patrice Chotard82270812020-11-06 08:11:59 +0100262
263&rcc {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700264 bootph-all;
Patrice Chotard82270812020-11-06 08:11:59 +0100265};
266
267&syscfg {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700268 bootph-all;
Patrice Chotard82270812020-11-06 08:11:59 +0100269};
270
Patrice Chotard83975322022-09-23 13:20:33 +0200271&timers5 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700272 bootph-all;
Patrice Chotard82270812020-11-06 08:11:59 +0100273};