summaryrefslogtreecommitdiff
path: root/board/ti/am57xx/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/ti/am57xx/board.c')
-rw-r--r--board/ti/am57xx/board.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 125e965..5e3bcff 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -473,6 +473,7 @@ void recalibrate_iodelay(void)
const struct pad_conf_entry *pconf;
const struct iodelay_cfg_entry *iod;
int pconf_sz, iod_sz;
+ int ret;
if (board_is_am572x_idk()) {
pconf = core_padconf_array_essential_am572x_idk;
@@ -483,11 +484,42 @@ void recalibrate_iodelay(void)
/* 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);
+ /* There never was an SR1.0 X15.. So.. */
+ if (omap_revision() == DRA752_ES1_1) {
+ iod = iodelay_cfg_array_x15_sr1_1;
+ iod_sz = ARRAY_SIZE(iodelay_cfg_array_x15_sr1_1);
+ } else {
+ /* Since full production should switch to SR2.0 */
+ iod = iodelay_cfg_array_x15_sr2_0;
+ iod_sz = ARRAY_SIZE(iodelay_cfg_array_x15_sr2_0);
+ }
+ }
+
+ /* Setup I/O isolation */
+ ret = __recalibrate_iodelay_start();
+ if (ret)
+ goto err;
+
+ /* Do the muxing here */
+ do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
+
+ /* Now do the weird minor deltas that should be safe */
+ if (board_is_x15() || board_is_am572x_evm()) {
+ if (board_is_x15_revb1() || board_is_am572x_evm_reva3()) {
+ pconf = core_padconf_array_delta_x15_sr2_0;
+ pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr2_0);
+ } else {
+ pconf = core_padconf_array_delta_x15_sr1_1;
+ pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr1_1);
+ }
+ do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
}
- __recalibrate_iodelay(pconf, pconf_sz, iod, iod_sz);
+ /* Setup IOdelay configuration */
+ ret = do_set_iodelay((*ctrl)->iodelay_config_base, iod, iod_sz);
+err:
+ /* Closeup.. remove isolation */
+ __recalibrate_iodelay_end(ret);
}
#endif