AR# 72000

|

AXI CAN-FD Linux driver does not work for Flexible Datarate

Description

The CAN-FD Linux driver does not work as per FD specifications for bit rates above 1Mbps.

FD support issues have been identified in the driver:

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/net/can/xilinx_can.c

Solution

The CAN-FD Linux driver https://github.com/Xilinx/linux-xlnx/blob/master/drivers/net/can/xilinx_can.c has the following issues:

1) It is using phase segment 1 of the arbitration phase instead of the data phase to calculate BTR:

btr1 = dbt->prop_seg + bt->phase_seg1 - 1;

2) It is shifting phase segment 2 based on CAN instead of CAN FD:

btr1 |= (dbt->phase_seg2 - 1) << XCAN_BTR_TS2_SHIFT;

3) It is shifting SJW based on CAN instead of CAN FD:

btr1 |= (dbt->sjw - 1) << XCAN_BTR_SJW_SHIFT;


Attached is a CAN FD driver patch which has been tested thoroughly with FD for various bit rates above 1Mbps.

These issues are noted with the CAN-FD software driver from PetaLinux 2017.2 up to the 2018.3 release.

The driver issue is due to be fixed in the 2019.1 version, kernel 4.19.

Attachments

Associated Attachments

Name File Size File Type
ar72000_2017.2_patch.zip 1009 Bytes ZIP
ar72000_2018.3_patch.zip 1 KB ZIP
AR# 72000
Date 03/25/2019
Status Active
Type General Article
Devices
Tools
IP
Boards & Kits More Less
People Also Viewed