summaryrefslogtreecommitdiff
path: root/drivers/net/can/flexcan.c
diff options
context:
space:
mode:
authorDong Aisheng <aisheng.dong@nxp.com>2017-12-15 18:49:38 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit2f6b5c56b23eba9a0eafb006cee3ab5b30e502f2 (patch)
tree65cee386a77299accf068a1f25103890726a8166 /drivers/net/can/flexcan.c
parent6d6a3dc6c369d061c667652e3889f618f82494fe (diff)
MLK-16879-3 can: flexcan: add notes for avaliable fd mode rate combinations
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>
Diffstat (limited to 'drivers/net/can/flexcan.c')
-rw-r--r--drivers/net/can/flexcan.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 278f53c24b71..712006eab365 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -261,6 +261,25 @@
#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: