blob: ff97c6cc791aa1c0be8639b1d9ef77b0274ed6e9 [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 */
16#ifndef CONFIG_SYS_QE_FW_ADDR
17#define CONFIG_SYS_QE_FW_ADDR 0xF00C0000
18#endif
19
20/*
21 * System IO Config
22 */
23/* 0x14000180 SICR_1 */
Holger Brunck0f5d0652019-11-26 19:09:00 +010024#ifndef CONFIG_SYS_SICRL
Mario Six3e67cb22019-01-21 09:18:23 +010025#define CONFIG_SYS_SICRL (0 \
26 | SICR_1_UART1_UART1RTS \
27 | SICR_1_I2C_CKSTOP \
28 | SICR_1_IRQ_A_IRQ \
29 | SICR_1_IRQ_B_IRQ \
30 | SICR_1_GPIO_A_GPIO \
31 | SICR_1_GPIO_B_GPIO \
32 | SICR_1_GPIO_C_GPIO \
33 | SICR_1_GPIO_D_GPIO \
34 | SICR_1_GPIO_E_GPIO \
35 | SICR_1_GPIO_F_GPIO \
36 | SICR_1_USB_A_UART2S \
37 | SICR_1_USB_B_UART2RTS \
38 | SICR_1_FEC1_FEC1 \
39 | SICR_1_FEC2_FEC2 \
40 )
Holger Brunck0f5d0652019-11-26 19:09:00 +010041#endif
Mario Six3e67cb22019-01-21 09:18:23 +010042
43/* 0x00080400 SICR_2 */
44#define CONFIG_SYS_SICRH (0 \
45 | SICR_2_FEC3_FEC3 \
46 | SICR_2_HDLC1_A_HDLC1 \
47 | SICR_2_ELBC_A_LA \
48 | SICR_2_ELBC_B_LCLK \
49 | SICR_2_HDLC2_A_HDLC2 \
50 | SICR_2_USB_D_GPIO \
51 | SICR_2_PCI_PCI \
52 | SICR_2_HDLC1_B_HDLC1 \
53 | SICR_2_HDLC1_C_HDLC1 \
54 | SICR_2_HDLC2_B_GPIO \
55 | SICR_2_HDLC2_C_HDLC2 \
56 | SICR_2_QUIESCE_B \
57 )
58
59/* GPR_1 */
60#define CONFIG_SYS_GPR1 0x50008060
61
62#define CONFIG_SYS_GP1DIR 0x00000000
63#define CONFIG_SYS_GP1ODR 0x00000000
64#define CONFIG_SYS_GP2DIR 0xFF000000
65#define CONFIG_SYS_GP2ODR 0x00000000
66
67#define CONFIG_SYS_DDRCDR (\
68 DDRCDR_EN | \
69 DDRCDR_PZ_MAXZ | \
70 DDRCDR_NZ_MAXZ | \
71 DDRCDR_M_ODR)
72
73#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
74#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
75 SDRAM_CFG_32_BE | \
76 SDRAM_CFG_SREN | \
77 SDRAM_CFG_HSE)
78
79#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
80#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
81#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \
82 (0x200 << SDRAM_INTERVAL_REFINT_SHIFT))
83
84#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \
85 CSCONFIG_ODT_RD_NEVER | \
86 CSCONFIG_ODT_WR_ONLY_CURRENT | \
87 CSCONFIG_ROW_BIT_13 | \
88 CSCONFIG_COL_BIT_10)
89
90#define CONFIG_SYS_DDR_MODE 0x47860242
91#define CONFIG_SYS_DDR_MODE2 0x8080c000
92
93#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
94 (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
95 (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
96 (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
97 (0 << TIMING_CFG0_WWT_SHIFT) | \
98 (0 << TIMING_CFG0_RRT_SHIFT) | \
99 (0 << TIMING_CFG0_WRT_SHIFT) | \
100 (0 << TIMING_CFG0_RWT_SHIFT))
101
102#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_40) | \
103 (2 << TIMING_CFG1_WRTORD_SHIFT) | \
104 (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
105 (3 << TIMING_CFG1_WRREC_SHIFT) | \
106 (7 << TIMING_CFG1_REFREC_SHIFT) | \
107 (3 << TIMING_CFG1_ACTTORW_SHIFT) | \
108 (7 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
109 (3 << TIMING_CFG1_PRETOACT_SHIFT))
110
111#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \
112 (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \
113 (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
114 (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
115 (3 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
116 (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \
117 (5 << TIMING_CFG2_CPO_SHIFT))
118
119#define CONFIG_SYS_DDR_TIMING_3 0x00000000
120
121#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000
122#define CONFIG_SYS_KMBEC_FPGA_SIZE 128
123
124/* EEprom support */
Mario Six3e67cb22019-01-21 09:18:23 +0100125
126/* ethernet port connected to piggy (UEC2) */
127#define CONFIG_HAS_ETH1
128#define CONFIG_UEC_ETH2
129#define CONFIG_SYS_UEC2_UCC_NUM 2 /* UCC3 */
130#define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE /* not used in RMII Mode */
131#define CONFIG_SYS_UEC2_TX_CLK QE_CLK12
132#define CONFIG_SYS_UEC2_ETH_TYPE FAST_ETH
133#define CONFIG_SYS_UEC2_PHY_ADDR 0
134#define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
135#define CONFIG_SYS_UEC2_INTERFACE_SPEED 100