From: Dong Aisheng Date: Wed, 7 Aug 2013 12:20:27 +0000 (+0800) Subject: ENGR00274382 imx6q: fix can transceiver unwork on AI RevE baseboard X-Git-Tag: v3.0.35-fsl_4.1.0~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e21a95c1af5fa3f07e8298ca107ab8215c92ebcd;p=karo-tx-linux.git 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 Acked-by: Jason Liu --- 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.