I use a i/MX286 processor and I would like to use the CAN controller inside. So I compiled my Linux 3.8 with CAN support (CAN, CAN RAW, Flexcan, etc...) in static. I have also updated the .dts to set the status to "okay" for the CAN0.
Linux boot correctly, but when I try to set up the can 0 with "ip link set can0 up type can bitrate 125000", linux tell me that it "cannot find device can0"
Did I forgot something ?
Thanks in advance
Gilles
PS: my bootloader is u-boot 2013.04
Solved! Go to Solution.
Hi, there
I am working on i.MX6q sabre-lite board and trying to enable CAN bus for the same. The CAN interface configuration has been enabled in the dts file and Freescale Flexcan driver support enabled in Kernel. Looking at the dmesgs I am able to see the CAN driver init is happening. But when I issue a ifconfig -a which is not listing the CAN interface.
On the board dts file.
--------------------------------
&can1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan1_1>;
status = "okay";
};
On the processor dts file
-----------------------------------
can1: flexcan@02090000 {
compatible = "fsl,imx6q-flexcan";
reg = <0x02090000 0x4000>;
interrupts = <0 110 0x04>;
clocks = <&clks 108>, <&clks 109>;
clock-names = "ipg", "per";
};
can2: flexcan@02094000 {
compatible = "fsl,imx6q-flexcan";
reg = <0x02094000 0x4000>;
interrupts = <0 111 0x04>;
clocks = <&clks 110>, <&clks 111>;
clock-names = "ipg", "per";
};
I have debugged the CAN driver init on kernel boot log. The kernel log message looks like below.
calling can_init+0x0/0x108 @ 1
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
initcall can_init+0x0/0x108 returned 0 after 9945 usecs
calling raw_module_init+0x0/0x40 @ 1
can: raw protocol (rev 20120528)
initcall raw_module_init+0x0/0x40 returned 0 after 2922 usecs
calling bcm_module_init+0x0/0x70 @ 1
can: broadcast manager protocol (rev 20120528 t)
initcall bcm_module_init+0x0/0x70 returned 0 after 4290 usecs
calling cgw_module_init+0x0/0x110 @ 1
can: netlink gateway (rev 20130117) max_hops=1
Looks like i have to do some changes in my dts file. Any pointers on this?
Your help will be appreciated...
This issue was rectified. It dis appeared when I recompiled the kernel and enabled Virtual can option.
Hi,
thank for your help. After a little pause due to work, I managed to run correctly flexcan on linux 3.8 with xenomai. I don't know what's happend, I'd just rewrite the dts....
In my case of Linux-3.9.7, socket can does work with "/dev/can0".
Hi Gilles,
please check first the Booting messages from Kernel for any CAN specific output and a existing CAN interface with:
ifconfig -a
Hi in my case, i tried with ifconfig -a, and i did not have any response grom kernel regarding Can.
what would be the possible problem?
I already installed canutils, modified the tree file, Also enabled "network utilities". Copy and create an imx image-multimedia image, and I keep getting the same problem.