blob: 869bd9b30a9d70018da2106a67b86babd00181f8 [file] [log] [blame]
Mario Six3e67cb22019-01-21 09:18:23 +01001/*
2 * High Level Configuration Options
3 */
4#define CONFIG_E300 1 /* E300 family */
Mario Six3e67cb22019-01-21 09:18:23 +01005
6#define CONFIG_KM_DEF_ARCH "arch=ppc_82xx\0"
7
8/*
9 * System Clock Setup
10 */
Mario Six3e67cb22019-01-21 09:18:23 +010011#define CONFIG_SYS_CLK_FREQ 66000000
12#define CONFIG_83XX_PCICLK 66000000
13
14/* QE microcode/firmware address */
Mario Six3e67cb22019-01-21 09:18:23 +010015/* between the u-boot partition and env */
Mario Six3e67cb22019-01-21 09:18:23 +010016
17/*
18 * System IO Config
19 */
20/* 0x14000180 SICR_1 */
Holger Brunck0f5d0652019-11-26 19:09:00 +010021#ifndef CONFIG_SYS_SICRL
Mario Six3e67cb22019-01-21 09:18:23 +010022#define CONFIG_SYS_SICRL (0 \
23 | SICR_1_UART1_UART1RTS \
24 | SICR_1_I2C_CKSTOP \
25 | SICR_1_IRQ_A_IRQ \
26 | SICR_1_IRQ_B_IRQ \
27 | SICR_1_GPIO_A_GPIO \
28 | SICR_1_GPIO_B_GPIO \
29 | SICR_1_GPIO_C_GPIO \
30 | SICR_1_GPIO_D_GPIO \
31 | SICR_1_GPIO_E_GPIO \
32 | SICR_1_GPIO_F_GPIO \
33 | SICR_1_USB_A_UART2S \
34 | SICR_1_USB_B_UART2RTS \
35 | SICR_1_FEC1_FEC1 \
36 | SICR_1_FEC2_FEC2 \
37 )
Holger Brunck0f5d0652019-11-26 19:09:00 +010038#endif
Mario Six3e67cb22019-01-21 09:18:23 +010039
40/* 0x00080400 SICR_2 */
41#define CONFIG_SYS_SICRH (0 \
42 | SICR_2_FEC3_FEC3 \
43 | SICR_2_HDLC1_A_HDLC1 \
44 | SICR_2_ELBC_A_LA \
45 | SICR_2_ELBC_B_LCLK \
46 | SICR_2_HDLC2_A_HDLC2 \
47 | SICR_2_USB_D_GPIO \
48 | SICR_2_PCI_PCI \
49 | SICR_2_HDLC1_B_HDLC1 \
50 | SICR_2_HDLC1_C_HDLC1 \
51 | SICR_2_HDLC2_B_GPIO \
52 | SICR_2_HDLC2_C_HDLC2 \
53 | SICR_2_QUIESCE_B \
54 )
55
56/* GPR_1 */
57#define CONFIG_SYS_GPR1 0x50008060
58
59#define CONFIG_SYS_GP1DIR 0x00000000
60#define CONFIG_SYS_GP1ODR 0x00000000
61#define CONFIG_SYS_GP2DIR 0xFF000000
62#define CONFIG_SYS_GP2ODR 0x00000000
63
64#define CONFIG_SYS_DDRCDR (\
65 DDRCDR_EN | \
66 DDRCDR_PZ_MAXZ | \
67 DDRCDR_NZ_MAXZ | \
68 DDRCDR_M_ODR)
69
70#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
71#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
72 SDRAM_CFG_32_BE | \
73 SDRAM_CFG_SREN | \
74 SDRAM_CFG_HSE)
75
76#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
77#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
78#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \
79 (0x200 << SDRAM_INTERVAL_REFINT_SHIFT))
80
81#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \
82 CSCONFIG_ODT_RD_NEVER | \
83 CSCONFIG_ODT_WR_ONLY_CURRENT | \
84 CSCONFIG_ROW_BIT_13 | \
85 CSCONFIG_COL_BIT_10)
86
87#define CONFIG_SYS_DDR_MODE 0x47860242
88#define CONFIG_SYS_DDR_MODE2 0x8080c000
89
90#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
91 (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
92 (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
93 (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
94 (0 << TIMING_CFG0_WWT_SHIFT) | \
95 (0 << TIMING_CFG0_RRT_SHIFT) | \
96 (0 << TIMING_CFG0_WRT_SHIFT) | \
97 (0 << TIMING_CFG0_RWT_SHIFT))
98
99#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_40) | \
100 (2 << TIMING_CFG1_WRTORD_SHIFT) | \
101 (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
102 (3 << TIMING_CFG1_WRREC_SHIFT) | \
103 (7 << TIMING_CFG1_REFREC_SHIFT) | \
104 (3 << TIMING_CFG1_ACTTORW_SHIFT) | \
105 (7 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
106 (3 << TIMING_CFG1_PRETOACT_SHIFT))
107
108#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \
109 (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \
110 (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
111 (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
112 (3 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
113 (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \
114 (5 << TIMING_CFG2_CPO_SHIFT))
115
116#define CONFIG_SYS_DDR_TIMING_3 0x00000000
117
118#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000
119#define CONFIG_SYS_KMBEC_FPGA_SIZE 128
120
121/* EEprom support */
Mario Six3e67cb22019-01-21 09:18:23 +0100122
123/* ethernet port connected to piggy (UEC2) */
124#define CONFIG_HAS_ETH1
125#define CONFIG_UEC_ETH2
126#define CONFIG_SYS_UEC2_UCC_NUM 2 /* UCC3 */
127#define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE /* not used in RMII Mode */
128#define CONFIG_SYS_UEC2_TX_CLK QE_CLK12
129#define CONFIG_SYS_UEC2_ETH_TYPE FAST_ETH
130#define CONFIG_SYS_UEC2_PHY_ADDR 0
131#define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
132#define CONFIG_SYS_UEC2_INTERFACE_SPEED 100