]> Git Repo - J-u-boot.git/blame - include/configs/ls1043aqds.h
Convert CONFIG_SPL_PAD_TO et al to Kconfig
[J-u-boot.git] / include / configs / ls1043aqds.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
02b5d2ed
SX
2/*
3 * Copyright 2015 Freescale Semiconductor, Inc.
02b5d2ed
SX
4 */
5
6#ifndef __LS1043AQDS_H__
7#define __LS1043AQDS_H__
8
9#include "ls1043a_common.h"
10
02b5d2ed
SX
11#define CONFIG_LAYERSCAPE_NS_ACCESS
12
02b5d2ed 13/* Physical Memory Map */
02b5d2ed 14
02b5d2ed
SX
15#define SPD_EEPROM_ADDRESS 0x51
16#define CONFIG_SYS_SPD_BUS_NUM 0
17
02b5d2ed 18#ifdef CONFIG_DDR_ECC
02b5d2ed
SX
19#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
20#endif
21
02b5d2ed 22#ifdef CONFIG_SYS_DPAA_FMAN
02b5d2ed
SX
23#define RGMII_PHY1_ADDR 0x1
24#define RGMII_PHY2_ADDR 0x2
25#define SGMII_CARD_PORT1_PHY_ADDR 0x1C
26#define SGMII_CARD_PORT2_PHY_ADDR 0x1D
27#define SGMII_CARD_PORT3_PHY_ADDR 0x1E
28#define SGMII_CARD_PORT4_PHY_ADDR 0x1F
29/* PHY address on QSGMII riser card on slot 1 */
30#define QSGMII_CARD_PORT1_PHY_ADDR_S1 0x4
31#define QSGMII_CARD_PORT2_PHY_ADDR_S1 0x5
32#define QSGMII_CARD_PORT3_PHY_ADDR_S1 0x6
33#define QSGMII_CARD_PORT4_PHY_ADDR_S1 0x7
34/* PHY address on QSGMII riser card on slot 2 */
35#define QSGMII_CARD_PORT1_PHY_ADDR_S2 0x8
36#define QSGMII_CARD_PORT2_PHY_ADDR_S2 0x9
37#define QSGMII_CARD_PORT3_PHY_ADDR_S2 0xA
38#define QSGMII_CARD_PORT4_PHY_ADDR_S2 0xB
39#endif
40
989c5f0a 41/* SATA */
989c5f0a 42
ceded371 43/* EEPROM */
ceded371
WS
44#define CONFIG_SYS_I2C_EEPROM_NXID
45#define CONFIG_SYS_EEPROM_BUS_NUM 0
ceded371 46
989c5f0a
TY
47#define CONFIG_SYS_SATA AHCI_BASE_ADDR
48
02b5d2ed
SX
49/*
50 * IFC Definitions
51 */
b0f20caf 52#if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
02b5d2ed
SX
53#define CONFIG_SYS_NOR0_CSPR_EXT (0x0)
54#define CONFIG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
55 CSPR_PORT_SIZE_16 | \
56 CSPR_MSEL_NOR | \
57 CSPR_V)
58#define CONFIG_SYS_NOR1_CSPR_EXT (0x0)
59#define CONFIG_SYS_NOR1_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS \
60 + 0x8000000) | \
61 CSPR_PORT_SIZE_16 | \
62 CSPR_MSEL_NOR | \
63 CSPR_V)
64#define CONFIG_SYS_NOR_AMASK IFC_AMASK(128 * 1024 * 1024)
65
66#define CONFIG_SYS_NOR_CSOR (CSOR_NOR_ADM_SHIFT(4) | \
67 CSOR_NOR_TRHZ_80)
68#define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \
69 FTIM0_NOR_TEADC(0x5) | \
70 FTIM0_NOR_TEAHC(0x5))
71#define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \
72 FTIM1_NOR_TRAD_NOR(0x1a) | \
73 FTIM1_NOR_TSEQRAD_NOR(0x13))
74#define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x4) | \
75 FTIM2_NOR_TCH(0x4) | \
76 FTIM2_NOR_TWPH(0xe) | \
77 FTIM2_NOR_TWP(0x1c))
78#define CONFIG_SYS_NOR_FTIM3 0
79
02b5d2ed
SX
80#define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */
81#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
82#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
83
84#define CONFIG_SYS_FLASH_EMPTY_INFO
85#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS, \
86 CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000}
87
02b5d2ed
SX
88#define CONFIG_SYS_WRITE_SWAPPED_DATA
89
90/*
91 * NAND Flash Definitions
92 */
02b5d2ed
SX
93
94#define CONFIG_SYS_NAND_BASE 0x7e800000
95#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
96
97#define CONFIG_SYS_NAND_CSPR_EXT (0x0)
98
99#define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
100 | CSPR_PORT_SIZE_8 \
101 | CSPR_MSEL_NAND \
102 | CSPR_V)
103#define CONFIG_SYS_NAND_AMASK IFC_AMASK(64*1024)
104#define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
105 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
106 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \
107 | CSOR_NAND_RAL_3 /* RAL = 3 Bytes */ \
108 | CSOR_NAND_PGS_2K /* Page Size = 2K */ \
109 | CSOR_NAND_SPRZ_64 /* Spare size = 64 */ \
110 | CSOR_NAND_PB(64)) /* 64 Pages Per Block */
111
02b5d2ed
SX
112#define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x7) | \
113 FTIM0_NAND_TWP(0x18) | \
114 FTIM0_NAND_TWCHT(0x7) | \
115 FTIM0_NAND_TWH(0xa))
116#define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
117 FTIM1_NAND_TWBE(0x39) | \
118 FTIM1_NAND_TRR(0xe) | \
119 FTIM1_NAND_TRP(0x18))
120#define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0xf) | \
121 FTIM2_NAND_TREH(0xa) | \
122 FTIM2_NAND_TWHRE(0x1e))
123#define CONFIG_SYS_NAND_FTIM3 0x0
124
125#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
126#define CONFIG_SYS_MAX_NAND_DEVICE 1
127#define CONFIG_MTD_NAND_VERIFY_WRITE
166ef1e9 128#endif
02b5d2ed
SX
129
130#ifdef CONFIG_NAND_BOOT
02b5d2ed
SX
131#define CONFIG_SYS_NAND_U_BOOT_SIZE (640 << 10)
132#endif
133
8aa6b17a
RB
134#if defined(CONFIG_TFABOOT) || \
135 defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
166ef1e9
GQ
136#endif
137
02b5d2ed
SX
138/*
139 * QIXIS Definitions
140 */
02b5d2ed
SX
141
142#ifdef CONFIG_FSL_QIXIS
143#define QIXIS_BASE 0x7fb00000
144#define QIXIS_BASE_PHYS QIXIS_BASE
145#define CONFIG_SYS_I2C_FPGA_ADDR 0x66
146#define QIXIS_LBMAP_SWITCH 6
147#define QIXIS_LBMAP_MASK 0x0f
148#define QIXIS_LBMAP_SHIFT 0
149#define QIXIS_LBMAP_DFLTBANK 0x00
150#define QIXIS_LBMAP_ALTBANK 0x04
ee2a4eee
GQ
151#define QIXIS_LBMAP_NAND 0x09
152#define QIXIS_LBMAP_SD 0x00
166ef1e9 153#define QIXIS_LBMAP_SD_QSPI 0xff
b0f20caf 154#define QIXIS_LBMAP_QSPI 0xff
ee2a4eee
GQ
155#define QIXIS_RCW_SRC_NAND 0x106
156#define QIXIS_RCW_SRC_SD 0x040
b0f20caf 157#define QIXIS_RCW_SRC_QSPI 0x045
a4b7d68c 158#define QIXIS_RST_CTL_RESET 0x41
02b5d2ed
SX
159#define QIXIS_RCFG_CTL_RECONFIG_IDLE 0x20
160#define QIXIS_RCFG_CTL_RECONFIG_START 0x21
161#define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08
162
163#define CONFIG_SYS_FPGA_CSPR_EXT (0x0)
164#define CONFIG_SYS_FPGA_CSPR (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) | \
165 CSPR_PORT_SIZE_8 | \
166 CSPR_MSEL_GPCM | \
167 CSPR_V)
168#define CONFIG_SYS_FPGA_AMASK IFC_AMASK(64 * 1024)
169#define CONFIG_SYS_FPGA_CSOR (CSOR_NOR_ADM_SHIFT(4) | \
170 CSOR_NOR_NOR_MODE_AVD_NOR | \
171 CSOR_NOR_TRHZ_80)
172
173/*
174 * QIXIS Timing parameters for IFC GPCM
175 */
176#define CONFIG_SYS_FPGA_FTIM0 (FTIM0_GPCM_TACSE(0xc) | \
177 FTIM0_GPCM_TEADC(0x20) | \
178 FTIM0_GPCM_TEAHC(0x10))
179#define CONFIG_SYS_FPGA_FTIM1 (FTIM1_GPCM_TACO(0x50) | \
180 FTIM1_GPCM_TRAD(0x1f))
181#define CONFIG_SYS_FPGA_FTIM2 (FTIM2_GPCM_TCS(0x8) | \
182 FTIM2_GPCM_TCH(0x8) | \
183 FTIM2_GPCM_TWP(0xf0))
184#define CONFIG_SYS_FPGA_FTIM3 0x0
185#endif
186
8aa6b17a
RB
187#ifdef CONFIG_TFABOOT
188#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
189#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR
190#define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
191#define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
192#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
193#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
194#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
195#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
196#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT
197#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR
198#define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK
199#define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR
200#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0
201#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1
202#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2
203#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3
204#define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT
205#define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR
206#define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK
207#define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR
208#define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0
209#define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1
210#define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2
211#define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3
212#define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
213#define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
214#define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK
215#define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
216#define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0
217#define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1
218#define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2
219#define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3
220#else
02b5d2ed
SX
221#ifdef CONFIG_NAND_BOOT
222#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
223#define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR
224#define CONFIG_SYS_AMASK0 CONFIG_SYS_NAND_AMASK
225#define CONFIG_SYS_CSOR0 CONFIG_SYS_NAND_CSOR
226#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NAND_FTIM0
227#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1
228#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2
229#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3
230#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT
231#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_CSPR
232#define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK
233#define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR
234#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0
235#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1
236#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2
237#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3
238#define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NOR1_CSPR_EXT
239#define CONFIG_SYS_CSPR2 CONFIG_SYS_NOR1_CSPR
240#define CONFIG_SYS_AMASK2 CONFIG_SYS_NOR_AMASK
241#define CONFIG_SYS_CSOR2 CONFIG_SYS_NOR_CSOR
242#define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NOR_FTIM0
243#define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NOR_FTIM1
244#define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NOR_FTIM2
245#define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NOR_FTIM3
246#define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
247#define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
248#define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK
249#define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
250#define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0
251#define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1
252#define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2
253#define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3
254#else
255#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
256#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR
257#define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
258#define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
259#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
260#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
261#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
262#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
263#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT
264#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR
265#define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK
266#define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR
267#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0
268#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1
269#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2
270#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3
271#define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT
272#define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR
273#define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK
274#define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR
275#define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0
276#define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1
277#define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2
278#define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3
279#define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
280#define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
281#define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK
282#define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
283#define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0
284#define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1
285#define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2
286#define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3
287#endif
8aa6b17a 288#endif
02b5d2ed
SX
289
290/*
291 * I2C bus multiplexer
292 */
293#define I2C_MUX_PCA_ADDR_PRI 0x77
294#define I2C_MUX_PCA_ADDR_SEC 0x76 /* Secondary multiplexer */
295#define I2C_RETIMER_ADDR 0x18
296#define I2C_MUX_CH_DEFAULT 0x8
297#define I2C_MUX_CH_CH7301 0xC
298#define I2C_MUX_CH5 0xD
299#define I2C_MUX_CH7 0xF
300
301#define I2C_MUX_CH_VOL_MONITOR 0xa
302
303/* Voltage monitor on channel 2*/
304#define I2C_VOL_MONITOR_ADDR 0x40
305#define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2
306#define I2C_VOL_MONITOR_BUS_V_OVF 0x1
307#define I2C_VOL_MONITOR_BUS_V_SHIFT 3
308
02b5d2ed
SX
309/* The lowest and highest voltage allowed for LS1043AQDS */
310#define VDD_MV_MIN 819
311#define VDD_MV_MAX 1212
312
313/*
314 * Miscellaneous configurable options
315 */
02b5d2ed 316
02b5d2ed
SX
317#define CONFIG_SYS_INIT_SP_OFFSET \
318 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
319
02b5d2ed
SX
320/*
321 * Environment
322 */
02b5d2ed 323
ef6c55a2
AB
324#include <asm/fsl_secure_boot.h>
325
02b5d2ed 326#endif /* __LS1043AQDS_H__ */
This page took 0.573046 seconds and 4 git commands to generate.