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>
#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: