AnsweredAssumed Answered

How to enable CAN Bus on MCIMX6QP-SDB

Question asked by 家禄 刘 on Jan 24, 2018
Latest reply on Jan 24, 2018 by igorpadykov

How to enable CAN Bus on MCIMX6QP-SDB with L4.1.15_2.0.0, i modifiled the code like below, but it still can't work.

 

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 04ad185..9d0ff77 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -295,6 +295,13 @@
     status = "okay";
 };
 
+&can1 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinctrl_flexcan1>;
+    can-stby-gpio = <&gpio4 5 GPIO_ACTIVE_LOW>;
+    status = "okay";
+};
+
 &cpu0 {
     arm-supply = <&sw1a_reg>;
     soc-supply = <&sw1c_reg>;
@@ -700,6 +707,14 @@
             >;
         };
 
+        pinctrl_flexcan1: flexcan1grp {
+            fsl,pins = <
+                MX6QDL_PAD_GPIO_7__FLEXCAN1_TX        0x1b0b0
+                MX6QDL_PAD_GPIO_8__FLEXCAN1_RX        0x1b0b0
+                MX6QDL_PAD_GPIO_19__GPIO4_IO05          0x1b0b0 /* CAN_STBY */
+            >;
+        };
+
         pinctrl_gpio_keys: gpio_keysgrp {
             fsl,pins = <
                 MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x1b0b0

Outcomes