xref: /openbmc/u-boot/include/configs/T208xRDB.h (revision 66c433ed4342e5761ee9b048c85fe47d31130b2e)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
28d67c368SShengzhou Liu /*
38d67c368SShengzhou Liu  * Copyright 2014 Freescale Semiconductor, Inc.
48d67c368SShengzhou Liu  */
58d67c368SShengzhou Liu 
68d67c368SShengzhou Liu /*
78d67c368SShengzhou Liu  * T2080 RDB/PCIe board configuration file
88d67c368SShengzhou Liu  */
98d67c368SShengzhou Liu 
108d67c368SShengzhou Liu #ifndef __T2080RDB_H
118d67c368SShengzhou Liu #define __T2080RDB_H
128d67c368SShengzhou Liu 
138d67c368SShengzhou Liu #define CONFIG_ICS307_REFCLK_HZ 25000000  /* ICS307 ref clk freq */
148d67c368SShengzhou Liu #define CONFIG_FSL_SATA_V2
158d67c368SShengzhou Liu 
168d67c368SShengzhou Liu /* High Level Configuration Options */
178d67c368SShengzhou Liu #define CONFIG_SYS_BOOK3E_HV	/* Category E.HV supported */
188d67c368SShengzhou Liu #define CONFIG_ENABLE_36BIT_PHYS
198d67c368SShengzhou Liu 
208d67c368SShengzhou Liu #ifdef CONFIG_PHYS_64BIT
218d67c368SShengzhou Liu #define CONFIG_ADDR_MAP 1
228d67c368SShengzhou Liu #define CONFIG_SYS_NUM_ADDR_MAP 64 /* number of TLB1 entries */
238d67c368SShengzhou Liu #endif
248d67c368SShengzhou Liu 
258d67c368SShengzhou Liu #define CONFIG_SYS_FSL_CPC	/* Corenet Platform Cache */
2651370d56SYork Sun #define CONFIG_SYS_NUM_CPC	CONFIG_SYS_NUM_DDR_CTLRS
278d67c368SShengzhou Liu #define CONFIG_ENV_OVERWRITE
288d67c368SShengzhou Liu 
298d67c368SShengzhou Liu #ifdef CONFIG_RAMBOOT_PBL
30e4536f8eSMasahiro Yamada #define CONFIG_SYS_FSL_PBL_PBI board/freescale/t208xrdb/t2080_pbi.cfg
314d666683SShengzhou Liu 
324d666683SShengzhou Liu #define CONFIG_SPL_FLUSH_IMAGE
334d666683SShengzhou Liu #define CONFIG_SPL_TEXT_BASE		0xFFFD8000
344d666683SShengzhou Liu #define CONFIG_SPL_PAD_TO		0x40000
354d666683SShengzhou Liu #define CONFIG_SPL_MAX_SIZE		0x28000
364d666683SShengzhou Liu #define RESET_VECTOR_OFFSET		0x27FFC
374d666683SShengzhou Liu #define BOOT_PAGE_OFFSET		0x27000
384d666683SShengzhou Liu #ifdef CONFIG_SPL_BUILD
394d666683SShengzhou Liu #define CONFIG_SPL_SKIP_RELOCATE
404d666683SShengzhou Liu #define CONFIG_SPL_COMMON_INIT_DDR
414d666683SShengzhou Liu #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
428d67c368SShengzhou Liu #endif
438d67c368SShengzhou Liu 
444d666683SShengzhou Liu #ifdef CONFIG_NAND
454d666683SShengzhou Liu #define CONFIG_SYS_NAND_U_BOOT_SIZE	(768 << 10)
464d666683SShengzhou Liu #define CONFIG_SYS_NAND_U_BOOT_DST	0x00200000
474d666683SShengzhou Liu #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
484d666683SShengzhou Liu #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
494d666683SShengzhou Liu #define CONFIG_SYS_LDSCRIPT  "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
50ec90ac73SZhao Qiang #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xrdb/t2080_nand_rcw.cfg
514d666683SShengzhou Liu #define CONFIG_SPL_NAND_BOOT
524d666683SShengzhou Liu #endif
534d666683SShengzhou Liu 
544d666683SShengzhou Liu #ifdef CONFIG_SPIFLASH
554d666683SShengzhou Liu #define        CONFIG_RESET_VECTOR_ADDRESS             0x200FFC
564d666683SShengzhou Liu #define CONFIG_SPL_SPI_FLASH_MINIMAL
574d666683SShengzhou Liu #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE       (768 << 10)
584d666683SShengzhou Liu #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST                (0x00200000)
594d666683SShengzhou Liu #define CONFIG_SYS_SPI_FLASH_U_BOOT_START      (0x00200000)
604d666683SShengzhou Liu #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS       (256 << 10)
614d666683SShengzhou Liu #define CONFIG_SYS_LDSCRIPT    "arch/powerpc/cpu/mpc85xx/u-boot.lds"
624d666683SShengzhou Liu #ifndef CONFIG_SPL_BUILD
634d666683SShengzhou Liu #define CONFIG_SYS_MPC85XX_NO_RESETVEC
644d666683SShengzhou Liu #endif
65ec90ac73SZhao Qiang #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xrdb/t2080_spi_rcw.cfg
664d666683SShengzhou Liu #define CONFIG_SPL_SPI_BOOT
674d666683SShengzhou Liu #endif
684d666683SShengzhou Liu 
694d666683SShengzhou Liu #ifdef CONFIG_SDCARD
704d666683SShengzhou Liu #define        CONFIG_RESET_VECTOR_ADDRESS             0x200FFC
714d666683SShengzhou Liu #define CONFIG_SYS_MMC_U_BOOT_SIZE     (768 << 10)
724d666683SShengzhou Liu #define CONFIG_SYS_MMC_U_BOOT_DST      (0x00200000)
734d666683SShengzhou Liu #define CONFIG_SYS_MMC_U_BOOT_START    (0x00200000)
744d666683SShengzhou Liu #define CONFIG_SYS_MMC_U_BOOT_OFFS     (260 << 10)
754d666683SShengzhou Liu #define CONFIG_SYS_LDSCRIPT    "arch/powerpc/cpu/mpc85xx/u-boot.lds"
764d666683SShengzhou Liu #ifndef CONFIG_SPL_BUILD
774d666683SShengzhou Liu #define CONFIG_SYS_MPC85XX_NO_RESETVEC
784d666683SShengzhou Liu #endif
79ec90ac73SZhao Qiang #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xrdb/t2080_sd_rcw.cfg
804d666683SShengzhou Liu #define CONFIG_SPL_MMC_BOOT
814d666683SShengzhou Liu #endif
824d666683SShengzhou Liu 
834d666683SShengzhou Liu #endif /* CONFIG_RAMBOOT_PBL */
844d666683SShengzhou Liu 
858d67c368SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_MASTER
868d67c368SShengzhou Liu #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
878d67c368SShengzhou Liu /* Set 1M boot space */
888d67c368SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR (CONFIG_SYS_TEXT_BASE & 0xfff00000)
898d67c368SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR_PHYS \
908d67c368SShengzhou Liu 		(0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR)
918d67c368SShengzhou Liu #define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
928d67c368SShengzhou Liu #endif
938d67c368SShengzhou Liu 
948d67c368SShengzhou Liu #ifndef CONFIG_RESET_VECTOR_ADDRESS
958d67c368SShengzhou Liu #define CONFIG_RESET_VECTOR_ADDRESS	0xeffffffc
968d67c368SShengzhou Liu #endif
978d67c368SShengzhou Liu 
988d67c368SShengzhou Liu /*
998d67c368SShengzhou Liu  * These can be toggled for performance analysis, otherwise use default.
1008d67c368SShengzhou Liu  */
1018d67c368SShengzhou Liu #define CONFIG_SYS_CACHE_STASHING
1028d67c368SShengzhou Liu #define CONFIG_BTB		/* toggle branch predition */
1038d67c368SShengzhou Liu #define CONFIG_DDR_ECC
1048d67c368SShengzhou Liu #ifdef CONFIG_DDR_ECC
1058d67c368SShengzhou Liu #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
1068d67c368SShengzhou Liu #define CONFIG_MEM_INIT_VALUE		0xdeadbeef
1078d67c368SShengzhou Liu #endif
1088d67c368SShengzhou Liu 
1094913229eSShengzhou Liu #define CONFIG_SYS_MEMTEST_START	0x00200000 /* memtest works on */
1104913229eSShengzhou Liu #define CONFIG_SYS_MEMTEST_END		0x00400000
1114913229eSShengzhou Liu 
1128d67c368SShengzhou Liu #if defined(CONFIG_SPIFLASH)
1138d67c368SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000	   /* 8KB */
1148d67c368SShengzhou Liu #define CONFIG_ENV_OFFSET	0x100000   /* 1MB */
1158d67c368SShengzhou Liu #define CONFIG_ENV_SECT_SIZE	0x10000
1168d67c368SShengzhou Liu #elif defined(CONFIG_SDCARD)
1178d67c368SShengzhou Liu #define CONFIG_SYS_MMC_ENV_DEV	0
1188d67c368SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
1194d666683SShengzhou Liu #define CONFIG_ENV_OFFSET	(512 * 0x800)
1208d67c368SShengzhou Liu #elif defined(CONFIG_NAND)
1214d666683SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
1228d67c368SShengzhou Liu #define CONFIG_ENV_OFFSET	(2 * CONFIG_SYS_NAND_BLOCK_SIZE)
1238d67c368SShengzhou Liu #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE)
1248d67c368SShengzhou Liu #define CONFIG_ENV_ADDR		0xffe20000
1258d67c368SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
1268d67c368SShengzhou Liu #elif defined(CONFIG_ENV_IS_NOWHERE)
1278d67c368SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
1288d67c368SShengzhou Liu #else
1298d67c368SShengzhou Liu #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
1308d67c368SShengzhou Liu #define CONFIG_ENV_SIZE		0x2000
1318d67c368SShengzhou Liu #define CONFIG_ENV_SECT_SIZE	0x20000 /* 128K (one sector) */
1328d67c368SShengzhou Liu #endif
1338d67c368SShengzhou Liu 
1348d67c368SShengzhou Liu #ifndef __ASSEMBLY__
1358d67c368SShengzhou Liu unsigned long get_board_sys_clk(void);
1368d67c368SShengzhou Liu unsigned long get_board_ddr_clk(void);
1378d67c368SShengzhou Liu #endif
1388d67c368SShengzhou Liu 
1398d67c368SShengzhou Liu #define CONFIG_SYS_CLK_FREQ	66660000
1408d67c368SShengzhou Liu #define CONFIG_DDR_CLK_FREQ	133330000
1418d67c368SShengzhou Liu 
1428d67c368SShengzhou Liu /*
1438d67c368SShengzhou Liu  * Config the L3 Cache as L3 SRAM
1448d67c368SShengzhou Liu  */
1454d666683SShengzhou Liu #define CONFIG_SYS_INIT_L3_ADDR		0xFFFC0000
1464d666683SShengzhou Liu #define CONFIG_SYS_L3_SIZE		(512 << 10)
1474d666683SShengzhou Liu #define CONFIG_SPL_GD_ADDR		(CONFIG_SYS_INIT_L3_ADDR + 32 * 1024)
1484d666683SShengzhou Liu #ifdef CONFIG_RAMBOOT_PBL
1494d666683SShengzhou Liu #define CONFIG_ENV_ADDR			(CONFIG_SPL_GD_ADDR + 4 * 1024)
1504d666683SShengzhou Liu #endif
1514d666683SShengzhou Liu #define CONFIG_SPL_RELOC_MALLOC_ADDR	(CONFIG_SPL_GD_ADDR + 12 * 1024)
1524d666683SShengzhou Liu #define CONFIG_SPL_RELOC_MALLOC_SIZE	(50 << 10)
1534d666683SShengzhou Liu #define CONFIG_SPL_RELOC_STACK		(CONFIG_SPL_GD_ADDR + 64 * 1024)
1548d67c368SShengzhou Liu 
1558d67c368SShengzhou Liu #define CONFIG_SYS_DCSRBAR	0xf0000000
1568d67c368SShengzhou Liu #define CONFIG_SYS_DCSRBAR_PHYS	0xf00000000ull
1578d67c368SShengzhou Liu 
1588d67c368SShengzhou Liu /* EEPROM */
1598d67c368SShengzhou Liu #define CONFIG_ID_EEPROM
1608d67c368SShengzhou Liu #define CONFIG_SYS_I2C_EEPROM_NXID
1618d67c368SShengzhou Liu #define CONFIG_SYS_EEPROM_BUS_NUM	0
1628d67c368SShengzhou Liu #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
163ef531c73SShengzhou Liu #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	2
1648d67c368SShengzhou Liu 
1658d67c368SShengzhou Liu /*
1668d67c368SShengzhou Liu  * DDR Setup
1678d67c368SShengzhou Liu  */
1688d67c368SShengzhou Liu #define CONFIG_VERY_BIG_RAM
1698d67c368SShengzhou Liu #define CONFIG_SYS_DDR_SDRAM_BASE	0x00000000
1708d67c368SShengzhou Liu #define CONFIG_SYS_SDRAM_BASE		CONFIG_SYS_DDR_SDRAM_BASE
1718d67c368SShengzhou Liu #define CONFIG_DIMM_SLOTS_PER_CTLR	1
1728d67c368SShengzhou Liu #define CONFIG_CHIP_SELECTS_PER_CTRL	(4 * CONFIG_DIMM_SLOTS_PER_CTLR)
1738d67c368SShengzhou Liu #define CONFIG_DDR_SPD
1748d67c368SShengzhou Liu #define CONFIG_SYS_SPD_BUS_NUM	0
1758d67c368SShengzhou Liu #define CONFIG_SYS_SDRAM_SIZE	2048	/* for fixed parameter use */
1768d67c368SShengzhou Liu #define SPD_EEPROM_ADDRESS1	0x51
1778d67c368SShengzhou Liu #define SPD_EEPROM_ADDRESS2	0x52
1788d67c368SShengzhou Liu #define SPD_EEPROM_ADDRESS	SPD_EEPROM_ADDRESS1
1798d67c368SShengzhou Liu #define CTRL_INTLV_PREFERED	cacheline
1808d67c368SShengzhou Liu 
1818d67c368SShengzhou Liu /*
1828d67c368SShengzhou Liu  * IFC Definitions
1838d67c368SShengzhou Liu  */
1848d67c368SShengzhou Liu #define CONFIG_SYS_FLASH_BASE		0xe8000000
1858d67c368SShengzhou Liu #define CONFIG_SYS_FLASH_BASE_PHYS	(0xf00000000ull | CONFIG_SYS_FLASH_BASE)
1868d67c368SShengzhou Liu #define CONFIG_SYS_NOR0_CSPR_EXT	(0xf)
1878d67c368SShengzhou Liu #define CONFIG_SYS_NOR0_CSPR	(CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
1888d67c368SShengzhou Liu 				CSPR_PORT_SIZE_16 | \
1898d67c368SShengzhou Liu 				CSPR_MSEL_NOR | \
1908d67c368SShengzhou Liu 				CSPR_V)
1918d67c368SShengzhou Liu #define CONFIG_SYS_NOR_AMASK	IFC_AMASK(128*1024*1024)
1928d67c368SShengzhou Liu 
1938d67c368SShengzhou Liu /* NOR Flash Timing Params */
1948d67c368SShengzhou Liu #define CONFIG_SYS_NOR_CSOR	CSOR_NAND_TRHZ_80
1958d67c368SShengzhou Liu 
1968d67c368SShengzhou Liu #define CONFIG_SYS_NOR_FTIM0	(FTIM0_NOR_TACSE(0x4) | \
1978d67c368SShengzhou Liu 				FTIM0_NOR_TEADC(0x5) | \
1988d67c368SShengzhou Liu 				FTIM0_NOR_TEAHC(0x5))
1998d67c368SShengzhou Liu #define CONFIG_SYS_NOR_FTIM1	(FTIM1_NOR_TACO(0x35) | \
2008d67c368SShengzhou Liu 				FTIM1_NOR_TRAD_NOR(0x1A) |\
2018d67c368SShengzhou Liu 				FTIM1_NOR_TSEQRAD_NOR(0x13))
2028d67c368SShengzhou Liu #define CONFIG_SYS_NOR_FTIM2	(FTIM2_NOR_TCS(0x4) | \
2038d67c368SShengzhou Liu 				FTIM2_NOR_TCH(0x4) | \
2048d67c368SShengzhou Liu 				FTIM2_NOR_TWPH(0x0E) | \
2058d67c368SShengzhou Liu 				FTIM2_NOR_TWP(0x1c))
2068d67c368SShengzhou Liu #define CONFIG_SYS_NOR_FTIM3	0x0
2078d67c368SShengzhou Liu 
2088d67c368SShengzhou Liu #define CONFIG_SYS_FLASH_QUIET_TEST
2098d67c368SShengzhou Liu #define CONFIG_FLASH_SHOW_PROGRESS	45 /* count down from 45/5: 9..1 */
2108d67c368SShengzhou Liu 
2118d67c368SShengzhou Liu #define CONFIG_SYS_MAX_FLASH_BANKS	1	/* number of banks */
2128d67c368SShengzhou Liu #define CONFIG_SYS_MAX_FLASH_SECT	1024	/* sectors per device */
2138d67c368SShengzhou Liu #define CONFIG_SYS_FLASH_ERASE_TOUT	60000	/* Flash Erase Timeout (ms) */
2148d67c368SShengzhou Liu #define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (ms) */
2158d67c368SShengzhou Liu #define CONFIG_SYS_FLASH_EMPTY_INFO
2168d67c368SShengzhou Liu #define CONFIG_SYS_FLASH_BANKS_LIST	{CONFIG_SYS_FLASH_BASE_PHYS }
2178d67c368SShengzhou Liu 
2188d67c368SShengzhou Liu /* CPLD on IFC */
2198d67c368SShengzhou Liu #define CONFIG_SYS_CPLD_BASE	0xffdf0000
2208d67c368SShengzhou Liu #define CONFIG_SYS_CPLD_BASE_PHYS	(0xf00000000ull | CONFIG_SYS_CPLD_BASE)
2218d67c368SShengzhou Liu #define CONFIG_SYS_CSPR2_EXT	(0xf)
2228d67c368SShengzhou Liu #define CONFIG_SYS_CSPR2	(CSPR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE) \
2238d67c368SShengzhou Liu 				| CSPR_PORT_SIZE_8 \
2248d67c368SShengzhou Liu 				| CSPR_MSEL_GPCM \
2258d67c368SShengzhou Liu 				| CSPR_V)
2268d67c368SShengzhou Liu #define CONFIG_SYS_AMASK2	IFC_AMASK(64*1024)
2278d67c368SShengzhou Liu #define CONFIG_SYS_CSOR2	0x0
2288d67c368SShengzhou Liu 
2298d67c368SShengzhou Liu /* CPLD Timing parameters for IFC CS2 */
2308d67c368SShengzhou Liu #define CONFIG_SYS_CS2_FTIM0		(FTIM0_GPCM_TACSE(0x0e) | \
2318d67c368SShengzhou Liu 					FTIM0_GPCM_TEADC(0x0e) | \
2328d67c368SShengzhou Liu 					FTIM0_GPCM_TEAHC(0x0e))
2338d67c368SShengzhou Liu #define CONFIG_SYS_CS2_FTIM1		(FTIM1_GPCM_TACO(0x0e) | \
2348d67c368SShengzhou Liu 					FTIM1_GPCM_TRAD(0x1f))
2358d67c368SShengzhou Liu #define CONFIG_SYS_CS2_FTIM2		(FTIM2_GPCM_TCS(0x0e) | \
236de519163SShaohui Xie 					FTIM2_GPCM_TCH(0x8) | \
2378d67c368SShengzhou Liu 					FTIM2_GPCM_TWP(0x1f))
2388d67c368SShengzhou Liu #define CONFIG_SYS_CS2_FTIM3		0x0
2398d67c368SShengzhou Liu 
2408d67c368SShengzhou Liu /* NAND Flash on IFC */
2418d67c368SShengzhou Liu #define CONFIG_NAND_FSL_IFC
2428d67c368SShengzhou Liu #define CONFIG_SYS_NAND_BASE		0xff800000
2438d67c368SShengzhou Liu #define CONFIG_SYS_NAND_BASE_PHYS	(0xf00000000ull | CONFIG_SYS_NAND_BASE)
2448d67c368SShengzhou Liu 
2458d67c368SShengzhou Liu #define CONFIG_SYS_NAND_CSPR_EXT	(0xf)
2468d67c368SShengzhou Liu #define CONFIG_SYS_NAND_CSPR	(CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
2478d67c368SShengzhou Liu 				| CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
2488d67c368SShengzhou Liu 				| CSPR_MSEL_NAND	 /* MSEL = NAND */ \
2498d67c368SShengzhou Liu 				| CSPR_V)
2508d67c368SShengzhou Liu #define CONFIG_SYS_NAND_AMASK	IFC_AMASK(64*1024)
2518d67c368SShengzhou Liu 
2528d67c368SShengzhou Liu #define CONFIG_SYS_NAND_CSOR	(CSOR_NAND_ECC_ENC_EN	/* ECC on encode */ \
2538d67c368SShengzhou Liu 				| CSOR_NAND_ECC_DEC_EN	/* ECC on decode */ \
2548d67c368SShengzhou Liu 				| CSOR_NAND_ECC_MODE_4	/* 4-bit ECC */	    \
2558d67c368SShengzhou Liu 				| CSOR_NAND_RAL_3	/* RAL = 2Byes */   \
2568d67c368SShengzhou Liu 				| CSOR_NAND_PGS_2K	/* Page Size = 2K */\
2578d67c368SShengzhou Liu 				| CSOR_NAND_SPRZ_64	/* Spare size = 64 */\
2588d67c368SShengzhou Liu 				| CSOR_NAND_PB(64))	/*Pages Per Block = 64*/
2598d67c368SShengzhou Liu 
2608d67c368SShengzhou Liu #define CONFIG_SYS_NAND_ONFI_DETECTION
2618d67c368SShengzhou Liu 
2628d67c368SShengzhou Liu /* ONFI NAND Flash mode0 Timing Params */
2638d67c368SShengzhou Liu #define CONFIG_SYS_NAND_FTIM0		(FTIM0_NAND_TCCST(0x07) | \
2648d67c368SShengzhou Liu 					FTIM0_NAND_TWP(0x18)    | \
2658d67c368SShengzhou Liu 					FTIM0_NAND_TWCHT(0x07)  | \
2668d67c368SShengzhou Liu 					FTIM0_NAND_TWH(0x0a))
2678d67c368SShengzhou Liu #define CONFIG_SYS_NAND_FTIM1		(FTIM1_NAND_TADLE(0x32) | \
2688d67c368SShengzhou Liu 					FTIM1_NAND_TWBE(0x39)   | \
2698d67c368SShengzhou Liu 					FTIM1_NAND_TRR(0x0e)    | \
2708d67c368SShengzhou Liu 					FTIM1_NAND_TRP(0x18))
2718d67c368SShengzhou Liu #define CONFIG_SYS_NAND_FTIM2		(FTIM2_NAND_TRAD(0x0f)  | \
2728d67c368SShengzhou Liu 					FTIM2_NAND_TREH(0x0a)   | \
2738d67c368SShengzhou Liu 					FTIM2_NAND_TWHRE(0x1e))
2748d67c368SShengzhou Liu #define CONFIG_SYS_NAND_FTIM3		0x0
2758d67c368SShengzhou Liu 
2768d67c368SShengzhou Liu #define CONFIG_SYS_NAND_DDR_LAW		11
2778d67c368SShengzhou Liu #define CONFIG_SYS_NAND_BASE_LIST	{ CONFIG_SYS_NAND_BASE }
2788d67c368SShengzhou Liu #define CONFIG_SYS_MAX_NAND_DEVICE	1
2798d67c368SShengzhou Liu #define CONFIG_SYS_NAND_BLOCK_SIZE	(512 * 1024)
2808d67c368SShengzhou Liu 
2818d67c368SShengzhou Liu #if defined(CONFIG_NAND)
2828d67c368SShengzhou Liu #define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NAND_CSPR_EXT
2838d67c368SShengzhou Liu #define CONFIG_SYS_CSPR0		CONFIG_SYS_NAND_CSPR
2848d67c368SShengzhou Liu #define CONFIG_SYS_AMASK0		CONFIG_SYS_NAND_AMASK
2858d67c368SShengzhou Liu #define CONFIG_SYS_CSOR0		CONFIG_SYS_NAND_CSOR
2868d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM0		CONFIG_SYS_NAND_FTIM0
2878d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM1		CONFIG_SYS_NAND_FTIM1
2888d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM2		CONFIG_SYS_NAND_FTIM2
2898d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM3		CONFIG_SYS_NAND_FTIM3
2908d67c368SShengzhou Liu #define CONFIG_SYS_CSPR1_EXT		CONFIG_SYS_NOR0_CSPR_EXT
2918d67c368SShengzhou Liu #define CONFIG_SYS_CSPR1		CONFIG_SYS_NOR0_CSPR
2928d67c368SShengzhou Liu #define CONFIG_SYS_AMASK1		CONFIG_SYS_NOR_AMASK
2938d67c368SShengzhou Liu #define CONFIG_SYS_CSOR1		CONFIG_SYS_NOR_CSOR
2948d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM0		CONFIG_SYS_NOR_FTIM0
2958d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM1		CONFIG_SYS_NOR_FTIM1
2968d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM2		CONFIG_SYS_NOR_FTIM2
2978d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM3		CONFIG_SYS_NOR_FTIM3
2988d67c368SShengzhou Liu #else
2998d67c368SShengzhou Liu #define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NOR0_CSPR_EXT
3008d67c368SShengzhou Liu #define CONFIG_SYS_CSPR0		CONFIG_SYS_NOR0_CSPR
3018d67c368SShengzhou Liu #define CONFIG_SYS_AMASK0		CONFIG_SYS_NOR_AMASK
3028d67c368SShengzhou Liu #define CONFIG_SYS_CSOR0		CONFIG_SYS_NOR_CSOR
3038d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM0		CONFIG_SYS_NOR_FTIM0
3048d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM1		CONFIG_SYS_NOR_FTIM1
3058d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM2		CONFIG_SYS_NOR_FTIM2
3068d67c368SShengzhou Liu #define CONFIG_SYS_CS0_FTIM3		CONFIG_SYS_NOR_FTIM3
3078d67c368SShengzhou Liu #define CONFIG_SYS_CSPR1_EXT		CONFIG_SYS_NAND_CSPR_EXT
3088d67c368SShengzhou Liu #define CONFIG_SYS_CSPR1		CONFIG_SYS_NAND_CSPR
3098d67c368SShengzhou Liu #define CONFIG_SYS_AMASK1		CONFIG_SYS_NAND_AMASK
3108d67c368SShengzhou Liu #define CONFIG_SYS_CSOR1		CONFIG_SYS_NAND_CSOR
3118d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM0		CONFIG_SYS_NAND_FTIM0
3128d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM1		CONFIG_SYS_NAND_FTIM1
3138d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM2		CONFIG_SYS_NAND_FTIM2
3148d67c368SShengzhou Liu #define CONFIG_SYS_CS1_FTIM3		CONFIG_SYS_NAND_FTIM3
3158d67c368SShengzhou Liu #endif
3168d67c368SShengzhou Liu 
3178d67c368SShengzhou Liu #if defined(CONFIG_RAMBOOT_PBL)
3188d67c368SShengzhou Liu #define CONFIG_SYS_RAMBOOT
3198d67c368SShengzhou Liu #endif
3208d67c368SShengzhou Liu 
3214d666683SShengzhou Liu #ifdef CONFIG_SPL_BUILD
3224d666683SShengzhou Liu #define CONFIG_SYS_MONITOR_BASE  CONFIG_SPL_TEXT_BASE
3234d666683SShengzhou Liu #else
3244d666683SShengzhou Liu #define CONFIG_SYS_MONITOR_BASE  CONFIG_SYS_TEXT_BASE /* start of monitor */
3254d666683SShengzhou Liu #endif
3264d666683SShengzhou Liu 
3278d67c368SShengzhou Liu #define CONFIG_HWCONFIG
3288d67c368SShengzhou Liu 
3298d67c368SShengzhou Liu /* define to use L1 as initial stack */
3308d67c368SShengzhou Liu #define CONFIG_L1_INIT_RAM
3318d67c368SShengzhou Liu #define CONFIG_SYS_INIT_RAM_LOCK
3328d67c368SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR	0xfdd00000 /* Initial L1 address */
3338d67c368SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH	0xf
334b3142e2cSYork Sun #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW	0xfe03c000
3358d67c368SShengzhou Liu /* The assembler doesn't like typecast */
3368d67c368SShengzhou Liu #define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
3378d67c368SShengzhou Liu 			((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
3388d67c368SShengzhou Liu 			CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
3398d67c368SShengzhou Liu #define CONFIG_SYS_INIT_RAM_SIZE	0x00004000
3408d67c368SShengzhou Liu #define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - \
3418d67c368SShengzhou Liu 						GENERATED_GBL_DATA_SIZE)
3428d67c368SShengzhou Liu #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
3439307cbabSPrabhakar Kushwaha #define CONFIG_SYS_MONITOR_LEN		(768 * 1024)
3448d67c368SShengzhou Liu #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
3458d67c368SShengzhou Liu 
3468d67c368SShengzhou Liu /*
3478d67c368SShengzhou Liu  * Serial Port
3488d67c368SShengzhou Liu  */
3498d67c368SShengzhou Liu #define CONFIG_SYS_NS16550_SERIAL
3508d67c368SShengzhou Liu #define CONFIG_SYS_NS16550_REG_SIZE	1
3518d67c368SShengzhou Liu #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
3528d67c368SShengzhou Liu #define CONFIG_SYS_BAUDRATE_TABLE	\
3538d67c368SShengzhou Liu 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
3548d67c368SShengzhou Liu #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x11C500)
3558d67c368SShengzhou Liu #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x11C600)
3568d67c368SShengzhou Liu #define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)
3578d67c368SShengzhou Liu #define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)
3588d67c368SShengzhou Liu 
3598d67c368SShengzhou Liu /*
3608d67c368SShengzhou Liu  * I2C
3618d67c368SShengzhou Liu  */
3628d67c368SShengzhou Liu #define CONFIG_SYS_I2C
3638d67c368SShengzhou Liu #define CONFIG_SYS_I2C_FSL
3648d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C_SLAVE   0x7F
3658d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C2_SLAVE  0x7F
3668d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C3_SLAVE  0x7F
3678d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C4_SLAVE  0x7F
3688d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C_OFFSET  0x118000
3698d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C2_OFFSET 0x118100
3708d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C3_OFFSET 0x119000
3718d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C4_OFFSET 0x119100
3728d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C_SPEED   100000
3738d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C2_SPEED  100000
3748d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C3_SPEED  100000
3758d67c368SShengzhou Liu #define CONFIG_SYS_FSL_I2C4_SPEED  100000
3768d67c368SShengzhou Liu #define I2C_MUX_PCA_ADDR_PRI	0x77 /* I2C bus multiplexer,primary */
3778d67c368SShengzhou Liu #define I2C_MUX_PCA_ADDR_SEC1	0x75 /* I2C bus multiplexer,secondary 1 */
3788d67c368SShengzhou Liu #define I2C_MUX_PCA_ADDR_SEC2	0x76 /* I2C bus multiplexer,secondary 2 */
3798d67c368SShengzhou Liu #define I2C_MUX_CH_DEFAULT	0x8
3808d67c368SShengzhou Liu 
381e5abb92cSYing Zhang #define I2C_MUX_CH_VOL_MONITOR	0xa
382e5abb92cSYing Zhang 
383e5abb92cSYing Zhang #define CONFIG_VID_FLS_ENV		"t208xrdb_vdd_mv"
384e5abb92cSYing Zhang #ifndef CONFIG_SPL_BUILD
385e5abb92cSYing Zhang #define CONFIG_VID
386e5abb92cSYing Zhang #endif
387e5abb92cSYing Zhang #define CONFIG_VOL_MONITOR_IR36021_SET
388e5abb92cSYing Zhang #define CONFIG_VOL_MONITOR_IR36021_READ
389e5abb92cSYing Zhang /* The lowest and highest voltage allowed for T208xRDB */
390e5abb92cSYing Zhang #define VDD_MV_MIN			819
391e5abb92cSYing Zhang #define VDD_MV_MAX			1212
3928d67c368SShengzhou Liu 
3938d67c368SShengzhou Liu /*
3948d67c368SShengzhou Liu  * RapidIO
3958d67c368SShengzhou Liu  */
3968d67c368SShengzhou Liu #define CONFIG_SYS_SRIO1_MEM_VIRT	0xa0000000
3978d67c368SShengzhou Liu #define CONFIG_SYS_SRIO1_MEM_PHYS	0xc20000000ull
3988d67c368SShengzhou Liu #define CONFIG_SYS_SRIO1_MEM_SIZE	0x10000000 /* 256M */
3998d67c368SShengzhou Liu #define CONFIG_SYS_SRIO2_MEM_VIRT	0xb0000000
4008d67c368SShengzhou Liu #define CONFIG_SYS_SRIO2_MEM_PHYS	0xc30000000ull
4018d67c368SShengzhou Liu #define CONFIG_SYS_SRIO2_MEM_SIZE	0x10000000 /* 256M */
4028d67c368SShengzhou Liu /*
4038d67c368SShengzhou Liu  * for slave u-boot IMAGE instored in master memory space,
4048d67c368SShengzhou Liu  * PHYS must be aligned based on the SIZE
4058d67c368SShengzhou Liu  */
406e4911815SLiu Gang #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xfef200000ull
407e4911815SLiu Gang #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS1 0xfff00000ull
408e4911815SLiu Gang #define CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE     0x100000 /* 1M */
409e4911815SLiu Gang #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0x3fff00000ull
4108d67c368SShengzhou Liu /*
4118d67c368SShengzhou Liu  * for slave UCODE and ENV instored in master memory space,
4128d67c368SShengzhou Liu  * PHYS must be aligned based on the SIZE
4138d67c368SShengzhou Liu  */
414e4911815SLiu Gang #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xfef100000ull
4158d67c368SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS 0x3ffe00000ull
4168d67c368SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE    0x40000	/* 256K */
4178d67c368SShengzhou Liu 
4188d67c368SShengzhou Liu /* slave core release by master*/
4198d67c368SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET 0xe00e4
4208d67c368SShengzhou Liu #define CONFIG_SRIO_PCIE_BOOT_RELEASE_MASK 0x00000001 /* release core 0 */
4218d67c368SShengzhou Liu 
4228d67c368SShengzhou Liu /*
4238d67c368SShengzhou Liu  * SRIO_PCIE_BOOT - SLAVE
4248d67c368SShengzhou Liu  */
4258d67c368SShengzhou Liu #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
4268d67c368SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR 0xFFE00000
4278d67c368SShengzhou Liu #define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR_PHYS \
4288d67c368SShengzhou Liu 		(0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR)
4298d67c368SShengzhou Liu #endif
4308d67c368SShengzhou Liu 
4318d67c368SShengzhou Liu /*
4328d67c368SShengzhou Liu  * eSPI - Enhanced SPI
4338d67c368SShengzhou Liu  */
4348d67c368SShengzhou Liu 
4358d67c368SShengzhou Liu /*
4368d67c368SShengzhou Liu  * General PCI
4378d67c368SShengzhou Liu  * Memory space is mapped 1-1, but I/O space must start from 0.
4388d67c368SShengzhou Liu  */
439b38eaec5SRobert P. J. Day #define CONFIG_PCIE1		/* PCIE controller 1 */
440b38eaec5SRobert P. J. Day #define CONFIG_PCIE2		/* PCIE controller 2 */
441b38eaec5SRobert P. J. Day #define CONFIG_PCIE3		/* PCIE controller 3 */
442b38eaec5SRobert P. J. Day #define CONFIG_PCIE4		/* PCIE controller 4 */
4438d67c368SShengzhou Liu #define CONFIG_FSL_PCI_INIT	/* Use common FSL init code */
4448d67c368SShengzhou Liu #define CONFIG_SYS_PCI_64BIT	/* enable 64-bit PCI resources */
4458d67c368SShengzhou Liu /* controller 1, direct to uli, tgtid 3, Base address 20000 */
4468d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_MEM_VIRT	0x80000000
4478d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_MEM_BUS	0xe0000000
4488d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_MEM_PHYS	0xc00000000ull
4498d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_MEM_SIZE	0x20000000      /* 512M */
4508d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_VIRT	0xf8000000
4518d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_BUS		0x00000000
4528d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_PHYS	0xff8000000ull
4538d67c368SShengzhou Liu #define CONFIG_SYS_PCIE1_IO_SIZE	0x00010000	/* 64k */
4548d67c368SShengzhou Liu 
4558d67c368SShengzhou Liu /* controller 2, Slot 2, tgtid 2, Base address 201000 */
4568d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_VIRT	0xa0000000
4578d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_BUS	0xe0000000
4588d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_PHYS	0xc20000000ull
4598d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_MEM_SIZE	0x10000000 /* 256M */
4608d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_VIRT	0xf8010000
4618d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_BUS		0x00000000
4628d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_PHYS	0xff8010000ull
4638d67c368SShengzhou Liu #define CONFIG_SYS_PCIE2_IO_SIZE	0x00010000	/* 64k */
4648d67c368SShengzhou Liu 
4658d67c368SShengzhou Liu /* controller 3, Slot 1, tgtid 1, Base address 202000 */
4668d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_VIRT	0xb0000000
4678d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_BUS	0xe0000000
4688d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_PHYS	0xc30000000ull
4698d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_MEM_SIZE	0x10000000	/* 256M */
4708d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_VIRT	0xf8020000
4718d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_BUS		0x00000000
4728d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_PHYS	0xff8020000ull
4738d67c368SShengzhou Liu #define CONFIG_SYS_PCIE3_IO_SIZE	0x00010000	/* 64k */
4748d67c368SShengzhou Liu 
4758d67c368SShengzhou Liu /* controller 4, Base address 203000 */
4768d67c368SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_VIRT       0xc0000000
4778d67c368SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_BUS	0xe0000000
4788d67c368SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_PHYS	0xc40000000ull
4798d67c368SShengzhou Liu #define CONFIG_SYS_PCIE4_MEM_SIZE	0x10000000	/* 256M */
4808d67c368SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_BUS		0x00000000
4818d67c368SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_PHYS	0xff8030000ull
4828d67c368SShengzhou Liu #define CONFIG_SYS_PCIE4_IO_SIZE	0x00010000	/* 64k */
4838d67c368SShengzhou Liu 
4848d67c368SShengzhou Liu #ifdef CONFIG_PCI
4858d67c368SShengzhou Liu #define CONFIG_PCI_INDIRECT_BRIDGE
4868d67c368SShengzhou Liu #define CONFIG_FSL_PCIE_RESET           /* need PCIe reset errata LSZ ADD */
4878d67c368SShengzhou Liu #define CONFIG_PCI_SCAN_SHOW	/* show pci devices on startup */
4888d67c368SShengzhou Liu #endif
4898d67c368SShengzhou Liu 
4908d67c368SShengzhou Liu /* Qman/Bman */
4918d67c368SShengzhou Liu #ifndef CONFIG_NOBQFMAN
4928d67c368SShengzhou Liu #define CONFIG_SYS_BMAN_NUM_PORTALS	18
4938d67c368SShengzhou Liu #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
4948d67c368SShengzhou Liu #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
4958d67c368SShengzhou Liu #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
4963fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
4973fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
4983fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
4993fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
5003fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
5013fa66db4SJeffrey Ladouceur 					CONFIG_SYS_BMAN_CENA_SIZE)
5023fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
5033fa66db4SJeffrey Ladouceur #define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
5048d67c368SShengzhou Liu #define CONFIG_SYS_QMAN_NUM_PORTALS	18
5058d67c368SShengzhou Liu #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
5068d67c368SShengzhou Liu #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
5078d67c368SShengzhou Liu #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
5083fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
5093fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
5103fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
5113fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
5123fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
5133fa66db4SJeffrey Ladouceur 					CONFIG_SYS_QMAN_CENA_SIZE)
5143fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
5153fa66db4SJeffrey Ladouceur #define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
5168d67c368SShengzhou Liu 
5178d67c368SShengzhou Liu #define CONFIG_SYS_DPAA_FMAN
5188d67c368SShengzhou Liu #define CONFIG_SYS_DPAA_PME
5198d67c368SShengzhou Liu #define CONFIG_SYS_PMAN
5208d67c368SShengzhou Liu #define CONFIG_SYS_DPAA_DCE
5218d67c368SShengzhou Liu #define CONFIG_SYS_DPAA_RMAN		/* RMan */
5228d67c368SShengzhou Liu #define CONFIG_SYS_INTERLAKEN
5238d67c368SShengzhou Liu 
5248d67c368SShengzhou Liu /* Default address of microcode for the Linux Fman driver */
5258d67c368SShengzhou Liu #if defined(CONFIG_SPIFLASH)
5268d67c368SShengzhou Liu /*
5278d67c368SShengzhou Liu  * env is stored at 0x100000, sector size is 0x10000, ucode is stored after
5288d67c368SShengzhou Liu  * env, so we got 0x110000.
5298d67c368SShengzhou Liu  */
5308d67c368SShengzhou Liu #define CONFIG_SYS_QE_FW_IN_SPIFLASH
531ef531c73SShengzhou Liu #define CONFIG_SYS_CORTINA_FW_IN_SPIFLASH
532dcf1d774SZhao Qiang #define CONFIG_SYS_FMAN_FW_ADDR		0x110000
5338d67c368SShengzhou Liu #define CONFIG_CORTINA_FW_ADDR		0x120000
5348d67c368SShengzhou Liu 
5358d67c368SShengzhou Liu #elif defined(CONFIG_SDCARD)
5368d67c368SShengzhou Liu /*
5378d67c368SShengzhou Liu  * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is
5384d666683SShengzhou Liu  * about 1MB (2048 blocks), Env is stored after the image, and the env size is
5394d666683SShengzhou Liu  * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080.
5408d67c368SShengzhou Liu  */
5418d67c368SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_MMC
542ef531c73SShengzhou Liu #define CONFIG_SYS_CORTINA_FW_IN_MMC
5434d666683SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR		(512 * 0x820)
5444d666683SShengzhou Liu #define CONFIG_CORTINA_FW_ADDR		(512 * 0x8a0)
5458d67c368SShengzhou Liu 
5468d67c368SShengzhou Liu #elif defined(CONFIG_NAND)
5478d67c368SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_NAND
548ef531c73SShengzhou Liu #define CONFIG_SYS_CORTINA_FW_IN_NAND
5494d666683SShengzhou Liu #define CONFIG_SYS_FMAN_FW_ADDR		(3 * CONFIG_SYS_NAND_BLOCK_SIZE)
5504d666683SShengzhou Liu #define CONFIG_CORTINA_FW_ADDR		(4 * CONFIG_SYS_NAND_BLOCK_SIZE)
5518d67c368SShengzhou Liu #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE)
5528d67c368SShengzhou Liu /*
5538d67c368SShengzhou Liu  * Slave has no ucode locally, it can fetch this from remote. When implementing
5548d67c368SShengzhou Liu  * in two corenet boards, slave's ucode could be stored in master's memory
5558d67c368SShengzhou Liu  * space, the address can be mapped from slave TLB->slave LAW->
5568d67c368SShengzhou Liu  * slave SRIO or PCIE outbound window->master inbound window->
5578d67c368SShengzhou Liu  * master LAW->the ucode address in master's memory space.
5588d67c368SShengzhou Liu  */
5598d67c368SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_REMOTE
560ef531c73SShengzhou Liu #define CONFIG_SYS_CORTINA_FW_IN_REMOTE
561dcf1d774SZhao Qiang #define CONFIG_SYS_FMAN_FW_ADDR		0xFFE00000
5628d67c368SShengzhou Liu #define CONFIG_CORTINA_FW_ADDR		0xFFE10000
5638d67c368SShengzhou Liu #else
5648d67c368SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_IN_NOR
565ef531c73SShengzhou Liu #define CONFIG_SYS_CORTINA_FW_IN_NOR
566dcf1d774SZhao Qiang #define CONFIG_SYS_FMAN_FW_ADDR		0xEFF00000
5678d67c368SShengzhou Liu #define CONFIG_CORTINA_FW_ADDR		0xEFE00000
5688d67c368SShengzhou Liu #endif
5698d67c368SShengzhou Liu #define CONFIG_SYS_QE_FMAN_FW_LENGTH	0x10000
5708d67c368SShengzhou Liu #define CONFIG_SYS_FDT_PAD		(0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
5718d67c368SShengzhou Liu #endif /* CONFIG_NOBQFMAN */
5728d67c368SShengzhou Liu 
5738d67c368SShengzhou Liu #ifdef CONFIG_SYS_DPAA_FMAN
5748d67c368SShengzhou Liu #define CONFIG_FMAN_ENET
5758d67c368SShengzhou Liu #define CONFIG_PHY_CORTINA
5768d67c368SShengzhou Liu #define CONFIG_PHY_REALTEK
5778d67c368SShengzhou Liu #define CONFIG_CORTINA_FW_LENGTH	0x40000
5788d67c368SShengzhou Liu #define RGMII_PHY1_ADDR		0x01  /* RealTek RTL8211E */
5798d67c368SShengzhou Liu #define RGMII_PHY2_ADDR		0x02
5808d67c368SShengzhou Liu #define CORTINA_PHY_ADDR1	0x0c  /* Cortina CS4315 */
5818d67c368SShengzhou Liu #define CORTINA_PHY_ADDR2	0x0d
5828d67c368SShengzhou Liu #define FM1_10GEC3_PHY_ADDR	0x00  /* Aquantia AQ1202 10G Base-T */
5838d67c368SShengzhou Liu #define FM1_10GEC4_PHY_ADDR	0x01
5848d67c368SShengzhou Liu #endif
5858d67c368SShengzhou Liu 
5868d67c368SShengzhou Liu #ifdef CONFIG_FMAN_ENET
5878d67c368SShengzhou Liu #define CONFIG_ETHPRIME		"FM1@DTSEC3"
5888d67c368SShengzhou Liu #endif
5898d67c368SShengzhou Liu 
5908d67c368SShengzhou Liu /*
5918d67c368SShengzhou Liu  * SATA
5928d67c368SShengzhou Liu  */
5938d67c368SShengzhou Liu #ifdef CONFIG_FSL_SATA_V2
5948d67c368SShengzhou Liu #define CONFIG_SYS_SATA_MAX_DEVICE	2
5958d67c368SShengzhou Liu #define CONFIG_SATA1
5968d67c368SShengzhou Liu #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
5978d67c368SShengzhou Liu #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
5988d67c368SShengzhou Liu #define CONFIG_SATA2
5998d67c368SShengzhou Liu #define CONFIG_SYS_SATA2		CONFIG_SYS_MPC85xx_SATA2_ADDR
6008d67c368SShengzhou Liu #define CONFIG_SYS_SATA2_FLAGS		FLAGS_DMA
6018d67c368SShengzhou Liu #define CONFIG_LBA48
6028d67c368SShengzhou Liu #endif
6038d67c368SShengzhou Liu 
6048d67c368SShengzhou Liu /*
6058d67c368SShengzhou Liu  * USB
6068d67c368SShengzhou Liu  */
6078850c5d5STom Rini #ifdef CONFIG_USB_EHCI_HCD
6088d67c368SShengzhou Liu #define CONFIG_USB_EHCI_FSL
6098d67c368SShengzhou Liu #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
6108d67c368SShengzhou Liu #define CONFIG_HAS_FSL_DR_USB
6118d67c368SShengzhou Liu #endif
6128d67c368SShengzhou Liu 
6138d67c368SShengzhou Liu /*
6148d67c368SShengzhou Liu  * SDHC
6158d67c368SShengzhou Liu  */
6168d67c368SShengzhou Liu #ifdef CONFIG_MMC
6178d67c368SShengzhou Liu #define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC85xx_ESDHC_ADDR
6188d67c368SShengzhou Liu #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT
6198d67c368SShengzhou Liu #define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
6208d67c368SShengzhou Liu #endif
6218d67c368SShengzhou Liu 
6228d67c368SShengzhou Liu /*
6234feac1c6SShengzhou Liu  * Dynamic MTD Partition support with mtdparts
6244feac1c6SShengzhou Liu  */
6254feac1c6SShengzhou Liu 
6264feac1c6SShengzhou Liu /*
6278d67c368SShengzhou Liu  * Environment
6288d67c368SShengzhou Liu  */
6298d67c368SShengzhou Liu 
6308d67c368SShengzhou Liu /*
6318d67c368SShengzhou Liu  * Miscellaneous configurable options
6328d67c368SShengzhou Liu  */
6338d67c368SShengzhou Liu #define CONFIG_SYS_LOAD_ADDR	0x2000000 /* default load address */
6348d67c368SShengzhou Liu 
6358d67c368SShengzhou Liu /*
6368d67c368SShengzhou Liu  * For booting Linux, the board info and command line data
6378d67c368SShengzhou Liu  * have to be in the first 64 MB of memory, since this is
6388d67c368SShengzhou Liu  * the maximum mapped by the Linux kernel during initialization.
6398d67c368SShengzhou Liu  */
6408d67c368SShengzhou Liu #define CONFIG_SYS_BOOTMAPSZ	(64 << 20)	/* Initial map for Linux*/
6418d67c368SShengzhou Liu #define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
6428d67c368SShengzhou Liu 
6438d67c368SShengzhou Liu #ifdef CONFIG_CMD_KGDB
6448d67c368SShengzhou Liu #define CONFIG_KGDB_BAUDRATE	230400	/* speed to run kgdb serial port */
6458d67c368SShengzhou Liu #define CONFIG_KGDB_SER_INDEX	2	/* which serial port to use */
6468d67c368SShengzhou Liu #endif
6478d67c368SShengzhou Liu 
6488d67c368SShengzhou Liu /*
6498d67c368SShengzhou Liu  * Environment Configuration
6508d67c368SShengzhou Liu  */
6518d67c368SShengzhou Liu #define CONFIG_ROOTPATH	 "/opt/nfsroot"
6528d67c368SShengzhou Liu #define CONFIG_BOOTFILE	 "uImage"
6538d67c368SShengzhou Liu #define CONFIG_UBOOTPATH "u-boot.bin"	/* U-Boot image on TFTP server */
6548d67c368SShengzhou Liu 
6558d67c368SShengzhou Liu /* default location for tftp and bootm */
6568d67c368SShengzhou Liu #define CONFIG_LOADADDR		1000000
6578d67c368SShengzhou Liu #define __USB_PHY_TYPE		utmi
6588d67c368SShengzhou Liu 
6598d67c368SShengzhou Liu #define	CONFIG_EXTRA_ENV_SETTINGS				\
6608d67c368SShengzhou Liu 	"hwconfig=fsl_ddr:"					\
6618d67c368SShengzhou Liu 	"ctlr_intlv=" __stringify(CTRL_INTLV_PREFERED) ","	\
6628d67c368SShengzhou Liu 	"bank_intlv=auto;"					\
6638d67c368SShengzhou Liu 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
6648d67c368SShengzhou Liu 	"netdev=eth0\0"						\
6658d67c368SShengzhou Liu 	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
6668d67c368SShengzhou Liu 	"ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"	\
6678d67c368SShengzhou Liu 	"tftpflash=tftpboot $loadaddr $uboot && "		\
6688d67c368SShengzhou Liu 	"protect off $ubootaddr +$filesize && "			\
6698d67c368SShengzhou Liu 	"erase $ubootaddr +$filesize && "			\
6708d67c368SShengzhou Liu 	"cp.b $loadaddr $ubootaddr $filesize && "		\
6718d67c368SShengzhou Liu 	"protect on $ubootaddr +$filesize && "			\
6728d67c368SShengzhou Liu 	"cmp.b $loadaddr $ubootaddr $filesize\0"		\
6738d67c368SShengzhou Liu 	"consoledev=ttyS0\0"					\
6748d67c368SShengzhou Liu 	"ramdiskaddr=2000000\0"					\
6758d67c368SShengzhou Liu 	"ramdiskfile=t2080rdb/ramdisk.uboot\0"			\
676b24a4f62SScott Wood 	"fdtaddr=1e00000\0"					\
6778d67c368SShengzhou Liu 	"fdtfile=t2080rdb/t2080rdb.dtb\0"			\
6783246584dSKim Phillips 	"bdev=sda3\0"
6798d67c368SShengzhou Liu 
6808d67c368SShengzhou Liu /*
6818d67c368SShengzhou Liu  * For emulation this causes u-boot to jump to the start of the
6828d67c368SShengzhou Liu  * proof point app code automatically
6838d67c368SShengzhou Liu  */
6848d67c368SShengzhou Liu #define CONFIG_PROOF_POINTS				\
6858d67c368SShengzhou Liu 	"setenv bootargs root=/dev/$bdev rw "		\
6868d67c368SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
6878d67c368SShengzhou Liu 	"cpu 1 release 0x29000000 - - -;"		\
6888d67c368SShengzhou Liu 	"cpu 2 release 0x29000000 - - -;"		\
6898d67c368SShengzhou Liu 	"cpu 3 release 0x29000000 - - -;"		\
6908d67c368SShengzhou Liu 	"cpu 4 release 0x29000000 - - -;"		\
6918d67c368SShengzhou Liu 	"cpu 5 release 0x29000000 - - -;"		\
6928d67c368SShengzhou Liu 	"cpu 6 release 0x29000000 - - -;"		\
6938d67c368SShengzhou Liu 	"cpu 7 release 0x29000000 - - -;"		\
6948d67c368SShengzhou Liu 	"go 0x29000000"
6958d67c368SShengzhou Liu 
6968d67c368SShengzhou Liu #define CONFIG_HVBOOT				\
6978d67c368SShengzhou Liu 	"setenv bootargs config-addr=0x60000000; "	\
6988d67c368SShengzhou Liu 	"bootm 0x01000000 - 0x00f00000"
6998d67c368SShengzhou Liu 
7008d67c368SShengzhou Liu #define CONFIG_ALU				\
7018d67c368SShengzhou Liu 	"setenv bootargs root=/dev/$bdev rw "		\
7028d67c368SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
7038d67c368SShengzhou Liu 	"cpu 1 release 0x01000000 - - -;"		\
7048d67c368SShengzhou Liu 	"cpu 2 release 0x01000000 - - -;"		\
7058d67c368SShengzhou Liu 	"cpu 3 release 0x01000000 - - -;"		\
7068d67c368SShengzhou Liu 	"cpu 4 release 0x01000000 - - -;"		\
7078d67c368SShengzhou Liu 	"cpu 5 release 0x01000000 - - -;"		\
7088d67c368SShengzhou Liu 	"cpu 6 release 0x01000000 - - -;"		\
7098d67c368SShengzhou Liu 	"cpu 7 release 0x01000000 - - -;"		\
7108d67c368SShengzhou Liu 	"go 0x01000000"
7118d67c368SShengzhou Liu 
7128d67c368SShengzhou Liu #define CONFIG_LINUX				\
7138d67c368SShengzhou Liu 	"setenv bootargs root=/dev/ram rw "		\
7148d67c368SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
7158d67c368SShengzhou Liu 	"setenv ramdiskaddr 0x02000000;"		\
7168d67c368SShengzhou Liu 	"setenv fdtaddr 0x00c00000;"			\
7178d67c368SShengzhou Liu 	"setenv loadaddr 0x1000000;"			\
7188d67c368SShengzhou Liu 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
7198d67c368SShengzhou Liu 
7208d67c368SShengzhou Liu #define CONFIG_HDBOOT					\
7218d67c368SShengzhou Liu 	"setenv bootargs root=/dev/$bdev rw "		\
7228d67c368SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
7238d67c368SShengzhou Liu 	"tftp $loadaddr $bootfile;"			\
7248d67c368SShengzhou Liu 	"tftp $fdtaddr $fdtfile;"			\
7258d67c368SShengzhou Liu 	"bootm $loadaddr - $fdtaddr"
7268d67c368SShengzhou Liu 
7278d67c368SShengzhou Liu #define CONFIG_NFSBOOTCOMMAND			\
7288d67c368SShengzhou Liu 	"setenv bootargs root=/dev/nfs rw "	\
7298d67c368SShengzhou Liu 	"nfsroot=$serverip:$rootpath "		\
7308d67c368SShengzhou Liu 	"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
7318d67c368SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
7328d67c368SShengzhou Liu 	"tftp $loadaddr $bootfile;"		\
7338d67c368SShengzhou Liu 	"tftp $fdtaddr $fdtfile;"		\
7348d67c368SShengzhou Liu 	"bootm $loadaddr - $fdtaddr"
7358d67c368SShengzhou Liu 
7368d67c368SShengzhou Liu #define CONFIG_RAMBOOTCOMMAND				\
7378d67c368SShengzhou Liu 	"setenv bootargs root=/dev/ram rw "		\
7388d67c368SShengzhou Liu 	"console=$consoledev,$baudrate $othbootargs;"	\
7398d67c368SShengzhou Liu 	"tftp $ramdiskaddr $ramdiskfile;"		\
7408d67c368SShengzhou Liu 	"tftp $loadaddr $bootfile;"			\
7418d67c368SShengzhou Liu 	"tftp $fdtaddr $fdtfile;"			\
7428d67c368SShengzhou Liu 	"bootm $loadaddr $ramdiskaddr $fdtaddr"
7438d67c368SShengzhou Liu 
7448d67c368SShengzhou Liu #define CONFIG_BOOTCOMMAND		CONFIG_LINUX
7458d67c368SShengzhou Liu 
7468d67c368SShengzhou Liu #include <asm/fsl_secure_boot.h>
747ef6c55a2SAneesh Bansal 
7488d67c368SShengzhou Liu #endif	/* __T2080RDB_H */
749