How to enable both CAN1 and CAN2 on iMX6QP SabreAuto

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to enable both CAN1 and CAN2 on iMX6QP SabreAuto

跳至解决方案
1,872 次查看
stw_sesa
Contributor I

Hi,

I want to use both CAN ports on my iMX6 Quad Plus + Sabre Automotive Base Board (+ Atheros GBit Ethernet).

The problem is that only a single one (CAN2) is available in Linux (as "can0").

I'm using bitbake from the Yocto project to build the SD-card image with Linux.

BSP: FSL Community BSP

Build Configuration file "local.conf" (excerpt):

MACHINE ??= 'imx6qpsabreauto'

DISTRO_FEATURES_remove = "x11 wayland directfb "

IMAGE_INSTALL_append = "iproute2 libsocketcan canutils"

Build command:

bitbake core-image-minimal

According to some other answers in this community portal I've added "can0" to the kernel boot arguments, but it does not help.

The boot log contains only a message that a single can device was registered.

root@imx6qpsabreauto:~# dmesg | grep can

Kernel command line: console=ttymxc3,115200 root=/dev/mmcblk2p2 rootwait rw can0

2094000.can supply xceiver not found, using dummy regulator

flexcan 2094000.can: device registered (reg_base=f0238000, irq=143)

can: controller area network core (rev 20120528 abi 9)

can: raw protocol (rev 20120528)

can: broadcast manager protocol (rev 20120528 t)

can: netlink gateway (rev 20130117) max_hops=1

CAN2 is available as "can0" in Linux and works after configuration:

root@imx6qpsabreauto:~# ifconfig -a

can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

          NOARP  MTU:16  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:10

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:143

eth0      Link encap:Ethernet  HWaddr 00:04:9F:03:D9:86

          inet6 addr: fe80::204:9fff:fe03:d986/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:106 errors:0 dropped:0 overruns:0 frame:0

          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:12550 (12.2 KiB)  TX bytes:8172 (7.9 KiB)

root@imx6qpsabreauto:~# ip link set can0 up type can bitrate 500000

flexcan 2094000.can can0: writing ctrl=0x03292005

How can I enable CAN1 ?

Thank You.

标签 (3)
标记 (1)
0 项奖励
回复
1 解答
1,040 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Stefan

it is necessary to use zImage-imx6qp-sabreauto-flexcan1.dtb

configuration, as flexcan1 is disabled by default in standard DTB file due to

pin conflicts with FEC. Please refer to attached Release Notes Table 3. Kernel

and device tree configurations.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,041 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Stefan

it is necessary to use zImage-imx6qp-sabreauto-flexcan1.dtb

configuration, as flexcan1 is disabled by default in standard DTB file due to

pin conflicts with FEC. Please refer to attached Release Notes Table 3. Kernel

and device tree configurations.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复