AnsweredAssumed Answered

i.MX6q sabresd CAN/FLEXCAN Support

Question asked by Aravind Srinivasan on Jun 4, 2019
Latest reply on Jun 10, 2019 by Aravind Srinivasan

I am trying to bring up CAN I/F on i.mx6q sabresd on Android 8.0. i have made the kernel configurations such as 

 

CONFIG_CAN=y
CONFIG_CAN_VCAN=y
CONFIG_CAN_FLEXCAN=y
CONFIG_CAN_M_CAN=y

 

 and dtsi changes 

 

can1: flexcan@02090000 {
compatible = "fsl,imx6q-flexcan";
reg = <0x02090000 0x4000>;
interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_CAN1_IPG>,
<&clks IMX6QDL_CLK_CAN1_SERIAL>;
clock-names = "ipg", "per";
stop-mode = <&gpr 0x34 28 0x10 17>;
status = "enabled";
};

can2: flexcan@02094000 {
compatible = "fsl,imx6q-flexcan";
reg = <0x02094000 0x4000>;
interrupts = <0 111 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_CAN2_IPG>,
<&clks IMX6QDL_CLK_CAN2_SERIAL>;
clock-names = "ipg", "per";
stop-mode = <&gpr 0x34 29 0x10 18>;
status = "enabled";
};

 

can1 {
pinctrl_flexcan1_1: flexcan1grp-1 {
fsl,pins = <
MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x1b0b0
MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX 0x1b0b0
MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x4001b0b0 /* CAN_STBY */
>;
};

pinctrl_flexcan1_2: flexcan1grp-2 {
fsl,pins = <
MX6QDL_PAD_GPIO_7__FLEXCAN1_TX 0x1b0b0
MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x1b0b0
MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x4001b0b0 /* CAN_STBY */
>;
};

pinctrl_flexcan1_3: flexcan1grp-3 {
fsl,pins = <
MX6QDL_PAD_GPIO_7__FLEXCAN1_TX 0x1b0b0
MX6QDL_PAD_GPIO_8__FLEXCAN1_RX 0x1b0b0
MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x4001b0b0 /* CAN_STBY */
>;
};
};

 

how ever i am not able to enumerated can0 port on /sys/class/net/

 

my ifconfig -a is 

 

sabresd_6dq:/ # ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:04:9f:05:b7:18 Driver fec
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:0

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 TX bytes:0

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 TX bytes:0

 

 

kernel logs

 

sabresd_6dq:/ # dmesg | grep can
[ 0.502410] i2c i2c-0: can't use DMA, using PIO instead.
[ 0.503669] i2c i2c-1: can't use DMA, using PIO instead.
[ 0.504463] i2c i2c-2: can't use DMA, using PIO instead.
[ 1.819637] vcan: Virtual CAN interface driver
[ 1.825525] flexcan 2090000.flexcan: could not find pctldev for node /soc/can1/flexcan1grp-3, deferring probe
[ 1.834207] flexcan 2094000.flexcan: could not find pctldev for node /soc/can2/flexcan2grp-1, deferring probe
[ 4.009768] snvs-secvio 20cc000.caam-snvs: can't get snvs clock
[ 4.261684] can: controller area network core (rev 20120528 abi 9)
[ 4.269794] can: raw protocol (rev 20120528)
[ 4.272825] can: broadcast manager protocol (rev 20161123 t)
[ 4.277194] can: netlink gateway (rev 20130117) max_hops=1
[ 4.353356] flexcan 2090000.flexcan: could not find pctldev for node /soc/can1/flexcan1grp-3, deferring probe
[ 4.362515] flexcan 2094000.flexcan: could not find pctldev for node /soc/can2/flexcan2grp-1, deferring probe
[ 4.635453] flexcan 2090000.flexcan: could not find pctldev for node /soc/can1/flexcan1grp-3, deferring probe
[ 4.644554] flexcan 2094000.flexcan: could not find pctldev for node /soc/can2/flexcan2grp-1, deferring probe
[ 4.664613] flexcan 2090000.flexcan: could not find pctldev for node /soc/can1/flexcan1grp-3, deferring probe
[ 4.674109] flexcan 2094000.flexcan: could not find pctldev for node /soc/can2/flexcan2grp-1, deferring probe
[ 12.998737] flexcan 2090000.flexcan: could not find pctldev for node /soc/can1/flexcan1grp-3, deferring probe
[ 13.041782] flexcan 2094000.flexcan: could not find pctldev for node /soc/can2/flexcan2grp-1, deferring probe
[ 73.135941] flexcan 2090000.flexcan: could not find pctldev for node /soc/can1/flexcan1grp-3, deferring probe
[ 73.147405] flexcan 2094000.flexcan: could not find pctldev for node /soc/can2/flexcan2grp-1, deferring probe

 

Anything i am missing?

 

attached my sabresd board where i have fixed a DB9 connector in CAN I/F port.

 

Thanks in advance.

Attachments

Outcomes