From: Vignesh R <vigne...@ti.com> MCAN can be accessed via DCAN1 or DCAN2. Determining which DCAN instance to use if any at all is done through CTRL_CORE_CONTROL_SPARE_RW.SEL_ALT_MCAN. Since general pinmuxing is handled in U-boot. Handle this additional pinmuxing requirement in U-boot to insure that MCAN is used by default via the DCAN1 pins.
Signed-off-by: Vignesh R <vigne...@ti.com> [fcoo...@ti.com: Update commit message and use DCAN1 not DCAN2 for MCAN] Signed-off-by: Franklin S Cooper Jr <fcoo...@ti.com> Signed-off-by: Faiz Abbas <faiz_ab...@ti.com> --- arch/arm/include/asm/arch-omap5/mux_dra7xx.h | 3 +++ board/ti/dra7xx/evm.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/arch-omap5/mux_dra7xx.h b/arch/arm/include/asm/arch-omap5/mux_dra7xx.h index 55f49c7..dc2eb60 100644 --- a/arch/arm/include/asm/arch-omap5/mux_dra7xx.h +++ b/arch/arm/include/asm/arch-omap5/mux_dra7xx.h @@ -351,4 +351,7 @@ #define NMIN_DSP 0x460 #define RSTOUTN 0x464 +#define MCAN_SEL_ALT_MASK 0x6000 +#define MCAN_SEL 0x2000 + #endif /* _MUX_DRA7XX_H_ */ diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 6bcfa48..9f1ae5d 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -761,6 +761,11 @@ void recalibrate_iodelay(void) int npads, niodelays, delta_npads = 0; int ret; + /* Setup I/O isolation */ + ret = __recalibrate_iodelay_start(); + if (ret) + goto err; + switch (omap_revision()) { case DRA722_ES1_0: case DRA722_ES2_0: @@ -798,6 +803,9 @@ void recalibrate_iodelay(void) npads = ARRAY_SIZE(dra76x_core_padconf_array); iodelay = dra76x_es1_0_iodelay_cfg_array; niodelays = ARRAY_SIZE(dra76x_es1_0_iodelay_cfg_array); + /* Set mux for MCAN instead of DCAN1 */ + clrsetbits_le32((*ctrl)->control_core_control_spare_rw, + MCAN_SEL_ALT_MASK, MCAN_SEL); break; default: case DRA752_ES2_0: @@ -810,10 +818,6 @@ void recalibrate_iodelay(void) RGMII1_ID_MODE_N_MASK); break; } - /* Setup I/O isolation */ - ret = __recalibrate_iodelay_start(); - if (ret) - goto err; /* Do the muxing here */ do_set_mux32((*ctrl)->control_padconf_core_base, pads, npads); -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot