blob: 45db5cf873c78796d055a5c373791df51dad846e [file] [log] [blame]
Mario Six3e67cb22019-01-21 09:18:23 +01001/*
2 * Internal Definitions
3 */
Simon Glassfb64e362020-05-10 11:40:09 -06004#include <linux/stringify.h>
Mario Six3e67cb22019-01-21 09:18:23 +01005#define BOOTFLASH_START 0xF0000000
6
Mario Six3e67cb22019-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 Six3e67cb22019-01-21 09:18:23 +010021#define CONFIG_SYS_DDR_SIZE 2048 /* MB */
22
23/*
24 * The reserved memory
25 */
26#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
27#define CONFIG_SYS_FLASH_BASE 0xF0000000
28
29#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
30#define CONFIG_SYS_RAMBOOT
31#endif
32
33/* Reserve 768 kB for Mon */
34#define CONFIG_SYS_MONITOR_LEN (768 * 1024)
35
36/*
37 * Initial RAM Base Address Setup
38 */
39#define CONFIG_SYS_INIT_RAM_LOCK
40#define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
41#define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in RAM */
42#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
43 GENERATED_GBL_DATA_SIZE)
44/*
45 * Init Local Bus Memory Controller:
46 *
47 * Bank Bus Machine PortSz Size Device
48 * ---- --- ------- ------ ----- ------
49 * 0 Local GPCM 16 bit 256MB FLASH
50 * 1 Local GPCM 8 bit 128MB GPIO/PIGGY
51 *
52 */
53
54/*
55 * FLASH on the Local Bus
56 */
57#define CONFIG_SYS_FLASH_SIZE 256 /* max FLASH size is 256M */
58
59#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */
60#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max num of sects on one chip */
61#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
62
Mario Six3e67cb22019-01-21 09:18:23 +010063/* I2C */
Mario Six3e67cb22019-01-21 09:18:23 +010064#define CONFIG_SYS_NUM_I2C_BUSES 4
65#define CONFIG_SYS_I2C_MAX_HOPS 1
Mario Six3e67cb22019-01-21 09:18:23 +010066#define CONFIG_SYS_I2C_BUSES {{0, {I2C_NULL_HOP} }, \
67 {0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \
68 {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \
69 {1, {I2C_NULL_HOP} } }
70
Mario Six3e67cb22019-01-21 09:18:23 +010071#if defined(CONFIG_CMD_NAND)
72#define CONFIG_NAND_KMETER1
73#define CONFIG_SYS_MAX_NAND_DEVICE 1
74#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE
75#endif
76
77/*
78 * For booting Linux, the board info and command line data
79 * have to be in the first 8 MB of memory, since this is
80 * the maximum mapped by the Linux kernel during initialization.
81 */
82#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
83
84/*
85 * Environment
86 */
87
88#ifndef CONFIG_SYS_RAMBOOT
Mario Six3e67cb22019-01-21 09:18:23 +010089/* Address and size of Redundant Environment Sector */
Mario Six3e67cb22019-01-21 09:18:23 +010090#endif /* CFG_SYS_RAMBOOT */
91
92/*
93 * Environment Configuration
94 */
Mario Six3e67cb22019-01-21 09:18:23 +010095#ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */
96#define CONFIG_KM_DEF_ENV "km-common=empty\0"
97#endif
98
99#ifndef CONFIG_KM_DEF_ARCH
100#define CONFIG_KM_DEF_ARCH "arch=ppc_82xx\0"
101#endif
102
103#define CONFIG_EXTRA_ENV_SETTINGS \
104 CONFIG_KM_DEF_ENV \
105 CONFIG_KM_DEF_ARCH \
106 "newenv=" \
107 "prot off " __stringify(CONFIG_ENV_ADDR) " +0x40000 && " \
108 "era " __stringify(CONFIG_ENV_ADDR) " +0x40000\0" \
109 "unlock=yes\0" \
110 ""
111
112#if defined(CONFIG_UEC_ETH)
113#define CONFIG_HAS_ETH0
114#endif
115
116/*
117 * QE UEC ethernet configuration
118 */
119#define CONFIG_UEC_ETH
120#define CONFIG_ETHPRIME "UEC0"