blob: 618b8ed845a1bf4d860fce7f826fecc5354f9bb2 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Shengzhou Liu49912402014-11-24 17:11:56 +08002/*
3 * Copyright 2014 Freescale Semiconductor, Inc.
Rajesh Bhagataec38012021-11-09 16:30:38 +05304 * Copyright 2020-2021 NXP
Shengzhou Liu49912402014-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 Glassfb64e362020-05-10 11:40:09 -060014#include <linux/stringify.h>
15
Shengzhou Liu49912402014-11-24 17:11:56 +080016/* High Level Configuration Options */
Shengzhou Liu49912402014-11-24 17:11:56 +080017#define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */
Shengzhou Liu49912402014-11-24 17:11:56 +080018#define CONFIG_ENABLE_36BIT_PHYS
19
Shengzhou Liu49912402014-11-24 17:11:56 +080020#define CONFIG_SYS_FSL_CPC /* Corenet Platform Cache */
York Sunfe845072016-12-28 08:43:45 -080021#define CONFIG_SYS_NUM_CPC CONFIG_SYS_NUM_DDR_CTLRS
Shengzhou Liu49912402014-11-24 17:11:56 +080022
Shengzhou Liu49912402014-11-24 17:11:56 +080023#ifdef CONFIG_RAMBOOT_PBL
Shengzhou Liu49912402014-11-24 17:11:56 +080024#define RESET_VECTOR_OFFSET 0x27FFC
25#define BOOT_PAGE_OFFSET 0x27000
Shengzhou Liu49912402014-11-24 17:11:56 +080026
Miquel Raynald0935362019-10-03 19:50:03 +020027#ifdef CONFIG_MTD_RAW_NAND
Shengzhou Liu49912402014-11-24 17:11:56 +080028#define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10)
tang yuantian8dc02f32014-12-17 15:42:54 +080029#define CONFIG_SYS_NAND_U_BOOT_DST 0x30000000
30#define CONFIG_SYS_NAND_U_BOOT_START 0x30000000
Pali Rohár7e814162022-04-25 14:21:20 +053031#ifndef CONFIG_MPC85XX_HAVE_RESET_VECTOR
32#define CONFIG_SYS_MPC85XX_NO_RESETVEC
33#endif
Shengzhou Liu49912402014-11-24 17:11:56 +080034#endif
35
36#ifdef CONFIG_SPIFLASH
tang yuantian8dc02f32014-12-17 15:42:54 +080037#define CONFIG_RESET_VECTOR_ADDRESS 0x30000FFC
Shengzhou Liu49912402014-11-24 17:11:56 +080038#define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (768 << 10)
tang yuantian8dc02f32014-12-17 15:42:54 +080039#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST (0x30000000)
40#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x30000000)
Shengzhou Liu49912402014-11-24 17:11:56 +080041#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (256 << 10)
Shengzhou Liu49912402014-11-24 17:11:56 +080042#ifndef CONFIG_SPL_BUILD
43#define CONFIG_SYS_MPC85XX_NO_RESETVEC
44#endif
Shengzhou Liu49912402014-11-24 17:11:56 +080045#endif
46
47#ifdef CONFIG_SDCARD
tang yuantian8dc02f32014-12-17 15:42:54 +080048#define CONFIG_RESET_VECTOR_ADDRESS 0x30000FFC
Shengzhou Liu49912402014-11-24 17:11:56 +080049#define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10)
tang yuantian8dc02f32014-12-17 15:42:54 +080050#define CONFIG_SYS_MMC_U_BOOT_DST (0x30000000)
51#define CONFIG_SYS_MMC_U_BOOT_START (0x30000000)
Shengzhou Liu49912402014-11-24 17:11:56 +080052#define CONFIG_SYS_MMC_U_BOOT_OFFS (260 << 10)
Shengzhou Liu49912402014-11-24 17:11:56 +080053#ifndef CONFIG_SPL_BUILD
54#define CONFIG_SYS_MPC85XX_NO_RESETVEC
55#endif
Shengzhou Liu49912402014-11-24 17:11:56 +080056#endif
57
58#endif /* CONFIG_RAMBOOT_PBL */
59
Shengzhou Liu49912402014-11-24 17:11:56 +080060#ifndef CONFIG_RESET_VECTOR_ADDRESS
61#define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc
62#endif
63
Shengzhou Liu49912402014-11-24 17:11:56 +080064/* PCIe Boot - Master */
65#define CONFIG_SRIO_PCIE_BOOT_MASTER
66/*
67 * for slave u-boot IMAGE instored in master memory space,
68 * PHYS must be aligned based on the SIZE
69 */
70#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS1 0xfff00000ull
71#define CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE 0x100000 /* 1M */
72#ifdef CONFIG_PHYS_64BIT
73#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xfef200000ull
74#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0x3fff00000ull
75#else
76#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xef200000
77#define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0xfff00000
78#endif
79/*
80 * for slave UCODE and ENV instored in master memory space,
81 * PHYS must be aligned based on the SIZE
82 */
83#ifdef CONFIG_PHYS_64BIT
84#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xfef100000ull
85#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS 0x3ffe00000ull
86#else
87#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xef100000
88#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS 0xffe00000
89#endif
90#define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE 0x40000 /* 256K */
91/* slave core release by master*/
92#define CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET 0xe00e4
93#define CONFIG_SRIO_PCIE_BOOT_RELEASE_MASK 0x00000001 /* release core 0 */
94
95/* PCIe Boot - Slave */
96#ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
97#define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR 0xFFE00000
98#define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR_PHYS \
99 (0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR)
100/* Set 1M boot space for PCIe boot */
101#define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR (CONFIG_SYS_TEXT_BASE & 0xfff00000)
102#define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR_PHYS \
103 (0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR)
104#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
Shengzhou Liu49912402014-11-24 17:11:56 +0800105#endif
106
Shengzhou Liu49912402014-11-24 17:11:56 +0800107/*
108 * These can be toggled for performance analysis, otherwise use default.
109 */
110#define CONFIG_SYS_CACHE_STASHING
Shengzhou Liu49912402014-11-24 17:11:56 +0800111#define CONFIG_SYS_INIT_L2CSR0 L2CSR0_L2E
Shengzhou Liu49912402014-11-24 17:11:56 +0800112#ifdef CONFIG_DDR_ECC
Shengzhou Liu49912402014-11-24 17:11:56 +0800113#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
114#endif
115
Shengzhou Liu49912402014-11-24 17:11:56 +0800116/*
117 * Config the L3 Cache as L3 SRAM
118 */
119#define CONFIG_SYS_INIT_L3_ADDR 0xFFFC0000
120#define CONFIG_SYS_L3_SIZE (256 << 10)
Tom Rini5cd7ece2019-11-18 20:02:10 -0500121#define SPL_ENV_ADDR (CONFIG_SPL_GD_ADDR + 4 * 1024)
Shengzhou Liu49912402014-11-24 17:11:56 +0800122
123#ifdef CONFIG_PHYS_64BIT
124#define CONFIG_SYS_DCSRBAR 0xf0000000
125#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
126#endif
127
128/* EEPROM */
Shengzhou Liu49912402014-11-24 17:11:56 +0800129#define CONFIG_SYS_I2C_EEPROM_NXID
130#define CONFIG_SYS_EEPROM_BUS_NUM 0
Shengzhou Liu49912402014-11-24 17:11:56 +0800131
132/*
133 * DDR Setup
134 */
135#define CONFIG_VERY_BIG_RAM
136#define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
137#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
York Sunf9a03632016-12-28 08:43:34 -0800138#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu49912402014-11-24 17:11:56 +0800139#define CONFIG_SYS_SPD_BUS_NUM 0
140#define SPD_EEPROM_ADDRESS 0x51
Shengzhou Liu49912402014-11-24 17:11:56 +0800141#define CONFIG_SYS_SDRAM_SIZE 4096 /* for fixed parameter use */
York Sun940ee4a2016-12-28 08:43:33 -0800142#elif defined(CONFIG_TARGET_T1023RDB)
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800143#define CONFIG_SYS_DDR_RAW_TIMING
144#define CONFIG_SYS_SDRAM_SIZE 2048
145#endif
Shengzhou Liu49912402014-11-24 17:11:56 +0800146
147/*
148 * IFC Definitions
149 */
150#define CONFIG_SYS_FLASH_BASE 0xe8000000
151#ifdef CONFIG_PHYS_64BIT
152#define CONFIG_SYS_FLASH_BASE_PHYS (0xf00000000ull | CONFIG_SYS_FLASH_BASE)
153#else
154#define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE
155#endif
156
157#define CONFIG_SYS_NOR0_CSPR_EXT (0xf)
158#define CONFIG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
159 CSPR_PORT_SIZE_16 | \
160 CSPR_MSEL_NOR | \
161 CSPR_V)
162#define CONFIG_SYS_NOR_AMASK IFC_AMASK(128*1024*1024)
163
164/* NOR Flash Timing Params */
York Sunf9a03632016-12-28 08:43:34 -0800165#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu49912402014-11-24 17:11:56 +0800166#define CONFIG_SYS_NOR_CSOR CSOR_NAND_TRHZ_80
York Sun940ee4a2016-12-28 08:43:33 -0800167#elif defined(CONFIG_TARGET_T1023RDB)
Shengzhou Liu0a197892015-06-17 16:37:01 +0800168#define CONFIG_SYS_NOR_CSOR (CSOR_NOR_ADM_SHIFT(0) | \
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800169 CSOR_NAND_TRHZ_80 | CSOR_NOR_ADM_SHFT_MODE_EN)
170#endif
Shengzhou Liu49912402014-11-24 17:11:56 +0800171#define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \
172 FTIM0_NOR_TEADC(0x5) | \
173 FTIM0_NOR_TEAHC(0x5))
174#define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \
175 FTIM1_NOR_TRAD_NOR(0x1A) |\
176 FTIM1_NOR_TSEQRAD_NOR(0x13))
177#define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x4) | \
178 FTIM2_NOR_TCH(0x4) | \
179 FTIM2_NOR_TWPH(0x0E) | \
180 FTIM2_NOR_TWP(0x1c))
181#define CONFIG_SYS_NOR_FTIM3 0x0
182
183#define CONFIG_SYS_FLASH_QUIET_TEST
184#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
185
Shengzhou Liu49912402014-11-24 17:11:56 +0800186#define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */
187#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
188#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
189
190#define CONFIG_SYS_FLASH_EMPTY_INFO
191#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS}
192
York Sunf9a03632016-12-28 08:43:34 -0800193#ifdef CONFIG_TARGET_T1024RDB
Shengzhou Liu49912402014-11-24 17:11:56 +0800194/* CPLD on IFC */
195#define CONFIG_SYS_CPLD_BASE 0xffdf0000
196#define CONFIG_SYS_CPLD_BASE_PHYS (0xf00000000ull | CONFIG_SYS_CPLD_BASE)
197#define CONFIG_SYS_CSPR2_EXT (0xf)
198#define CONFIG_SYS_CSPR2 (CSPR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE) \
199 | CSPR_PORT_SIZE_8 \
200 | CSPR_MSEL_GPCM \
201 | CSPR_V)
202#define CONFIG_SYS_AMASK2 IFC_AMASK(64*1024)
203#define CONFIG_SYS_CSOR2 0x0
204
205/* CPLD Timing parameters for IFC CS2 */
206#define CONFIG_SYS_CS2_FTIM0 (FTIM0_GPCM_TACSE(0x0e) | \
207 FTIM0_GPCM_TEADC(0x0e) | \
208 FTIM0_GPCM_TEAHC(0x0e))
209#define CONFIG_SYS_CS2_FTIM1 (FTIM1_GPCM_TACO(0x0e) | \
210 FTIM1_GPCM_TRAD(0x1f))
211#define CONFIG_SYS_CS2_FTIM2 (FTIM2_GPCM_TCS(0x0e) | \
212 FTIM2_GPCM_TCH(0x8) | \
213 FTIM2_GPCM_TWP(0x1f))
214#define CONFIG_SYS_CS2_FTIM3 0x0
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800215#endif
Shengzhou Liu49912402014-11-24 17:11:56 +0800216
217/* NAND Flash on IFC */
Shengzhou Liu49912402014-11-24 17:11:56 +0800218#define CONFIG_SYS_NAND_BASE 0xff800000
219#ifdef CONFIG_PHYS_64BIT
220#define CONFIG_SYS_NAND_BASE_PHYS (0xf00000000ull | CONFIG_SYS_NAND_BASE)
221#else
222#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
223#endif
224#define CONFIG_SYS_NAND_CSPR_EXT (0xf)
225#define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
226 | CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
227 | CSPR_MSEL_NAND /* MSEL = NAND */ \
228 | CSPR_V)
229#define CONFIG_SYS_NAND_AMASK IFC_AMASK(64*1024)
230
York Sunf9a03632016-12-28 08:43:34 -0800231#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu49912402014-11-24 17:11:56 +0800232#define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
233 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
234 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \
235 | CSOR_NAND_RAL_3 /* RAL = 3Byes */ \
236 | CSOR_NAND_PGS_4K /* Page Size = 4K */ \
237 | CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \
238 | CSOR_NAND_PB(64)) /*Pages Per Block = 64*/
York Sun940ee4a2016-12-28 08:43:33 -0800239#elif defined(CONFIG_TARGET_T1023RDB)
Jaiprakash Singhc4e609f2015-05-22 15:21:07 +0530240#define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
241 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
242 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800243 | CSOR_NAND_RAL_3 /* RAL 3Bytes */ \
244 | CSOR_NAND_PGS_2K /* Page Size = 2K */ \
245 | CSOR_NAND_SPRZ_128 /* Spare size = 128 */ \
246 | CSOR_NAND_PB(64)) /*Pages Per Block = 64*/
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800247#endif
Shengzhou Liu49912402014-11-24 17:11:56 +0800248
Shengzhou Liu49912402014-11-24 17:11:56 +0800249/* ONFI NAND Flash mode0 Timing Params */
250#define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x07) | \
251 FTIM0_NAND_TWP(0x18) | \
252 FTIM0_NAND_TWCHT(0x07) | \
253 FTIM0_NAND_TWH(0x0a))
254#define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
255 FTIM1_NAND_TWBE(0x39) | \
256 FTIM1_NAND_TRR(0x0e) | \
257 FTIM1_NAND_TRP(0x18))
258#define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0x0f) | \
259 FTIM2_NAND_TREH(0x0a) | \
260 FTIM2_NAND_TWHRE(0x1e))
261#define CONFIG_SYS_NAND_FTIM3 0x0
262
263#define CONFIG_SYS_NAND_DDR_LAW 11
264#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
265#define CONFIG_SYS_MAX_NAND_DEVICE 1
Shengzhou Liu49912402014-11-24 17:11:56 +0800266
Miquel Raynald0935362019-10-03 19:50:03 +0200267#if defined(CONFIG_MTD_RAW_NAND)
Shengzhou Liu49912402014-11-24 17:11:56 +0800268#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
269#define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR
270#define CONFIG_SYS_AMASK0 CONFIG_SYS_NAND_AMASK
271#define CONFIG_SYS_CSOR0 CONFIG_SYS_NAND_CSOR
272#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NAND_FTIM0
273#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1
274#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2
275#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3
276#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT
277#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_CSPR
278#define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK
279#define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR
280#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0
281#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1
282#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2
283#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3
284#else
285#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
286#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR
287#define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
288#define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
289#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
290#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
291#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
292#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
293#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NAND_CSPR_EXT
294#define CONFIG_SYS_CSPR1 CONFIG_SYS_NAND_CSPR
295#define CONFIG_SYS_AMASK1 CONFIG_SYS_NAND_AMASK
296#define CONFIG_SYS_CSOR1 CONFIG_SYS_NAND_CSOR
297#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NAND_FTIM0
298#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NAND_FTIM1
299#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NAND_FTIM2
300#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NAND_FTIM3
301#endif
302
Shengzhou Liu49912402014-11-24 17:11:56 +0800303#if defined(CONFIG_RAMBOOT_PBL)
304#define CONFIG_SYS_RAMBOOT
305#endif
306
Shengzhou Liu49912402014-11-24 17:11:56 +0800307#define CONFIG_HWCONFIG
308
309/* define to use L1 as initial stack */
310#define CONFIG_L1_INIT_RAM
311#define CONFIG_SYS_INIT_RAM_LOCK
312#define CONFIG_SYS_INIT_RAM_ADDR 0xfdd00000 /* Initial L1 address */
313#ifdef CONFIG_PHYS_64BIT
314#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf
York Sunee7b4832015-08-17 13:31:51 -0700315#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW 0xfe03c000
Shengzhou Liu49912402014-11-24 17:11:56 +0800316/* The assembler doesn't like typecast */
317#define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
318 ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
319 CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
320#else
York Sunee7b4832015-08-17 13:31:51 -0700321#define CONFIG_SYS_INIT_RAM_ADDR_PHYS 0xfe03c000 /* Initial L1 address */
Shengzhou Liu49912402014-11-24 17:11:56 +0800322#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
323#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
324#endif
325#define CONFIG_SYS_INIT_RAM_SIZE 0x00004000
326
Tom Rini55f37562022-05-24 14:14:02 -0400327#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
Shengzhou Liu49912402014-11-24 17:11:56 +0800328
329#define CONFIG_SYS_MONITOR_LEN (768 * 1024)
Shengzhou Liu49912402014-11-24 17:11:56 +0800330
331/* Serial Port */
Shengzhou Liu49912402014-11-24 17:11:56 +0800332#define CONFIG_SYS_NS16550_SERIAL
333#define CONFIG_SYS_NS16550_REG_SIZE 1
334#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0)/2)
335
336#define CONFIG_SYS_BAUDRATE_TABLE \
337 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
338
339#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x11C500)
340#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x11C600)
341#define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)
342#define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)
Shengzhou Liu49912402014-11-24 17:11:56 +0800343
Shengzhou Liu49912402014-11-24 17:11:56 +0800344/* I2C */
Shengzhou Liu49912402014-11-24 17:11:56 +0800345
Shengzhou Liu0a197892015-06-17 16:37:01 +0800346#define I2C_PCA6408_BUS_NUM 1
347#define I2C_PCA6408_ADDR 0x20
Shengzhou Liu49912402014-11-24 17:11:56 +0800348
349/* I2C bus multiplexer */
350#define I2C_MUX_CH_DEFAULT 0x8
351
352/*
353 * RTC configuration
354 */
355#define RTC
356#define CONFIG_RTC_DS1337 1
357#define CONFIG_SYS_I2C_RTC_ADDR 0x68
358
359/*
360 * eSPI - Enhanced SPI
361 */
Shengzhou Liu49912402014-11-24 17:11:56 +0800362
363/*
364 * General PCIe
365 * Memory space is mapped 1-1, but I/O space must start from 0.
366 */
Robert P. J. Daya8099812016-05-03 19:52:49 -0400367#define CONFIG_PCIE1 /* PCIE controller 1 */
368#define CONFIG_PCIE2 /* PCIE controller 2 */
369#define CONFIG_PCIE3 /* PCIE controller 3 */
Shengzhou Liu49912402014-11-24 17:11:56 +0800370
371#ifdef CONFIG_PCI
372/* controller 1, direct to uli, tgtid 3, Base address 20000 */
373#ifdef CONFIG_PCIE1
374#define CONFIG_SYS_PCIE1_MEM_VIRT 0x80000000
Shengzhou Liu49912402014-11-24 17:11:56 +0800375#define CONFIG_SYS_PCIE1_MEM_PHYS 0xc00000000ull
Shengzhou Liu49912402014-11-24 17:11:56 +0800376#define CONFIG_SYS_PCIE1_IO_VIRT 0xf8000000
Shengzhou Liu49912402014-11-24 17:11:56 +0800377#define CONFIG_SYS_PCIE1_IO_PHYS 0xff8000000ull
Shengzhou Liu49912402014-11-24 17:11:56 +0800378#endif
379
380/* controller 2, Slot 2, tgtid 2, Base address 201000 */
381#ifdef CONFIG_PCIE2
382#define CONFIG_SYS_PCIE2_MEM_VIRT 0x90000000
Shengzhou Liu49912402014-11-24 17:11:56 +0800383#define CONFIG_SYS_PCIE2_MEM_PHYS 0xc10000000ull
Shengzhou Liu49912402014-11-24 17:11:56 +0800384#define CONFIG_SYS_PCIE2_IO_VIRT 0xf8010000
Shengzhou Liu49912402014-11-24 17:11:56 +0800385#define CONFIG_SYS_PCIE2_IO_PHYS 0xff8010000ull
Shengzhou Liu49912402014-11-24 17:11:56 +0800386#endif
387
388/* controller 3, Slot 1, tgtid 1, Base address 202000 */
389#ifdef CONFIG_PCIE3
390#define CONFIG_SYS_PCIE3_MEM_VIRT 0xa0000000
Shengzhou Liu49912402014-11-24 17:11:56 +0800391#define CONFIG_SYS_PCIE3_MEM_PHYS 0xc20000000ull
Shengzhou Liu49912402014-11-24 17:11:56 +0800392#define CONFIG_SYS_PCIE3_IO_VIRT 0xf8020000
Shengzhou Liu49912402014-11-24 17:11:56 +0800393#define CONFIG_SYS_PCIE3_IO_PHYS 0xff8020000ull
Shengzhou Liu49912402014-11-24 17:11:56 +0800394#endif
Hou Zhiqiang38a02b52019-08-27 11:03:34 +0000395
Shengzhou Liu49912402014-11-24 17:11:56 +0800396#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
Shengzhou Liu49912402014-11-24 17:11:56 +0800397#endif /* CONFIG_PCI */
398
399/*
400 * USB
401 */
402#define CONFIG_HAS_FSL_DR_USB
403
404#ifdef CONFIG_HAS_FSL_DR_USB
Shengzhou Liu49912402014-11-24 17:11:56 +0800405#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
Shengzhou Liu49912402014-11-24 17:11:56 +0800406#endif
407
408/*
409 * SDHC
410 */
Shengzhou Liu49912402014-11-24 17:11:56 +0800411#ifdef CONFIG_MMC
Shengzhou Liu49912402014-11-24 17:11:56 +0800412#define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
Shengzhou Liu49912402014-11-24 17:11:56 +0800413#endif
414
415/* Qman/Bman */
416#ifndef CONFIG_NOBQFMAN
Jeffrey Ladouceurf9c39742014-12-03 18:08:43 -0500417#define CONFIG_SYS_BMAN_NUM_PORTALS 10
Shengzhou Liu49912402014-11-24 17:11:56 +0800418#define CONFIG_SYS_BMAN_MEM_BASE 0xf4000000
419#ifdef CONFIG_PHYS_64BIT
420#define CONFIG_SYS_BMAN_MEM_PHYS 0xff4000000ull
421#else
422#define CONFIG_SYS_BMAN_MEM_PHYS CONFIG_SYS_BMAN_MEM_BASE
423#endif
424#define CONFIG_SYS_BMAN_MEM_SIZE 0x02000000
Jeffrey Ladouceurff2c6462014-12-08 14:54:01 -0500425#define CONFIG_SYS_BMAN_SP_CENA_SIZE 0x4000
426#define CONFIG_SYS_BMAN_SP_CINH_SIZE 0x1000
427#define CONFIG_SYS_BMAN_CENA_BASE CONFIG_SYS_BMAN_MEM_BASE
428#define CONFIG_SYS_BMAN_CENA_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
429#define CONFIG_SYS_BMAN_CINH_BASE (CONFIG_SYS_BMAN_MEM_BASE + \
430 CONFIG_SYS_BMAN_CENA_SIZE)
431#define CONFIG_SYS_BMAN_CINH_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
432#define CONFIG_SYS_BMAN_SWP_ISDR_REG 0xE08
Jeffrey Ladouceurf9c39742014-12-03 18:08:43 -0500433#define CONFIG_SYS_QMAN_NUM_PORTALS 10
Shengzhou Liu49912402014-11-24 17:11:56 +0800434#define CONFIG_SYS_QMAN_MEM_BASE 0xf6000000
435#ifdef CONFIG_PHYS_64BIT
436#define CONFIG_SYS_QMAN_MEM_PHYS 0xff6000000ull
437#else
438#define CONFIG_SYS_QMAN_MEM_PHYS CONFIG_SYS_QMAN_MEM_BASE
439#endif
440#define CONFIG_SYS_QMAN_MEM_SIZE 0x02000000
Jeffrey Ladouceurff2c6462014-12-08 14:54:01 -0500441#define CONFIG_SYS_QMAN_SP_CENA_SIZE 0x4000
442#define CONFIG_SYS_QMAN_SP_CINH_SIZE 0x1000
443#define CONFIG_SYS_QMAN_CENA_BASE CONFIG_SYS_QMAN_MEM_BASE
444#define CONFIG_SYS_QMAN_CENA_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
445#define CONFIG_SYS_QMAN_CINH_BASE (CONFIG_SYS_QMAN_MEM_BASE + \
446 CONFIG_SYS_QMAN_CENA_SIZE)
447#define CONFIG_SYS_QMAN_CINH_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
448#define CONFIG_SYS_QMAN_SWP_ISDR_REG 0xE08
Shengzhou Liu49912402014-11-24 17:11:56 +0800449
450#define CONFIG_SYS_DPAA_FMAN
451
Shengzhou Liu49912402014-11-24 17:11:56 +0800452#define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
453#endif /* CONFIG_NOBQFMAN */
454
455#ifdef CONFIG_SYS_DPAA_FMAN
York Sunf9a03632016-12-28 08:43:34 -0800456#if defined(CONFIG_TARGET_T1024RDB)
Shengzhou Liu49912402014-11-24 17:11:56 +0800457#define RGMII_PHY1_ADDR 0x2
458#define RGMII_PHY2_ADDR 0x6
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800459#define SGMII_AQR_PHY_ADDR 0x2
Shengzhou Liu49912402014-11-24 17:11:56 +0800460#define FM1_10GEC1_PHY_ADDR 0x1
York Sun940ee4a2016-12-28 08:43:33 -0800461#elif defined(CONFIG_TARGET_T1023RDB)
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800462#define RGMII_PHY1_ADDR 0x1
463#define SGMII_RTK_PHY_ADDR 0x3
464#define SGMII_AQR_PHY_ADDR 0x2
465#endif
Shengzhou Liu49912402014-11-24 17:11:56 +0800466#endif
467
Shengzhou Liu49912402014-11-24 17:11:56 +0800468/*
469 * Dynamic MTD Partition support with mtdparts
470 */
Shengzhou Liu49912402014-11-24 17:11:56 +0800471
472/*
473 * Environment
474 */
475#define CONFIG_LOADS_ECHO /* echo on for serial download */
476#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
477
478/*
Shengzhou Liu49912402014-11-24 17:11:56 +0800479 * Miscellaneous configurable options
480 */
Shengzhou Liu49912402014-11-24 17:11:56 +0800481
482/*
483 * For booting Linux, the board info and command line data
484 * have to be in the first 64 MB of memory, since this is
485 * the maximum mapped by the Linux kernel during initialization.
486 */
487#define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial map for Linux*/
488#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
489
Shengzhou Liu49912402014-11-24 17:11:56 +0800490/*
491 * Environment Configuration
492 */
493#define CONFIG_ROOTPATH "/opt/nfsroot"
Shengzhou Liu00d7e5b2015-03-27 15:48:34 +0800494#define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
Shengzhou Liu49912402014-11-24 17:11:56 +0800495#define __USB_PHY_TYPE utmi
496
York Sun7d29dd62016-11-18 13:01:34 -0800497#ifdef CONFIG_ARCH_T1024
Tom Rini272eb5b2022-03-21 21:33:32 -0400498#define ARCH_EXTRA_ENV_SETTINGS \
499 "bank_intlv=cs0_cs1\0" \
500 "ramdiskfile=t1024rdb/ramdisk.uboot\0" \
501 "fdtfile=t1024rdb/t1024rdb.dtb\0"
Shengzhou Liu49912402014-11-24 17:11:56 +0800502#else
Tom Rini272eb5b2022-03-21 21:33:32 -0400503#define ARCH_EXTRA_ENV_SETTINGS \
504 "bank_intlv=null\0" \
505 "ramdiskfile=t1023rdb/ramdisk.uboot\0" \
506 "fdtfile=t1023rdb/t1023rdb.dtb\0"
Shengzhou Liu49912402014-11-24 17:11:56 +0800507#endif
508
509#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Rini272eb5b2022-03-21 21:33:32 -0400510 ARCH_EXTRA_ENV_SETTINGS \
Shengzhou Liu49912402014-11-24 17:11:56 +0800511 "hwconfig=fsl_ddr:ctlr_intlv=cacheline," \
Shengzhou Liu49912402014-11-24 17:11:56 +0800512 "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0" \
Shengzhou Liu49912402014-11-24 17:11:56 +0800513 "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \
514 "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0" \
515 "bootargs=root=/dev/ram rw console=ttyS0,115200\0" \
516 "netdev=eth0\0" \
517 "tftpflash=tftpboot $loadaddr $uboot && " \
518 "protect off $ubootaddr +$filesize && " \
519 "erase $ubootaddr +$filesize && " \
520 "cp.b $loadaddr $ubootaddr $filesize && " \
521 "protect on $ubootaddr +$filesize && " \
522 "cmp.b $loadaddr $ubootaddr $filesize\0" \
523 "consoledev=ttyS0\0" \
524 "ramdiskaddr=2000000\0" \
Scott Woodb7f4b852016-07-19 17:52:06 -0500525 "fdtaddr=1e00000\0" \
Shengzhou Liu49912402014-11-24 17:11:56 +0800526 "bdev=sda3\0"
527
Shengzhou Liu49912402014-11-24 17:11:56 +0800528#include <asm/fsl_secure_boot.h>
Aneesh Bansal962021a2016-01-22 16:37:22 +0530529
Shengzhou Liu49912402014-11-24 17:11:56 +0800530#endif /* __T1024RDB_H */