can: flexcan: remove the auto stop mode for IMX93
authorHaibo Chen <haibo.chen@nxp.com>
Wed, 26 Jul 2023 11:24:58 +0000 (19:24 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 6 Oct 2023 10:54:33 +0000 (12:54 +0200)
commit63ead535570f13d0e06fda3f2d020c8f5394e998
treea551f1827417424a0dd814406f17ec47325620f4
parent23ed2be5404da7cee6a519fa69bf22d0f69da4e4
can: flexcan: remove the auto stop mode for IMX93

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, 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.
And 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>
Link: https://lore.kernel.org/all/20230726112458.3524165-2-haibo.chen@nxp.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan/flexcan-core.c
drivers/net/can/flexcan/flexcan.h