blob: 04d3d352ee20667bb76ef654cb7fdacc4ca2fb7b [file] [log] [blame]
Mario Six3e67cb22019-01-21 09:18:23 +01001/* KMBEC FPGA (PRIO) */
Tom Rini6a5dccc2022-11-16 13:10:41 -05002#define CFG_SYS_KMBEC_FPGA_BASE 0xE8000000
3#define CFG_SYS_KMBEC_FPGA_SIZE 64
Mario Six3e67cb22019-01-21 09:18:23 +01004
5/*
6 * High Level Configuration Options
7 */
Mario Six3e67cb22019-01-21 09:18:23 +01008
9/*
Mario Six3e67cb22019-01-21 09:18:23 +010010 * System IO Setup
11 */
Tom Rini6a5dccc2022-11-16 13:10:41 -050012#define CFG_SYS_SICRH (SICRH_UC1EOBI | SICRH_UC2E1OBI)
Mario Six3e67cb22019-01-21 09:18:23 +010013
14/**
15 * DDR RAM settings
16 */
Tom Rini6a5dccc2022-11-16 13:10:41 -050017#define CFG_SYS_DDR_SDRAM_CFG (\
Mario Six3e67cb22019-01-21 09:18:23 +010018 SDRAM_CFG_SDRAM_TYPE_DDR2 | \
19 SDRAM_CFG_SREN | \
20 SDRAM_CFG_HSE)
21
Tom Rini6a5dccc2022-11-16 13:10:41 -050022#define CFG_SYS_DDR_SDRAM_CFG2 0x00401000
Mario Six3e67cb22019-01-21 09:18:23 +010023
Tom Rini6a5dccc2022-11-16 13:10:41 -050024#define CFG_SYS_DDR_CLK_CNTL (\
Mario Six3e67cb22019-01-21 09:18:23 +010025 DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
26
Tom Rini6a5dccc2022-11-16 13:10:41 -050027#define CFG_SYS_DDR_INTERVAL (\
Mario Six3e67cb22019-01-21 09:18:23 +010028 (0x080 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \
29 (0x203 << SDRAM_INTERVAL_REFINT_SHIFT))
30
Tom Rini6a5dccc2022-11-16 13:10:41 -050031#define CFG_SYS_DDR_CS0_BNDS 0x0000007f
Mario Six3e67cb22019-01-21 09:18:23 +010032
Tom Rini6a5dccc2022-11-16 13:10:41 -050033#define CFG_SYS_DDRCDR (\
Mario Six3e67cb22019-01-21 09:18:23 +010034 DDRCDR_EN | \
35 DDRCDR_Q_DRN)
Tom Rini6a5dccc2022-11-16 13:10:41 -050036#define CFG_SYS_DDR_MODE 0x47860452
37#define CFG_SYS_DDR_MODE2 0x8080c000
Mario Six3e67cb22019-01-21 09:18:23 +010038
Tom Rini6a5dccc2022-11-16 13:10:41 -050039#define CFG_SYS_DDR_TIMING_0 (\
Mario Six3e67cb22019-01-21 09:18:23 +010040 (2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
41 (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
42 (6 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
43 (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
44 (0 << TIMING_CFG0_WWT_SHIFT) | \
45 (0 << TIMING_CFG0_RRT_SHIFT) | \
46 (0 << TIMING_CFG0_WRT_SHIFT) | \
47 (0 << TIMING_CFG0_RWT_SHIFT))
48
Tom Rini6a5dccc2022-11-16 13:10:41 -050049#define CFG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \
Mario Six3e67cb22019-01-21 09:18:23 +010050 (2 << TIMING_CFG1_WRTORD_SHIFT) | \
51 (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
52 (3 << TIMING_CFG1_WRREC_SHIFT) | \
53 (7 << TIMING_CFG1_REFREC_SHIFT) | \
54 (3 << TIMING_CFG1_ACTTORW_SHIFT) | \
55 (8 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
56 (3 << TIMING_CFG1_PRETOACT_SHIFT))
57
Tom Rini6a5dccc2022-11-16 13:10:41 -050058#define CFG_SYS_DDR_TIMING_2 (\
Mario Six3e67cb22019-01-21 09:18:23 +010059 (0xa << TIMING_CFG2_FOUR_ACT_SHIFT) | \
60 (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \
61 (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
62 (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
63 (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
64 (5 << TIMING_CFG2_CPO_SHIFT) | \
65 (0 << TIMING_CFG2_ADD_LAT_SHIFT))
66
Tom Rini6a5dccc2022-11-16 13:10:41 -050067#define CFG_SYS_DDR_TIMING_3 0x00000000
Mario Six3e67cb22019-01-21 09:18:23 +010068