Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
| 9 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 10 | #define CONFIG_LS102XA |
| 11 | |
Hongbo Zhang | aeb901f | 2016-07-21 18:09:38 +0800 | [diff] [blame] | 12 | #define CONFIG_ARMV7_PSCI_1_0 |
Wang Dongsheng | 340848b | 2015-06-04 12:01:09 +0800 | [diff] [blame] | 13 | |
Hongbo Zhang | 3288628 | 2016-07-21 18:09:39 +0800 | [diff] [blame] | 14 | #define CONFIG_ARMV7_SECURE_BASE OCRAM_BASE_S_ADDR |
| 15 | |
Gong Qianyu | 18fb0e3 | 2015-10-26 19:47:42 +0800 | [diff] [blame] | 16 | #define CONFIG_SYS_FSL_CLK |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 17 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 18 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 19 | #define CONFIG_BOARD_EARLY_INIT_F |
| 20 | |
tang yuantian | 41ba57d | 2014-12-17 12:58:05 +0800 | [diff] [blame] | 21 | #define CONFIG_DEEP_SLEEP |
tang yuantian | 41ba57d | 2014-12-17 12:58:05 +0800 | [diff] [blame] | 22 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 23 | /* |
| 24 | * Size of malloc() pool |
| 25 | */ |
| 26 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 16 * 1024 * 1024) |
| 27 | |
| 28 | #define CONFIG_SYS_INIT_RAM_ADDR OCRAM_BASE_ADDR |
| 29 | #define CONFIG_SYS_INIT_RAM_SIZE OCRAM_SIZE |
| 30 | |
| 31 | /* |
| 32 | * Generic Timer Definitions |
| 33 | */ |
| 34 | #define GENERIC_TIMER_CLK 12500000 |
| 35 | |
| 36 | #ifndef __ASSEMBLY__ |
| 37 | unsigned long get_board_sys_clk(void); |
| 38 | unsigned long get_board_ddr_clk(void); |
| 39 | #endif |
| 40 | |
Alison Wang | 7009702 | 2016-02-02 15:16:23 +0800 | [diff] [blame] | 41 | #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 42 | #define CONFIG_SYS_CLK_FREQ 100000000 |
| 43 | #define CONFIG_DDR_CLK_FREQ 100000000 |
| 44 | #define CONFIG_QIXIS_I2C_ACCESS |
| 45 | #else |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 46 | #define CONFIG_SYS_CLK_FREQ get_board_sys_clk() |
| 47 | #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk() |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 48 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 49 | |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 50 | #ifdef CONFIG_RAMBOOT_PBL |
| 51 | #define CONFIG_SYS_FSL_PBL_PBI board/freescale/ls1021aqds/ls102xa_pbi.cfg |
| 52 | #endif |
| 53 | |
| 54 | #ifdef CONFIG_SD_BOOT |
Alison Wang | 7009702 | 2016-02-02 15:16:23 +0800 | [diff] [blame] | 55 | #ifdef CONFIG_SD_BOOT_QSPI |
| 56 | #define CONFIG_SYS_FSL_PBL_RCW \ |
| 57 | board/freescale/ls1021aqds/ls102xa_rcw_sd_qspi.cfg |
| 58 | #else |
| 59 | #define CONFIG_SYS_FSL_PBL_RCW \ |
| 60 | board/freescale/ls1021aqds/ls102xa_rcw_sd_ifc.cfg |
| 61 | #endif |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 62 | #define CONFIG_SPL_FRAMEWORK |
| 63 | #define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot-spl.lds" |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 64 | |
| 65 | #define CONFIG_SPL_TEXT_BASE 0x10000000 |
| 66 | #define CONFIG_SPL_MAX_SIZE 0x1a000 |
| 67 | #define CONFIG_SPL_STACK 0x1001d000 |
| 68 | #define CONFIG_SPL_PAD_TO 0x1c000 |
| 69 | #define CONFIG_SYS_TEXT_BASE 0x82000000 |
| 70 | |
tang yuantian | 41ba57d | 2014-12-17 12:58:05 +0800 | [diff] [blame] | 71 | #define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_TEXT_BASE + \ |
| 72 | CONFIG_SYS_MONITOR_LEN) |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 73 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 |
| 74 | #define CONFIG_SPL_BSS_START_ADDR 0x80100000 |
| 75 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 |
Alison Wang | 7ee52af | 2015-10-30 22:45:38 +0800 | [diff] [blame] | 76 | #define CONFIG_SYS_MONITOR_LEN 0xc0000 |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 77 | #endif |
| 78 | |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 79 | #ifdef CONFIG_QSPI_BOOT |
| 80 | #define CONFIG_SYS_TEXT_BASE 0x40010000 |
Alison Wang | 7009702 | 2016-02-02 15:16:23 +0800 | [diff] [blame] | 81 | #endif |
| 82 | |
| 83 | #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 84 | #define CONFIG_SYS_NO_FLASH |
| 85 | #endif |
| 86 | |
Alison Wang | 8ab967b | 2014-12-09 17:38:14 +0800 | [diff] [blame] | 87 | #ifdef CONFIG_NAND_BOOT |
| 88 | #define CONFIG_SYS_FSL_PBL_RCW board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg |
| 89 | #define CONFIG_SPL_FRAMEWORK |
| 90 | #define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot-spl.lds" |
Alison Wang | 8ab967b | 2014-12-09 17:38:14 +0800 | [diff] [blame] | 91 | |
| 92 | #define CONFIG_SPL_TEXT_BASE 0x10000000 |
| 93 | #define CONFIG_SPL_MAX_SIZE 0x1a000 |
| 94 | #define CONFIG_SPL_STACK 0x1001d000 |
| 95 | #define CONFIG_SPL_PAD_TO 0x1c000 |
| 96 | #define CONFIG_SYS_TEXT_BASE 0x82000000 |
| 97 | |
| 98 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (400 << 10) |
| 99 | #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_PAD_TO |
| 100 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 |
| 101 | #define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE |
| 102 | #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE |
| 103 | |
| 104 | #define CONFIG_SYS_SPL_MALLOC_START 0x80200000 |
| 105 | #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 |
| 106 | #define CONFIG_SPL_BSS_START_ADDR 0x80100000 |
| 107 | #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 |
| 108 | #define CONFIG_SYS_MONITOR_LEN 0x80000 |
| 109 | #endif |
| 110 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 111 | #ifndef CONFIG_SYS_TEXT_BASE |
Alison Wang | 1c69a51 | 2015-04-21 16:04:38 +0800 | [diff] [blame] | 112 | #define CONFIG_SYS_TEXT_BASE 0x60100000 |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 113 | #endif |
| 114 | |
| 115 | #define CONFIG_NR_DRAM_BANKS 1 |
| 116 | |
| 117 | #define CONFIG_DDR_SPD |
| 118 | #define SPD_EEPROM_ADDRESS 0x51 |
| 119 | #define CONFIG_SYS_SPD_BUS_NUM 0 |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 120 | |
| 121 | #define CONFIG_FSL_DDR_INTERACTIVE /* Interactive debugging */ |
York Sun | c7eae7f | 2014-09-11 13:32:07 -0700 | [diff] [blame] | 122 | #ifndef CONFIG_SYS_FSL_DDR4 |
York Sun | c7eae7f | 2014-09-11 13:32:07 -0700 | [diff] [blame] | 123 | #define CONFIG_SYS_DDR_RAW_TIMING |
| 124 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 125 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
| 126 | #define CONFIG_CHIP_SELECTS_PER_CTRL 4 |
| 127 | |
| 128 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000UL |
| 129 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
| 130 | |
| 131 | #define CONFIG_DDR_ECC |
| 132 | #ifdef CONFIG_DDR_ECC |
| 133 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER |
| 134 | #define CONFIG_MEM_INIT_VALUE 0xdeadbeef |
| 135 | #endif |
| 136 | |
Ruchika Gupta | 4ba4a09 | 2014-10-15 11:39:06 +0530 | [diff] [blame] | 137 | #define CONFIG_FSL_CAAM /* Enable CAAM */ |
Zhao Qiang | 63e75fd | 2014-09-26 16:25:32 +0800 | [diff] [blame] | 138 | |
Alison Wang | 4c59ab9 | 2014-12-09 17:37:49 +0800 | [diff] [blame] | 139 | #if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \ |
| 140 | !defined(CONFIG_QSPI_BOOT) |
Zhao Qiang | 63e75fd | 2014-09-26 16:25:32 +0800 | [diff] [blame] | 141 | #define CONFIG_U_QE |
| 142 | #endif |
| 143 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 144 | /* |
| 145 | * IFC Definitions |
| 146 | */ |
Alison Wang | 7009702 | 2016-02-02 15:16:23 +0800 | [diff] [blame] | 147 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 148 | #define CONFIG_FSL_IFC |
| 149 | #define CONFIG_SYS_FLASH_BASE 0x60000000 |
| 150 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE |
| 151 | |
| 152 | #define CONFIG_SYS_NOR0_CSPR_EXT (0x0) |
| 153 | #define CONFIG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \ |
| 154 | CSPR_PORT_SIZE_16 | \ |
| 155 | CSPR_MSEL_NOR | \ |
| 156 | CSPR_V) |
| 157 | #define CONFIG_SYS_NOR1_CSPR_EXT (0x0) |
| 158 | #define CONFIG_SYS_NOR1_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS \ |
| 159 | + 0x8000000) | \ |
| 160 | CSPR_PORT_SIZE_16 | \ |
| 161 | CSPR_MSEL_NOR | \ |
| 162 | CSPR_V) |
| 163 | #define CONFIG_SYS_NOR_AMASK IFC_AMASK(128 * 1024 * 1024) |
| 164 | |
| 165 | #define CONFIG_SYS_NOR_CSOR (CSOR_NOR_ADM_SHIFT(4) | \ |
| 166 | CSOR_NOR_TRHZ_80) |
| 167 | #define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \ |
| 168 | FTIM0_NOR_TEADC(0x5) | \ |
| 169 | FTIM0_NOR_TEAHC(0x5)) |
| 170 | #define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \ |
| 171 | FTIM1_NOR_TRAD_NOR(0x1a) | \ |
| 172 | FTIM1_NOR_TSEQRAD_NOR(0x13)) |
| 173 | #define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x4) | \ |
| 174 | FTIM2_NOR_TCH(0x4) | \ |
| 175 | FTIM2_NOR_TWPH(0xe) | \ |
| 176 | FTIM2_NOR_TWP(0x1c)) |
| 177 | #define CONFIG_SYS_NOR_FTIM3 0 |
| 178 | |
| 179 | #define CONFIG_FLASH_CFI_DRIVER |
| 180 | #define CONFIG_SYS_FLASH_CFI |
| 181 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
| 182 | #define CONFIG_SYS_FLASH_QUIET_TEST |
| 183 | #define CONFIG_FLASH_SHOW_PROGRESS 45 |
| 184 | #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS |
Yuan Yao | 272c526 | 2014-10-17 15:26:34 +0800 | [diff] [blame] | 185 | #define CONFIG_SYS_WRITE_SWAPPED_DATA |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 186 | |
| 187 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
| 188 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ |
| 189 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
| 190 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
| 191 | |
| 192 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
| 193 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS, \ |
| 194 | CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000} |
| 195 | |
| 196 | /* |
| 197 | * NAND Flash Definitions |
| 198 | */ |
| 199 | #define CONFIG_NAND_FSL_IFC |
| 200 | |
| 201 | #define CONFIG_SYS_NAND_BASE 0x7e800000 |
| 202 | #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE |
| 203 | |
| 204 | #define CONFIG_SYS_NAND_CSPR_EXT (0x0) |
| 205 | |
| 206 | #define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \ |
| 207 | | CSPR_PORT_SIZE_8 \ |
| 208 | | CSPR_MSEL_NAND \ |
| 209 | | CSPR_V) |
| 210 | #define CONFIG_SYS_NAND_AMASK IFC_AMASK(64*1024) |
| 211 | #define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \ |
| 212 | | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \ |
| 213 | | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \ |
| 214 | | CSOR_NAND_RAL_3 /* RAL = 3 Bytes */ \ |
| 215 | | CSOR_NAND_PGS_2K /* Page Size = 2K */ \ |
| 216 | | CSOR_NAND_SPRZ_64 /* Spare size = 64 */ \ |
| 217 | | CSOR_NAND_PB(64)) /* 64 Pages Per Block */ |
| 218 | |
| 219 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
| 220 | |
| 221 | #define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x7) | \ |
| 222 | FTIM0_NAND_TWP(0x18) | \ |
| 223 | FTIM0_NAND_TWCHT(0x7) | \ |
| 224 | FTIM0_NAND_TWH(0xa)) |
| 225 | #define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \ |
| 226 | FTIM1_NAND_TWBE(0x39) | \ |
| 227 | FTIM1_NAND_TRR(0xe) | \ |
| 228 | FTIM1_NAND_TRP(0x18)) |
| 229 | #define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0xf) | \ |
| 230 | FTIM2_NAND_TREH(0xa) | \ |
| 231 | FTIM2_NAND_TWHRE(0x1e)) |
| 232 | #define CONFIG_SYS_NAND_FTIM3 0x0 |
| 233 | |
| 234 | #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE } |
| 235 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 236 | #define CONFIG_CMD_NAND |
| 237 | |
| 238 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 239 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 240 | |
| 241 | /* |
| 242 | * QIXIS Definitions |
| 243 | */ |
| 244 | #define CONFIG_FSL_QIXIS |
| 245 | |
| 246 | #ifdef CONFIG_FSL_QIXIS |
| 247 | #define QIXIS_BASE 0x7fb00000 |
| 248 | #define QIXIS_BASE_PHYS QIXIS_BASE |
| 249 | #define CONFIG_SYS_I2C_FPGA_ADDR 0x66 |
| 250 | #define QIXIS_LBMAP_SWITCH 6 |
| 251 | #define QIXIS_LBMAP_MASK 0x0f |
| 252 | #define QIXIS_LBMAP_SHIFT 0 |
| 253 | #define QIXIS_LBMAP_DFLTBANK 0x00 |
| 254 | #define QIXIS_LBMAP_ALTBANK 0x04 |
Hongbo Zhang | aeb901f | 2016-07-21 18:09:38 +0800 | [diff] [blame] | 255 | #define QIXIS_PWR_CTL 0x21 |
| 256 | #define QIXIS_PWR_CTL_POWEROFF 0x80 |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 257 | #define QIXIS_RST_CTL_RESET 0x44 |
| 258 | #define QIXIS_RCFG_CTL_RECONFIG_IDLE 0x20 |
| 259 | #define QIXIS_RCFG_CTL_RECONFIG_START 0x21 |
| 260 | #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08 |
Hongbo Zhang | 349cfc9 | 2016-08-19 17:20:31 +0800 | [diff] [blame] | 261 | #define QIXIS_CTL_SYS 0x5 |
| 262 | #define QIXIS_CTL_SYS_EVTSW_MASK 0x0c |
| 263 | #define QIXIS_CTL_SYS_EVTSW_IRQ 0x04 |
| 264 | #define QIXIS_RST_FORCE_3 0x45 |
| 265 | #define QIXIS_RST_FORCE_3_PCIESLOT1 0x80 |
| 266 | #define QIXIS_PWR_CTL2 0x21 |
| 267 | #define QIXIS_PWR_CTL2_PCTL 0x2 |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 268 | |
| 269 | #define CONFIG_SYS_FPGA_CSPR_EXT (0x0) |
| 270 | #define CONFIG_SYS_FPGA_CSPR (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) | \ |
| 271 | CSPR_PORT_SIZE_8 | \ |
| 272 | CSPR_MSEL_GPCM | \ |
| 273 | CSPR_V) |
| 274 | #define CONFIG_SYS_FPGA_AMASK IFC_AMASK(64 * 1024) |
| 275 | #define CONFIG_SYS_FPGA_CSOR (CSOR_NOR_ADM_SHIFT(4) | \ |
| 276 | CSOR_NOR_NOR_MODE_AVD_NOR | \ |
| 277 | CSOR_NOR_TRHZ_80) |
| 278 | |
| 279 | /* |
| 280 | * QIXIS Timing parameters for IFC GPCM |
| 281 | */ |
| 282 | #define CONFIG_SYS_FPGA_FTIM0 (FTIM0_GPCM_TACSE(0xe) | \ |
| 283 | FTIM0_GPCM_TEADC(0xe) | \ |
| 284 | FTIM0_GPCM_TEAHC(0xe)) |
| 285 | #define CONFIG_SYS_FPGA_FTIM1 (FTIM1_GPCM_TACO(0xe) | \ |
| 286 | FTIM1_GPCM_TRAD(0x1f)) |
| 287 | #define CONFIG_SYS_FPGA_FTIM2 (FTIM2_GPCM_TCS(0xe) | \ |
| 288 | FTIM2_GPCM_TCH(0xe) | \ |
| 289 | FTIM2_GPCM_TWP(0xf0)) |
| 290 | #define CONFIG_SYS_FPGA_FTIM3 0x0 |
| 291 | #endif |
| 292 | |
Alison Wang | 8ab967b | 2014-12-09 17:38:14 +0800 | [diff] [blame] | 293 | #if defined(CONFIG_NAND_BOOT) |
| 294 | #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT |
| 295 | #define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR |
| 296 | #define CONFIG_SYS_AMASK0 CONFIG_SYS_NAND_AMASK |
| 297 | #define CONFIG_SYS_CSOR0 CONFIG_SYS_NAND_CSOR |
| 298 | #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NAND_FTIM0 |
| 299 | #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1 |
| 300 | #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2 |
| 301 | #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3 |
| 302 | #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT |
| 303 | #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_CSPR |
| 304 | #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK |
| 305 | #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR |
| 306 | #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 307 | #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 308 | #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 309 | #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 310 | #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NOR1_CSPR_EXT |
| 311 | #define CONFIG_SYS_CSPR2 CONFIG_SYS_NOR1_CSPR |
| 312 | #define CONFIG_SYS_AMASK2 CONFIG_SYS_NOR_AMASK |
| 313 | #define CONFIG_SYS_CSOR2 CONFIG_SYS_NOR_CSOR |
| 314 | #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 315 | #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 316 | #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 317 | #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 318 | #define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT |
| 319 | #define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR |
| 320 | #define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK |
| 321 | #define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR |
| 322 | #define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0 |
| 323 | #define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1 |
| 324 | #define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2 |
| 325 | #define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3 |
| 326 | #else |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 327 | #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT |
| 328 | #define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR |
| 329 | #define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK |
| 330 | #define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR |
| 331 | #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 332 | #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 333 | #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 334 | #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 335 | #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT |
| 336 | #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR |
| 337 | #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK |
| 338 | #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR |
| 339 | #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 340 | #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 341 | #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 342 | #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 343 | #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT |
| 344 | #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR |
| 345 | #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK |
| 346 | #define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR |
| 347 | #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0 |
| 348 | #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1 |
| 349 | #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2 |
| 350 | #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3 |
| 351 | #define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT |
| 352 | #define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR |
| 353 | #define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK |
| 354 | #define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR |
| 355 | #define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0 |
| 356 | #define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1 |
| 357 | #define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2 |
| 358 | #define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3 |
Alison Wang | 8ab967b | 2014-12-09 17:38:14 +0800 | [diff] [blame] | 359 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 360 | |
| 361 | /* |
| 362 | * Serial Port |
| 363 | */ |
Alison Wang | 8fc2121 | 2015-01-04 15:30:58 +0800 | [diff] [blame] | 364 | #ifdef CONFIG_LPUART |
Alison Wang | 8fc2121 | 2015-01-04 15:30:58 +0800 | [diff] [blame] | 365 | #define CONFIG_LPUART_32B_REG |
| 366 | #else |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 367 | #define CONFIG_CONS_INDEX 1 |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 368 | #define CONFIG_SYS_NS16550_SERIAL |
York Sun | d83b47b | 2016-02-08 13:04:17 -0800 | [diff] [blame] | 369 | #ifndef CONFIG_DM_SERIAL |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 370 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
York Sun | d83b47b | 2016-02-08 13:04:17 -0800 | [diff] [blame] | 371 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 372 | #define CONFIG_SYS_NS16550_CLK get_serial_clock() |
Alison Wang | 8fc2121 | 2015-01-04 15:30:58 +0800 | [diff] [blame] | 373 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 374 | |
| 375 | #define CONFIG_BAUDRATE 115200 |
| 376 | |
| 377 | /* |
| 378 | * I2C |
| 379 | */ |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 380 | #define CONFIG_SYS_I2C |
| 381 | #define CONFIG_SYS_I2C_MXC |
Albert ARIBAUD \\(3ADEV\\) | 03544c6 | 2015-09-21 22:43:38 +0200 | [diff] [blame] | 382 | #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ |
| 383 | #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ |
York Sun | f8cb101 | 2015-03-20 10:20:40 -0700 | [diff] [blame] | 384 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 385 | |
| 386 | /* |
| 387 | * I2C bus multiplexer |
| 388 | */ |
| 389 | #define I2C_MUX_PCA_ADDR_PRI 0x77 |
| 390 | #define I2C_MUX_CH_DEFAULT 0x8 |
Xiubo Li | dd04832 | 2014-12-16 14:50:33 +0800 | [diff] [blame] | 391 | #define I2C_MUX_CH_CH7301 0xC |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 392 | |
| 393 | /* |
| 394 | * MMC |
| 395 | */ |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 396 | #define CONFIG_FSL_ESDHC |
| 397 | #define CONFIG_GENERIC_MMC |
| 398 | |
Alison Wang | 8251ed2 | 2014-12-09 17:37:34 +0800 | [diff] [blame] | 399 | #define CONFIG_DOS_PARTITION |
| 400 | |
Haikun Wang | e5493d4 | 2015-06-29 13:08:46 +0530 | [diff] [blame] | 401 | /* SPI */ |
Alison Wang | 7009702 | 2016-02-02 15:16:23 +0800 | [diff] [blame] | 402 | #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) |
Haikun Wang | e5493d4 | 2015-06-29 13:08:46 +0530 | [diff] [blame] | 403 | /* QSPI */ |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 404 | #define QSPI0_AMBA_BASE 0x40000000 |
| 405 | #define FSL_QSPI_FLASH_SIZE (1 << 24) |
| 406 | #define FSL_QSPI_FLASH_NUM 2 |
Haikun Wang | e5493d4 | 2015-06-29 13:08:46 +0530 | [diff] [blame] | 407 | |
| 408 | /* DSPI */ |
Haikun Wang | e5493d4 | 2015-06-29 13:08:46 +0530 | [diff] [blame] | 409 | |
| 410 | /* DM SPI */ |
| 411 | #if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI) |
Haikun Wang | e5493d4 | 2015-06-29 13:08:46 +0530 | [diff] [blame] | 412 | #define CONFIG_DM_SPI_FLASH |
Jagan Teki | 6812484 | 2015-06-27 22:04:55 +0530 | [diff] [blame] | 413 | #define CONFIG_SPI_FLASH_DATAFLASH |
Haikun Wang | e5493d4 | 2015-06-29 13:08:46 +0530 | [diff] [blame] | 414 | #endif |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 415 | #endif |
| 416 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 417 | /* |
Nikhil Badola | 8776cb2 | 2014-10-17 11:37:25 +0530 | [diff] [blame] | 418 | * USB |
| 419 | */ |
Ramneek Mehresh | 081a1b7 | 2015-05-29 14:47:22 +0530 | [diff] [blame] | 420 | /* EHCI Support - disbaled by default */ |
| 421 | /*#define CONFIG_HAS_FSL_DR_USB*/ |
Nikhil Badola | 8776cb2 | 2014-10-17 11:37:25 +0530 | [diff] [blame] | 422 | |
| 423 | #ifdef CONFIG_HAS_FSL_DR_USB |
| 424 | #define CONFIG_USB_EHCI |
Nikhil Badola | 8776cb2 | 2014-10-17 11:37:25 +0530 | [diff] [blame] | 425 | #define CONFIG_USB_EHCI_FSL |
| 426 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
Nikhil Badola | 8776cb2 | 2014-10-17 11:37:25 +0530 | [diff] [blame] | 427 | #endif |
Ramneek Mehresh | 081a1b7 | 2015-05-29 14:47:22 +0530 | [diff] [blame] | 428 | |
| 429 | /*XHCI Support - enabled by default*/ |
| 430 | #define CONFIG_HAS_FSL_XHCI_USB |
| 431 | |
| 432 | #ifdef CONFIG_HAS_FSL_XHCI_USB |
| 433 | #define CONFIG_USB_XHCI_FSL |
Ramneek Mehresh | 081a1b7 | 2015-05-29 14:47:22 +0530 | [diff] [blame] | 434 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 |
| 435 | #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 |
| 436 | #endif |
| 437 | |
Nikhil Badola | 8776cb2 | 2014-10-17 11:37:25 +0530 | [diff] [blame] | 438 | /* |
Xiubo Li | dd04832 | 2014-12-16 14:50:33 +0800 | [diff] [blame] | 439 | * Video |
| 440 | */ |
| 441 | #define CONFIG_FSL_DCU_FB |
| 442 | |
| 443 | #ifdef CONFIG_FSL_DCU_FB |
Xiubo Li | dd04832 | 2014-12-16 14:50:33 +0800 | [diff] [blame] | 444 | #define CONFIG_CMD_BMP |
Xiubo Li | dd04832 | 2014-12-16 14:50:33 +0800 | [diff] [blame] | 445 | #define CONFIG_VIDEO_LOGO |
| 446 | #define CONFIG_VIDEO_BMP_LOGO |
| 447 | |
| 448 | #define CONFIG_FSL_DIU_CH7301 |
| 449 | #define CONFIG_SYS_I2C_DVI_BUS_NUM 0 |
| 450 | #define CONFIG_SYS_I2C_QIXIS_ADDR 0x66 |
| 451 | #define CONFIG_SYS_I2C_DVI_ADDR 0x75 |
| 452 | #endif |
| 453 | |
| 454 | /* |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 455 | * eTSEC |
| 456 | */ |
| 457 | #define CONFIG_TSEC_ENET |
| 458 | |
| 459 | #ifdef CONFIG_TSEC_ENET |
| 460 | #define CONFIG_MII |
| 461 | #define CONFIG_MII_DEFAULT_TSEC 3 |
| 462 | #define CONFIG_TSEC1 1 |
| 463 | #define CONFIG_TSEC1_NAME "eTSEC1" |
| 464 | #define CONFIG_TSEC2 1 |
| 465 | #define CONFIG_TSEC2_NAME "eTSEC2" |
| 466 | #define CONFIG_TSEC3 1 |
| 467 | #define CONFIG_TSEC3_NAME "eTSEC3" |
| 468 | |
| 469 | #define TSEC1_PHY_ADDR 1 |
| 470 | #define TSEC2_PHY_ADDR 2 |
| 471 | #define TSEC3_PHY_ADDR 3 |
| 472 | |
| 473 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
| 474 | #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
| 475 | #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
| 476 | |
| 477 | #define TSEC1_PHYIDX 0 |
| 478 | #define TSEC2_PHYIDX 0 |
| 479 | #define TSEC3_PHYIDX 0 |
| 480 | |
| 481 | #define CONFIG_ETHPRIME "eTSEC1" |
| 482 | |
| 483 | #define CONFIG_PHY_GIGE |
| 484 | #define CONFIG_PHYLIB |
| 485 | #define CONFIG_PHY_REALTEK |
| 486 | |
| 487 | #define CONFIG_HAS_ETH0 |
| 488 | #define CONFIG_HAS_ETH1 |
| 489 | #define CONFIG_HAS_ETH2 |
| 490 | |
| 491 | #define CONFIG_FSL_SGMII_RISER 1 |
| 492 | #define SGMII_RISER_PHY_OFFSET 0x1b |
| 493 | |
| 494 | #ifdef CONFIG_FSL_SGMII_RISER |
| 495 | #define CONFIG_SYS_TBIPA_VALUE 8 |
| 496 | #endif |
| 497 | |
| 498 | #endif |
Minghuan Lian | da41902 | 2014-10-31 13:43:44 +0800 | [diff] [blame] | 499 | |
| 500 | /* PCIe */ |
Robert P. J. Day | b38eaec | 2016-05-03 19:52:49 -0400 | [diff] [blame] | 501 | #define CONFIG_PCIE1 /* PCIE controller 1 */ |
| 502 | #define CONFIG_PCIE2 /* PCIE controller 2 */ |
Minghuan Lian | da41902 | 2014-10-31 13:43:44 +0800 | [diff] [blame] | 503 | #define CONFIG_PCIE_LAYERSCAPE /* Use common FSL Layerscape PCIe code */ |
| 504 | #define FSL_PCIE_COMPAT "fsl,ls1021a-pcie" |
| 505 | |
Minghuan Lian | 180b868 | 2015-01-21 17:29:19 +0800 | [diff] [blame] | 506 | #define CONFIG_SYS_PCI_64BIT |
| 507 | |
| 508 | #define CONFIG_SYS_PCIE_CFG0_PHYS_OFF 0x00000000 |
| 509 | #define CONFIG_SYS_PCIE_CFG0_SIZE 0x00001000 /* 4k */ |
| 510 | #define CONFIG_SYS_PCIE_CFG1_PHYS_OFF 0x00001000 |
| 511 | #define CONFIG_SYS_PCIE_CFG1_SIZE 0x00001000 /* 4k */ |
| 512 | |
| 513 | #define CONFIG_SYS_PCIE_IO_BUS 0x00000000 |
| 514 | #define CONFIG_SYS_PCIE_IO_PHYS_OFF 0x00010000 |
| 515 | #define CONFIG_SYS_PCIE_IO_SIZE 0x00010000 /* 64k */ |
| 516 | |
| 517 | #define CONFIG_SYS_PCIE_MEM_BUS 0x08000000 |
| 518 | #define CONFIG_SYS_PCIE_MEM_PHYS_OFF 0x04000000 |
| 519 | #define CONFIG_SYS_PCIE_MEM_SIZE 0x08000000 /* 128M */ |
| 520 | |
| 521 | #ifdef CONFIG_PCI |
Minghuan Lian | 180b868 | 2015-01-21 17:29:19 +0800 | [diff] [blame] | 522 | #define CONFIG_PCI_SCAN_SHOW |
| 523 | #define CONFIG_CMD_PCI |
Minghuan Lian | 180b868 | 2015-01-21 17:29:19 +0800 | [diff] [blame] | 524 | #endif |
| 525 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 526 | #define CONFIG_CMDLINE_TAG |
| 527 | #define CONFIG_CMDLINE_EDITING |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 528 | |
Xiubo Li | 1a2826f | 2014-11-21 17:40:57 +0800 | [diff] [blame] | 529 | #define CONFIG_PEN_ADDR_BIG_ENDIAN |
Mingkai Hu | 435acd8 | 2015-10-26 19:47:41 +0800 | [diff] [blame] | 530 | #define CONFIG_LAYERSCAPE_NS_ACCESS |
Xiubo Li | 1a2826f | 2014-11-21 17:40:57 +0800 | [diff] [blame] | 531 | #define CONFIG_SMP_PEN_ADDR 0x01ee0200 |
| 532 | #define CONFIG_TIMER_CLK_FREQ 12500000 |
Xiubo Li | 1a2826f | 2014-11-21 17:40:57 +0800 | [diff] [blame] | 533 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 534 | #define CONFIG_HWCONFIG |
Zhuoyu Zhang | 03c2244 | 2015-08-17 18:55:12 +0800 | [diff] [blame] | 535 | #define HWCONFIG_BUFFER_SIZE 256 |
| 536 | |
| 537 | #define CONFIG_FSL_DEVICE_DISABLE |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 538 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 539 | |
Zhao Qiang | 713bf94 | 2015-09-16 16:20:42 +0800 | [diff] [blame] | 540 | #define CONFIG_SYS_QE_FW_ADDR 0x600c0000 |
Zhao Qiang | 63e75fd | 2014-09-26 16:25:32 +0800 | [diff] [blame] | 541 | |
Alison Wang | 8fc2121 | 2015-01-04 15:30:58 +0800 | [diff] [blame] | 542 | #ifdef CONFIG_LPUART |
| 543 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 544 | "bootargs=root=/dev/ram0 rw console=ttyLP0,115200\0" \ |
Alison Wang | 99fe454 | 2015-11-05 11:16:26 +0800 | [diff] [blame] | 545 | "fdt_high=0xffffffff\0" \ |
| 546 | "initrd_high=0xffffffff\0" \ |
Alison Wang | 8fc2121 | 2015-01-04 15:30:58 +0800 | [diff] [blame] | 547 | "hwconfig=fsl_ddr:ctlr_intlv=null,bank_intlv=null\0" |
| 548 | #else |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 549 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 550 | "bootargs=root=/dev/ram0 rw console=ttyS0,115200\0" \ |
Alison Wang | 99fe454 | 2015-11-05 11:16:26 +0800 | [diff] [blame] | 551 | "fdt_high=0xffffffff\0" \ |
| 552 | "initrd_high=0xffffffff\0" \ |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 553 | "hwconfig=fsl_ddr:ctlr_intlv=null,bank_intlv=null\0" |
Alison Wang | 8fc2121 | 2015-01-04 15:30:58 +0800 | [diff] [blame] | 554 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 555 | |
| 556 | /* |
| 557 | * Miscellaneous configurable options |
| 558 | */ |
| 559 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 560 | #define CONFIG_AUTO_COMPLETE |
| 561 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 562 | #define CONFIG_SYS_PBSIZE \ |
| 563 | (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 564 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 565 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 566 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 567 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 568 | #define CONFIG_SYS_MEMTEST_END 0x9fffffff |
| 569 | |
| 570 | #define CONFIG_SYS_LOAD_ADDR 0x82000000 |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 571 | |
Xiubo Li | 660673a | 2014-11-21 17:40:59 +0800 | [diff] [blame] | 572 | #define CONFIG_LS102XA_STREAM_ID |
| 573 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 574 | /* |
| 575 | * Stack sizes |
| 576 | * The stack sizes are set up in start.S using the settings below |
| 577 | */ |
| 578 | #define CONFIG_STACKSIZE (30 * 1024) |
| 579 | |
| 580 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 581 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 582 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 583 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 584 | |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 585 | #ifdef CONFIG_SPL_BUILD |
| 586 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE |
| 587 | #else |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 588 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 589 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 590 | |
| 591 | /* |
| 592 | * Environment |
| 593 | */ |
| 594 | #define CONFIG_ENV_OVERWRITE |
| 595 | |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 596 | #if defined(CONFIG_SD_BOOT) |
| 597 | #define CONFIG_ENV_OFFSET 0x100000 |
| 598 | #define CONFIG_ENV_IS_IN_MMC |
| 599 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 600 | #define CONFIG_ENV_SIZE 0x2000 |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 601 | #elif defined(CONFIG_QSPI_BOOT) |
| 602 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 603 | #define CONFIG_ENV_SIZE 0x2000 /* 8KB */ |
| 604 | #define CONFIG_ENV_OFFSET 0x100000 /* 1MB */ |
| 605 | #define CONFIG_ENV_SECT_SIZE 0x10000 |
Alison Wang | 8ab967b | 2014-12-09 17:38:14 +0800 | [diff] [blame] | 606 | #elif defined(CONFIG_NAND_BOOT) |
| 607 | #define CONFIG_ENV_IS_IN_NAND |
| 608 | #define CONFIG_ENV_SIZE 0x2000 |
| 609 | #define CONFIG_ENV_OFFSET (10 * CONFIG_SYS_NAND_BLOCK_SIZE) |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 610 | #else |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 611 | #define CONFIG_ENV_IS_IN_FLASH |
| 612 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) |
| 613 | #define CONFIG_ENV_SIZE 0x2000 |
| 614 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ |
Alison Wang | 86949c2 | 2014-12-03 15:00:47 +0800 | [diff] [blame] | 615 | #endif |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 616 | |
Ruchika Gupta | 4ba4a09 | 2014-10-15 11:39:06 +0530 | [diff] [blame] | 617 | #define CONFIG_MISC_INIT_R |
| 618 | |
| 619 | /* Hash command with SHA acceleration supported in hardware */ |
Aneesh Bansal | ef6c55a | 2016-01-22 16:37:22 +0530 | [diff] [blame] | 620 | #ifdef CONFIG_FSL_CAAM |
Ruchika Gupta | 4ba4a09 | 2014-10-15 11:39:06 +0530 | [diff] [blame] | 621 | #define CONFIG_CMD_HASH |
| 622 | #define CONFIG_SHA_HW_ACCEL |
Aneesh Bansal | ef6c55a | 2016-01-22 16:37:22 +0530 | [diff] [blame] | 623 | #endif |
| 624 | |
| 625 | #include <asm/fsl_secure_boot.h> |
Alison Wang | cc7b8b9 | 2016-01-15 15:29:32 +0800 | [diff] [blame] | 626 | #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ |
Ruchika Gupta | 4ba4a09 | 2014-10-15 11:39:06 +0530 | [diff] [blame] | 627 | |
Wang Huan | 550e3dc | 2014-09-05 13:52:44 +0800 | [diff] [blame] | 628 | #endif |