blob: 159002d1ed8310919b16ebbc03d3b28ef09f9fcf [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Shengzhou Liu48c6f322014-11-24 17:11:56 +08002/*
3 * Copyright 2014 Freescale Semiconductor, Inc.
Rajesh Bhagata97a0712021-11-09 16:30:38 +05304 * Copyright 2020-2021 NXP
Shengzhou Liu48c6f322014-11-24 17:11:56 +08005 */
6
7/*
8 * T1024/T1023 RDB board configuration file
9 */
10
11#ifndef __T1024RDB_H
12#define __T1024RDB_H
13
Simon Glass1af3c7f2020-05-10 11:40:09 -060014#include <linux/stringify.h>
15
Shengzhou Liu48c6f322014-11-24 17:11:56 +080016/* High Level Configuration Options */
Shengzhou Liu48c6f322014-11-24 17:11:56 +080017
Shengzhou Liu48c6f322014-11-24 17:11:56 +080018#define CONFIG_SYS_FSL_CPC /* Corenet Platform Cache */
York Sun51370d52016-12-28 08:43:45 -080019#define CONFIG_SYS_NUM_CPC CONFIG_SYS_NUM_DDR_CTLRS
Shengzhou Liu48c6f322014-11-24 17:11:56 +080020
Shengzhou Liu48c6f322014-11-24 17:11:56 +080021#ifdef CONFIG_RAMBOOT_PBL
Shengzhou Liu48c6f322014-11-24 17:11:56 +080022#define RESET_VECTOR_OFFSET 0x27FFC
23#define BOOT_PAGE_OFFSET 0x27000
Shengzhou Liu48c6f322014-11-24 17:11:56 +080024
Miquel Raynal88718be2019-10-03 19:50:03 +020025#ifdef CONFIG_MTD_RAW_NAND
Shengzhou Liu48c6f322014-11-24 17:11:56 +080026#define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10)
tang yuantianf49b8c12014-12-17 15:42:54 +080027#define CONFIG_SYS_NAND_U_BOOT_DST 0x30000000
28#define CONFIG_SYS_NAND_U_BOOT_START 0x30000000
Shengzhou Liu48c6f322014-11-24 17:11:56 +080029#endif
30
31#ifdef CONFIG_SPIFLASH
tang yuantianf49b8c12014-12-17 15:42:54 +080032#define CONFIG_RESET_VECTOR_ADDRESS 0x30000FFC
Shengzhou Liu48c6f322014-11-24 17:11:56 +080033#define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10)
tang yuantianf49b8c12014-12-17 15:42:54 +080034#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x30000000)
35#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x30000000)
Shengzhou Liu48c6f322014-11-24 17:11:56 +080036#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (256 << 10)
Shengzhou Liu48c6f322014-11-24 17:11:56 +080037#endif
38
39#ifdef CONFIG_SDCARD
tang yuantianf49b8c12014-12-17 15:42:54 +080040#define CONFIG_RESET_VECTOR_ADDRESS 0x30000FFC
Shengzhou Liu48c6f322014-11-24 17:11:56 +080041#define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10)
tang yuantianf49b8c12014-12-17 15:42:54 +080042#define CONFIG_SYS_MMC_U_BOOT_DST (0x30000000)
43#define CONFIG_SYS_MMC_U_BOOT_START (0x30000000)
Shengzhou Liu48c6f322014-11-24 17:11:56 +080044#define CONFIG_SYS_MMC_U_BOOT_OFFS (260 << 10)
Shengzhou Liu48c6f322014-11-24 17:11:56 +080045#endif
46
47#endif /* CONFIG_RAMBOOT_PBL */
48
Shengzhou Liu48c6f322014-11-24 17:11:56 +080049#ifndef CONFIG_RESET_VECTOR_ADDRESS
50#define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc
51#endif
52
Shengzhou Liu48c6f322014-11-24 17:11:56 +080053/* PCIe Boot - Master */
54#define CONFIG_SRIO_PCIE_BOOT_MASTER
55/*
56 * for slave u-boot IMAGE instored in master memory space,
57 * PHYS must be aligned based on the SIZE
58 */
59#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS1 0xfff00000ull
60#define CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE 0x100000 /* 1M */
61#ifdef CONFIG_PHYS_64BIT
62#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xfef200000ull
63#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0x3fff00000ull
64#else
65#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xef200000
66#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0xfff00000
67#endif
68/*
69 * for slave UCODE and ENV instored in master memory space,
70 * PHYS must be aligned based on the SIZE
71 */
72#ifdef CONFIG_PHYS_64BIT
73#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xfef100000ull
74#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS 0x3ffe00000ull
75#else
76#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xef100000
77#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS 0xffe00000
78#endif
79#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE 0x40000 /* 256K */
80/* slave core release by master*/
81#define CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET 0xe00e4
82#define CONFIG_SRIO_PCIE_BOOT_RELEASE_MASK 0x00000001 /* release core 0 */
83
84/* PCIe Boot - Slave */
85#ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
86#define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR 0xFFE00000
87#define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR_PHYS \
88 (0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR)
89/* Set 1M boot space for PCIe boot */
90#define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR (CONFIG_SYS_TEXT_BASE & 0xfff00000)
91#define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR_PHYS \
92 (0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR)
93#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
Shengzhou Liu48c6f322014-11-24 17:11:56 +080094#endif
95
Shengzhou Liu48c6f322014-11-24 17:11:56 +080096/*
97 * These can be toggled for performance analysis, otherwise use default.
98 */
99#define CONFIG_SYS_CACHE_STASHING
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800100#define CONFIG_SYS_INIT_L2CSR0 L2CSR0_L2E
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800101#ifdef CONFIG_DDR_ECC
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800102#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
103#endif
104
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800105/*
106 * Config the L3 Cache as L3 SRAM
107 */
108#define CONFIG_SYS_INIT_L3_ADDR 0xFFFC0000
109#define CONFIG_SYS_L3_SIZE (256 << 10)
Tom Rinia09fea12019-11-18 20:02:10 -0500110#define SPL_ENV_ADDR (CONFIG_SPL_GD_ADDR + 4 * 1024)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800111
112#ifdef CONFIG_PHYS_64BIT
113#define CONFIG_SYS_DCSRBAR 0xf0000000
114#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
115#endif
116
117/* EEPROM */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800118#define CONFIG_SYS_I2C_EEPROM_NXID
119#define CONFIG_SYS_EEPROM_BUS_NUM 0
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800120
121/*
122 * DDR Setup
123 */
124#define CONFIG_VERY_BIG_RAM
125#define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
126#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
York Sun960286b2016-12-28 08:43:34 -0800127#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800128#define SPD_EEPROM_ADDRESS 0x51
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800129#define CONFIG_SYS_SDRAM_SIZE 4096 /* for fixed parameter use */
York Sun90824052016-12-28 08:43:33 -0800130#elif defined(CONFIG_TARGET_T1023RDB)
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800131#define CONFIG_SYS_SDRAM_SIZE 2048
132#endif
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800133
134/*
135 * IFC Definitions
136 */
137#define CONFIG_SYS_FLASH_BASE 0xe8000000
138#ifdef CONFIG_PHYS_64BIT
139#define CONFIG_SYS_FLASH_BASE_PHYS (0xf00000000ull | CONFIG_SYS_FLASH_BASE)
140#else
141#define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE
142#endif
143
144#define CONFIG_SYS_NOR0_CSPR_EXT (0xf)
145#define CONFIG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
146 CSPR_PORT_SIZE_16 | \
147 CSPR_MSEL_NOR | \
148 CSPR_V)
149#define CONFIG_SYS_NOR_AMASK IFC_AMASK(128*1024*1024)
150
151/* NOR Flash Timing Params */
York Sun960286b2016-12-28 08:43:34 -0800152#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800153#define CONFIG_SYS_NOR_CSOR CSOR_NAND_TRHZ_80
York Sun90824052016-12-28 08:43:33 -0800154#elif defined(CONFIG_TARGET_T1023RDB)
Shengzhou Liuff7ea2d2015-06-17 16:37:01 +0800155#define CONFIG_SYS_NOR_CSOR (CSOR_NOR_ADM_SHIFT(0) | \
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800156 CSOR_NAND_TRHZ_80 | CSOR_NOR_ADM_SHFT_MODE_EN)
157#endif
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800158#define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \
159 FTIM0_NOR_TEADC(0x5) | \
160 FTIM0_NOR_TEAHC(0x5))
161#define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \
162 FTIM1_NOR_TRAD_NOR(0x1A) |\
163 FTIM1_NOR_TSEQRAD_NOR(0x13))
164#define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x4) | \
165 FTIM2_NOR_TCH(0x4) | \
166 FTIM2_NOR_TWPH(0x0E) | \
167 FTIM2_NOR_TWP(0x1c))
168#define CONFIG_SYS_NOR_FTIM3 0x0
169
170#define CONFIG_SYS_FLASH_QUIET_TEST
171#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
172
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800173#define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */
174#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
175#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
176
177#define CONFIG_SYS_FLASH_EMPTY_INFO
178#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS}
179
York Sun960286b2016-12-28 08:43:34 -0800180#ifdef CONFIG_TARGET_T1024RDB
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800181/* CPLD on IFC */
182#define CONFIG_SYS_CPLD_BASE 0xffdf0000
183#define CONFIG_SYS_CPLD_BASE_PHYS (0xf00000000ull | CONFIG_SYS_CPLD_BASE)
184#define CONFIG_SYS_CSPR2_EXT (0xf)
185#define CONFIG_SYS_CSPR2 (CSPR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE) \
186 | CSPR_PORT_SIZE_8 \
187 | CSPR_MSEL_GPCM \
188 | CSPR_V)
189#define CONFIG_SYS_AMASK2 IFC_AMASK(64*1024)
190#define CONFIG_SYS_CSOR2 0x0
191
192/* CPLD Timing parameters for IFC CS2 */
193#define CONFIG_SYS_CS2_FTIM0 (FTIM0_GPCM_TACSE(0x0e) | \
194 FTIM0_GPCM_TEADC(0x0e) | \
195 FTIM0_GPCM_TEAHC(0x0e))
196#define CONFIG_SYS_CS2_FTIM1 (FTIM1_GPCM_TACO(0x0e) | \
197 FTIM1_GPCM_TRAD(0x1f))
198#define CONFIG_SYS_CS2_FTIM2 (FTIM2_GPCM_TCS(0x0e) | \
199 FTIM2_GPCM_TCH(0x8) | \
200 FTIM2_GPCM_TWP(0x1f))
201#define CONFIG_SYS_CS2_FTIM3 0x0
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800202#endif
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800203
204/* NAND Flash on IFC */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800205#define CONFIG_SYS_NAND_BASE 0xff800000
206#ifdef CONFIG_PHYS_64BIT
207#define CONFIG_SYS_NAND_BASE_PHYS (0xf00000000ull | CONFIG_SYS_NAND_BASE)
208#else
209#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
210#endif
211#define CONFIG_SYS_NAND_CSPR_EXT (0xf)
212#define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
213 | CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
214 | CSPR_MSEL_NAND /* MSEL = NAND */ \
215 | CSPR_V)
216#define CONFIG_SYS_NAND_AMASK IFC_AMASK(64*1024)
217
York Sun960286b2016-12-28 08:43:34 -0800218#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800219#define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
220 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
221 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \
222 | CSOR_NAND_RAL_3 /* RAL = 3Byes */ \
223 | CSOR_NAND_PGS_4K /* Page Size = 4K */ \
224 | CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \
225 | CSOR_NAND_PB(64)) /*Pages Per Block = 64*/
York Sun90824052016-12-28 08:43:33 -0800226#elif defined(CONFIG_TARGET_T1023RDB)
Jaiprakash Singh78429502015-05-22 15:21:07 +0530227#define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
228 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
229 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800230 | CSOR_NAND_RAL_3 /* RAL 3Bytes */ \
231 | CSOR_NAND_PGS_2K /* Page Size = 2K */ \
232 | CSOR_NAND_SPRZ_128 /* Spare size = 128 */ \
233 | CSOR_NAND_PB(64)) /*Pages Per Block = 64*/
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800234#endif
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800235
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800236/* ONFI NAND Flash mode0 Timing Params */
237#define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x07) | \
238 FTIM0_NAND_TWP(0x18) | \
239 FTIM0_NAND_TWCHT(0x07) | \
240 FTIM0_NAND_TWH(0x0a))
241#define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
242 FTIM1_NAND_TWBE(0x39) | \
243 FTIM1_NAND_TRR(0x0e) | \
244 FTIM1_NAND_TRP(0x18))
245#define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0x0f) | \
246 FTIM2_NAND_TREH(0x0a) | \
247 FTIM2_NAND_TWHRE(0x1e))
248#define CONFIG_SYS_NAND_FTIM3 0x0
249
250#define CONFIG_SYS_NAND_DDR_LAW 11
251#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
252#define CONFIG_SYS_MAX_NAND_DEVICE 1
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800253
Miquel Raynal88718be2019-10-03 19:50:03 +0200254#if defined(CONFIG_MTD_RAW_NAND)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800255#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
256#define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR
257#define CONFIG_SYS_AMASK0 CONFIG_SYS_NAND_AMASK
258#define CONFIG_SYS_CSOR0 CONFIG_SYS_NAND_CSOR
259#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NAND_FTIM0
260#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1
261#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2
262#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3
263#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT
264#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_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#else
272#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
273#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR
274#define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
275#define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
276#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
277#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
278#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
279#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
280#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NAND_CSPR_EXT
281#define CONFIG_SYS_CSPR1 CONFIG_SYS_NAND_CSPR
282#define CONFIG_SYS_AMASK1 CONFIG_SYS_NAND_AMASK
283#define CONFIG_SYS_CSOR1 CONFIG_SYS_NAND_CSOR
284#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NAND_FTIM0
285#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NAND_FTIM1
286#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NAND_FTIM2
287#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NAND_FTIM3
288#endif
289
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800290#if defined(CONFIG_RAMBOOT_PBL)
291#define CONFIG_SYS_RAMBOOT
292#endif
293
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800294#define CONFIG_HWCONFIG
295
296/* define to use L1 as initial stack */
297#define CONFIG_L1_INIT_RAM
298#define CONFIG_SYS_INIT_RAM_LOCK
299#define CONFIG_SYS_INIT_RAM_ADDR 0xfdd00000 /* Initial L1 address */
300#ifdef CONFIG_PHYS_64BIT
301#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf
York Sunb3142e22015-08-17 13:31:51 -0700302#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW 0xfe03c000
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800303/* The assembler doesn't like typecast */
304#define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
305 ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
306 CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
307#else
York Sunb3142e22015-08-17 13:31:51 -0700308#define CONFIG_SYS_INIT_RAM_ADDR_PHYS 0xfe03c000 /* Initial L1 address */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800309#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
310#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
311#endif
312#define CONFIG_SYS_INIT_RAM_SIZE 0x00004000
313
Tom Rini4c97c8c2022-05-24 14:14:02 -0400314#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800315
316#define CONFIG_SYS_MONITOR_LEN (768 * 1024)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800317
318/* Serial Port */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800319#define CONFIG_SYS_NS16550_SERIAL
320#define CONFIG_SYS_NS16550_REG_SIZE 1
321#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0)/2)
322
323#define CONFIG_SYS_BAUDRATE_TABLE \
324 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
325
326#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x11C500)
327#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x11C600)
328#define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)
329#define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800330
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800331/* I2C */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800332
Shengzhou Liuff7ea2d2015-06-17 16:37:01 +0800333#define I2C_PCA6408_BUS_NUM 1
334#define I2C_PCA6408_ADDR 0x20
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800335
336/* I2C bus multiplexer */
337#define I2C_MUX_CH_DEFAULT 0x8
338
339/*
340 * RTC configuration
341 */
342#define RTC
343#define CONFIG_RTC_DS1337 1
344#define CONFIG_SYS_I2C_RTC_ADDR 0x68
345
346/*
347 * eSPI - Enhanced SPI
348 */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800349
350/*
351 * General PCIe
352 * Memory space is mapped 1-1, but I/O space must start from 0.
353 */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800354
355#ifdef CONFIG_PCI
356/* controller 1, direct to uli, tgtid 3, Base address 20000 */
357#ifdef CONFIG_PCIE1
358#define CONFIG_SYS_PCIE1_MEM_VIRT 0x80000000
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800359#define CONFIG_SYS_PCIE1_MEM_PHYS 0xc00000000ull
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800360#define CONFIG_SYS_PCIE1_IO_VIRT 0xf8000000
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800361#define CONFIG_SYS_PCIE1_IO_PHYS 0xff8000000ull
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800362#endif
363
364/* controller 2, Slot 2, tgtid 2, Base address 201000 */
365#ifdef CONFIG_PCIE2
366#define CONFIG_SYS_PCIE2_MEM_VIRT 0x90000000
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800367#define CONFIG_SYS_PCIE2_MEM_PHYS 0xc10000000ull
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800368#define CONFIG_SYS_PCIE2_IO_VIRT 0xf8010000
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800369#define CONFIG_SYS_PCIE2_IO_PHYS 0xff8010000ull
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800370#endif
371
372/* controller 3, Slot 1, tgtid 1, Base address 202000 */
373#ifdef CONFIG_PCIE3
374#define CONFIG_SYS_PCIE3_MEM_VIRT 0xa0000000
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800375#define CONFIG_SYS_PCIE3_MEM_PHYS 0xc20000000ull
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800376#define CONFIG_SYS_PCIE3_IO_VIRT 0xf8020000
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800377#define CONFIG_SYS_PCIE3_IO_PHYS 0xff8020000ull
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800378#endif
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800379#endif /* CONFIG_PCI */
380
381/*
382 * USB
383 */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800384
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800385/*
386 * SDHC
387 */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800388#ifdef CONFIG_MMC
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800389#define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800390#endif
391
392/* Qman/Bman */
393#ifndef CONFIG_NOBQFMAN
Jeffrey Ladouceur2a8b3422014-12-03 18:08:43 -0500394#define CONFIG_SYS_BMAN_NUM_PORTALS 10
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800395#define CONFIG_SYS_BMAN_MEM_BASE 0xf4000000
396#ifdef CONFIG_PHYS_64BIT
397#define CONFIG_SYS_BMAN_MEM_PHYS 0xff4000000ull
398#else
399#define CONFIG_SYS_BMAN_MEM_PHYS CONFIG_SYS_BMAN_MEM_BASE
400#endif
401#define CONFIG_SYS_BMAN_MEM_SIZE 0x02000000
Jeffrey Ladouceur3fa66db2014-12-08 14:54:01 -0500402#define CONFIG_SYS_BMAN_SP_CENA_SIZE 0x4000
403#define CONFIG_SYS_BMAN_SP_CINH_SIZE 0x1000
404#define CONFIG_SYS_BMAN_CENA_BASE CONFIG_SYS_BMAN_MEM_BASE
405#define CONFIG_SYS_BMAN_CENA_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
406#define CONFIG_SYS_BMAN_CINH_BASE (CONFIG_SYS_BMAN_MEM_BASE + \
407 CONFIG_SYS_BMAN_CENA_SIZE)
408#define CONFIG_SYS_BMAN_CINH_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
409#define CONFIG_SYS_BMAN_SWP_ISDR_REG 0xE08
Jeffrey Ladouceur2a8b3422014-12-03 18:08:43 -0500410#define CONFIG_SYS_QMAN_NUM_PORTALS 10
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800411#define CONFIG_SYS_QMAN_MEM_BASE 0xf6000000
412#ifdef CONFIG_PHYS_64BIT
413#define CONFIG_SYS_QMAN_MEM_PHYS 0xff6000000ull
414#else
415#define CONFIG_SYS_QMAN_MEM_PHYS CONFIG_SYS_QMAN_MEM_BASE
416#endif
417#define CONFIG_SYS_QMAN_MEM_SIZE 0x02000000
Jeffrey Ladouceur3fa66db2014-12-08 14:54:01 -0500418#define CONFIG_SYS_QMAN_SP_CENA_SIZE 0x4000
419#define CONFIG_SYS_QMAN_SP_CINH_SIZE 0x1000
420#define CONFIG_SYS_QMAN_CENA_BASE CONFIG_SYS_QMAN_MEM_BASE
421#define CONFIG_SYS_QMAN_CENA_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
422#define CONFIG_SYS_QMAN_CINH_BASE (CONFIG_SYS_QMAN_MEM_BASE + \
423 CONFIG_SYS_QMAN_CENA_SIZE)
424#define CONFIG_SYS_QMAN_CINH_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
425#define CONFIG_SYS_QMAN_SWP_ISDR_REG 0xE08
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800426
427#define CONFIG_SYS_DPAA_FMAN
428
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800429#define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
430#endif /* CONFIG_NOBQFMAN */
431
432#ifdef CONFIG_SYS_DPAA_FMAN
York Sun960286b2016-12-28 08:43:34 -0800433#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800434#define RGMII_PHY1_ADDR 0x2
435#define RGMII_PHY2_ADDR 0x6
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800436#define SGMII_AQR_PHY_ADDR 0x2
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800437#define FM1_10GEC1_PHY_ADDR 0x1
York Sun90824052016-12-28 08:43:33 -0800438#elif defined(CONFIG_TARGET_T1023RDB)
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800439#define RGMII_PHY1_ADDR 0x1
440#define SGMII_RTK_PHY_ADDR 0x3
441#define SGMII_AQR_PHY_ADDR 0x2
442#endif
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800443#endif
444
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800445/*
446 * Dynamic MTD Partition support with mtdparts
447 */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800448
449/*
450 * Environment
451 */
452#define CONFIG_LOADS_ECHO /* echo on for serial download */
453#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
454
455/*
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800456 * Miscellaneous configurable options
457 */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800458
459/*
460 * For booting Linux, the board info and command line data
461 * have to be in the first 64 MB of memory, since this is
462 * the maximum mapped by the Linux kernel during initialization.
463 */
464#define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial map for Linux*/
465#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
466
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800467/*
468 * Environment Configuration
469 */
470#define CONFIG_ROOTPATH "/opt/nfsroot"
Shengzhou Liue8a7f1c2015-03-27 15:48:34 +0800471#define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800472#define __USB_PHY_TYPE utmi
473
York Sune5d5f5a2016-11-18 13:01:34 -0800474#ifdef CONFIG_ARCH_T1024
Tom Rini47267f82022-03-21 21:33:32 -0400475#define ARCH_EXTRA_ENV_SETTINGS \
476 "bank_intlv=cs0_cs1\0" \
477 "ramdiskfile=t1024rdb/ramdisk.uboot\0" \
478 "fdtfile=t1024rdb/t1024rdb.dtb\0"
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800479#else
Tom Rini47267f82022-03-21 21:33:32 -0400480#define ARCH_EXTRA_ENV_SETTINGS \
481 "bank_intlv=null\0" \
482 "ramdiskfile=t1023rdb/ramdisk.uboot\0" \
483 "fdtfile=t1023rdb/t1023rdb.dtb\0"
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800484#endif
485
486#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Rini47267f82022-03-21 21:33:32 -0400487 ARCH_EXTRA_ENV_SETTINGS \
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800488 "hwconfig=fsl_ddr:ctlr_intlv=cacheline," \
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800489 "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0" \
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800490 "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \
491 "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0" \
492 "bootargs=root=/dev/ram rw console=ttyS0,115200\0" \
493 "netdev=eth0\0" \
494 "tftpflash=tftpboot $loadaddr $uboot && " \
495 "protect off $ubootaddr +$filesize && " \
496 "erase $ubootaddr +$filesize && " \
497 "cp.b $loadaddr $ubootaddr $filesize && " \
498 "protect on $ubootaddr +$filesize && " \
499 "cmp.b $loadaddr $ubootaddr $filesize\0" \
500 "consoledev=ttyS0\0" \
501 "ramdiskaddr=2000000\0" \
Scott Woodb24a4f62016-07-19 17:52:06 -0500502 "fdtaddr=1e00000\0" \
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800503 "bdev=sda3\0"
504
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800505#include <asm/fsl_secure_boot.h>
Aneesh Bansalef6c55a2016-01-22 16:37:22 +0530506
Shengzhou Liu48c6f322014-11-24 17:11:56 +0800507#endif /* __T1024RDB_H */