blob: d4da91fcfecb27ff01dd8c81c45bdfd195928437 [file] [log] [blame]
York Sunf749db32014-06-23 15:15:56 -07001/*
2 * Copyright (C) 2014 Freescale Semiconductor
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __LS2_SIMU_H
8#define __LS2_SIMU_H
9
Prabhakar Kushwaha44937212015-11-09 16:42:07 +053010#include "ls2080a_common.h"
York Sunf749db32014-06-23 15:15:56 -070011
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070012#define CONFIG_SYS_CLK_FREQ 100000000
13#define CONFIG_DDR_CLK_FREQ 133333333
14
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070015#define CONFIG_DIMM_SLOTS_PER_CTLR 1
16#define CONFIG_CHIP_SELECTS_PER_CTRL 4
Prabhakar Kushwaha44937212015-11-09 16:42:07 +053017#ifdef CONFIG_SYS_FSL_HAS_DP_DDR
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070018#define CONFIG_DP_DDR_DIMM_SLOTS_PER_CTLR 1
Prabhakar Kushwaha44937212015-11-09 16:42:07 +053019#endif
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070020
York Sunf749db32014-06-23 15:15:56 -070021/* SMSC 91C111 ethernet configuration */
22#define CONFIG_SMC91111
23#define CONFIG_SMC91111_BASE (0x2210000)
24
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070025#define CONFIG_SYS_NOR0_CSPR_EXT (0x0)
26#define CONFIG_SYS_NOR_AMASK IFC_AMASK(128*1024*1024)
27
Masahiro Yamadae856bdc2017-02-11 22:43:54 +090028#ifdef CONFIG_MTD_NOR_FLASH
Yuan Yao82d13342016-06-08 18:24:53 +080029#define CONFIG_FLASH_CFI_DRIVER
30#define CONFIG_SYS_FLASH_CFI
31#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
32#define CONFIG_SYS_FLASH_QUIET_TEST
33#endif
34
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070035/*
36 * NOR Flash Timing Params
37 */
38#define CONFIG_SYS_NOR0_CSPR \
39 (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
40 CSPR_PORT_SIZE_16 | \
41 CSPR_MSEL_NOR | \
42 CSPR_V)
43#define CONFIG_SYS_NOR0_CSPR_EARLY \
44 (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS_EARLY) | \
45 CSPR_PORT_SIZE_16 | \
46 CSPR_MSEL_NOR | \
47 CSPR_V)
48#define CONFIG_SYS_NOR_CSOR CSOR_NOR_ADM_SHIFT(12)
49#define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x1) | \
50 FTIM0_NOR_TEADC(0x1) | \
51 FTIM0_NOR_TEAHC(0x1))
52#define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x1) | \
53 FTIM1_NOR_TRAD_NOR(0x1))
54#define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x0) | \
55 FTIM2_NOR_TCH(0x0) | \
56 FTIM2_NOR_TWP(0x1))
57#define CONFIG_SYS_NOR_FTIM3 0x04000000
58#define CONFIG_SYS_IFC_CCR 0x01000000
59
Masahiro Yamadae856bdc2017-02-11 22:43:54 +090060#ifdef CONFIG_MTD_NOR_FLASH
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070061#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
62
63#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
64#define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */
65#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
66#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
67
68#define CONFIG_SYS_FLASH_EMPTY_INFO
69#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
70#endif
71
72#define CONFIG_NAND_FSL_IFC
73#define CONFIG_SYS_NAND_MAX_ECCPOS 256
74#define CONFIG_SYS_NAND_MAX_OOBFREE 2
75
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -070076#define CONFIG_SYS_NAND_CSPR_EXT (0x0)
77#define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
78 | CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
79 | CSPR_MSEL_NAND /* MSEL = NAND */ \
80 | CSPR_V)
81#define CONFIG_SYS_NAND_AMASK IFC_AMASK(64 * 1024)
82
83#define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
84 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
85 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \
86 | CSOR_NAND_RAL_3 /* RAL = 2Byes */ \
87 | CSOR_NAND_PGS_2K /* Page Size = 2K */ \
88 | CSOR_NAND_SPRZ_64/* Spare size = 64 */ \
89 | CSOR_NAND_PB(64)) /*Pages Per Block = 64*/
90
91#define CONFIG_SYS_NAND_ONFI_DETECTION
92
93/* ONFI NAND Flash mode0 Timing Params */
94#define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x07) | \
95 FTIM0_NAND_TWP(0x18) | \
96 FTIM0_NAND_TWCHT(0x07) | \
97 FTIM0_NAND_TWH(0x0a))
98#define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
99 FTIM1_NAND_TWBE(0x39) | \
100 FTIM1_NAND_TRR(0x0e) | \
101 FTIM1_NAND_TRP(0x18))
102#define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0x0f) | \
103 FTIM2_NAND_TREH(0x0a) | \
104 FTIM2_NAND_TWHRE(0x1e))
105#define CONFIG_SYS_NAND_FTIM3 0x0
106
107#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
108#define CONFIG_SYS_MAX_NAND_DEVICE 1
109#define CONFIG_MTD_NAND_VERIFY_WRITE
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -0700110
111#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
112
113#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
114#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR_EARLY
115#define CONFIG_SYS_CSPR0_FINAL CONFIG_SYS_NOR0_CSPR
116#define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
117#define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
118#define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
119#define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
120#define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
121#define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
Prabhakar Kushwahae211c122014-07-16 09:21:12 +0530122#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NAND_CSPR_EXT
123#define CONFIG_SYS_CSPR1 CONFIG_SYS_NAND_CSPR
124#define CONFIG_SYS_AMASK1 CONFIG_SYS_NAND_AMASK
125#define CONFIG_SYS_CSOR1 CONFIG_SYS_NAND_CSOR
126#define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NAND_FTIM0
127#define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NAND_FTIM1
128#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NAND_FTIM2
129#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NAND_FTIM3
130
Yangbo Lub22b8e92015-07-24 17:37:29 +0800131/* MMC */
Yangbo Lub22b8e92015-07-24 17:37:29 +0800132#ifdef CONFIG_MMC
Yangbo Lub22b8e92015-07-24 17:37:29 +0800133#define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
Yangbo Lub22b8e92015-07-24 17:37:29 +0800134#endif
135
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -0700136/* Debug Server firmware */
137#define CONFIG_SYS_DEBUG_SERVER_FW_IN_NOR
138#define CONFIG_SYS_DEBUG_SERVER_FW_ADDR 0x580C00000ULL
139
140/* MC firmware */
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -0700141#define CONFIG_SYS_LS_MC_DPL_IN_NOR
142#define CONFIG_SYS_LS_MC_DPL_ADDR 0x5806C0000ULL
143
J. German Rivera125e2bc2015-03-20 19:28:18 -0700144#define CONFIG_SYS_LS_MC_DPC_IN_NOR
145#define CONFIG_SYS_LS_MC_DPC_ADDR 0x5806F8000ULL
146
147#define CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS 200000
148
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -0700149/* Store environment at top of flash */
Prabhakar Kushwahaf3f8c562015-03-20 19:28:06 -0700150#define CONFIG_ENV_SIZE 0x1000
151
York Sunf749db32014-06-23 15:15:56 -0700152#endif /* __LS2_SIMU_H */