MLK-16879-3 can: flexcan: add notes for avaliable fd mode rate combinations
authorDong Aisheng <aisheng.dong@nxp.com>
Fri, 15 Dec 2017 10:49:38 +0000 (18:49 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:51:48 +0000 (14:51 -0500)
CAN FD can only support some specific bitrate combinations in FD mode
due to HW limitations. See below info mentioned in RM:
"To minimize errors when processing FD frames, use the same value
for FPRESDIV and PRESDIV (in CAN_CBT or CAN_CTRL1)."

Add notes in driver to let user know easily:

CAN FD supported rates combinations
* Combination 1:
*  Bitrate: 225000 375000 400000 425000 500000 875000
*  Data rate: 1000000
*
* Combination 2:
*  Bitrate:   550000 600000 625000 650000 675000 750000 775000
*             800000 850000 925000 950000 975000 1000000
*  Data rate: 1500000 2000000 2500000 3000000 3500000 4000000
*             5000000

Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
drivers/net/can/flexcan.c

index 278f53c..712006e 100644 (file)
 #define FLEXCAN_CANFD_MBDSR_SHIFT      16
 #define FLEXCAN_CANFD_MBDSR_DEFAULT    0x6db
 
+/*
+ * NOTE:
+ * To minimize errors when processing FD frames, use the same value
+ * for FPRESDIV and PRESDIV (in CAN_CBT or CAN_CTRL1).
+ * For more details refer to the first NOTE in section CAN FD frames.
+ *
+ * CAN FD supported rates combinations
+ *
+ * Combination 1:
+ *  Bitrate: 225000 375000 400000 425000 500000 875000
+ *  Data rate: 1000000
+ *
+ * Combination 2:
+ *  Bitrate:   550000 600000 625000 650000 675000 750000 775000
+ *             800000 850000 925000 950000 975000 1000000
+ *  Data rate: 1500000 2000000 2500000 3000000 3500000 4000000
+ *             5000000
+ */
+
 /* registers definition
  *
  * FIFO-MODE: