1 /* 2 * Copyright 2011-2012 Freescale Semiconductor, Inc. 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 /* 8 * T4240 QDS board configuration file 9 */ 10 #ifndef __CONFIG_H 11 #define __CONFIG_H 12 13 #define CONFIG_FSL_SATA_V2 14 #define CONFIG_PCIE4 15 16 #define CONFIG_ICS307_REFCLK_HZ 25000000 /* ICS307 ref clk freq */ 17 18 #ifdef CONFIG_RAMBOOT_PBL 19 #define CONFIG_SYS_FSL_PBL_PBI board/freescale/t4qds/t4_pbi.cfg 20 #if !defined(CONFIG_NAND) && !defined(CONFIG_SDCARD) 21 #define CONFIG_RAMBOOT_TEXT_BASE CONFIG_SYS_TEXT_BASE 22 #define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc 23 #else 24 #define CONFIG_SPL_FLUSH_IMAGE 25 #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" 26 #define CONFIG_SYS_TEXT_BASE 0x00201000 27 #define CONFIG_SPL_TEXT_BASE 0xFFFD8000 28 #define CONFIG_SPL_PAD_TO 0x40000 29 #define CONFIG_SPL_MAX_SIZE 0x28000 30 #define RESET_VECTOR_OFFSET 0x27FFC 31 #define BOOT_PAGE_OFFSET 0x27000 32 33 #ifdef CONFIG_NAND 34 #define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10) 35 #define CONFIG_SYS_NAND_U_BOOT_DST 0x00200000 36 #define CONFIG_SYS_NAND_U_BOOT_START 0x00200000 37 #define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) 38 #define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds" 39 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t4qds/t4_nand_rcw.cfg 40 #define CONFIG_SPL_NAND_BOOT 41 #endif 42 43 #ifdef CONFIG_SDCARD 44 #define CONFIG_RESET_VECTOR_ADDRESS 0x200FFC 45 #define CONFIG_SPL_MMC_MINIMAL 46 #define CONFIG_SYS_MMC_U_BOOT_SIZE (768 << 10) 47 #define CONFIG_SYS_MMC_U_BOOT_DST 0x00200000 48 #define CONFIG_SYS_MMC_U_BOOT_START 0x00200000 49 #define CONFIG_SYS_MMC_U_BOOT_OFFS (260 << 10) 50 #ifndef CONFIG_SPL_BUILD 51 #define CONFIG_SYS_MPC85XX_NO_RESETVEC 52 #endif 53 #define CONFIG_SYS_LDSCRIPT "arch/powerpc/cpu/mpc85xx/u-boot.lds" 54 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t4qds/t4_sd_rcw.cfg 55 #define CONFIG_SPL_MMC_BOOT 56 #endif 57 58 #ifdef CONFIG_SPL_BUILD 59 #define CONFIG_SPL_SKIP_RELOCATE 60 #define CONFIG_SPL_COMMON_INIT_DDR 61 #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE 62 #endif 63 64 #endif 65 #endif /* CONFIG_RAMBOOT_PBL */ 66 67 #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE 68 /* Set 1M boot space */ 69 #define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR (CONFIG_SYS_TEXT_BASE & 0xfff00000) 70 #define CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR_PHYS \ 71 (0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_SLAVE_ADDR) 72 #define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc 73 #endif 74 75 #define CONFIG_SRIO_PCIE_BOOT_MASTER 76 #define CONFIG_DDR_ECC 77 78 #include "t4qds.h" 79 80 #ifndef CONFIG_MTD_NOR_FLASH 81 #else 82 #define CONFIG_FLASH_CFI_DRIVER 83 #define CONFIG_SYS_FLASH_CFI 84 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 85 #endif 86 87 #if defined(CONFIG_SPIFLASH) 88 #define CONFIG_SYS_EXTRA_ENV_RELOC 89 #define CONFIG_ENV_SPI_BUS 0 90 #define CONFIG_ENV_SPI_CS 0 91 #define CONFIG_ENV_SPI_MAX_HZ 10000000 92 #define CONFIG_ENV_SPI_MODE 0 93 #define CONFIG_ENV_SIZE 0x2000 /* 8KB */ 94 #define CONFIG_ENV_OFFSET 0x100000 /* 1MB */ 95 #define CONFIG_ENV_SECT_SIZE 0x10000 96 #elif defined(CONFIG_SDCARD) 97 #define CONFIG_SYS_EXTRA_ENV_RELOC 98 #define CONFIG_SYS_MMC_ENV_DEV 0 99 #define CONFIG_ENV_SIZE 0x2000 100 #define CONFIG_ENV_OFFSET (512 * 0x800) 101 #elif defined(CONFIG_NAND) 102 #define CONFIG_SYS_EXTRA_ENV_RELOC 103 #define CONFIG_ENV_SIZE 0x2000 104 #define CONFIG_ENV_OFFSET (10 * CONFIG_SYS_NAND_BLOCK_SIZE) 105 #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) 106 #define CONFIG_ENV_ADDR 0xffe20000 107 #define CONFIG_ENV_SIZE 0x2000 108 #elif defined(CONFIG_ENV_IS_NOWHERE) 109 #define CONFIG_ENV_SIZE 0x2000 110 #else 111 #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) 112 #define CONFIG_ENV_SIZE 0x2000 113 #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ 114 #endif 115 116 #define CONFIG_SYS_CLK_FREQ get_board_sys_clk() 117 #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk() 118 119 #ifndef __ASSEMBLY__ 120 unsigned long get_board_sys_clk(void); 121 unsigned long get_board_ddr_clk(void); 122 #endif 123 124 /* EEPROM */ 125 #define CONFIG_ID_EEPROM 126 #define CONFIG_SYS_I2C_EEPROM_NXID 127 #define CONFIG_SYS_EEPROM_BUS_NUM 0 128 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 129 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 130 131 /* 132 * DDR Setup 133 */ 134 #define CONFIG_SYS_SPD_BUS_NUM 0 135 #define SPD_EEPROM_ADDRESS1 0x51 136 #define SPD_EEPROM_ADDRESS2 0x52 137 #define SPD_EEPROM_ADDRESS3 0x53 138 #define SPD_EEPROM_ADDRESS4 0x54 139 #define SPD_EEPROM_ADDRESS5 0x55 140 #define SPD_EEPROM_ADDRESS6 0x56 141 #define SPD_EEPROM_ADDRESS SPD_EEPROM_ADDRESS1 /* for p3041/p5010 */ 142 #define CONFIG_SYS_SDRAM_SIZE 4096 /* for fixed parameter use */ 143 144 /* 145 * IFC Definitions 146 */ 147 #define CONFIG_SYS_NOR0_CSPR_EXT (0xf) 148 #define CONFIG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS \ 149 + 0x8000000) | \ 150 CSPR_PORT_SIZE_16 | \ 151 CSPR_MSEL_NOR | \ 152 CSPR_V) 153 #define CONFIG_SYS_NOR1_CSPR_EXT (0xf) 154 #define CONFIG_SYS_NOR1_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \ 155 CSPR_PORT_SIZE_16 | \ 156 CSPR_MSEL_NOR | \ 157 CSPR_V) 158 #define CONFIG_SYS_NOR_AMASK IFC_AMASK(128*1024*1024) 159 /* NOR Flash Timing Params */ 160 #define CONFIG_SYS_NOR_CSOR CSOR_NAND_TRHZ_80 161 162 #define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \ 163 FTIM0_NOR_TEADC(0x5) | \ 164 FTIM0_NOR_TEAHC(0x5)) 165 #define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \ 166 FTIM1_NOR_TRAD_NOR(0x1A) |\ 167 FTIM1_NOR_TSEQRAD_NOR(0x13)) 168 #define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x4) | \ 169 FTIM2_NOR_TCH(0x4) | \ 170 FTIM2_NOR_TWPH(0x0E) | \ 171 FTIM2_NOR_TWP(0x1c)) 172 #define CONFIG_SYS_NOR_FTIM3 0x0 173 174 #define CONFIG_SYS_FLASH_QUIET_TEST 175 #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ 176 177 #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ 178 #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ 179 #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ 180 #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ 181 182 #define CONFIG_SYS_FLASH_EMPTY_INFO 183 #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS \ 184 + 0x8000000, CONFIG_SYS_FLASH_BASE_PHYS} 185 186 #define CONFIG_FSL_QIXIS /* use common QIXIS code */ 187 #define QIXIS_BASE 0xffdf0000 188 #define QIXIS_LBMAP_SWITCH 6 189 #define QIXIS_LBMAP_MASK 0x0f 190 #define QIXIS_LBMAP_SHIFT 0 191 #define QIXIS_LBMAP_DFLTBANK 0x00 192 #define QIXIS_LBMAP_ALTBANK 0x04 193 #define QIXIS_RST_CTL_RESET 0x83 194 #define QIXIS_RST_FORCE_MEM 0x1 195 #define QIXIS_RCFG_CTL_RECONFIG_IDLE 0x20 196 #define QIXIS_RCFG_CTL_RECONFIG_START 0x21 197 #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08 198 #define QIXIS_BRDCFG5 0x55 199 #define QIXIS_MUX_SDHC 2 200 #define QIXIS_MUX_SDHC_WIDTH8 1 201 #define QIXIS_BASE_PHYS (0xf00000000ull | QIXIS_BASE) 202 203 #define CONFIG_SYS_CSPR3_EXT (0xf) 204 #define CONFIG_SYS_CSPR3 (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) \ 205 | CSPR_PORT_SIZE_8 \ 206 | CSPR_MSEL_GPCM \ 207 | CSPR_V) 208 #define CONFIG_SYS_AMASK3 IFC_AMASK(4*1024) 209 #define CONFIG_SYS_CSOR3 0x0 210 /* QIXIS Timing parameters for IFC CS3 */ 211 #define CONFIG_SYS_CS3_FTIM0 (FTIM0_GPCM_TACSE(0x0e) | \ 212 FTIM0_GPCM_TEADC(0x0e) | \ 213 FTIM0_GPCM_TEAHC(0x0e)) 214 #define CONFIG_SYS_CS3_FTIM1 (FTIM1_GPCM_TACO(0xff) | \ 215 FTIM1_GPCM_TRAD(0x3f)) 216 #define CONFIG_SYS_CS3_FTIM2 (FTIM2_GPCM_TCS(0x0e) | \ 217 FTIM2_GPCM_TCH(0x8) | \ 218 FTIM2_GPCM_TWP(0x1f)) 219 #define CONFIG_SYS_CS3_FTIM3 0x0 220 221 /* NAND Flash on IFC */ 222 #define CONFIG_NAND_FSL_IFC 223 #define CONFIG_SYS_NAND_BASE 0xff800000 224 #define CONFIG_SYS_NAND_BASE_PHYS (0xf00000000ull | CONFIG_SYS_NAND_BASE) 225 226 #define CONFIG_SYS_NAND_CSPR_EXT (0xf) 227 #define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \ 228 | CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \ 229 | CSPR_MSEL_NAND /* MSEL = NAND */ \ 230 | CSPR_V) 231 #define CONFIG_SYS_NAND_AMASK IFC_AMASK(64*1024) 232 233 #define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \ 234 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \ 235 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \ 236 | CSOR_NAND_RAL_3 /* RAL = 2Byes */ \ 237 | CSOR_NAND_PGS_2K /* Page Size = 2K */ \ 238 | CSOR_NAND_SPRZ_64/* Spare size = 64 */ \ 239 | CSOR_NAND_PB(64)) /*Pages Per Block = 64*/ 240 241 #define CONFIG_SYS_NAND_ONFI_DETECTION 242 243 /* ONFI NAND Flash mode0 Timing Params */ 244 #define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x07) | \ 245 FTIM0_NAND_TWP(0x18) | \ 246 FTIM0_NAND_TWCHT(0x07) | \ 247 FTIM0_NAND_TWH(0x0a)) 248 #define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \ 249 FTIM1_NAND_TWBE(0x39) | \ 250 FTIM1_NAND_TRR(0x0e) | \ 251 FTIM1_NAND_TRP(0x18)) 252 #define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0x0f) | \ 253 FTIM2_NAND_TREH(0x0a) | \ 254 FTIM2_NAND_TWHRE(0x1e)) 255 #define CONFIG_SYS_NAND_FTIM3 0x0 256 257 #define CONFIG_SYS_NAND_DDR_LAW 11 258 259 #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE } 260 #define CONFIG_SYS_MAX_NAND_DEVICE 1 261 #define CONFIG_CMD_NAND 262 263 #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) 264 #define CONFIG_SYS_NAND_MAX_OOBFREE 2 265 #define CONFIG_SYS_NAND_MAX_ECCPOS 256 266 267 #if defined(CONFIG_NAND) 268 #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT 269 #define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR 270 #define CONFIG_SYS_AMASK0 CONFIG_SYS_NAND_AMASK 271 #define CONFIG_SYS_CSOR0 CONFIG_SYS_NAND_CSOR 272 #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NAND_FTIM0 273 #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1 274 #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2 275 #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3 276 #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT 277 #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_CSPR 278 #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK 279 #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR 280 #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 281 #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 282 #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 283 #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 284 #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NOR1_CSPR_EXT 285 #define CONFIG_SYS_CSPR2 CONFIG_SYS_NOR1_CSPR 286 #define CONFIG_SYS_AMASK2 CONFIG_SYS_NOR_AMASK 287 #define CONFIG_SYS_CSOR2 CONFIG_SYS_NOR_CSOR 288 #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NOR_FTIM0 289 #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NOR_FTIM1 290 #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NOR_FTIM2 291 #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NOR_FTIM3 292 #else 293 #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT 294 #define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR 295 #define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK 296 #define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR 297 #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0 298 #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1 299 #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2 300 #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3 301 #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT 302 #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR 303 #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK 304 #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR 305 #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 306 #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 307 #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 308 #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 309 #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT 310 #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR 311 #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK 312 #define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR 313 #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0 314 #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1 315 #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2 316 #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3 317 #endif 318 319 #if defined(CONFIG_RAMBOOT_PBL) 320 #define CONFIG_SYS_RAMBOOT 321 #endif 322 323 /* I2C */ 324 #define CONFIG_SYS_FSL_I2C_SPEED 100000 /* I2C speed */ 325 #define CONFIG_SYS_FSL_I2C2_SPEED 100000 /* I2C2 speed */ 326 #define I2C_MUX_PCA_ADDR_PRI 0x77 /* I2C bus multiplexer,primary */ 327 #define I2C_MUX_PCA_ADDR_SEC 0x76 /* I2C bus multiplexer,secondary */ 328 329 #define I2C_MUX_CH_DEFAULT 0x8 330 #define I2C_MUX_CH_VOL_MONITOR 0xa 331 #define I2C_MUX_CH_VSC3316_FS 0xc 332 #define I2C_MUX_CH_VSC3316_BS 0xd 333 334 /* Voltage monitor on channel 2*/ 335 #define I2C_VOL_MONITOR_ADDR 0x40 336 #define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2 337 #define I2C_VOL_MONITOR_BUS_V_OVF 0x1 338 #define I2C_VOL_MONITOR_BUS_V_SHIFT 3 339 340 /* VSC Crossbar switches */ 341 #define CONFIG_VSC_CROSSBAR 342 #define VSC3316_FSM_TX_ADDR 0x70 343 #define VSC3316_FSM_RX_ADDR 0x71 344 345 /* 346 * RapidIO 347 */ 348 349 /* 350 * for slave u-boot IMAGE instored in master memory space, 351 * PHYS must be aligned based on the SIZE 352 */ 353 #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_PHYS 0xfef200000ull 354 #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS1 0xfff00000ull 355 #define CONFIG_SRIO_PCIE_BOOT_IMAGE_SIZE 0x100000 /* 1M */ 356 #define CONFIG_SRIO_PCIE_BOOT_IMAGE_MEM_BUS2 0x3fff00000ull 357 /* 358 * for slave UCODE and ENV instored in master memory space, 359 * PHYS must be aligned based on the SIZE 360 */ 361 #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_PHYS 0xfef100000ull 362 #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_MEM_BUS 0x3ffe00000ull 363 #define CONFIG_SRIO_PCIE_BOOT_UCODE_ENV_SIZE 0x40000 /* 256K */ 364 365 /* slave core release by master*/ 366 #define CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET 0xe00e4 367 #define CONFIG_SRIO_PCIE_BOOT_RELEASE_MASK 0x00000001 /* release core 0 */ 368 369 /* 370 * SRIO_PCIE_BOOT - SLAVE 371 */ 372 #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE 373 #define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR 0xFFE00000 374 #define CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR_PHYS \ 375 (0x300000000ull | CONFIG_SYS_SRIO_PCIE_BOOT_UCODE_ENV_ADDR) 376 #endif 377 /* 378 * eSPI - Enhanced SPI 379 */ 380 #define CONFIG_SF_DEFAULT_SPEED 10000000 381 #define CONFIG_SF_DEFAULT_MODE 0 382 383 /* Qman/Bman */ 384 #ifndef CONFIG_NOBQFMAN 385 #define CONFIG_SYS_DPAA_QBMAN /* Support Q/Bman */ 386 #define CONFIG_SYS_BMAN_NUM_PORTALS 50 387 #define CONFIG_SYS_BMAN_MEM_BASE 0xf4000000 388 #define CONFIG_SYS_BMAN_MEM_PHYS 0xff4000000ull 389 #define CONFIG_SYS_BMAN_MEM_SIZE 0x02000000 390 #define CONFIG_SYS_BMAN_SP_CENA_SIZE 0x4000 391 #define CONFIG_SYS_BMAN_SP_CINH_SIZE 0x1000 392 #define CONFIG_SYS_BMAN_CENA_BASE CONFIG_SYS_BMAN_MEM_BASE 393 #define CONFIG_SYS_BMAN_CENA_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1) 394 #define CONFIG_SYS_BMAN_CINH_BASE (CONFIG_SYS_BMAN_MEM_BASE + \ 395 CONFIG_SYS_BMAN_CENA_SIZE) 396 #define CONFIG_SYS_BMAN_CINH_SIZE (CONFIG_SYS_BMAN_MEM_SIZE >> 1) 397 #define CONFIG_SYS_BMAN_SWP_ISDR_REG 0xE08 398 #define CONFIG_SYS_QMAN_NUM_PORTALS 50 399 #define CONFIG_SYS_QMAN_MEM_BASE 0xf6000000 400 #define CONFIG_SYS_QMAN_MEM_PHYS 0xff6000000ull 401 #define CONFIG_SYS_QMAN_MEM_SIZE 0x02000000 402 #define CONFIG_SYS_QMAN_SP_CENA_SIZE 0x4000 403 #define CONFIG_SYS_QMAN_SP_CINH_SIZE 0x1000 404 #define CONFIG_SYS_QMAN_CENA_BASE CONFIG_SYS_QMAN_MEM_BASE 405 #define CONFIG_SYS_QMAN_CENA_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1) 406 #define CONFIG_SYS_QMAN_CINH_BASE (CONFIG_SYS_QMAN_MEM_BASE + \ 407 CONFIG_SYS_QMAN_CENA_SIZE) 408 #define CONFIG_SYS_QMAN_CINH_SIZE (CONFIG_SYS_QMAN_MEM_SIZE >> 1) 409 #define CONFIG_SYS_QMAN_SWP_ISDR_REG 0xE08 410 411 #define CONFIG_SYS_DPAA_FMAN 412 #define CONFIG_SYS_DPAA_PME 413 #define CONFIG_SYS_PMAN 414 #define CONFIG_SYS_DPAA_DCE 415 #define CONFIG_SYS_DPAA_RMAN 416 #define CONFIG_SYS_INTERLAKEN 417 418 /* Default address of microcode for the Linux Fman driver */ 419 #if defined(CONFIG_SPIFLASH) 420 /* 421 * env is stored at 0x100000, sector size is 0x10000, ucode is stored after 422 * env, so we got 0x110000. 423 */ 424 #define CONFIG_SYS_QE_FW_IN_SPIFLASH 425 #define CONFIG_SYS_FMAN_FW_ADDR 0x110000 426 #elif defined(CONFIG_SDCARD) 427 /* 428 * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is 429 * about 1MB (2048 blocks), Env is stored after the image, and the env size is 430 * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. 431 */ 432 #define CONFIG_SYS_QE_FMAN_FW_IN_MMC 433 #define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) 434 #elif defined(CONFIG_NAND) 435 #define CONFIG_SYS_QE_FMAN_FW_IN_NAND 436 #define CONFIG_SYS_FMAN_FW_ADDR (11 * CONFIG_SYS_NAND_BLOCK_SIZE) 437 #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) 438 /* 439 * Slave has no ucode locally, it can fetch this from remote. When implementing 440 * in two corenet boards, slave's ucode could be stored in master's memory 441 * space, the address can be mapped from slave TLB->slave LAW-> 442 * slave SRIO or PCIE outbound window->master inbound window-> 443 * master LAW->the ucode address in master's memory space. 444 */ 445 #define CONFIG_SYS_QE_FMAN_FW_IN_REMOTE 446 #define CONFIG_SYS_FMAN_FW_ADDR 0xFFE00000 447 #else 448 #define CONFIG_SYS_QE_FMAN_FW_IN_NOR 449 #define CONFIG_SYS_FMAN_FW_ADDR 0xEFF00000 450 #endif 451 #define CONFIG_SYS_QE_FMAN_FW_LENGTH 0x10000 452 #define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH) 453 #endif /* CONFIG_NOBQFMAN */ 454 455 #ifdef CONFIG_SYS_DPAA_FMAN 456 #define CONFIG_FMAN_ENET 457 #define CONFIG_PHYLIB_10G 458 #define CONFIG_PHY_VITESSE 459 #define CONFIG_PHY_TERANETICS 460 #define SGMII_CARD_PORT1_PHY_ADDR 0x1C 461 #define SGMII_CARD_PORT2_PHY_ADDR 0x1D 462 #define SGMII_CARD_PORT3_PHY_ADDR 0x1E 463 #define SGMII_CARD_PORT4_PHY_ADDR 0x1F 464 #define FM1_10GEC1_PHY_ADDR 0x0 465 #define FM1_10GEC2_PHY_ADDR 0x1 466 #define FM2_10GEC1_PHY_ADDR 0x2 467 #define FM2_10GEC2_PHY_ADDR 0x3 468 #endif 469 470 /* SATA */ 471 #ifdef CONFIG_FSL_SATA_V2 472 #define CONFIG_LIBATA 473 #define CONFIG_FSL_SATA 474 475 #define CONFIG_SYS_SATA_MAX_DEVICE 2 476 #define CONFIG_SATA1 477 #define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR 478 #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA 479 #define CONFIG_SATA2 480 #define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR 481 #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA 482 483 #define CONFIG_LBA48 484 #endif 485 486 #ifdef CONFIG_FMAN_ENET 487 #define CONFIG_MII /* MII PHY management */ 488 #define CONFIG_ETHPRIME "FM1@DTSEC1" 489 #define CONFIG_PHY_GIGE /* Include GbE speed/duplex detection */ 490 #endif 491 492 /* 493 * USB 494 */ 495 #define CONFIG_USB_EHCI_FSL 496 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET 497 #define CONFIG_HAS_FSL_DR_USB 498 499 #ifdef CONFIG_MMC 500 #define CONFIG_FSL_ESDHC 501 #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR 502 #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT 503 #define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33 504 #define CONFIG_ESDHC_DETECT_QUIRK \ 505 (!(readb(QIXIS_BASE + QIXIS_BRDCFG5) & QIXIS_MUX_SDHC) || \ 506 IS_SVR_REV(get_svr(), 1, 0)) 507 #define CONFIG_ESDHC_DETECT_8_BIT_QUIRK \ 508 (!(readb(QIXIS_BASE + QIXIS_BRDCFG5) & QIXIS_MUX_SDHC_WIDTH8)) 509 #endif 510 511 512 #define __USB_PHY_TYPE utmi 513 514 /* 515 * T4240 has 3 DDR controllers. Default to 3-way interleaving. It can be 516 * 3way_1KB, 3way_4KB, 3way_8KB. T4160 has 2 DDR controllers. Default to 2-way 517 * interleaving. It can be cacheline, page, bank, superbank. 518 * See doc/README.fsl-ddr for details. 519 */ 520 #ifdef CONFIG_ARCH_T4240 521 #define CTRL_INTLV_PREFERED 3way_4KB 522 #else 523 #define CTRL_INTLV_PREFERED cacheline 524 #endif 525 526 #define CONFIG_EXTRA_ENV_SETTINGS \ 527 "hwconfig=fsl_ddr:" \ 528 "ctlr_intlv=" __stringify(CTRL_INTLV_PREFERED) "," \ 529 "bank_intlv=auto;" \ 530 "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\ 531 "netdev=eth0\0" \ 532 "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ 533 "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0" \ 534 "tftpflash=tftpboot $loadaddr $uboot && " \ 535 "protect off $ubootaddr +$filesize && " \ 536 "erase $ubootaddr +$filesize && " \ 537 "cp.b $loadaddr $ubootaddr $filesize && " \ 538 "protect on $ubootaddr +$filesize && " \ 539 "cmp.b $loadaddr $ubootaddr $filesize\0" \ 540 "consoledev=ttyS0\0" \ 541 "ramdiskaddr=2000000\0" \ 542 "ramdiskfile=t4240qds/ramdisk.uboot\0" \ 543 "fdtaddr=1e00000\0" \ 544 "fdtfile=t4240qds/t4240qds.dtb\0" \ 545 "bdev=sda3\0" 546 547 #define CONFIG_HVBOOT \ 548 "setenv bootargs config-addr=0x60000000; " \ 549 "bootm 0x01000000 - 0x00f00000" 550 551 #define CONFIG_ALU \ 552 "setenv bootargs root=/dev/$bdev rw " \ 553 "console=$consoledev,$baudrate $othbootargs;" \ 554 "cpu 1 release 0x01000000 - - -;" \ 555 "cpu 2 release 0x01000000 - - -;" \ 556 "cpu 3 release 0x01000000 - - -;" \ 557 "cpu 4 release 0x01000000 - - -;" \ 558 "cpu 5 release 0x01000000 - - -;" \ 559 "cpu 6 release 0x01000000 - - -;" \ 560 "cpu 7 release 0x01000000 - - -;" \ 561 "go 0x01000000" 562 563 #define CONFIG_LINUX \ 564 "setenv bootargs root=/dev/ram rw " \ 565 "console=$consoledev,$baudrate $othbootargs;" \ 566 "setenv ramdiskaddr 0x02000000;" \ 567 "setenv fdtaddr 0x00c00000;" \ 568 "setenv loadaddr 0x1000000;" \ 569 "bootm $loadaddr $ramdiskaddr $fdtaddr" 570 571 #define CONFIG_HDBOOT \ 572 "setenv bootargs root=/dev/$bdev rw " \ 573 "console=$consoledev,$baudrate $othbootargs;" \ 574 "tftp $loadaddr $bootfile;" \ 575 "tftp $fdtaddr $fdtfile;" \ 576 "bootm $loadaddr - $fdtaddr" 577 578 #define CONFIG_NFSBOOTCOMMAND \ 579 "setenv bootargs root=/dev/nfs rw " \ 580 "nfsroot=$serverip:$rootpath " \ 581 "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ 582 "console=$consoledev,$baudrate $othbootargs;" \ 583 "tftp $loadaddr $bootfile;" \ 584 "tftp $fdtaddr $fdtfile;" \ 585 "bootm $loadaddr - $fdtaddr" 586 587 #define CONFIG_RAMBOOTCOMMAND \ 588 "setenv bootargs root=/dev/ram rw " \ 589 "console=$consoledev,$baudrate $othbootargs;" \ 590 "tftp $ramdiskaddr $ramdiskfile;" \ 591 "tftp $loadaddr $bootfile;" \ 592 "tftp $fdtaddr $fdtfile;" \ 593 "bootm $loadaddr $ramdiskaddr $fdtaddr" 594 595 #define CONFIG_BOOTCOMMAND CONFIG_LINUX 596 597 #include <asm/fsl_secure_boot.h> 598 599 #endif /* __CONFIG_H */ 600