blob: e1c161586b4fc4ca77edab70d5c51a25a596412d [file] [log] [blame]
Mario Sixaed7d0e2019-01-21 09:18:23 +01001/*
2 * Internal Definitions
3 */
Simon Glass1af3c7f2020-05-10 11:40:09 -06004#include <linux/stringify.h>
Mario Sixaed7d0e2019-01-21 09:18:23 +01005#define BOOTFLASH_START 0xF0000000
6
Mario Sixaed7d0e2019-01-21 09:18:23 +01007/*
8 * DDR Setup
9 */
10#define CONFIG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */
11#define CONFIG_SYS_SDRAM_BASE2 (CONFIG_SYS_SDRAM_BASE + 0x10000000) /* +256M */
12
13#define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
14 DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
15
16#define CFG_83XX_DDR_USES_CS0
17
18/*
19 * Manually set up DDR parameters
20 */
Mario Sixaed7d0e2019-01-21 09:18:23 +010021#define CONFIG_SYS_DDR_SIZE 2048 /* MB */
22
23/*
24 * The reserved memory
25 */
Mario Sixaed7d0e2019-01-21 09:18:23 +010026#define CONFIG_SYS_FLASH_BASE 0xF0000000
27
28#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
29#define CONFIG_SYS_RAMBOOT
30#endif
31
32/* Reserve 768 kB for Mon */
33#define CONFIG_SYS_MONITOR_LEN (768 * 1024)
34
35/*
36 * Initial RAM Base Address Setup
37 */
38#define CONFIG_SYS_INIT_RAM_LOCK
39#define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
40#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in RAM */
41#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
42 GENERATED_GBL_DATA_SIZE)
43/*
44 * Init Local Bus Memory Controller:
45 *
46 * Bank Bus Machine PortSz Size Device
47 * ---- --- ------- ------ ----- ------
48 * 0 Local GPCM 16 bit 256MB FLASH
49 * 1 Local GPCM 8 bit 128MB GPIO/PIGGY
50 *
51 */
52
53/*
54 * FLASH on the Local Bus
55 */
56#define CONFIG_SYS_FLASH_SIZE 256 /* max FLASH size is 256M */
57
Mario Sixaed7d0e2019-01-21 09:18:23 +010058#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max num of sects on one chip */
59#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
60
Mario Sixaed7d0e2019-01-21 09:18:23 +010061/* I2C */
Mario Sixaed7d0e2019-01-21 09:18:23 +010062#define CONFIG_SYS_NUM_I2C_BUSES 4
63#define CONFIG_SYS_I2C_MAX_HOPS 1
Mario Sixaed7d0e2019-01-21 09:18:23 +010064#define CONFIG_SYS_I2C_BUSES {{0, {I2C_NULL_HOP} }, \
65 {0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \
66 {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \
67 {1, {I2C_NULL_HOP} } }
68
Mario Sixaed7d0e2019-01-21 09:18:23 +010069#if defined(CONFIG_CMD_NAND)
70#define CONFIG_NAND_KMETER1
71#define CONFIG_SYS_MAX_NAND_DEVICE 1
72#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE
73#endif
74
75/*
76 * For booting Linux, the board info and command line data
77 * have to be in the first 8 MB of memory, since this is
78 * the maximum mapped by the Linux kernel during initialization.
79 */
80#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
81
82/*
83 * Environment
84 */
85
86#ifndef CONFIG_SYS_RAMBOOT
Mario Sixaed7d0e2019-01-21 09:18:23 +010087/* Address and size of Redundant Environment Sector */
Mario Sixaed7d0e2019-01-21 09:18:23 +010088#endif /* CFG_SYS_RAMBOOT */
89
90/*
91 * Environment Configuration
92 */
Mario Sixaed7d0e2019-01-21 09:18:23 +010093#ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */
94#define CONFIG_KM_DEF_ENV "km-common=empty\0"
95#endif
96
97#ifndef CONFIG_KM_DEF_ARCH
98#define CONFIG_KM_DEF_ARCH "arch=ppc_82xx\0"
99#endif
100
101#define CONFIG_EXTRA_ENV_SETTINGS \
102 CONFIG_KM_DEF_ENV \
103 CONFIG_KM_DEF_ARCH \
104 "newenv=" \
105 "prot off " __stringify(CONFIG_ENV_ADDR) " +0x40000 && " \
106 "era " __stringify(CONFIG_ENV_ADDR) " +0x40000\0" \
107 "unlock=yes\0" \
108 ""
109
Mario Sixaed7d0e2019-01-21 09:18:23 +0100110/*
111 * QE UEC ethernet configuration
112 */
113#define CONFIG_UEC_ETH