I’ve made the preparations to engage CAN1 on my colibri vf 50 board running on viola 1.1. The dtsi is changed as per the suggestions given inhere. The board comes up with the following message in dmesg.
[ 14.627493] CAN device driver interface
[ 14.872628] vf610-pinctrl 40048000.iomuxc: pin VF610_PAD_PTB16 already requested by 40048000.iomuxc; cannot claim for 400d4000.flexcan
[ 14.903666] vf610-pinctrl 40048000.iomuxc: pin-38 (400d4000.flexcan) status -22
[ 14.930582] vf610-pinctrl 40048000.iomuxc: could not request pin 38 (VF610_PAD_PTB16) from group can1grp on device 40048000.iomuxc
[ 14.963561] flexcan 400d4000.flexcan: Error applying setting, reverse things back
[ 16.471036] 400d4000.flexcan supply xceiver not found, using dummy regulator
[ 16.756042] flexcan 400d4000.flexcan: device registered (reg_base=884f0000, irq=45)
While the hardware works with the CAN sniffer, when connected to viola, the error reported is always network down. Can someone suggest something please.
The update of the patch above that includes addition of line 20…21 of iomuxc made the pin errors go away. That clears the first hurdle. Now the Viola board does not report any problems while bootup. additionally i have observed no message coming in or going out of the CAN1_TX or CAN1_RX pins.
root@colibri-vf:~# dmesg | grep can
[ 15.031665] 400d4000.flexcan supply xceiver not found, using dummy regulator
[ 15.197365] flexcan 400d4000.flexcan: device registered (reg_base=88508000, irq=45)
[ 178.778307] can: controller area network core (rev 20120528 abi 9)
[ 178.840624] can: raw protocol (rev 20120528)
Thanks for the dmesg log. You can go to uboot and type print ver.
Additionally you should see the information in the console when you startup the module.
Can you type ip l in the console window and see if there is can0 and can1 showing up?
I have checked again the device tree files, we need to update our can article. These are the changes you have to apply to get can0 and can 1 working.
I’m back with no good news. The changes in the dtsi files resulted in no difference in activity of CAN1_RX or CAN1_TX. The result of ip l is: `
root@kolibriWhite:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 00:14:2d:49:c3:9a brd ff:ff:ff:ff:ff:ff
3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
link/can
4: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can
5: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 00:14:2d:ff:ff:ff brd ff:ff:ff:ff:ff:ff
6: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:36:76:02:2d:82 brd ff:ff:ff:ff:ff:ff
I would want to check if the ALT1 function is correctly set for the PTB16/PTB17 for CAN1 functions. How do i verify that the register settings of (Pin Mux) 0x4004_8098h are set to the right setting for the ALT mode?