From: Marc Kleine-Budde <mkl@pengutronix.de>
To: haibo.chen@nxp.com
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de,
wg@grandegger.com, kernel@pengutronix.de, linux-imx@nxp.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, devicetree@vger.kernel.org,
linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] can: flexcan: remove the auto stop mode for IMX93
Date: Wed, 26 Jul 2023 08:35:32 +0200 [thread overview]
Message-ID: <20230726-deflected-slider-8e928de8616a-mkl@pengutronix.de> (raw)
In-Reply-To: <20230726035032.3073951-2-haibo.chen@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 2614 bytes --]
On 26.07.2023 11:50:32, haibo.chen@nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
>
> IMX93 A0 chip involve the internal q-channel handshake in LPCG and
> CCM to automatically handle the Flex-CAN IPG STOP signal. Only after
> FLEX-CAN enter stop mode then can support the self-wakeup feature.
>
> But meet issue when do the continue system PM stress test. When config
> the CAN as wakeup source, the first time after system suspend, any data
> on CAN bus can wakeup the system, this is as expect. But the second time
> when system suspend, data on CAN bus can't wakeup the system. If continue
> this test, we find in odd time system enter suspend, CAN can wakeup the
> system, but in even number system enter suspend, CAN can't wakeup the
> system.
>
> IC find a bug in the auto stop mode logic when handle the q-channel, and
> can't fix it easily. So for the new imx93 A1, IC drop the auto stop mode
> and involve the GPR to support stop mode (used before). IC define a bit
> in GPR which can trigger the IPG STOP signal to Flex-CAN, let it go into
> stop mode.
>
> Now NXP claim to drop IMX93 A0, and only support IMX93 A1. So this patch
> remove the auto stop mode, and add flag FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR
> to imx93.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
> drivers/net/can/flexcan/flexcan-core.c | 37 ++++----------------------
> drivers/net/can/flexcan/flexcan.h | 2 --
> 2 files changed, 5 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
> index ff0fc18baf13..a3f3a9c909be 100644
> --- a/drivers/net/can/flexcan/flexcan-core.c
> +++ b/drivers/net/can/flexcan/flexcan-core.c
> @@ -348,7 +348,7 @@ static struct flexcan_devtype_data fsl_imx8mp_devtype_data = {
> static struct flexcan_devtype_data fsl_imx93_devtype_data = {
> .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
> FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_RX_MAILBOX |
> - FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_AUTO_STOP_MODE |
> + FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR |
AFAICS this change breaks systems with old device trees (i.e. without
"fsl,stop-mode") and new kernels. The flexcan driver will not probe
anymore.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-07-26 6:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 3:50 [PATCH 1/2] arm64: dts: imx93: add the Flex-CAN stop mode by GPR haibo.chen
2023-07-26 3:50 ` [PATCH 2/2] can: flexcan: remove the auto stop mode for IMX93 haibo.chen
2023-07-26 6:35 ` Marc Kleine-Budde [this message]
2023-07-26 8:04 ` Bough Chen
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=20230726-deflected-slider-8e928de8616a-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=haibo.chen@nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=wg@grandegger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).