xref: /openbmc/u-boot/include/configs/T102xRDB.h (revision ef6c55a2)
148c6f328SShengzhou Liu /*
248c6f328SShengzhou Liu  * Copyright 2014 Freescale Semiconductor, Inc.
348c6f328SShengzhou Liu  *
448c6f328SShengzhou Liu  * SPDX-License-Identifier:     GPL-2.0+
548c6f328SShengzhou Liu  */
648c6f328SShengzhou Liu 
748c6f328SShengzhou Liu /*
848c6f328SShengzhou Liu  * T1024/T1023 RDB board configuration file
948c6f328SShengzhou Liu  */
1048c6f328SShengzhou Liu 
1148c6f328SShengzhou Liu #ifndef __T1024RDB_H
1248c6f328SShengzhou Liu #define __T1024RDB_H
1348c6f328SShengzhou Liu 
1448c6f328SShengzhou Liu /* High Level Configuration Options */
1548c6f328SShengzhou Liu #define CONFIG_DISPLAY_BOARDINFO
1648c6f328SShengzhou Liu #define CONFIG_BOOKE
1748c6f328SShengzhou Liu #define CONFIG_E500			/* BOOKE e500 family */
1848c6f328SShengzhou Liu #define CONFIG_E500MC			/* BOOKE e500mc family */
1948c6f328SShengzhou Liu #define CONFIG_SYS_BOOK3E_HV		/* Category E.HV supported */
2048c6f328SShengzhou Liu #define CONFIG_MP			/* support multiple processors */
2148c6f328SShengzhou Liu #define CONFIG_PHYS_64BIT
2248c6f328SShengzhou Liu #define CONFIG_ENABLE_36BIT_PHYS
2348c6f328SShengzhou Liu 
2448c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
2548c6f328SShengzhou Liu #define CONFIG_ADDR_MAP		1
2648c6f328SShengzhou Liu #define CONFIG_SYS_NUM_ADDR_MAP	64	/* number of TLB1 entries */
2748c6f328SShengzhou Liu #endif
2848c6f328SShengzhou Liu 
2948c6f328SShengzhou Liu #define CONFIG_SYS_FSL_CPC		/* Corenet Platform Cache */
3048c6f328SShengzhou Liu #define CONFIG_SYS_NUM_CPC		CONFIG_NUM_DDR_CONTROLLERS
3148c6f328SShengzhou Liu #define CONFIG_FSL_IFC			/* Enable IFC Support */
3248c6f328SShengzhou Liu 
3348c6f328SShengzhou Liu #define CONFIG_FSL_LAW			/* Use common FSL init code */
3448c6f328SShengzhou Liu #define CONFIG_ENV_OVERWRITE
3548c6f328SShengzhou Liu 
36*ef6c55a2SAneesh Bansal #define CONFIG_FSL_CAAM			/* Enable SEC/CAAM */
37*ef6c55a2SAneesh Bansal 
3848c6f328SShengzhou Liu /* support deep sleep */
39e8a7f1c3SShengzhou Liu #ifdef CONFIG_PPC_T1024
4048c6f328SShengzhou Liu #define CONFIG_DEEP_SLEEP
41e8a7f1c3SShengzhou Liu #endif
42f49b8c1bStang yuantian #if defined(CONFIG_DEEP_SLEEP)
4348c6f328SShengzhou Liu #define CONFIG_SILENT_CONSOLE
44f49b8c1bStang yuantian #define CONFIG_BOARD_EARLY_INIT_F
45f49b8c1bStang yuantian #endif
4648c6f328SShengzhou Liu 
4748c6f328SShengzhou Liu #ifdef CONFIG_RAMBOOT_PBL
4848c6f328SShengzhou Liu #define CONFIG_SYS_FSL_PBL_PBI board/freescale/t102xrdb/t1024_pbi.cfg
49e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
5048c6f328SShengzhou Liu #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t102xrdb/t1024_rcw.cfg
51e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
52e8a7f1c3SShengzhou Liu #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t102xrdb/t1023_rcw.cfg
53e8a7f1c3SShengzhou Liu #endif
5448c6f328SShengzhou Liu #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
5548c6f328SShengzhou Liu #define CONFIG_SPL_ENV_SUPPORT
5648c6f328SShengzhou Liu #define CONFIG_SPL_SERIAL_SUPPORT
5748c6f328SShengzhou Liu #define CONFIG_SPL_FLUSH_IMAGE
5848c6f328SShengzhou Liu #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
5948c6f328SShengzhou Liu #define CONFIG_SPL_LIBGENERIC_SUPPORT
6048c6f328SShengzhou Liu #define CONFIG_SPL_LIBCOMMON_SUPPORT
6148c6f328SShengzhou Liu #define CONFIG_SPL_I2C_SUPPORT
6248c6f328SShengzhou Liu #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
6348c6f328SShengzhou Liu #define CONFIG_FSL_LAW			/* Use common FSL init code */
64f49b8c1bStang yuantian #define CONFIG_SYS_TEXT_BASE		0x30001000
6548c6f328SShengzhou Liu #define CONFIG_SPL_TEXT_BASE		0xFFFD8000
6648c6f328SShengzhou Liu #define CONFIG_SPL_PAD_TO		0x40000
6748c6f328SShengzhou Liu #define CONFIG_SPL_MAX_SIZE		0x28000
6848c6f328SShengzhou Liu #define RESET_VECTOR_OFFSET		0x27FFC
6948c6f328SShengzhou Liu #define BOOT_PAGE_OFFSET		0x27000
7048c6f328SShengzhou Liu #ifdef CONFIG_SPL_BUILD
7148c6f328SShengzhou Liu #define CONFIG_SPL_SKIP_RELOCATE
7248c6f328SShengzhou Liu #define CONFIG_SPL_COMMON_INIT_DDR
7348c6f328SShengzhou Liu #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
7448c6f328SShengzhou Liu #define CONFIG_SYS_NO_FLASH
7548c6f328SShengzhou Liu #endif
7648c6f328SShengzhou Liu 
7748c6f328SShengzhou Liu #ifdef CONFIG_NAND
7848c6f328SShengzhou Liu #define CONFIG_SPL_NAND_SUPPORT
7948c6f328SShengzhou Liu #define CONFIG_SYS_NAND_U_BOOT_SIZE	(768 << 10)
80f49b8c1bStang yuantian #define CONFIG_SYS_NAND_U_BOOT_DST	0x30000000
81f49b8c1bStang yuantian #define CONFIG_SYS_NAND_U_BOOT_START	0x30000000
8248c6f328SShengzhou Liu #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
8348c6f328SShengzhou Liu #define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
8448c6f328SShengzhou Liu #define CONFIG_SPL_NAND_BOOT
8548c6f328SShengzhou Liu #endif
8648c6f328SShengzhou Liu 
8748c6f328SShengzhou Liu #ifdef CONFIG_SPIFLASH
88f49b8c1bStang yuantian #define CONFIG_RESET_VECTOR_ADDRESS		0x30000FFC
8948c6f328SShengzhou Liu #define CONFIG_SPL_SPI_SUPPORT
9048c6f328SShengzhou Liu #define CONFIG_SPL_SPI_FLASH_SUPPORT
9148c6f328SShengzhou Liu #define CONFIG_SPL_SPI_FLASH_MINIMAL
9248c6f328SShengzhou Liu #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
93f49b8c1bStang yuantian #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x30000000)
94f49b8c1bStang yuantian #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x30000000)
9548c6f328SShengzhou Liu #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(256 << 10)
9648c6f328SShengzhou Liu #define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot.lds"
9748c6f328SShengzhou Liu #ifndef CONFIG_SPL_BUILD
9848c6f328SShengzhou Liu #define CONFIG_SYS_MPC85XX_NO_RESETVEC
9948c6f328SShengzhou Liu #endif
10048c6f328SShengzhou Liu #define CONFIG_SPL_SPI_BOOT
10148c6f328SShengzhou Liu #endif
10248c6f328SShengzhou Liu 
10348c6f328SShengzhou Liu #ifdef CONFIG_SDCARD
104f49b8c1bStang yuantian #define CONFIG_RESET_VECTOR_ADDRESS	0x30000FFC
10548c6f328SShengzhou Liu #define CONFIG_SPL_MMC_SUPPORT
10648c6f328SShengzhou Liu #define CONFIG_SPL_MMC_MINIMAL
10748c6f328SShengzhou Liu #define CONFIG_SYS_MMC_U_BOOT_SIZE	(768 << 10)
108f49b8c1bStang yuantian #define CONFIG_SYS_MMC_U_BOOT_DST	(0x30000000)
109f49b8c1bStang yuantian #define CONFIG_SYS_MMC_U_BOOT_START	(0x30000000)
11048c6f328SShengzhou Liu #define CONFIG_SYS_MMC_U_BOOT_OFFS	(260 << 10)
11148c6f328SShengzhou Liu #define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot.lds"
11248c6f328SShengzhou Liu #ifndef CONFIG_SPL_BUILD
11348c6f328SShengzhou Liu #define CONFIG_SYS_MPC85XX_NO_RESETVEC
11448c6f328SShengzhou Liu #endif
11548c6f328SShengzhou Liu #define CONFIG_SPL_MMC_BOOT
11648c6f328SShengzhou Liu #endif
11748c6f328SShengzhou Liu 
11848c6f328SShengzhou Liu #endif /* CONFIG_RAMBOOT_PBL */
11948c6f328SShengzhou Liu 
12048c6f328SShengzhou Liu #ifndef CONFIG_SYS_TEXT_BASE
12148c6f328SShengzhou Liu #define CONFIG_SYS_TEXT_BASE	0xeff40000
12248c6f328SShengzhou Liu #endif
12348c6f328SShengzhou Liu 
12448c6f328SShengzhou Liu #ifndef CONFIG_RESET_VECTOR_ADDRESS
12548c6f328SShengzhou Liu #define CONFIG_RESET_VECTOR_ADDRESS	0xeffffffc
12648c6f328SShengzhou Liu #endif
12748c6f328SShengzhou Liu 
12848c6f328SShengzhou Liu #ifndef CONFIG_SYS_NO_FLASH
12948c6f328SShengzhou Liu #define CONFIG_FLASH_CFI_DRIVER
13048c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_CFI
13148c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
13248c6f328SShengzhou Liu #endif
13348c6f328SShengzhou Liu 
13448c6f328SShengzhou Liu /* PCIe Boot - Master */
13548c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_MASTER
13648c6f328SShengzhou Liu /*
13748c6f328SShengzhou Liu  * for slave u-boot IMAGE instored in master memory space,
13848c6f328SShengzhou Liu  * PHYS must be aligned based on the SIZE
13948c6f328SShengzhou Liu  */
14048c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS1 0xfff00000ull
14148c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE     0x100000 /* 1M */
14248c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
14348c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xfef200000ull
14448c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0x3fff00000ull
14548c6f328SShengzhou Liu #else
14648c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xef200000
14748c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0xfff00000
14848c6f328SShengzhou Liu #endif
14948c6f328SShengzhou Liu /*
15048c6f328SShengzhou Liu  * for slave UCODE and ENV instored in master memory space,
15148c6f328SShengzhou Liu  * PHYS must be aligned based on the SIZE
15248c6f328SShengzhou Liu  */
15348c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
15448c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xfef100000ull
15548c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS	 0x3ffe00000ull
15648c6f328SShengzhou Liu #else
15748c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xef100000
15848c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS  0xffe00000
15948c6f328SShengzhou Liu #endif
16048c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE	0x40000 /* 256K */
16148c6f328SShengzhou Liu /* slave core release by master*/
16248c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET	0xe00e4
16348c6f328SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_RELEASE_MASK	0x00000001 /* release core 0 */
16448c6f328SShengzhou Liu 
16548c6f328SShengzhou Liu /* PCIe Boot - Slave */
16648c6f328SShengzhou Liu #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
16748c6f328SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR 0xFFE00000
16848c6f328SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR_PHYS \
16948c6f328SShengzhou Liu 		(0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR)
17048c6f328SShengzhou Liu /* Set 1M boot space for PCIe boot */
17148c6f328SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR (CONFIG_SYS_TEXT_BASE & 0xfff00000)
17248c6f328SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR_PHYS	\
17348c6f328SShengzhou Liu 		(0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR)
17448c6f328SShengzhou Liu #define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
17548c6f328SShengzhou Liu #define CONFIG_SYS_NO_FLASH
17648c6f328SShengzhou Liu #endif
17748c6f328SShengzhou Liu 
17848c6f328SShengzhou Liu #if defined(CONFIG_SPIFLASH)
17948c6f328SShengzhou Liu #define CONFIG_SYS_EXTRA_ENV_RELOC
18048c6f328SShengzhou Liu #define CONFIG_ENV_IS_IN_SPI_FLASH
18148c6f328SShengzhou Liu #define CONFIG_ENV_SPI_BUS		0
18248c6f328SShengzhou Liu #define CONFIG_ENV_SPI_CS		0
18348c6f328SShengzhou Liu #define CONFIG_ENV_SPI_MAX_HZ		10000000
18448c6f328SShengzhou Liu #define CONFIG_ENV_SPI_MODE		0
18548c6f328SShengzhou Liu #define CONFIG_ENV_SIZE			0x2000		/* 8KB */
18648c6f328SShengzhou Liu #define CONFIG_ENV_OFFSET		0x100000	/* 1MB */
187e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
18848c6f328SShengzhou Liu #define CONFIG_ENV_SECT_SIZE		0x10000
189e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
190e8a7f1c3SShengzhou Liu #define CONFIG_ENV_SECT_SIZE		0x40000
191e8a7f1c3SShengzhou Liu #endif
19248c6f328SShengzhou Liu #elif defined(CONFIG_SDCARD)
19348c6f328SShengzhou Liu #define CONFIG_SYS_EXTRA_ENV_RELOC
19448c6f328SShengzhou Liu #define CONFIG_ENV_IS_IN_MMC
19548c6f328SShengzhou Liu #define CONFIG_SYS_MMC_ENV_DEV		0
19648c6f328SShengzhou Liu #define CONFIG_ENV_SIZE			0x2000
19748c6f328SShengzhou Liu #define CONFIG_ENV_OFFSET		(512 * 0x800)
19848c6f328SShengzhou Liu #elif defined(CONFIG_NAND)
19948c6f328SShengzhou Liu #define CONFIG_SYS_EXTRA_ENV_RELOC
20048c6f328SShengzhou Liu #define CONFIG_ENV_IS_IN_NAND
20148c6f328SShengzhou Liu #define CONFIG_ENV_SIZE			0x2000
202e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
20348c6f328SShengzhou Liu #define CONFIG_ENV_OFFSET		(2 * CONFIG_SYS_NAND_BLOCK_SIZE)
204e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
205e8a7f1c3SShengzhou Liu #define CONFIG_ENV_OFFSET		(10 * CONFIG_SYS_NAND_BLOCK_SIZE)
206e8a7f1c3SShengzhou Liu #endif
20748c6f328SShengzhou Liu #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE)
20848c6f328SShengzhou Liu #define CONFIG_ENV_IS_IN_REMOTE
20948c6f328SShengzhou Liu #define CONFIG_ENV_ADDR		0xffe20000
21048c6f328SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
21148c6f328SShengzhou Liu #elif defined(CONFIG_ENV_IS_NOWHERE)
21248c6f328SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
21348c6f328SShengzhou Liu #else
21448c6f328SShengzhou Liu #define CONFIG_ENV_IS_IN_FLASH
21548c6f328SShengzhou Liu #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
21648c6f328SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
21748c6f328SShengzhou Liu #define CONFIG_ENV_SECT_SIZE	0x20000 /* 128K (one sector) */
21848c6f328SShengzhou Liu #endif
21948c6f328SShengzhou Liu 
22048c6f328SShengzhou Liu 
22148c6f328SShengzhou Liu #ifndef __ASSEMBLY__
22248c6f328SShengzhou Liu unsigned long get_board_sys_clk(void);
22348c6f328SShengzhou Liu unsigned long get_board_ddr_clk(void);
22448c6f328SShengzhou Liu #endif
22548c6f328SShengzhou Liu 
22648c6f328SShengzhou Liu #define CONFIG_SYS_CLK_FREQ	100000000
227e8a7f1c3SShengzhou Liu #define CONFIG_DDR_CLK_FREQ	100000000
22848c6f328SShengzhou Liu 
22948c6f328SShengzhou Liu /*
23048c6f328SShengzhou Liu  * These can be toggled for performance analysis, otherwise use default.
23148c6f328SShengzhou Liu  */
23248c6f328SShengzhou Liu #define CONFIG_SYS_CACHE_STASHING
23348c6f328SShengzhou Liu #define CONFIG_BACKSIDE_L2_CACHE
23448c6f328SShengzhou Liu #define CONFIG_SYS_INIT_L2CSR0		L2CSR0_L2E
23548c6f328SShengzhou Liu #define CONFIG_BTB			/* toggle branch predition */
23648c6f328SShengzhou Liu #define CONFIG_DDR_ECC
23748c6f328SShengzhou Liu #ifdef CONFIG_DDR_ECC
23848c6f328SShengzhou Liu #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
23948c6f328SShengzhou Liu #define CONFIG_MEM_INIT_VALUE		0xdeadbeef
24048c6f328SShengzhou Liu #endif
24148c6f328SShengzhou Liu 
242e8a7f1c3SShengzhou Liu #define CONFIG_CMD_MEMTEST
24348c6f328SShengzhou Liu #define CONFIG_SYS_MEMTEST_START	0x00200000 /* memtest works on */
24448c6f328SShengzhou Liu #define CONFIG_SYS_MEMTEST_END		0x00400000
24548c6f328SShengzhou Liu #define CONFIG_SYS_ALT_MEMTEST
24648c6f328SShengzhou Liu #define CONFIG_PANIC_HANG	/* do not reset board on panic */
24748c6f328SShengzhou Liu 
24848c6f328SShengzhou Liu /*
24948c6f328SShengzhou Liu  *  Config the L3 Cache as L3 SRAM
25048c6f328SShengzhou Liu  */
25148c6f328SShengzhou Liu #define CONFIG_SYS_INIT_L3_ADDR		0xFFFC0000
25248c6f328SShengzhou Liu #define CONFIG_SYS_L3_SIZE		(256 << 10)
25348c6f328SShengzhou Liu #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L3_ADDR + 32 * 1024)
25448c6f328SShengzhou Liu #ifdef CONFIG_RAMBOOT_PBL
25548c6f328SShengzhou Liu #define CONFIG_ENV_ADDR			(CONFIG_SPL_GD_ADDR + 4 * 1024)
25648c6f328SShengzhou Liu #endif
25748c6f328SShengzhou Liu #define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SPL_GD_ADDR + 12 * 1024)
25848c6f328SShengzhou Liu #define CONFIG_SPL_RELOC_MALLOC_SIZE	(30 << 10)
25948c6f328SShengzhou Liu #define CONFIG_SPL_RELOC_STACK		(CONFIG_SPL_GD_ADDR + 64 * 1024)
26048c6f328SShengzhou Liu #define CONFIG_SPL_RELOC_STACK_SIZE	(22 << 10)
26148c6f328SShengzhou Liu 
26248c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
26348c6f328SShengzhou Liu #define CONFIG_SYS_DCSRBAR		0xf0000000
26448c6f328SShengzhou Liu #define CONFIG_SYS_DCSRBAR_PHYS		0xf00000000ull
26548c6f328SShengzhou Liu #endif
26648c6f328SShengzhou Liu 
26748c6f328SShengzhou Liu /* EEPROM */
26848c6f328SShengzhou Liu #define CONFIG_ID_EEPROM
26948c6f328SShengzhou Liu #define CONFIG_SYS_I2C_EEPROM_NXID
27048c6f328SShengzhou Liu #define CONFIG_SYS_EEPROM_BUS_NUM	0
27148c6f328SShengzhou Liu #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
27248c6f328SShengzhou Liu #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	2
27348c6f328SShengzhou Liu #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
27448c6f328SShengzhou Liu #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
27548c6f328SShengzhou Liu 
27648c6f328SShengzhou Liu /*
27748c6f328SShengzhou Liu  * DDR Setup
27848c6f328SShengzhou Liu  */
27948c6f328SShengzhou Liu #define CONFIG_VERY_BIG_RAM
28048c6f328SShengzhou Liu #define CONFIG_SYS_DDR_SDRAM_BASE	0x00000000
28148c6f328SShengzhou Liu #define CONFIG_SYS_SDRAM_BASE		CONFIG_SYS_DDR_SDRAM_BASE
28248c6f328SShengzhou Liu #define CONFIG_DIMM_SLOTS_PER_CTLR	1
28348c6f328SShengzhou Liu #define CONFIG_CHIP_SELECTS_PER_CTRL	(4 * CONFIG_DIMM_SLOTS_PER_CTLR)
284e8a7f1c3SShengzhou Liu #define CONFIG_FSL_DDR_INTERACTIVE
285e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
28648c6f328SShengzhou Liu #define CONFIG_DDR_SPD
28748c6f328SShengzhou Liu #define CONFIG_SYS_FSL_DDR3
28848c6f328SShengzhou Liu #define CONFIG_SYS_SPD_BUS_NUM	0
28948c6f328SShengzhou Liu #define SPD_EEPROM_ADDRESS	0x51
29048c6f328SShengzhou Liu #define CONFIG_SYS_SDRAM_SIZE	4096	/* for fixed parameter use */
291e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
292e8a7f1c3SShengzhou Liu #define CONFIG_SYS_FSL_DDR4
293e8a7f1c3SShengzhou Liu #define CONFIG_SYS_DDR_RAW_TIMING
294e8a7f1c3SShengzhou Liu #define CONFIG_SYS_SDRAM_SIZE   2048
295e8a7f1c3SShengzhou Liu #endif
29648c6f328SShengzhou Liu 
29748c6f328SShengzhou Liu /*
29848c6f328SShengzhou Liu  * IFC Definitions
29948c6f328SShengzhou Liu  */
30048c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_BASE	0xe8000000
30148c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
30248c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_BASE_PHYS	(0xf00000000ull | CONFIG_SYS_FLASH_BASE)
30348c6f328SShengzhou Liu #else
30448c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_BASE_PHYS	CONFIG_SYS_FLASH_BASE
30548c6f328SShengzhou Liu #endif
30648c6f328SShengzhou Liu 
30748c6f328SShengzhou Liu #define CONFIG_SYS_NOR0_CSPR_EXT	(0xf)
30848c6f328SShengzhou Liu #define CONFIG_SYS_NOR0_CSPR	(CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
30948c6f328SShengzhou Liu 				CSPR_PORT_SIZE_16 | \
31048c6f328SShengzhou Liu 				CSPR_MSEL_NOR | \
31148c6f328SShengzhou Liu 				CSPR_V)
31248c6f328SShengzhou Liu #define CONFIG_SYS_NOR_AMASK	IFC_AMASK(128*1024*1024)
31348c6f328SShengzhou Liu 
31448c6f328SShengzhou Liu /* NOR Flash Timing Params */
315e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
31648c6f328SShengzhou Liu #define CONFIG_SYS_NOR_CSOR	CSOR_NAND_TRHZ_80
317e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
318ff7ea2d1SShengzhou Liu #define CONFIG_SYS_NOR_CSOR    (CSOR_NOR_ADM_SHIFT(0) | \
319e8a7f1c3SShengzhou Liu 				CSOR_NAND_TRHZ_80 | CSOR_NOR_ADM_SHFT_MODE_EN)
320e8a7f1c3SShengzhou Liu #endif
32148c6f328SShengzhou Liu #define CONFIG_SYS_NOR_FTIM0	(FTIM0_NOR_TACSE(0x4) | \
32248c6f328SShengzhou Liu 				FTIM0_NOR_TEADC(0x5) | \
32348c6f328SShengzhou Liu 				FTIM0_NOR_TEAHC(0x5))
32448c6f328SShengzhou Liu #define CONFIG_SYS_NOR_FTIM1	(FTIM1_NOR_TACO(0x35) | \
32548c6f328SShengzhou Liu 				FTIM1_NOR_TRAD_NOR(0x1A) |\
32648c6f328SShengzhou Liu 				FTIM1_NOR_TSEQRAD_NOR(0x13))
32748c6f328SShengzhou Liu #define CONFIG_SYS_NOR_FTIM2	(FTIM2_NOR_TCS(0x4) | \
32848c6f328SShengzhou Liu 				FTIM2_NOR_TCH(0x4) | \
32948c6f328SShengzhou Liu 				FTIM2_NOR_TWPH(0x0E) | \
33048c6f328SShengzhou Liu 				FTIM2_NOR_TWP(0x1c))
33148c6f328SShengzhou Liu #define CONFIG_SYS_NOR_FTIM3	0x0
33248c6f328SShengzhou Liu 
33348c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_QUIET_TEST
33448c6f328SShengzhou Liu #define CONFIG_FLASH_SHOW_PROGRESS	45 /* count down from 45/5: 9..1 */
33548c6f328SShengzhou Liu 
33648c6f328SShengzhou Liu #define CONFIG_SYS_MAX_FLASH_BANKS	1	/* number of banks */
33748c6f328SShengzhou Liu #define CONFIG_SYS_MAX_FLASH_SECT	1024	/* sectors per device */
33848c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_ERASE_TOUT	60000	/* Flash Erase Timeout (ms) */
33948c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (ms) */
34048c6f328SShengzhou Liu 
34148c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_EMPTY_INFO
34248c6f328SShengzhou Liu #define CONFIG_SYS_FLASH_BANKS_LIST	{CONFIG_SYS_FLASH_BASE_PHYS}
34348c6f328SShengzhou Liu 
344e8a7f1c3SShengzhou Liu #ifdef CONFIG_T1024RDB
34548c6f328SShengzhou Liu /* CPLD on IFC */
34648c6f328SShengzhou Liu #define CONFIG_SYS_CPLD_BASE		0xffdf0000
34748c6f328SShengzhou Liu #define CONFIG_SYS_CPLD_BASE_PHYS	(0xf00000000ull | CONFIG_SYS_CPLD_BASE)
34848c6f328SShengzhou Liu #define CONFIG_SYS_CSPR2_EXT		(0xf)
34948c6f328SShengzhou Liu #define CONFIG_SYS_CSPR2		(CSPR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE) \
35048c6f328SShengzhou Liu 						| CSPR_PORT_SIZE_8 \
35148c6f328SShengzhou Liu 						| CSPR_MSEL_GPCM \
35248c6f328SShengzhou Liu 						| CSPR_V)
35348c6f328SShengzhou Liu #define CONFIG_SYS_AMASK2		IFC_AMASK(64*1024)
35448c6f328SShengzhou Liu #define CONFIG_SYS_CSOR2		0x0
35548c6f328SShengzhou Liu 
35648c6f328SShengzhou Liu /* CPLD Timing parameters for IFC CS2 */
35748c6f328SShengzhou Liu #define CONFIG_SYS_CS2_FTIM0		(FTIM0_GPCM_TACSE(0x0e) | \
35848c6f328SShengzhou Liu 						FTIM0_GPCM_TEADC(0x0e) | \
35948c6f328SShengzhou Liu 						FTIM0_GPCM_TEAHC(0x0e))
36048c6f328SShengzhou Liu #define CONFIG_SYS_CS2_FTIM1		(FTIM1_GPCM_TACO(0x0e) | \
36148c6f328SShengzhou Liu 						FTIM1_GPCM_TRAD(0x1f))
36248c6f328SShengzhou Liu #define CONFIG_SYS_CS2_FTIM2		(FTIM2_GPCM_TCS(0x0e) | \
36348c6f328SShengzhou Liu 						FTIM2_GPCM_TCH(0x8) | \
36448c6f328SShengzhou Liu 						FTIM2_GPCM_TWP(0x1f))
36548c6f328SShengzhou Liu #define CONFIG_SYS_CS2_FTIM3		0x0
366e8a7f1c3SShengzhou Liu #endif
36748c6f328SShengzhou Liu 
36848c6f328SShengzhou Liu /* NAND Flash on IFC */
36948c6f328SShengzhou Liu #define CONFIG_NAND_FSL_IFC
37048c6f328SShengzhou Liu #define CONFIG_SYS_NAND_BASE		0xff800000
37148c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
37248c6f328SShengzhou Liu #define CONFIG_SYS_NAND_BASE_PHYS	(0xf00000000ull | CONFIG_SYS_NAND_BASE)
37348c6f328SShengzhou Liu #else
37448c6f328SShengzhou Liu #define CONFIG_SYS_NAND_BASE_PHYS	CONFIG_SYS_NAND_BASE
37548c6f328SShengzhou Liu #endif
37648c6f328SShengzhou Liu #define CONFIG_SYS_NAND_CSPR_EXT	(0xf)
37748c6f328SShengzhou Liu #define CONFIG_SYS_NAND_CSPR	(CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
37848c6f328SShengzhou Liu 				| CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
37948c6f328SShengzhou Liu 				| CSPR_MSEL_NAND	/* MSEL = NAND */ \
38048c6f328SShengzhou Liu 				| CSPR_V)
38148c6f328SShengzhou Liu #define CONFIG_SYS_NAND_AMASK	IFC_AMASK(64*1024)
38248c6f328SShengzhou Liu 
383e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
38448c6f328SShengzhou Liu #define CONFIG_SYS_NAND_CSOR	(CSOR_NAND_ECC_ENC_EN	/* ECC on encode */ \
38548c6f328SShengzhou Liu 				| CSOR_NAND_ECC_DEC_EN  /* ECC on decode */ \
38648c6f328SShengzhou Liu 				| CSOR_NAND_ECC_MODE_4  /* 4-bit ECC */ \
38748c6f328SShengzhou Liu 				| CSOR_NAND_RAL_3	/* RAL = 3Byes */ \
38848c6f328SShengzhou Liu 				| CSOR_NAND_PGS_4K	/* Page Size = 4K */ \
38948c6f328SShengzhou Liu 				| CSOR_NAND_SPRZ_224	/* Spare size = 224 */ \
39048c6f328SShengzhou Liu 				| CSOR_NAND_PB(64))	/*Pages Per Block = 64*/
391e8a7f1c3SShengzhou Liu #define CONFIG_SYS_NAND_BLOCK_SIZE	(512 * 1024)
392e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
3937842950fSJaiprakash Singh #define CONFIG_SYS_NAND_CSOR	(CSOR_NAND_ECC_ENC_EN   /* ECC on encode */ \
3947842950fSJaiprakash Singh 				| CSOR_NAND_ECC_DEC_EN  /* ECC on decode */ \
3957842950fSJaiprakash Singh 				| CSOR_NAND_ECC_MODE_4	/* 4-bit ECC */ \
396e8a7f1c3SShengzhou Liu 				| CSOR_NAND_RAL_3	/* RAL 3Bytes */ \
397e8a7f1c3SShengzhou Liu 				| CSOR_NAND_PGS_2K	/* Page Size = 2K */ \
398e8a7f1c3SShengzhou Liu 				| CSOR_NAND_SPRZ_128	/* Spare size = 128 */ \
399e8a7f1c3SShengzhou Liu 				| CSOR_NAND_PB(64))	/*Pages Per Block = 64*/
400e8a7f1c3SShengzhou Liu #define CONFIG_SYS_NAND_BLOCK_SIZE	(128 * 1024)
401e8a7f1c3SShengzhou Liu #endif
40248c6f328SShengzhou Liu 
40348c6f328SShengzhou Liu #define CONFIG_SYS_NAND_ONFI_DETECTION
40448c6f328SShengzhou Liu /* ONFI NAND Flash mode0 Timing Params */
40548c6f328SShengzhou Liu #define CONFIG_SYS_NAND_FTIM0		(FTIM0_NAND_TCCST(0x07) | \
40648c6f328SShengzhou Liu 					FTIM0_NAND_TWP(0x18)   | \
40748c6f328SShengzhou Liu 					FTIM0_NAND_TWCHT(0x07) | \
40848c6f328SShengzhou Liu 					FTIM0_NAND_TWH(0x0a))
40948c6f328SShengzhou Liu #define CONFIG_SYS_NAND_FTIM1		(FTIM1_NAND_TADLE(0x32) | \
41048c6f328SShengzhou Liu 					FTIM1_NAND_TWBE(0x39)  | \
41148c6f328SShengzhou Liu 					FTIM1_NAND_TRR(0x0e)   | \
41248c6f328SShengzhou Liu 					FTIM1_NAND_TRP(0x18))
41348c6f328SShengzhou Liu #define CONFIG_SYS_NAND_FTIM2		(FTIM2_NAND_TRAD(0x0f) | \
41448c6f328SShengzhou Liu 					FTIM2_NAND_TREH(0x0a) | \
41548c6f328SShengzhou Liu 					FTIM2_NAND_TWHRE(0x1e))
41648c6f328SShengzhou Liu #define CONFIG_SYS_NAND_FTIM3		0x0
41748c6f328SShengzhou Liu 
41848c6f328SShengzhou Liu #define CONFIG_SYS_NAND_DDR_LAW		11
41948c6f328SShengzhou Liu #define CONFIG_SYS_NAND_BASE_LIST	{ CONFIG_SYS_NAND_BASE }
42048c6f328SShengzhou Liu #define CONFIG_SYS_MAX_NAND_DEVICE	1
42148c6f328SShengzhou Liu #define CONFIG_CMD_NAND
42248c6f328SShengzhou Liu 
42348c6f328SShengzhou Liu #if defined(CONFIG_NAND)
42448c6f328SShengzhou Liu #define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NAND_CSPR_EXT
42548c6f328SShengzhou Liu #define CONFIG_SYS_CSPR0		CONFIG_SYS_NAND_CSPR
42648c6f328SShengzhou Liu #define CONFIG_SYS_AMASK0		CONFIG_SYS_NAND_AMASK
42748c6f328SShengzhou Liu #define CONFIG_SYS_CSOR0		CONFIG_SYS_NAND_CSOR
42848c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM0		CONFIG_SYS_NAND_FTIM0
42948c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM1		CONFIG_SYS_NAND_FTIM1
43048c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM2		CONFIG_SYS_NAND_FTIM2
43148c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM3		CONFIG_SYS_NAND_FTIM3
43248c6f328SShengzhou Liu #define CONFIG_SYS_CSPR1_EXT		CONFIG_SYS_NOR0_CSPR_EXT
43348c6f328SShengzhou Liu #define CONFIG_SYS_CSPR1		CONFIG_SYS_NOR0_CSPR
43448c6f328SShengzhou Liu #define CONFIG_SYS_AMASK1		CONFIG_SYS_NOR_AMASK
43548c6f328SShengzhou Liu #define CONFIG_SYS_CSOR1		CONFIG_SYS_NOR_CSOR
43648c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM0		CONFIG_SYS_NOR_FTIM0
43748c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM1		CONFIG_SYS_NOR_FTIM1
43848c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM2		CONFIG_SYS_NOR_FTIM2
43948c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM3		CONFIG_SYS_NOR_FTIM3
44048c6f328SShengzhou Liu #else
44148c6f328SShengzhou Liu #define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NOR0_CSPR_EXT
44248c6f328SShengzhou Liu #define CONFIG_SYS_CSPR0		CONFIG_SYS_NOR0_CSPR
44348c6f328SShengzhou Liu #define CONFIG_SYS_AMASK0		CONFIG_SYS_NOR_AMASK
44448c6f328SShengzhou Liu #define CONFIG_SYS_CSOR0		CONFIG_SYS_NOR_CSOR
44548c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM0		CONFIG_SYS_NOR_FTIM0
44648c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM1		CONFIG_SYS_NOR_FTIM1
44748c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM2		CONFIG_SYS_NOR_FTIM2
44848c6f328SShengzhou Liu #define CONFIG_SYS_CS0_FTIM3		CONFIG_SYS_NOR_FTIM3
44948c6f328SShengzhou Liu #define CONFIG_SYS_CSPR1_EXT		CONFIG_SYS_NAND_CSPR_EXT
45048c6f328SShengzhou Liu #define CONFIG_SYS_CSPR1		CONFIG_SYS_NAND_CSPR
45148c6f328SShengzhou Liu #define CONFIG_SYS_AMASK1		CONFIG_SYS_NAND_AMASK
45248c6f328SShengzhou Liu #define CONFIG_SYS_CSOR1		CONFIG_SYS_NAND_CSOR
45348c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM0		CONFIG_SYS_NAND_FTIM0
45448c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM1		CONFIG_SYS_NAND_FTIM1
45548c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM2		CONFIG_SYS_NAND_FTIM2
45648c6f328SShengzhou Liu #define CONFIG_SYS_CS1_FTIM3		CONFIG_SYS_NAND_FTIM3
45748c6f328SShengzhou Liu #endif
45848c6f328SShengzhou Liu 
45948c6f328SShengzhou Liu #ifdef CONFIG_SPL_BUILD
46048c6f328SShengzhou Liu #define CONFIG_SYS_MONITOR_BASE		CONFIG_SPL_TEXT_BASE
46148c6f328SShengzhou Liu #else
46248c6f328SShengzhou Liu #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
46348c6f328SShengzhou Liu #endif
46448c6f328SShengzhou Liu 
46548c6f328SShengzhou Liu #if defined(CONFIG_RAMBOOT_PBL)
46648c6f328SShengzhou Liu #define CONFIG_SYS_RAMBOOT
46748c6f328SShengzhou Liu #endif
46848c6f328SShengzhou Liu 
46948c6f328SShengzhou Liu #define CONFIG_BOARD_EARLY_INIT_R
47048c6f328SShengzhou Liu #define CONFIG_MISC_INIT_R
47148c6f328SShengzhou Liu 
47248c6f328SShengzhou Liu #define CONFIG_HWCONFIG
47348c6f328SShengzhou Liu 
47448c6f328SShengzhou Liu /* define to use L1 as initial stack */
47548c6f328SShengzhou Liu #define CONFIG_L1_INIT_RAM
47648c6f328SShengzhou Liu #define CONFIG_SYS_INIT_RAM_LOCK
47748c6f328SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR	0xfdd00000	/* Initial L1 address */
47848c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
47948c6f328SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH	0xf
480b3142e2cSYork Sun #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW	0xfe03c000
48148c6f328SShengzhou Liu /* The assembler doesn't like typecast */
48248c6f328SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
48348c6f328SShengzhou Liu 	((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
48448c6f328SShengzhou Liu 	  CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
48548c6f328SShengzhou Liu #else
486b3142e2cSYork Sun #define CONFIG_SYS_INIT_RAM_ADDR_PHYS	0xfe03c000 /* Initial L1 address */
48748c6f328SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
48848c6f328SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
48948c6f328SShengzhou Liu #endif
49048c6f328SShengzhou Liu #define CONFIG_SYS_INIT_RAM_SIZE		0x00004000
49148c6f328SShengzhou Liu 
49248c6f328SShengzhou Liu #define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - \
49348c6f328SShengzhou Liu 					GENERATED_GBL_DATA_SIZE)
49448c6f328SShengzhou Liu #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
49548c6f328SShengzhou Liu 
49648c6f328SShengzhou Liu #define CONFIG_SYS_MONITOR_LEN		(768 * 1024)
49748c6f328SShengzhou Liu #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
49848c6f328SShengzhou Liu 
49948c6f328SShengzhou Liu /* Serial Port */
50048c6f328SShengzhou Liu #define CONFIG_CONS_INDEX	1
50148c6f328SShengzhou Liu #define CONFIG_SYS_NS16550_SERIAL
50248c6f328SShengzhou Liu #define CONFIG_SYS_NS16550_REG_SIZE	1
50348c6f328SShengzhou Liu #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
50448c6f328SShengzhou Liu 
50548c6f328SShengzhou Liu #define CONFIG_SYS_BAUDRATE_TABLE	\
50648c6f328SShengzhou Liu 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
50748c6f328SShengzhou Liu 
50848c6f328SShengzhou Liu #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x11C500)
50948c6f328SShengzhou Liu #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x11C600)
51048c6f328SShengzhou Liu #define CONFIG_SYS_NS16550_COM3	(CONFIG_SYS_CCSRBAR+0x11D500)
51148c6f328SShengzhou Liu #define CONFIG_SYS_NS16550_COM4	(CONFIG_SYS_CCSRBAR+0x11D600)
51248c6f328SShengzhou Liu #define CONFIG_SYS_CONSOLE_IS_IN_ENV	/* determine from environment */
51348c6f328SShengzhou Liu 
51448c6f328SShengzhou Liu /* Use the HUSH parser */
51548c6f328SShengzhou Liu #define CONFIG_SYS_HUSH_PARSER
51648c6f328SShengzhou Liu #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
51748c6f328SShengzhou Liu 
51848c6f328SShengzhou Liu /* Video */
51948c6f328SShengzhou Liu #undef CONFIG_FSL_DIU_FB	/* RDB doesn't support DIU */
52048c6f328SShengzhou Liu #ifdef CONFIG_FSL_DIU_FB
52148c6f328SShengzhou Liu #define CONFIG_SYS_DIU_ADDR	(CONFIG_SYS_CCSRBAR + 0x180000)
52248c6f328SShengzhou Liu #define CONFIG_VIDEO
52348c6f328SShengzhou Liu #define CONFIG_CMD_BMP
52448c6f328SShengzhou Liu #define CONFIG_CFB_CONSOLE
52548c6f328SShengzhou Liu #define CONFIG_VIDEO_SW_CURSOR
52648c6f328SShengzhou Liu #define CONFIG_VGA_AS_SINGLE_DEVICE
52748c6f328SShengzhou Liu #define CONFIG_VIDEO_LOGO
52848c6f328SShengzhou Liu #define CONFIG_VIDEO_BMP_LOGO
52948c6f328SShengzhou Liu #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
53048c6f328SShengzhou Liu /*
53148c6f328SShengzhou Liu  * With CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, flash I/O is really slow, so
53248c6f328SShengzhou Liu  * disable empty flash sector detection, which is I/O-intensive.
53348c6f328SShengzhou Liu  */
53448c6f328SShengzhou Liu #undef CONFIG_SYS_FLASH_EMPTY_INFO
53548c6f328SShengzhou Liu #endif
53648c6f328SShengzhou Liu 
53748c6f328SShengzhou Liu /* pass open firmware flat tree */
53848c6f328SShengzhou Liu #define CONFIG_OF_LIBFDT
53948c6f328SShengzhou Liu #define CONFIG_OF_BOARD_SETUP
54048c6f328SShengzhou Liu #define CONFIG_OF_STDOUT_VIA_ALIAS
54148c6f328SShengzhou Liu 
54248c6f328SShengzhou Liu /* new uImage format support */
54348c6f328SShengzhou Liu #define CONFIG_FIT
54448c6f328SShengzhou Liu #define CONFIG_FIT_VERBOSE	/* enable fit_format_{error,warning}() */
54548c6f328SShengzhou Liu 
54648c6f328SShengzhou Liu /* I2C */
54748c6f328SShengzhou Liu #define CONFIG_SYS_I2C
54848c6f328SShengzhou Liu #define CONFIG_SYS_I2C_FSL		/* Use FSL common I2C driver */
54948c6f328SShengzhou Liu #define CONFIG_SYS_FSL_I2C_SPEED	50000	/* I2C speed in Hz */
55048c6f328SShengzhou Liu #define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
55148c6f328SShengzhou Liu #define CONFIG_SYS_FSL_I2C2_SPEED	50000	/* I2C speed in Hz */
55248c6f328SShengzhou Liu #define CONFIG_SYS_FSL_I2C2_SLAVE	0x7F
55348c6f328SShengzhou Liu #define CONFIG_SYS_FSL_I2C_OFFSET	0x118000
55448c6f328SShengzhou Liu #define CONFIG_SYS_FSL_I2C2_OFFSET	0x118100
55548c6f328SShengzhou Liu 
556ff7ea2d1SShengzhou Liu #define I2C_PCA6408_BUS_NUM		1
557ff7ea2d1SShengzhou Liu #define I2C_PCA6408_ADDR		0x20
55848c6f328SShengzhou Liu 
55948c6f328SShengzhou Liu /* I2C bus multiplexer */
56048c6f328SShengzhou Liu #define I2C_MUX_CH_DEFAULT	0x8
56148c6f328SShengzhou Liu 
56248c6f328SShengzhou Liu /*
56348c6f328SShengzhou Liu  * RTC configuration
56448c6f328SShengzhou Liu  */
56548c6f328SShengzhou Liu #define RTC
56648c6f328SShengzhou Liu #define CONFIG_RTC_DS1337	1
56748c6f328SShengzhou Liu #define CONFIG_SYS_I2C_RTC_ADDR	0x68
56848c6f328SShengzhou Liu 
56948c6f328SShengzhou Liu /*
57048c6f328SShengzhou Liu  * eSPI - Enhanced SPI
57148c6f328SShengzhou Liu  */
572e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
573e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
574e8a7f1c3SShengzhou Liu #endif
57548c6f328SShengzhou Liu #define CONFIG_CMD_SF
57648c6f328SShengzhou Liu #define CONFIG_SPI_FLASH_BAR
57748c6f328SShengzhou Liu #define CONFIG_SF_DEFAULT_SPEED	10000000
57848c6f328SShengzhou Liu #define CONFIG_SF_DEFAULT_MODE	0
57948c6f328SShengzhou Liu 
58048c6f328SShengzhou Liu /*
58148c6f328SShengzhou Liu  * General PCIe
58248c6f328SShengzhou Liu  * Memory space is mapped 1-1, but I/O space must start from 0.
58348c6f328SShengzhou Liu  */
58448c6f328SShengzhou Liu #define CONFIG_PCI		/* Enable PCI/PCIE */
58548c6f328SShengzhou Liu #define CONFIG_PCIE1		/* PCIE controler 1 */
58648c6f328SShengzhou Liu #define CONFIG_PCIE2		/* PCIE controler 2 */
58748c6f328SShengzhou Liu #define CONFIG_PCIE3		/* PCIE controler 3 */
58848c6f328SShengzhou Liu #ifdef CONFIG_PPC_T1040
58948c6f328SShengzhou Liu #define CONFIG_PCIE4		/* PCIE controler 4 */
59048c6f328SShengzhou Liu #endif
59148c6f328SShengzhou Liu #define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
59248c6f328SShengzhou Liu #define CONFIG_SYS_PCI_64BIT	/* enable 64-bit PCI resources */
59348c6f328SShengzhou Liu #define CONFIG_PCI_INDIRECT_BRIDGE
59448c6f328SShengzhou Liu 
59548c6f328SShengzhou Liu #ifdef CONFIG_PCI
59648c6f328SShengzhou Liu /* controller 1, direct to uli, tgtid 3, Base address 20000 */
59748c6f328SShengzhou Liu #ifdef CONFIG_PCIE1
59848c6f328SShengzhou Liu #define	CONFIG_SYS_PCIE1_MEM_VIRT	0x80000000
59948c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
60048c6f328SShengzhou Liu #define	CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
60148c6f328SShengzhou Liu #define	CONFIG_SYS_PCIE1_MEM_PHYS	0xc00000000ull
60248c6f328SShengzhou Liu #else
60348c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_MEM_BUS	0x80000000
60448c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_MEM_PHYS	0x80000000
60548c6f328SShengzhou Liu #endif
60648c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_MEM_SIZE	0x10000000	/* 256M */
60748c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_VIRT	0xf8000000
60848c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
60948c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
61048c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_PHYS	0xff8000000ull
61148c6f328SShengzhou Liu #else
61248c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_PHYS	0xf8000000
61348c6f328SShengzhou Liu #endif
61448c6f328SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
61548c6f328SShengzhou Liu #endif
61648c6f328SShengzhou Liu 
61748c6f328SShengzhou Liu /* controller 2, Slot 2, tgtid 2, Base address 201000 */
61848c6f328SShengzhou Liu #ifdef CONFIG_PCIE2
61948c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_VIRT	0x90000000
62048c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
62148c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
62248c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_PHYS	0xc10000000ull
62348c6f328SShengzhou Liu #else
62448c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_BUS	0x90000000
62548c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_PHYS	0x90000000
62648c6f328SShengzhou Liu #endif
62748c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_SIZE	0x10000000	/* 256M */
62848c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_VIRT	0xf8010000
62948c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
63048c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
63148c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_PHYS	0xff8010000ull
63248c6f328SShengzhou Liu #else
63348c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_PHYS	0xf8010000
63448c6f328SShengzhou Liu #endif
63548c6f328SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
63648c6f328SShengzhou Liu #endif
63748c6f328SShengzhou Liu 
63848c6f328SShengzhou Liu /* controller 3, Slot 1, tgtid 1, Base address 202000 */
63948c6f328SShengzhou Liu #ifdef CONFIG_PCIE3
64048c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_VIRT	0xa0000000
64148c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
64248c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
64348c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_PHYS	0xc20000000ull
64448c6f328SShengzhou Liu #else
64548c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_BUS	0xa0000000
64648c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_PHYS	0xa0000000
64748c6f328SShengzhou Liu #endif
64848c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_SIZE	0x10000000	/* 256M */
64948c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_VIRT	0xf8020000
65048c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
65148c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
65248c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_PHYS	0xff8020000ull
65348c6f328SShengzhou Liu #else
65448c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_PHYS	0xf8020000
65548c6f328SShengzhou Liu #endif
65648c6f328SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
65748c6f328SShengzhou Liu #endif
65848c6f328SShengzhou Liu 
65948c6f328SShengzhou Liu /* controller 4, Base address 203000, to be removed */
66048c6f328SShengzhou Liu #ifdef CONFIG_PCIE4
66148c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_VIRT       0xb0000000
66248c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
66348c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_BUS	0xe0000000
66448c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_PHYS       0xc30000000ull
66548c6f328SShengzhou Liu #else
66648c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_BUS	0xb0000000
66748c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_PHYS	0xb0000000
66848c6f328SShengzhou Liu #endif
66948c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_SIZE       0x10000000      /* 256M */
67048c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_VIRT	0xf8030000
67148c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_BUS		0x00000000
67248c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
67348c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_PHYS	0xff8030000ull
67448c6f328SShengzhou Liu #else
67548c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_PHYS	0xf8030000
67648c6f328SShengzhou Liu #endif
67748c6f328SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_SIZE	0x00010000      /* 64k */
67848c6f328SShengzhou Liu #endif
67948c6f328SShengzhou Liu 
68048c6f328SShengzhou Liu #define CONFIG_PCI_PNP			/* do pci plug-and-play */
68148c6f328SShengzhou Liu #define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup */
68248c6f328SShengzhou Liu #define CONFIG_DOS_PARTITION
68348c6f328SShengzhou Liu #endif	/* CONFIG_PCI */
68448c6f328SShengzhou Liu 
68548c6f328SShengzhou Liu /*
68648c6f328SShengzhou Liu  * USB
68748c6f328SShengzhou Liu  */
68848c6f328SShengzhou Liu #define CONFIG_HAS_FSL_DR_USB
68948c6f328SShengzhou Liu 
69048c6f328SShengzhou Liu #ifdef CONFIG_HAS_FSL_DR_USB
69148c6f328SShengzhou Liu #define CONFIG_USB_EHCI
69248c6f328SShengzhou Liu #define CONFIG_CMD_USB
69348c6f328SShengzhou Liu #define CONFIG_USB_STORAGE
69448c6f328SShengzhou Liu #define CONFIG_USB_EHCI_FSL
69548c6f328SShengzhou Liu #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
69648c6f328SShengzhou Liu #define CONFIG_CMD_EXT2
69748c6f328SShengzhou Liu #endif
69848c6f328SShengzhou Liu 
69948c6f328SShengzhou Liu /*
70048c6f328SShengzhou Liu  * SDHC
70148c6f328SShengzhou Liu  */
70248c6f328SShengzhou Liu #define CONFIG_MMC
70348c6f328SShengzhou Liu #ifdef CONFIG_MMC
70448c6f328SShengzhou Liu #define CONFIG_FSL_ESDHC
70548c6f328SShengzhou Liu #define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC85xx_ESDHC_ADDR
70648c6f328SShengzhou Liu #define CONFIG_CMD_MMC
70748c6f328SShengzhou Liu #define CONFIG_GENERIC_MMC
70848c6f328SShengzhou Liu #define CONFIG_CMD_EXT2
70948c6f328SShengzhou Liu #define CONFIG_CMD_FAT
71048c6f328SShengzhou Liu #define CONFIG_DOS_PARTITION
71148c6f328SShengzhou Liu #endif
71248c6f328SShengzhou Liu 
71348c6f328SShengzhou Liu /* Qman/Bman */
71448c6f328SShengzhou Liu #ifndef CONFIG_NOBQFMAN
71548c6f328SShengzhou Liu #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
7162a8b3422SJeffrey Ladouceur #define CONFIG_SYS_BMAN_NUM_PORTALS	10
71748c6f328SShengzhou Liu #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
71848c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
71948c6f328SShengzhou Liu #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
72048c6f328SShengzhou Liu #else
72148c6f328SShengzhou Liu #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
72248c6f328SShengzhou Liu #endif
72348c6f328SShengzhou Liu #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
7243fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
7253fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
7263fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
7273fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
7283fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
7293fa66db4SJeffrey Ladouceur 					CONFIG_SYS_BMAN_CENA_SIZE)
7303fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
7313fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
7322a8b3422SJeffrey Ladouceur #define CONFIG_SYS_QMAN_NUM_PORTALS	10
73348c6f328SShengzhou Liu #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
73448c6f328SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
73548c6f328SShengzhou Liu #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
73648c6f328SShengzhou Liu #else
73748c6f328SShengzhou Liu #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
73848c6f328SShengzhou Liu #endif
73948c6f328SShengzhou Liu #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
7403fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
7413fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
7423fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
7433fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
7443fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
7453fa66db4SJeffrey Ladouceur 					CONFIG_SYS_QMAN_CENA_SIZE)
7463fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
7473fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
74848c6f328SShengzhou Liu 
74948c6f328SShengzhou Liu #define CONFIG_SYS_DPAA_FMAN
75048c6f328SShengzhou Liu 
751ff7ea2d1SShengzhou Liu #ifdef CONFIG_T1024RDB
75248c6f328SShengzhou Liu #define CONFIG_QE
75348c6f328SShengzhou Liu #define CONFIG_U_QE
754ff7ea2d1SShengzhou Liu #endif
75548c6f328SShengzhou Liu /* Default address of microcode for the Linux FMan driver */
75648c6f328SShengzhou Liu #if defined(CONFIG_SPIFLASH)
75748c6f328SShengzhou Liu /*
75848c6f328SShengzhou Liu  * env is stored at 0x100000, sector size is 0x10000, ucode is stored after
75948c6f328SShengzhou Liu  * env, so we got 0x110000.
76048c6f328SShengzhou Liu  */
76148c6f328SShengzhou Liu #define CONFIG_SYS_QE_FW_IN_SPIFLASH
76248c6f328SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR	0x110000
76348c6f328SShengzhou Liu #define CONFIG_SYS_QE_FW_ADDR	0x130000
76448c6f328SShengzhou Liu #elif defined(CONFIG_SDCARD)
76548c6f328SShengzhou Liu /*
76648c6f328SShengzhou Liu  * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is
76748c6f328SShengzhou Liu  * about 1MB (2048 blocks), Env is stored after the image, and the env size is
76848c6f328SShengzhou Liu  * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080(0x820).
76948c6f328SShengzhou Liu  */
77048c6f328SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_MMC
77148c6f328SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR		(512 * 0x820)
77248c6f328SShengzhou Liu #define CONFIG_SYS_QE_FW_ADDR		(512 * 0x920)
77348c6f328SShengzhou Liu #elif defined(CONFIG_NAND)
77448c6f328SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_NAND
775e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
77648c6f328SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR		(3 * CONFIG_SYS_NAND_BLOCK_SIZE)
77748c6f328SShengzhou Liu #define CONFIG_SYS_QE_FW_ADDR		(4 * CONFIG_SYS_NAND_BLOCK_SIZE)
778e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
779e8a7f1c3SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR		(11 * CONFIG_SYS_NAND_BLOCK_SIZE)
780e8a7f1c3SShengzhou Liu #define CONFIG_SYS_QE_FW_ADDR		(12 * CONFIG_SYS_NAND_BLOCK_SIZE)
781e8a7f1c3SShengzhou Liu #endif
78248c6f328SShengzhou Liu #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE)
78348c6f328SShengzhou Liu /*
78448c6f328SShengzhou Liu  * Slave has no ucode locally, it can fetch this from remote. When implementing
78548c6f328SShengzhou Liu  * in two corenet boards, slave's ucode could be stored in master's memory
78648c6f328SShengzhou Liu  * space, the address can be mapped from slave TLB->slave LAW->
78748c6f328SShengzhou Liu  * slave SRIO or PCIE outbound window->master inbound window->
78848c6f328SShengzhou Liu  * master LAW->the ucode address in master's memory space.
78948c6f328SShengzhou Liu  */
79048c6f328SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_REMOTE
79148c6f328SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR		0xFFE00000
79248c6f328SShengzhou Liu #else
79348c6f328SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_NOR
79448c6f328SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR		0xEFF00000
79548c6f328SShengzhou Liu #define CONFIG_SYS_QE_FW_ADDR		0xEFE00000
79648c6f328SShengzhou Liu #endif
79748c6f328SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_LENGTH	0x10000
79848c6f328SShengzhou Liu #define CONFIG_SYS_FDT_PAD		(0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
79948c6f328SShengzhou Liu #endif /* CONFIG_NOBQFMAN */
80048c6f328SShengzhou Liu 
80148c6f328SShengzhou Liu #ifdef CONFIG_SYS_DPAA_FMAN
80248c6f328SShengzhou Liu #define CONFIG_FMAN_ENET
80348c6f328SShengzhou Liu #define CONFIG_PHYLIB_10G
80448c6f328SShengzhou Liu #define CONFIG_PHY_REALTEK
805e26416a3SShengzhou Liu #define CONFIG_PHY_AQUANTIA
806e8a7f1c3SShengzhou Liu #if defined(CONFIG_T1024RDB)
80748c6f328SShengzhou Liu #define RGMII_PHY1_ADDR		0x2
80848c6f328SShengzhou Liu #define RGMII_PHY2_ADDR		0x6
809e8a7f1c3SShengzhou Liu #define SGMII_AQR_PHY_ADDR	0x2
81048c6f328SShengzhou Liu #define FM1_10GEC1_PHY_ADDR	0x1
811e8a7f1c3SShengzhou Liu #elif defined(CONFIG_T1023RDB)
812e8a7f1c3SShengzhou Liu #define RGMII_PHY1_ADDR		0x1
813e8a7f1c3SShengzhou Liu #define SGMII_RTK_PHY_ADDR	0x3
814e8a7f1c3SShengzhou Liu #define SGMII_AQR_PHY_ADDR	0x2
815e8a7f1c3SShengzhou Liu #endif
81648c6f328SShengzhou Liu #endif
81748c6f328SShengzhou Liu 
81848c6f328SShengzhou Liu #ifdef CONFIG_FMAN_ENET
81948c6f328SShengzhou Liu #define CONFIG_MII		/* MII PHY management */
82048c6f328SShengzhou Liu #define CONFIG_ETHPRIME		"FM1@DTSEC4"
82148c6f328SShengzhou Liu #define CONFIG_PHY_GIGE		/* Include GbE speed/duplex detection */
82248c6f328SShengzhou Liu #endif
82348c6f328SShengzhou Liu 
82448c6f328SShengzhou Liu /*
82548c6f328SShengzhou Liu  * Dynamic MTD Partition support with mtdparts
82648c6f328SShengzhou Liu  */
82748c6f328SShengzhou Liu #ifndef CONFIG_SYS_NO_FLASH
82848c6f328SShengzhou Liu #define CONFIG_MTD_DEVICE
82948c6f328SShengzhou Liu #define CONFIG_MTD_PARTITIONS
83048c6f328SShengzhou Liu #define CONFIG_CMD_MTDPARTS
83148c6f328SShengzhou Liu #define CONFIG_FLASH_CFI_MTD
83248c6f328SShengzhou Liu #define MTDIDS_DEFAULT "nor0=fe8000000.nor,nand0=fff800000.flash," \
83348c6f328SShengzhou Liu 			"spi0=spife110000.1"
83448c6f328SShengzhou Liu #define MTDPARTS_DEFAULT "mtdparts=fe8000000.nor:1m(uboot),5m(kernel)," \
83548c6f328SShengzhou Liu 			"128k(dtb),96m(fs),-(user);fff800000.flash:1m(uboot)," \
83648c6f328SShengzhou Liu 			"5m(kernel),128k(dtb),96m(fs),-(user);spife110000.0:" \
83748c6f328SShengzhou Liu 			"1m(uboot),5m(kernel),128k(dtb),-(user)"
83848c6f328SShengzhou Liu #endif
83948c6f328SShengzhou Liu 
84048c6f328SShengzhou Liu /*
84148c6f328SShengzhou Liu  * Environment
84248c6f328SShengzhou Liu  */
84348c6f328SShengzhou Liu #define CONFIG_LOADS_ECHO		/* echo on for serial download */
84448c6f328SShengzhou Liu #define CONFIG_SYS_LOADS_BAUD_CHANGE	/* allow baudrate change */
84548c6f328SShengzhou Liu 
84648c6f328SShengzhou Liu /*
84748c6f328SShengzhou Liu  * Command line configuration.
84848c6f328SShengzhou Liu  */
84948c6f328SShengzhou Liu #define CONFIG_CMD_DATE
85048c6f328SShengzhou Liu #define CONFIG_CMD_DHCP
85148c6f328SShengzhou Liu #define CONFIG_CMD_EEPROM
85248c6f328SShengzhou Liu #define CONFIG_CMD_ERRATA
85348c6f328SShengzhou Liu #define CONFIG_CMD_GREPENV
85448c6f328SShengzhou Liu #define CONFIG_CMD_IRQ
85548c6f328SShengzhou Liu #define CONFIG_CMD_I2C
85648c6f328SShengzhou Liu #define CONFIG_CMD_MII
85748c6f328SShengzhou Liu #define CONFIG_CMD_PING
85848c6f328SShengzhou Liu #define CONFIG_CMD_REGINFO
85948c6f328SShengzhou Liu 
86048c6f328SShengzhou Liu #ifdef CONFIG_PCI
86148c6f328SShengzhou Liu #define CONFIG_CMD_PCI
86248c6f328SShengzhou Liu #endif
86348c6f328SShengzhou Liu 
86448c6f328SShengzhou Liu /*
86548c6f328SShengzhou Liu  * Miscellaneous configurable options
86648c6f328SShengzhou Liu  */
86748c6f328SShengzhou Liu #define CONFIG_SYS_LONGHELP			/* undef to save memory	*/
86848c6f328SShengzhou Liu #define CONFIG_CMDLINE_EDITING			/* Command-line editing */
86948c6f328SShengzhou Liu #define CONFIG_AUTO_COMPLETE			/* add autocompletion support */
87048c6f328SShengzhou Liu #define CONFIG_SYS_LOAD_ADDR	0x2000000	/* default load address */
87148c6f328SShengzhou Liu #ifdef CONFIG_CMD_KGDB
87248c6f328SShengzhou Liu #define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size */
87348c6f328SShengzhou Liu #else
87448c6f328SShengzhou Liu #define CONFIG_SYS_CBSIZE	256		/* Console I/O Buffer Size */
87548c6f328SShengzhou Liu #endif
87648c6f328SShengzhou Liu #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
87748c6f328SShengzhou Liu #define CONFIG_SYS_MAXARGS	16		/* max number of command args */
87848c6f328SShengzhou Liu #define CONFIG_SYS_BARGSIZE  CONFIG_SYS_CBSIZE  /* Boot Argument Buffer Size */
87948c6f328SShengzhou Liu 
88048c6f328SShengzhou Liu /*
88148c6f328SShengzhou Liu  * For booting Linux, the board info and command line data
88248c6f328SShengzhou Liu  * have to be in the first 64 MB of memory, since this is
88348c6f328SShengzhou Liu  * the maximum mapped by the Linux kernel during initialization.
88448c6f328SShengzhou Liu  */
88548c6f328SShengzhou Liu #define CONFIG_SYS_BOOTMAPSZ	(64 << 20)	/* Initial map for Linux*/
88648c6f328SShengzhou Liu #define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
88748c6f328SShengzhou Liu 
88848c6f328SShengzhou Liu #ifdef CONFIG_CMD_KGDB
88948c6f328SShengzhou Liu #define CONFIG_KGDB_BAUDRATE	230400	/* speed to run kgdb serial port */
89048c6f328SShengzhou Liu #endif
89148c6f328SShengzhou Liu 
89248c6f328SShengzhou Liu /*
89348c6f328SShengzhou Liu  * Environment Configuration
89448c6f328SShengzhou Liu  */
89548c6f328SShengzhou Liu #define CONFIG_ROOTPATH		"/opt/nfsroot"
89648c6f328SShengzhou Liu #define CONFIG_BOOTFILE		"uImage"
897e8a7f1c3SShengzhou Liu #define CONFIG_UBOOTPATH	u-boot.bin /* U-Boot image on TFTP server */
89848c6f328SShengzhou Liu #define CONFIG_LOADADDR		1000000 /* default location for tftp, bootm */
89948c6f328SShengzhou Liu #define CONFIG_BOOTDELAY	10	/* -1 disables auto-boot */
90048c6f328SShengzhou Liu #define CONFIG_BAUDRATE		115200
90148c6f328SShengzhou Liu #define __USB_PHY_TYPE		utmi
90248c6f328SShengzhou Liu 
90348c6f328SShengzhou Liu #ifdef CONFIG_PPC_T1024
904e8a7f1c3SShengzhou Liu #define CONFIG_BOARDNAME t1024rdb
905e8a7f1c3SShengzhou Liu #define BANK_INTLV cs0_cs1
90648c6f328SShengzhou Liu #else
907e8a7f1c3SShengzhou Liu #define CONFIG_BOARDNAME t1023rdb
908e8a7f1c3SShengzhou Liu #define BANK_INTLV  null
90948c6f328SShengzhou Liu #endif
91048c6f328SShengzhou Liu 
91148c6f328SShengzhou Liu #define	CONFIG_EXTRA_ENV_SETTINGS				\
91248c6f328SShengzhou Liu 	"hwconfig=fsl_ddr:ctlr_intlv=cacheline,"		\
913e8a7f1c3SShengzhou Liu 	"bank_intlv=" __stringify(BANK_INTLV) "\0"		\
91448c6f328SShengzhou Liu 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"  \
91548c6f328SShengzhou Liu 	"ramdiskfile=" __stringify(CONFIG_BOARDNAME) "/ramdisk.uboot\0" \
91648c6f328SShengzhou Liu 	"fdtfile=" __stringify(CONFIG_BOARDNAME) "/"		\
91748c6f328SShengzhou Liu 	__stringify(CONFIG_BOARDNAME) ".dtb\0"			\
91848c6f328SShengzhou Liu 	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
91948c6f328SShengzhou Liu 	"ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"	\
92048c6f328SShengzhou Liu 	"bootargs=root=/dev/ram rw console=ttyS0,115200\0" \
92148c6f328SShengzhou Liu 	"netdev=eth0\0"						\
92248c6f328SShengzhou Liu 	"tftpflash=tftpboot $loadaddr $uboot && "		\
92348c6f328SShengzhou Liu 	"protect off $ubootaddr +$filesize && "			\
92448c6f328SShengzhou Liu 	"erase $ubootaddr +$filesize && "			\
92548c6f328SShengzhou Liu 	"cp.b $loadaddr $ubootaddr $filesize && "		\
92648c6f328SShengzhou Liu 	"protect on $ubootaddr +$filesize && "			\
92748c6f328SShengzhou Liu 	"cmp.b $loadaddr $ubootaddr $filesize\0"		\
92848c6f328SShengzhou Liu 	"consoledev=ttyS0\0"					\
92948c6f328SShengzhou Liu 	"ramdiskaddr=2000000\0"					\
93048c6f328SShengzhou Liu 	"fdtaddr=c00000\0"					\
93148c6f328SShengzhou Liu 	"bdev=sda3\0"
93248c6f328SShengzhou Liu 
93348c6f328SShengzhou Liu #define CONFIG_LINUX					\
93448c6f328SShengzhou Liu 	"setenv bootargs root=/dev/ram rw "		\
93548c6f328SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
93648c6f328SShengzhou Liu 	"setenv ramdiskaddr 0x02000000;"		\
93748c6f328SShengzhou Liu 	"setenv fdtaddr 0x00c00000;"			\
93848c6f328SShengzhou Liu 	"setenv loadaddr 0x1000000;"			\
93948c6f328SShengzhou Liu 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
94048c6f328SShengzhou Liu 
94148c6f328SShengzhou Liu 
94248c6f328SShengzhou Liu #define CONFIG_NFSBOOTCOMMAND			\
94348c6f328SShengzhou Liu 	"setenv bootargs root=/dev/nfs rw "	\
94448c6f328SShengzhou Liu 	"nfsroot=$serverip:$rootpath "		\
94548c6f328SShengzhou Liu 	"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
94648c6f328SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
94748c6f328SShengzhou Liu 	"tftp $loadaddr $bootfile;"		\
94848c6f328SShengzhou Liu 	"tftp $fdtaddr $fdtfile;"		\
94948c6f328SShengzhou Liu 	"bootm $loadaddr - $fdtaddr"
95048c6f328SShengzhou Liu 
95148c6f328SShengzhou Liu #define CONFIG_BOOTCOMMAND	CONFIG_LINUX
95248c6f328SShengzhou Liu 
953*ef6c55a2SAneesh Bansal /* Hash command with SHA acceleration supported in hardware */
954*ef6c55a2SAneesh Bansal #ifdef CONFIG_FSL_CAAM
955*ef6c55a2SAneesh Bansal #define CONFIG_CMD_HASH
956*ef6c55a2SAneesh Bansal #define CONFIG_SHA_HW_ACCEL
957*ef6c55a2SAneesh Bansal #endif
958*ef6c55a2SAneesh Bansal 
95948c6f328SShengzhou Liu #include <asm/fsl_secure_boot.h>
960*ef6c55a2SAneesh Bansal 
961*ef6c55a2SAneesh Bansal #ifdef CONFIG_SECURE_BOOT
962*ef6c55a2SAneesh Bansal #define CONFIG_CMD_BLOB
96348c6f328SShengzhou Liu #endif
96448c6f328SShengzhou Liu 
96548c6f328SShengzhou Liu #endif	/* __T1024RDB_H */
966