All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, linux-can@vger.kernel.org,
	kernel@pengutronix.de, michael@walle.cc, qiangqing.zhang@nxp.com,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH 19/20] can: flexcan: add imx8qm support
Date: Wed, 23 Sep 2020 10:54:17 +0200	[thread overview]
Message-ID: <20200923085418.2685858-20-mkl@pengutronix.de> (raw)
In-Reply-To: <20200923085418.2685858-1-mkl@pengutronix.de>

From: Joakim Zhang <qiangqing.zhang@nxp.com>

The Flexcan on i.MX8QM supports CAN FD protocol.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Link: https://lore.kernel.org/r/20190712075926.7357-8-qiangqing.zhang@nxp.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/flexcan.c | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index fc98b5d521f2..5f778c961a0c 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -206,15 +206,16 @@
 /* FLEXCAN hardware feature flags
  *
  * Below is some version info we got:
- *    SOC   Version   IP-Version  Glitch- [TR]WRN_INT IRQ Err Memory err RTR re-
- *                                Filter? connected?  Passive detection  ception in MB
- *   MX25  FlexCAN2  03.00.00.00     no        no        no       no        no
- *   MX28  FlexCAN2  03.00.04.00    yes       yes        no       no        no
- *   MX35  FlexCAN2  03.00.00.00     no        no        no       no        no
- *   MX53  FlexCAN2  03.00.00.00    yes        no        no       no        no
- *   MX6s  FlexCAN3  10.00.12.00    yes       yes        no       no       yes
- *   VF610 FlexCAN3  ?               no       yes        no      yes       yes?
- * LS1021A FlexCAN2  03.00.04.00     no       yes        no       no       yes
+ *    SOC   Version   IP-Version  Glitch- [TR]WRN_INT IRQ Err Memory err RTR rece-   FD Mode
+ *                                Filter? connected?  Passive detection  ption in MB Supported?
+ *   MX25  FlexCAN2  03.00.00.00     no        no        no       no        no           no
+ *   MX28  FlexCAN2  03.00.04.00    yes       yes        no       no        no           no
+ *   MX35  FlexCAN2  03.00.00.00     no        no        no       no        no           no
+ *   MX53  FlexCAN2  03.00.00.00    yes        no        no       no        no           no
+ *   MX6s  FlexCAN3  10.00.12.00    yes       yes        no       no       yes           no
+ *   MX8QM FlexCAN3  03.00.23.00    yes       yes        no       no       yes          yes
+ *   VF610 FlexCAN3  ?               no       yes        no      yes       yes?          no
+ * LS1021A FlexCAN2  03.00.04.00     no       yes        no       no       yes           no
  *
  * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected.
  */
@@ -368,6 +369,12 @@ static const struct flexcan_devtype_data fsl_imx6q_devtype_data = {
 		FLEXCAN_QUIRK_SETUP_STOP_MODE,
 };
 
+static const struct flexcan_devtype_data fsl_imx8qm_devtype_data = {
+	.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
+		FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | FLEXCAN_QUIRK_BROKEN_PERR_STATE |
+		FLEXCAN_QUIRK_SUPPORT_FD,
+};
+
 static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
 	.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
 		FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
@@ -1830,6 +1837,7 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
 }
 
 static const struct of_device_id flexcan_of_match[] = {
+	{ .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, },
 	{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
 	{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
 	{ .compatible = "fsl,imx53-flexcan", .data = &fsl_imx25_devtype_data, },
-- 
2.28.0


  parent reply	other threads:[~2020-09-23  8:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23  8:53 pull-request: can-next 2020-09-23 Marc Kleine-Budde
2020-09-23  8:53 ` [PATCH 01/20] can: flexcan: sort include files alphabetically Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 02/20] can: flexcan: flexcan_exit_stop_mode(): remove stray empty line Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 03/20] can: flexcan: more register names Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 04/20] can: flexcan: struct flexcan_regs: document registers not affected by soft reset Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 05/20] can: flexcan: quirks: get rid of long lines Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 06/20] can: flexcan: Ack wakeup interrupt separately Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 07/20] can: flexcan: flexcan_probe(): make regulator xceiver optional Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 08/20] can: flexcan: Add check for transceiver maximum bitrate limitation Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 09/20] can: flexcan: add correctable errors correction when HW supports ECC Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 10/20] can: flexcan: flexcan_chip_stop(): add error handling and propagate error value Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 11/20] can: flexcan: disable clocks during stop mode Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 12/20] can: flexcan: add LPSR mode support Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 13/20] can: flexcan: flexcan_set_bittiming(): move setup of CAN-2.0 bitiming into separate function Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 14/20] can: flexcan: use struct canfd_frame for CAN classic frame Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 15/20] can: flexcan: add CAN-FD mode support Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 16/20] can: flexcan: add ISO CAN FD feature support Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 17/20] can: flexcan: add CAN FD BRS support Marc Kleine-Budde
2020-09-23  8:54 ` [PATCH 18/20] can: flexcan: add Transceiver Delay Compensation support Marc Kleine-Budde
2020-09-23  8:54 ` Marc Kleine-Budde [this message]
2020-09-23  8:54 ` [PATCH 20/20] can: flexcan: add lx2160ar1 support Marc Kleine-Budde
2020-09-23 19:10 ` pull-request: can-next 2020-09-23 David Miller
  -- strict thread matches above, loose matches on Subject: below --
2020-09-22 14:44 [RFC]: flexcan FD support - can-next 2020-09-22 Marc Kleine-Budde
2020-09-22 14:44 ` [PATCH 19/20] can: flexcan: add imx8qm support Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200923085418.2685858-20-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.org \
    --cc=qiangqing.zhang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.