183d290c5STom Rini// SPDX-License-Identifier: GPL-2.0+
2791651e3SPatrice Chotard/*
3791651e3SPatrice Chotard * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
4791651e3SPatrice Chotard * Author(s): Patrice Chotard, <patrice.chotard@st.com> for STMicroelectronics.
5791651e3SPatrice Chotard */
6791651e3SPatrice Chotard
7791651e3SPatrice Chotard#include <dt-bindings/memory/stm32-sdram.h>
8791651e3SPatrice Chotard/{
9791651e3SPatrice Chotard	clocks {
10791651e3SPatrice Chotard		u-boot,dm-pre-reloc;
11791651e3SPatrice Chotard	};
12791651e3SPatrice Chotard
13791651e3SPatrice Chotard	aliases {
14791651e3SPatrice Chotard		/* Aliases for gpios so as to use sequence */
15791651e3SPatrice Chotard		gpio0 = &gpioa;
16791651e3SPatrice Chotard		gpio1 = &gpiob;
17791651e3SPatrice Chotard		gpio2 = &gpioc;
18791651e3SPatrice Chotard		gpio3 = &gpiod;
19791651e3SPatrice Chotard		gpio4 = &gpioe;
20791651e3SPatrice Chotard		gpio5 = &gpiof;
21791651e3SPatrice Chotard		gpio6 = &gpiog;
22791651e3SPatrice Chotard		gpio7 = &gpioh;
23791651e3SPatrice Chotard		gpio8 = &gpioi;
24791651e3SPatrice Chotard		gpio9 = &gpioj;
25791651e3SPatrice Chotard		gpio10 = &gpiok;
26791651e3SPatrice Chotard	};
27791651e3SPatrice Chotard
28791651e3SPatrice Chotard	soc {
29791651e3SPatrice Chotard		u-boot,dm-pre-reloc;
30791651e3SPatrice Chotard		pin-controller {
31791651e3SPatrice Chotard			u-boot,dm-pre-reloc;
32791651e3SPatrice Chotard		};
33791651e3SPatrice Chotard
34791651e3SPatrice Chotard		fmc: fmc@A0000000 {
35791651e3SPatrice Chotard			compatible = "st,stm32-fmc";
36791651e3SPatrice Chotard			reg = <0xA0000000 0x1000>;
37791651e3SPatrice Chotard			clocks = <&rcc 0 STM32F4_AHB3_CLOCK(FMC)>;
38791651e3SPatrice Chotard			pinctrl-0 = <&fmc_pins>;
39791651e3SPatrice Chotard			pinctrl-names = "default";
40*246a5e5fSRadoslaw Pietrzyk			st,syscfg = <&syscfg>;
41*246a5e5fSRadoslaw Pietrzyk			st,swp_fmc = <1>;
42791651e3SPatrice Chotard			u-boot,dm-pre-reloc;
43791651e3SPatrice Chotard
44791651e3SPatrice Chotard			/*
45791651e3SPatrice Chotard			 * Memory configuration from sdram datasheet
46791651e3SPatrice Chotard			 * IS42S16400J
47791651e3SPatrice Chotard			 */
48791651e3SPatrice Chotard			bank1: bank@1 {
49791651e3SPatrice Chotard			       st,sdram-control = /bits/ 8 <NO_COL_8
50791651e3SPatrice Chotard							    NO_ROW_12
51791651e3SPatrice Chotard							    MWIDTH_16
52791651e3SPatrice Chotard							    BANKS_4
53791651e3SPatrice Chotard							    CAS_3
54791651e3SPatrice Chotard							    SDCLK_2
55791651e3SPatrice Chotard							    RD_BURST_EN
56791651e3SPatrice Chotard							    RD_PIPE_DL_0>;
57791651e3SPatrice Chotard			       st,sdram-timing = /bits/ 8 <TMRD_3
58791651e3SPatrice Chotard							   TXSR_7
59791651e3SPatrice Chotard							   TRAS_4
60791651e3SPatrice Chotard							   TRC_6
61791651e3SPatrice Chotard							   TWR_2
62791651e3SPatrice Chotard							   TRP_2 TRCD_2>;
63791651e3SPatrice Chotard			       st,sdram-refcount = < 1386 >;
64791651e3SPatrice Chotard		       };
65791651e3SPatrice Chotard		};
66791651e3SPatrice Chotard	};
67791651e3SPatrice Chotard};
68791651e3SPatrice Chotard
69791651e3SPatrice Chotard&clk_hse {
70791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
71791651e3SPatrice Chotard};
72791651e3SPatrice Chotard
73791651e3SPatrice Chotard&clk_lse {
74791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
75791651e3SPatrice Chotard};
76791651e3SPatrice Chotard
77791651e3SPatrice Chotard&clk_i2s_ckin {
78791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
79791651e3SPatrice Chotard};
80791651e3SPatrice Chotard
81791651e3SPatrice Chotard&pwrcfg {
82791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
83791651e3SPatrice Chotard};
84791651e3SPatrice Chotard
85791651e3SPatrice Chotard&rcc {
86791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
87791651e3SPatrice Chotard};
88791651e3SPatrice Chotard
89791651e3SPatrice Chotard&gpioa {
90791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
91791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
92791651e3SPatrice Chotard};
93791651e3SPatrice Chotard
94791651e3SPatrice Chotard&gpiob {
95791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
96791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
97791651e3SPatrice Chotard};
98791651e3SPatrice Chotard
99791651e3SPatrice Chotard&gpioc {
100791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
101791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
102791651e3SPatrice Chotard};
103791651e3SPatrice Chotard
104791651e3SPatrice Chotard&gpiod {
105791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
106791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
107791651e3SPatrice Chotard};
108791651e3SPatrice Chotard
109791651e3SPatrice Chotard&gpioe {
110791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
111791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
112791651e3SPatrice Chotard};
113791651e3SPatrice Chotard
114791651e3SPatrice Chotard&gpiof {
115791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
116791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
117791651e3SPatrice Chotard};
118791651e3SPatrice Chotard
119791651e3SPatrice Chotard&gpiog {
120791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
121791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
122791651e3SPatrice Chotard};
123791651e3SPatrice Chotard
124791651e3SPatrice Chotard&gpioh {
125791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
126791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
127791651e3SPatrice Chotard};
128791651e3SPatrice Chotard
129791651e3SPatrice Chotard&gpioi {
130791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
131791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
132791651e3SPatrice Chotard};
133791651e3SPatrice Chotard
134791651e3SPatrice Chotard&gpioj {
135791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
136791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
137791651e3SPatrice Chotard};
138791651e3SPatrice Chotard
139791651e3SPatrice Chotard&gpiok {
140791651e3SPatrice Chotard	compatible = "st,stm32-gpio";
141791651e3SPatrice Chotard	u-boot,dm-pre-reloc;
142791651e3SPatrice Chotard};
143791651e3SPatrice Chotard
144791651e3SPatrice Chotard&pinctrl {
145791651e3SPatrice Chotard	usart1_pins_a: usart1@0	{
146791651e3SPatrice Chotard		u-boot,dm-pre-reloc;
147791651e3SPatrice Chotard		pins1 {
148791651e3SPatrice Chotard			u-boot,dm-pre-reloc;
149791651e3SPatrice Chotard		};
150791651e3SPatrice Chotard		pins2 {
151791651e3SPatrice Chotard			u-boot,dm-pre-reloc;
152791651e3SPatrice Chotard		};
153791651e3SPatrice Chotard	};
154791651e3SPatrice Chotard
155791651e3SPatrice Chotard	fmc_pins: fmc@0 {
156791651e3SPatrice Chotard		u-boot,dm-pre-reloc;
157791651e3SPatrice Chotard		pins
158791651e3SPatrice Chotard		{
159791651e3SPatrice Chotard			pinmux = <STM32_PINMUX('D',10, AF12)>, /* D15 */
160791651e3SPatrice Chotard				 <STM32_PINMUX('D', 9, AF12)>, /* D14 */
161791651e3SPatrice Chotard				 <STM32_PINMUX('D', 8, AF12)>, /* D13 */
162791651e3SPatrice Chotard				 <STM32_PINMUX('E',15, AF12)>, /* D12 */
163791651e3SPatrice Chotard				 <STM32_PINMUX('E',14, AF12)>, /* D11 */
164791651e3SPatrice Chotard				 <STM32_PINMUX('E',13, AF12)>, /* D10 */
165791651e3SPatrice Chotard				 <STM32_PINMUX('E',12, AF12)>, /* D09 */
166791651e3SPatrice Chotard				 <STM32_PINMUX('E',11, AF12)>, /* D08 */
167791651e3SPatrice Chotard				 <STM32_PINMUX('E',10, AF12)>, /* D07 */
168791651e3SPatrice Chotard				 <STM32_PINMUX('E', 9, AF12)>, /* D06 */
169791651e3SPatrice Chotard				 <STM32_PINMUX('E', 8, AF12)>, /* D05 */
170791651e3SPatrice Chotard				 <STM32_PINMUX('E', 7, AF12)>, /* D04 */
171791651e3SPatrice Chotard				 <STM32_PINMUX('D', 1, AF12)>, /* D03 */
172791651e3SPatrice Chotard				 <STM32_PINMUX('D', 0, AF12)>, /* D02 */
173791651e3SPatrice Chotard				 <STM32_PINMUX('D',15, AF12)>, /* D01 */
174791651e3SPatrice Chotard				 <STM32_PINMUX('D',14, AF12)>, /* D00 */
175791651e3SPatrice Chotard
176791651e3SPatrice Chotard				 <STM32_PINMUX('E', 0, AF12)>, /* NBL0 */
177791651e3SPatrice Chotard				 <STM32_PINMUX('E', 1, AF12)>, /* NBL1 */
178791651e3SPatrice Chotard
179791651e3SPatrice Chotard				 <STM32_PINMUX('G', 5, AF12)>, /* BA1 */
180791651e3SPatrice Chotard				 <STM32_PINMUX('G', 4, AF12)>, /* BA0 */
181791651e3SPatrice Chotard
182791651e3SPatrice Chotard				 <STM32_PINMUX('G', 1, AF12)>, /* A11 */
183791651e3SPatrice Chotard				 <STM32_PINMUX('G', 0, AF12)>, /* A10 */
184791651e3SPatrice Chotard				 <STM32_PINMUX('F',15, AF12)>, /* A09 */
185791651e3SPatrice Chotard				 <STM32_PINMUX('F',14, AF12)>, /* A08 */
186791651e3SPatrice Chotard				 <STM32_PINMUX('F',13, AF12)>, /* A07 */
187791651e3SPatrice Chotard				 <STM32_PINMUX('F',12, AF12)>, /* A06 */
188791651e3SPatrice Chotard				 <STM32_PINMUX('F', 5, AF12)>, /* A05 */
189791651e3SPatrice Chotard				 <STM32_PINMUX('F', 4, AF12)>, /* A04 */
190791651e3SPatrice Chotard				 <STM32_PINMUX('F', 3, AF12)>, /* A03 */
191791651e3SPatrice Chotard				 <STM32_PINMUX('F', 2, AF12)>, /* A02 */
192791651e3SPatrice Chotard				 <STM32_PINMUX('F', 1, AF12)>, /* A01 */
193791651e3SPatrice Chotard				 <STM32_PINMUX('F', 0, AF12)>, /* A00 */
194791651e3SPatrice Chotard
195791651e3SPatrice Chotard				 <STM32_PINMUX('B', 6, AF12)>, /* SDNE1 */
196791651e3SPatrice Chotard				 <STM32_PINMUX('C', 0, AF12)>, /* SDNWE */
197791651e3SPatrice Chotard				 <STM32_PINMUX('F',11, AF12)>, /* SDNRAS */
198791651e3SPatrice Chotard				 <STM32_PINMUX('G',15, AF12)>, /* SDNCAS */
199791651e3SPatrice Chotard				 <STM32_PINMUX('B', 5, AF12)>, /* SDCKE1 */
200791651e3SPatrice Chotard				 <STM32_PINMUX('G', 8, AF12)>; /* SDCLK */
201791651e3SPatrice Chotard			slew-rate = <2>;
202791651e3SPatrice Chotard			u-boot,dm-pre-reloc;
203791651e3SPatrice Chotard		};
204791651e3SPatrice Chotard	};
205791651e3SPatrice Chotard};
206