From e88338e5fcfa6eb04524ae053e5224260d406479 Mon Sep 17 00:00:00 2001 From: Peter Bailey Date: Tue, 21 Jul 2026 15:55:04 +0100 Subject: [PATCH 1/4] arm64: configs: Enable CONFIG_SUSPEND Signed-off-by: Peter Bailey --- arch/arm64/configs/bcm2712_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/configs/bcm2712_defconfig b/arch/arm64/configs/bcm2712_defconfig index c5573cf1bd11c0..b72788f16212d3 100644 --- a/arch/arm64/configs/bcm2712_defconfig +++ b/arch/arm64/configs/bcm2712_defconfig @@ -59,7 +59,7 @@ CONFIG_CP15_BARRIER_EMULATION=y CONFIG_SETEND_EMULATION=y CONFIG_RANDOMIZE_BASE=y CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" -# CONFIG_SUSPEND is not set +CONFIG_SUSPEND=y CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_CPU_IDLE=y From f06b1e5584e2d982e5937d957cde22fb21592363 Mon Sep 17 00:00:00 2001 From: Peter Bailey Date: Tue, 21 Jul 2026 15:56:52 +0100 Subject: [PATCH 2/4] watchdog: bcm2835: Stop watchdog during suspend/resume Signed-off-by: Peter Bailey --- drivers/watchdog/bcm2835_wdt.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c index ed4ae9fdf9d222..2e7a7ce6297e57 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c @@ -232,11 +232,31 @@ static void bcm2835_wdt_remove(struct platform_device *pdev) pm_power_off = NULL; } +static int bcm2835_wdt_suspend(struct device *dev) +{ + if (watchdog_active(&bcm2835_wdt_wdd) || watchdog_hw_running(&bcm2835_wdt_wdd)) + bcm2835_wdt_stop(&bcm2835_wdt_wdd); + + return 0; +} + +static int bcm2835_wdt_resume(struct device *dev) +{ + if (watchdog_active(&bcm2835_wdt_wdd) || watchdog_hw_running(&bcm2835_wdt_wdd)) + bcm2835_wdt_start(&bcm2835_wdt_wdd); + + return 0; +} + +static DEFINE_SIMPLE_DEV_PM_OPS(bcm2835_wdt_pm_ops, + bcm2835_wdt_suspend, bcm2835_wdt_resume); + static struct platform_driver bcm2835_wdt_driver = { .probe = bcm2835_wdt_probe, .remove = bcm2835_wdt_remove, .driver = { .name = "bcm2835-wdt", + .pm = pm_sleep_ptr(&bcm2835_wdt_pm_ops), }, }; module_platform_driver(bcm2835_wdt_driver); From b07e653f559b0a686414abd64129f9f97943187a Mon Sep 17 00:00:00 2001 From: Peter Bailey Date: Tue, 21 Jul 2026 16:14:14 +0100 Subject: [PATCH 3/4] arm64: dts: broadcom: bcm2712: Power off wireless during suspend/resume Signed-off-by: Peter Bailey --- arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 1 + arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts index c8908f6b3143b5..c6ff03ba495a8d 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts @@ -426,6 +426,7 @@ dpi_16bit_gpio2: &rp1_dpi_16bit_gpio2 { }; vmmc-supply = <&wl_on_reg>; sd-uhs-ddr50; non-removable; + cap-power-off-card; status = "okay"; #address-cells = <1>; #size-cells = <0>; diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi index dfad85a666a8a6..76ecc3d2e35826 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi @@ -411,6 +411,7 @@ dpi_16bit_gpio2: &rp1_dpi_16bit_gpio2 { }; vmmc-supply = <&wl_on_reg>; sd-uhs-ddr50; non-removable; + cap-power-off-card; status = "okay"; #address-cells = <1>; #size-cells = <0>; From bd60a513c3cb187b2f0480d7e2bdf24549cc6309 Mon Sep 17 00:00:00 2001 From: Peter Bailey Date: Thu, 23 Jul 2026 16:04:24 +0100 Subject: [PATCH 4/4] ACPI: PCI: bcm2712: Set acpi_storage_d3 to true on bcm2712 This makes the NVMe driver reset drives during suspend/resume. Signed-off-by: Peter Bailey --- include/linux/acpi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 5ff5d99f6ead50..d038dc2996e0e4 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1182,7 +1183,7 @@ static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) } static inline bool acpi_storage_d3(struct device *dev) { - return false; + return of_machine_is_compatible("brcm,bcm2712"); } static inline bool acpi_dev_state_d0(struct device *dev) {