summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2013-08-07 20:20:27 +0800
committerNitin Garg <nitin.garg@freescale.com>2014-06-03 23:01:40 -0500
commit39e7d8382b1dea26f5111478dc2a26f70b7770c5 (patch)
tree0b6b3d6cc76fc30292c79f802564a9bf38d8c02a /arch
parentf3a8b7f88d1948627c5a315bf1fc255a08c57777 (diff)
ENGR00274382 imx6q: fix can transceiver unwork on AI RevE baseboard
The transceiver TJA1041A on sabreauto RevE baseboard will fail to transit to Normal state if EN/STBY is high by default after board power up. So we set the EN/STBY initial state to low first then to high to guarantee the state transition successfully. Signed-off-by: Dong Aisheng <b29396@freescale.com> Acked-by: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx6/board-mx6q_sabreauto.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.c b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
index e1df8723146c..7c1fadaf1d47 100644
--- a/arch/arm/mach-mx6/board-mx6q_sabreauto.c
+++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
@@ -1116,6 +1116,15 @@ static int flexcan1_en;
static void mx6q_flexcan_switch(void)
{
if (flexcan0_en || flexcan1_en) {
+ /*
+ * The transceiver TJA1041A on sabreauto RevE baseboard will
+ * fail to transit to Normal state if EN/STBY is high by default
+ * after board power up. So we set the EN/STBY initial state to low
+ * first then to high to guarantee the state transition successfully.
+ */
+ gpio_set_value_cansleep(SABREAUTO_CAN_EN, 0);
+ gpio_set_value_cansleep(SABREAUTO_CAN_STBY, 0);
+
gpio_set_value_cansleep(SABREAUTO_CAN_EN, 1);
gpio_set_value_cansleep(SABREAUTO_CAN_STBY, 1);
/* Enable STEER pin if CAN1 interface is required.