blob: c07e2022e4a8a88957af98831751a14b5a15a223 [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
93&gpioa {
Simon Glassd3a98cb2023-02-13 08:56:33 -070094 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010095};
96
97&gpiob {
Simon Glassd3a98cb2023-02-13 08:56:33 -070098 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +010099};
100
101&gpioc {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700102 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100103};
104
105&gpiod {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700106 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100107};
108
109&gpioe {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700110 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100111};
112
113&gpiof {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700114 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100115};
116
117&gpiog {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700118 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100119};
120
121&gpioh {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700122 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100123};
124
125&gpioi {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700126 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100127};
128
129&gpioj {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700130 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100131};
132
133&gpiok {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700134 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100135};
136
137&pinctrl {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700138 bootph-all;
Patrice Chotard83975322022-09-23 13:20:33 +0200139
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100140 fmc_pins_d32: fmc_d32@0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700141 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100142 pins
143 {
144 pinmux = <STM32_PINMUX('I',10, AF12)>, /* D31 */
145 <STM32_PINMUX('I', 9, AF12)>, /* D30 */
146 <STM32_PINMUX('I', 7, AF12)>, /* D29 */
147 <STM32_PINMUX('I', 6, AF12)>, /* D28 */
148 <STM32_PINMUX('I', 3, AF12)>, /* D27 */
149 <STM32_PINMUX('I', 2, AF12)>, /* D26 */
150 <STM32_PINMUX('I', 1, AF12)>, /* D25 */
151 <STM32_PINMUX('I', 0, AF12)>, /* D24 */
152 <STM32_PINMUX('H',15, AF12)>, /* D23 */
153 <STM32_PINMUX('H',14, AF12)>, /* D22 */
154 <STM32_PINMUX('H',13, AF12)>, /* D21 */
155 <STM32_PINMUX('H',12, AF12)>, /* D20 */
156 <STM32_PINMUX('H',11, AF12)>, /* D19 */
157 <STM32_PINMUX('H',10, AF12)>, /* D18 */
158 <STM32_PINMUX('H', 9, AF12)>, /* D17 */
159 <STM32_PINMUX('H', 8, AF12)>, /* D16 */
160
161 <STM32_PINMUX('D',10, AF12)>, /* D15 */
162 <STM32_PINMUX('D', 9, AF12)>, /* D14 */
163 <STM32_PINMUX('D', 8, AF12)>, /* D13 */
164 <STM32_PINMUX('E',15, AF12)>, /* D12 */
165 <STM32_PINMUX('E',14, AF12)>, /* D11 */
166 <STM32_PINMUX('E',13, AF12)>, /* D10 */
167 <STM32_PINMUX('E',12, AF12)>, /* D09 */
168 <STM32_PINMUX('E',11, AF12)>, /* D08 */
169 <STM32_PINMUX('E',10, AF12)>, /* D07 */
170 <STM32_PINMUX('E', 9, AF12)>, /* D06 */
171 <STM32_PINMUX('E', 8, AF12)>, /* D05 */
172 <STM32_PINMUX('E', 7, AF12)>, /* D04 */
173 <STM32_PINMUX('D', 1, AF12)>, /* D03 */
174 <STM32_PINMUX('D', 0, AF12)>, /* D02 */
175 <STM32_PINMUX('D',15, AF12)>, /* D01 */
176 <STM32_PINMUX('D',14, AF12)>, /* D00 */
177
178 <STM32_PINMUX('E', 0, AF12)>, /* NBL0 */
179 <STM32_PINMUX('E', 1, AF12)>, /* NBL1 */
180 <STM32_PINMUX('I', 4, AF12)>, /* NBL2 */
181 <STM32_PINMUX('I', 5, AF12)>, /* NBL3 */
182
183 <STM32_PINMUX('G', 5, AF12)>, /* BA1 */
184 <STM32_PINMUX('G', 4, AF12)>, /* BA0 */
185
186 <STM32_PINMUX('G', 1, AF12)>, /* A11 */
187 <STM32_PINMUX('G', 0, AF12)>, /* A10 */
188 <STM32_PINMUX('F',15, AF12)>, /* A09 */
189 <STM32_PINMUX('F',14, AF12)>, /* A08 */
190 <STM32_PINMUX('F',13, AF12)>, /* A07 */
191 <STM32_PINMUX('F',12, AF12)>, /* A06 */
192 <STM32_PINMUX('F', 5, AF12)>, /* A05 */
193 <STM32_PINMUX('F', 4, AF12)>, /* A04 */
194 <STM32_PINMUX('F', 3, AF12)>, /* A03 */
195 <STM32_PINMUX('F', 2, AF12)>, /* A02 */
196 <STM32_PINMUX('F', 1, AF12)>, /* A01 */
197 <STM32_PINMUX('F', 0, AF12)>, /* A00 */
198
199 <STM32_PINMUX('H', 3, AF12)>, /* SDNE0 */
200 <STM32_PINMUX('C', 0, AF12)>, /* SDNWE */
201 <STM32_PINMUX('F',11, AF12)>, /* SDNRAS */
202 <STM32_PINMUX('G',15, AF12)>, /* SDNCAS */
203 <STM32_PINMUX('H', 2, AF12)>, /* SDCKE0 */
204 <STM32_PINMUX('G', 8, AF12)>; /* SDCLK> */
205 slew-rate = <2>;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700206 bootph-all;
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100207 };
208 };
Patrice Chotardcfad1262019-02-18 22:46:25 +0100209
Patrice Chotard265fa122019-04-30 16:08:06 +0200210 qspi_pins: qspi@0 {
211 pins {
212 pinmux = <STM32_PINMUX('F',10, AF9)>, /* CLK */
213 <STM32_PINMUX('B', 6, AF10)>, /* BK1_NCS */
214 <STM32_PINMUX('F', 8, AF10)>, /* BK1_IO0 */
215 <STM32_PINMUX('F', 9, AF10)>, /* BK1_IO1 */
216 <STM32_PINMUX('F', 7, AF9)>, /* BK1_IO2 */
217 <STM32_PINMUX('F', 6, AF9)>; /* BK1_IO3 */
218 slew-rate = <2>;
219 };
220 };
221
Patrice Chotard62f56162020-11-06 08:11:58 +0100222 usart3_pins_a: usart3-0 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700223 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100224 pins1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700225 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100226 };
227 pins2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700228 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100229 };
230 };
Patrice Chotardcb1c9382017-12-12 09:49:43 +0100231};
Patrice Chotardcfad1262019-02-18 22:46:25 +0100232
233&pwrcfg {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700234 bootph-all;
Patrice Chotardcfad1262019-02-18 22:46:25 +0100235};
236
Patrice Chotard265fa122019-04-30 16:08:06 +0200237&qspi {
Patrice Chotard1bd7de82021-11-15 11:39:17 +0100238 reg = <0xa0001000 0x1000>, <0x90000000 0x1000000>;
Patrice Chotard62f56162020-11-06 08:11:58 +0100239 flash0: n25q128a@0 {
Patrice Chotard265fa122019-04-30 16:08:06 +0200240 #address-cells = <1>;
241 #size-cells = <1>;
242 compatible = "jedec,spi-nor";
243 spi-max-frequency = <108000000>;
244 spi-tx-bus-width = <4>;
245 spi-rx-bus-width = <4>;
246 reg = <0>;
247 };
248};
Patrice Chotard82270812020-11-06 08:11:59 +0100249
250&rcc {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700251 bootph-all;
Patrice Chotard82270812020-11-06 08:11:59 +0100252};
253
254&syscfg {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700255 bootph-all;
Patrice Chotard82270812020-11-06 08:11:59 +0100256};
257
Patrice Chotard83975322022-09-23 13:20:33 +0200258&timers5 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700259 bootph-all;
Patrice Chotard82270812020-11-06 08:11:59 +0100260};