diff options
Diffstat (limited to 'board/ti/am57xx/board.c')
-rw-r--r-- | board/ti/am57xx/board.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index a5f02e6..1762089 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -35,6 +35,7 @@ #define board_is_x15() board_ti_is("BBRDX15_") #define board_is_am572x_evm() board_ti_is("AM572PM_") +#define board_is_am572x_idk() board_ti_is("AM572IDK") #ifdef CONFIG_DRIVER_TI_CPSW #include <cpsw.h> @@ -131,9 +132,9 @@ static const struct emif_regs beagle_x15_emif2_ddr3_532mhz_emif_regs = { .sdram_config2 = 0x08000000, .ref_ctrl = 0x000040F1, .ref_ctrl_final = 0x00001035, - .sdram_tim1 = 0xcccf36ab, + .sdram_tim1 = 0xcccf36b3, .sdram_tim2 = 0x308f7fda, - .sdram_tim3 = 0x409f88a8, + .sdram_tim3 = 0x407f88a8, .read_idle_ctrl = 0x00050000, .zq_config = 0x5007190b, .temp_alert_config = 0x00000000, @@ -278,6 +279,8 @@ void do_board_detect(void) bname = "BeagleBoard X15"; else if (board_is_am572x_evm()) bname = "AM572x EVM"; + else if (board_is_am572x_idk()) + bname = "AM572x IDK"; if (bname) snprintf(sysinfo.board_string, SYSINFO_BOARD_NAME_MAX_LEN, @@ -296,6 +299,8 @@ static void setup_board_eeprom_env(void) if (board_is_am572x_evm()) name = "am57xx_evm"; + else if (board_is_am572x_idk()) + name = "am572x_idk"; else printf("Unidentified board claims %s in eeprom header\n", board_ti_get_name()); @@ -343,9 +348,24 @@ void set_muxconf_regs(void) #ifdef CONFIG_IODELAY_RECALIBRATION void recalibrate_iodelay(void) { - __recalibrate_iodelay(core_padconf_array_essential, - ARRAY_SIZE(core_padconf_array_essential), - iodelay_cfg_array, ARRAY_SIZE(iodelay_cfg_array)); + const struct pad_conf_entry *pconf; + const struct iodelay_cfg_entry *iod; + int pconf_sz, iod_sz; + + if (board_is_am572x_idk()) { + pconf = core_padconf_array_essential_am572x_idk; + pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am572x_idk); + iod = iodelay_cfg_array_am572x_idk; + iod_sz = ARRAY_SIZE(iodelay_cfg_array_am572x_idk); + } else { + /* Common for X15/GPEVM */ + pconf = core_padconf_array_essential_x15; + pconf_sz = ARRAY_SIZE(core_padconf_array_essential_x15); + iod = iodelay_cfg_array_x15; + iod_sz = ARRAY_SIZE(iodelay_cfg_array_x15); + } + + __recalibrate_iodelay(pconf, pconf_sz, iod, iod_sz); } #endif @@ -605,6 +625,12 @@ int board_eth_init(bd_t *bis) ctrl_val |= 0x22; writel(ctrl_val, (*ctrl)->control_core_control_io1); + /* The phy address for the AM572x IDK are different than x15 */ + if (board_is_am572x_idk()) { + cpsw_data.slave_data[0].phy_addr = 0; + cpsw_data.slave_data[1].phy_addr = 1; + } + ret = cpsw_register(&cpsw_data); if (ret < 0) printf("Error %d registering CPSW switch\n", ret); |