]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: ti: dra7xx: Select MCAN instead of DCAN on DRA76 EVM
authorVignesh R <vigneshr@ti.com>
Tue, 12 Dec 2017 11:44:27 +0000 (17:14 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 19 Jan 2018 20:49:23 +0000 (15:49 -0500)
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 ensure that MCAN is used by default via the DCAN1 pins.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
[fcooper@ti.com: Update commit message and use DCAN1 not DCAN2 for MCAN]
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
arch/arm/include/asm/arch-omap5/mux_dra7xx.h
board/ti/dra7xx/evm.c

index 55f49c784857ec353d6fcfbc161822e88247d444..dc2eb608e2f8e3bb0da013440b8950de4c216b4c 100644 (file)
 #define NMIN_DSP       0x460
 #define RSTOUTN                0x464
 
+#define MCAN_SEL_ALT_MASK      0x6000
+#define MCAN_SEL               0x2000
+
 #endif /* _MUX_DRA7XX_H_ */
index 6bcfa482315983e2afd18d01cd9d25eec8605e48..ddcbe31f0eed59fe13d024ab786eff53bc021e92 100644 (file)
@@ -823,6 +823,11 @@ void recalibrate_iodelay(void)
                do_set_mux32((*ctrl)->control_padconf_core_base,
                             delta_pads, delta_npads);
 
+       if (is_dra76x())
+               /* Set mux for MCAN instead of DCAN1 */
+               clrsetbits_le32((*ctrl)->control_core_control_spare_rw,
+                               MCAN_SEL_ALT_MASK, MCAN_SEL);
+
        /* Setup IOdelay configuration */
        ret = do_set_iodelay((*ctrl)->iodelay_config_base, iodelay, niodelays);
 err: