blob: 455e5236debd6d96c5393c60a402c23d285bc23d [file] [log] [blame]
Mario Six3e67cb22019-01-21 09:18:23 +01001/*
2 * Internal Definitions
3 */
4#define BOOTFLASH_START 0xF0000000
5
6#define CONFIG_KM_CONSOLE_TTY "ttyS0"
7
8/*
9 * DDR Setup
10 */
11#define CONFIG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */
12#define CONFIG_SYS_SDRAM_BASE2 (CONFIG_SYS_SDRAM_BASE + 0x10000000) /* +256M */
13
14#define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
15 DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
16
17#define CFG_83XX_DDR_USES_CS0
18
19/*
20 * Manually set up DDR parameters
21 */
22#define CONFIG_DDR_II
23#define CONFIG_SYS_DDR_SIZE 2048 /* MB */
24
25/*
26 * The reserved memory
27 */
28#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
29#define CONFIG_SYS_FLASH_BASE 0xF0000000
30
31#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
32#define CONFIG_SYS_RAMBOOT
33#endif
34
35/* Reserve 768 kB for Mon */
36#define CONFIG_SYS_MONITOR_LEN (768 * 1024)
37
38/*
39 * Initial RAM Base Address Setup
40 */
41#define CONFIG_SYS_INIT_RAM_LOCK
42#define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
43#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in RAM */
44#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
45 GENERATED_GBL_DATA_SIZE)
46/*
47 * Init Local Bus Memory Controller:
48 *
49 * Bank Bus Machine PortSz Size Device
50 * ---- --- ------- ------ ----- ------
51 * 0 Local GPCM 16 bit 256MB FLASH
52 * 1 Local GPCM 8 bit 128MB GPIO/PIGGY
53 *
54 */
55
56/*
57 * FLASH on the Local Bus
58 */
59#define CONFIG_SYS_FLASH_SIZE 256 /* max FLASH size is 256M */
60
61#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */
62#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max num of sects on one chip */
63#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
64
65/*
66 * Serial Port
67 */
68#define CONFIG_SYS_NS16550_SERIAL
69#define CONFIG_SYS_NS16550_REG_SIZE 1
70#define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
71
72#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500)
73#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600)
74
75/* I2C */
76#define CONFIG_SYS_I2C
77#define CONFIG_SYS_NUM_I2C_BUSES 4
78#define CONFIG_SYS_I2C_MAX_HOPS 1
79#define CONFIG_SYS_I2C_FSL
80#define CONFIG_SYS_FSL_I2C_SPEED 200000
81#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
82#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
83#define CONFIG_SYS_I2C_OFFSET 0x3000
84#define CONFIG_SYS_FSL_I2C2_SPEED 200000
85#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
86#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
87#define CONFIG_SYS_I2C_BUSES {{0, {I2C_NULL_HOP} }, \
88 {0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \
89 {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \
90 {1, {I2C_NULL_HOP} } }
91
92#define CONFIG_KM_IVM_BUS 2 /* I2C2 (Mux-Port 1)*/
93
94#if defined(CONFIG_CMD_NAND)
95#define CONFIG_NAND_KMETER1
96#define CONFIG_SYS_MAX_NAND_DEVICE 1
97#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE
98#endif
99
100/*
101 * For booting Linux, the board info and command line data
102 * have to be in the first 8 MB of memory, since this is
103 * the maximum mapped by the Linux kernel during initialization.
104 */
105#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
106
107/*
108 * Environment
109 */
110
111#ifndef CONFIG_SYS_RAMBOOT
112#ifndef CONFIG_ENV_ADDR
113#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
114 CONFIG_SYS_MONITOR_LEN)
115#endif
116#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
117#ifndef CONFIG_ENV_OFFSET
118#define CONFIG_ENV_OFFSET (CONFIG_SYS_MONITOR_LEN)
119#endif
120
121/* Address and size of Redundant Environment Sector */
122#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
123 CONFIG_ENV_SECT_SIZE)
124#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
125
126#else /* CFG_SYS_RAMBOOT */
127#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
128#define CONFIG_ENV_SIZE 0x2000
129#endif /* CFG_SYS_RAMBOOT */
130
131/*
132 * Environment Configuration
133 */
134#define CONFIG_ENV_OVERWRITE
135#ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */
136#define CONFIG_KM_DEF_ENV "km-common=empty\0"
137#endif
138
139#ifndef CONFIG_KM_DEF_ARCH
140#define CONFIG_KM_DEF_ARCH "arch=ppc_82xx\0"
141#endif
142
143#define CONFIG_EXTRA_ENV_SETTINGS \
144 CONFIG_KM_DEF_ENV \
145 CONFIG_KM_DEF_ARCH \
146 "newenv=" \
147 "prot off " __stringify(CONFIG_ENV_ADDR) " +0x40000 && " \
148 "era " __stringify(CONFIG_ENV_ADDR) " +0x40000\0" \
149 "unlock=yes\0" \
150 ""
151
152#if defined(CONFIG_UEC_ETH)
153#define CONFIG_HAS_ETH0
154#endif
155
156/*
157 * QE UEC ethernet configuration
158 */
159#define CONFIG_UEC_ETH
160#define CONFIG_ETHPRIME "UEC0"