[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250912104733.173281-1-biju.das.jz@bp.renesas.com>
Date: Fri, 12 Sep 2025 11:47:18 +0100
From: Biju <biju.das.au@...il.com>
To: Marc Kleine-Budde <mkl@...gutronix.de>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>
Cc: Biju Das <biju.das.jz@...renesas.com>,
linux-can@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>,
Biju Das <biju.das.au@...il.com>
Subject: [PATCH v2 0/7] Add suspend/resume support
From: Biju Das <biju.das.jz@...renesas.com>
Hi all,
This patch series adds proper suspend/resume support to the Renesas
R-Car CAN-FD controller driver, after the customary cleanuops and fixes.
It aims to fix CAN-FD operation after resume from s2ram on systems where
PSCI powers down the SoC.
This patch series has been tested on RZ/G3E SMARC EVK, Ebisu-4D (R-Car E3)
and White Hawk (R-Car V4H).
v1->v2:
* Added logs from RZ/G3E
* Collected tags.
* Moved enabling of RAM clk from probe().
* Added RAM clk handling in rcar_canfd_global_{,de}init().
* Fixed the typo in error path of rcar_canfd_resume().
Logs from RZ/G3E:
root@...rc-rzg3e:~# /canfd_t_003_all.sh
[INFO] Testing can0<->can1 with bitrate 1000000 and dbitrate 4000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[ 541.705921] can: controller area network core
[ 541.710369] NET: Registered PF_CAN protocol family
[ 541.753974] can: raw protocol
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 500000 and dbitrate 2000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 250000 and dbitrate 1000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
EXIT|PASS|canfd_t_003.sh|[00:00:25] ||
bind/unbind
----------
[ 566.821475] rcar_canfd 12440000.can: can_clk rate is 80000000
[ 566.828076] rcar_canfd 12440000.can: device registered (channel 1)
[ 566.834361] rcar_canfd 12440000.can: can_clk rate is 80000000
[ 566.841842] rcar_canfd 12440000.can: device registered (channel 4)
[ 566.848093] rcar_canfd 12440000.can: global operational state (canfd clk, fd mode)
[INFO] Testing can0<->can1 with bitrate 1000000 and dbitrate 4000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 500000 and dbitrate 2000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 250000 and dbitrate 1000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
EXIT|PASS|canfd_t_003.sh|[00:00:25] ||
s2idle
-----
[ 592.182479] PM: suspend entry (s2idle)
[ 592.187031] Filesystems sync: 0.000 seconds
[ 592.193221] Freezing user space processes
[ 592.199425] Freezing user space processes completed (elapsed 0.002 seconds)
[ 592.206450] OOM killer disabled.
[ 592.209843] Freezing remaining freezable tasks
[ 592.215775] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 592.223247] printk: Suspending console(s) (use no_console_suspend to debug)
[ 592.260524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 592.322759] renesas-gbeth 15c30000.ethernet end0: Link is Down
[ 596.070955] dwmac4: Master AXI performs any burst length
[ 596.072307] renesas-gbeth 15c30000.ethernet end0: No Safety Features support found
[ 596.072376] renesas-gbeth 15c30000.ethernet end0: IEEE 1588-2008 Advanced Timestamp supported
[ 596.077470] renesas-gbeth 15c30000.ethernet end0: configuring for phy/rgmii-id link mode
[ 596.087503] dwmac4: Master AXI performs any burst length
[ 596.088817] renesas-gbeth 15c40000.ethernet end1: No Safety Features support found
[ 596.088881] renesas-gbeth 15c40000.ethernet end1: IEEE 1588-2008 Advanced Timestamp supported
[ 596.093997] renesas-gbeth 15c40000.ethernet end1: configuring for phy/rgmii-id link mode
[ 596.141986] usb usb1: root hub lost power or was reset
[ 596.142031] usb usb2: root hub lost power or was reset
[ 598.304525] usb 2-1: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci-renesas-hcd
[ 598.414846] OOM killer enabled.
[ 598.418002] Restarting tasks: Starting
[ 598.422518] Restarting tasks: Done
[ 598.425999] random: crng reseeded on system resumption
[ 598.431248] PM: suspend exit
[ 598.661875] renesas-gbeth 15c30000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx
[INFO] Testing can0<->can1 with bitrate 1000000 and dbitrate 4000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 500000 and dbitrate 2000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 250000 and dbitrate 1000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
EXIT|PASS|canfd_t_003.sh|[00:00:25] ||
str
---
[ 624.898952] PM: suspend entry (deep)
[ 624.903619] Filesystems sync: 0.000 seconds
[ 624.908715] Freezing user space processes
[ 624.914609] Freezing user space processes completed (elapsed 0.001 seconds)
[ 624.921599] OOM killer disabled.
[ 624.924862] Freezing remaining freezable tasks
[ 624.930642] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 624.938059] printk: Suspending console(s) (use no_console_suspend to debug)
NOTICE: BL2: v2.10.5(release):2.10.5/rz_soc_dev-169-g1410189b0
NOTICE: BL2: Built : 12:53:12, Jul 15 2025
NOTICE: BL2: SYS_LSI_MODE: 0x13e06
NOTICE: BL2: SYS_LSI_DEVID: 0x8679447
NOTICE: BL2: SYS_LSI_PRR: 0x0
NOTICE: BL2: Booting BL31
[ 624.984425] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 625.036962] renesas-gbeth 15c30000.ethernet end0: Link is Down
[ 625.050909] Disabling non-boot CPUs ...
[ 625.055800] psci: CPU3 killed (polled 0 ms)
[ 625.062476] psci: CPU2 killed (polled 0 ms)
[ 625.068380] psci: CPU1 killed (polled 4 ms)
[ 625.073342] Enabling non-boot CPUs ...
[ 625.073551] Detected VIPT I-cache on CPU1
[ 625.073598] GICv3: CPU1: found redistributor 100 region 0:0x0000000014960000
[ 625.073635] CPU1: Booted secondary processor 0x0000000100 [0x412fd050]
[ 625.074465] CPU1 is up
[ 625.074565] Detected VIPT I-cache on CPU2
[ 625.074587] GICv3: CPU2: found redistributor 200 region 0:0x0000000014980000
[ 625.074609] CPU2: Booted secondary processor 0x0000000200 [0x412fd050]
[ 625.075179] CPU2 is up
[ 625.075276] Detected VIPT I-cache on CPU3
[ 625.075299] GICv3: CPU3: found redistributor 300 region 0:0x00000000149a0000
[ 625.075320] CPU3: Booted secondary processor 0x0000000300 [0x412fd050]
[ 625.076021] CPU3 is up
[ 625.092153] dwmac4: Master AXI performs any burst length
[ 625.093058] renesas-gbeth 15c30000.ethernet end0: No Safety Features support found
[ 625.093078] renesas-gbeth 15c30000.ethernet end0: IEEE 1588-2008 Advanced Timestamp supported
[ 625.096594] renesas-gbeth 15c30000.ethernet end0: configuring for phy/rgmii-id link mode
[ 625.114030] dwmac4: Master AXI performs any burst length
[ 625.114926] renesas-gbeth 15c40000.ethernet end1: No Safety Features support found
[ 625.114942] renesas-gbeth 15c40000.ethernet end1: IEEE 1588-2008 Advanced Timestamp supported
[ 625.118528] renesas-gbeth 15c40000.ethernet end1: configuring for phy/rgmii-id link mode
[ 625.165208] usb usb1: root hub lost power or was reset
[ 625.165216] usb usb2: root hub lost power or was reset
[ 627.324220] usb 2-1: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci-renesas-hcd
[ 627.511216] OOM killer enabled.
[ 627.514354] Restarting tasks: Starting
[ 627.518782] Restarting tasks: Done
[ 627.522274] random: crng reseeded on system resumption
[ 627.527525] PM: suspend exit
[ 627.788377] renesas-gbeth 15c30000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx
[INFO] Testing can0<->can1 with bitrate 1000000 and dbitrate 4000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 500000 and dbitrate 2000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
[INFO] Testing can0<->can1 with bitrate 250000 and dbitrate 1000000
[INFO] Bringing down can0 can1
[INFO] Bringing up can0 can1
[INFO] Testing can1 as producer and can0 as consumer
[INFO] Testing can0 as producer and can1 as consumer
EXIT|PASS|canfd_t_003.sh|[00:00:25] ||
root@...rc-rzg3e:~#
Biju Das (1):
can: rcar_canfd: Move enabling of RAM clk from probe()
Geert Uytterhoeven (6):
can: rcar_canfd: Invert reset assert order
can: rcar_canfd: Invert global vs. channel teardown
can: rcar_canfd: Extract rcar_canfd_global_{,de}init()
can: rcar_canfd: Invert CAN clock and close_candev() order
can: rcar_canfd: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
can: rcar_canfd: Add suspend/resume support
drivers/net/can/rcar/rcar_canfd.c | 246 ++++++++++++++++++++----------
1 file changed, 168 insertions(+), 78 deletions(-)
--
2.43.0
Powered by blists - more mailing lists