blob: 21f707aaf83ca4aab1befb3a76ba98b8ca6a2cbb [file] [log] [blame]
Mario Sixaed7d0e2019-01-21 09:18:23 +01001/*
Mario Sixaed7d0e2019-01-21 09:18:23 +01002 * DDR Setup
3 */
Tom Riniaa6e94d2022-11-16 13:10:37 -05004#define CFG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */
Mario Sixaed7d0e2019-01-21 09:18:23 +01005
Tom Rini65cc0e22022-11-16 13:10:41 -05006#define CFG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
Mario Sixaed7d0e2019-01-21 09:18:23 +01007 DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
8
Mario Sixaed7d0e2019-01-21 09:18:23 +01009/*
10 * The reserved memory
11 */
Tom Rini65cc0e22022-11-16 13:10:41 -050012#define CFG_SYS_FLASH_BASE 0xF0000000
Mario Sixaed7d0e2019-01-21 09:18:23 +010013
Mario Sixaed7d0e2019-01-21 09:18:23 +010014/* Reserve 768 kB for Mon */
Mario Sixaed7d0e2019-01-21 09:18:23 +010015
16/*
17 * Initial RAM Base Address Setup
18 */
Tom Rini65cc0e22022-11-16 13:10:41 -050019#define CFG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
20#define CFG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in RAM */
Mario Sixaed7d0e2019-01-21 09:18:23 +010021/*
22 * Init Local Bus Memory Controller:
23 *
24 * Bank Bus Machine PortSz Size Device
25 * ---- --- ------- ------ ----- ------
26 * 0 Local GPCM 16 bit 256MB FLASH
27 * 1 Local GPCM 8 bit 128MB GPIO/PIGGY
28 *
29 */
30
31/*
32 * FLASH on the Local Bus
33 */
Tom Rini65cc0e22022-11-16 13:10:41 -050034#define CFG_SYS_FLASH_SIZE 256 /* max FLASH size is 256M */
Mario Sixaed7d0e2019-01-21 09:18:23 +010035
Tom Rini65cc0e22022-11-16 13:10:41 -050036#define CFG_SYS_FLASH_BANKS_LIST { CFG_SYS_FLASH_BASE }
Mario Sixaed7d0e2019-01-21 09:18:23 +010037
Holger Brunck5043ce22023-01-24 09:42:40 +010038#define CFG_SYS_KMBEC_FPGA_BASE 0xE8000000
39
Mario Sixaed7d0e2019-01-21 09:18:23 +010040#if defined(CONFIG_CMD_NAND)
Tom Rini65cc0e22022-11-16 13:10:41 -050041#define CFG_SYS_NAND_BASE CFG_SYS_KMBEC_FPGA_BASE
Mario Sixaed7d0e2019-01-21 09:18:23 +010042#endif
43
Holger Brunck5043ce22023-01-24 09:42:40 +010044#if defined(CONFIG_TARGET_KMCOGE5NE) || defined(CONFIG_TARGET_KMETER1)
45/*
46 * System IO Setup
47 */
48#define CFG_SYS_SICRH (SICRH_UC1EOBI | SICRH_UC2E1OBI)
49
50#define CFG_SYS_DDRCDR (\
51 DDRCDR_EN | \
52 DDRCDR_Q_DRN)
53#else
54/*
55 * System IO Config
56 */
57#define CFG_SYS_SICRL SICRL_IRQ_CKS
58
59#define CFG_SYS_DDRCDR (\
60 DDRCDR_EN | \
61 DDRCDR_PZ_MAXZ | \
62 DDRCDR_NZ_MAXZ | \
63 DDRCDR_M_ODR)
64#endif
65
Mario Sixaed7d0e2019-01-21 09:18:23 +010066/*
67 * For booting Linux, the board info and command line data
68 * have to be in the first 8 MB of memory, since this is
69 * the maximum mapped by the Linux kernel during initialization.
70 */
Tom Rini65cc0e22022-11-16 13:10:41 -050071#define CFG_SYS_BOOTMAPSZ (8 << 20)