public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] ARM: bcm2835: Implement initial S2Idle for Raspberry Pi
@ 2024-06-30 15:36 Stefan Wahren
  2024-06-30 15:36 ` [PATCH 01/11] firmware: raspberrypi: Improve timeout warning Stefan Wahren
                   ` (11 more replies)
  0 siblings, 12 replies; 42+ messages in thread
From: Stefan Wahren @ 2024-06-30 15:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Florian Fainelli, Ray Jui, Scott Branden,
	Maxime Ripard, Thomas Gleixner, Jassi Brar, Ulf Hansson,
	Jiri Slaby, Minas Harutyunyan
  Cc: Dave Stevenson, Maarten Lankhorst, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Lukas Wunner, Peter Robinson,
	dri-devel, bcm-kernel-feedback-list, linux-pm, linux-serial,
	linux-usb, linux-arm-kernel, kernel-list, Stefan Wahren

This series implement the initial Suspend-To-Idle support for
the Raspberry Pi, which was a long time on my TODO list [1]. The
changes allow to suspend and resume the Raspberry Pi via debug UART.
The focus is on the BCM2835 SoC, because it's less complex than its
successors and have enough documentation.

The series is a loose collection of fixes and improvements.
So cherry-picking should be fine.

Test steps:
- configure debug console (pl011 or mini UART) as wakeup source
- send system to idle state

  echo freeze > /sys/power/state

- wakeup system by console traffic

The implementation isn't perfect and contains workarounds like
patch 4 and 9. So there is still room for improvements, but
at least the system won't freeze forever as before [2].

Here are some figures for the Raspberry Pi 1 (without any
devices connected except of a debug UART):

running but CPU idle = 1.67 W
suspend to idle      = 1.33 W

The series has been tested on the following platforms:
Raspberry Pi 1 B
Raspberry Pi 3 A+
Raspberry Pi 3 B+

Known issues:
- currently it's not possible to power down the USB domain [3]
- there seems to be an issue with the DWC2 suspend handling [4]

[1] - https://github.com/lategoodbye/rpi-zero/issues/9
[2] - https://bugzilla.redhat.com/show_bug.cgi?id=2283978
[3] - https://github.com/raspberrypi/firmware/issues/1894
[4] - https://lore.kernel.org/linux-usb/3fd0c2fb-4752-45b3-94eb-42352703e1fd@gmx.net/T/

Stefan Wahren (11):
  firmware: raspberrypi: Improve timeout warning
  mailbox: bcm2835: Fix timeout during suspend mode
  pmdomain: raspberrypi-power: Adjust packet definition
  pmdomain: raspberrypi-power: Avoid powering down USB
  irqchip/bcm2835: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
  drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get
  drm/vc4: hdmi: Disable connector status polling during suspend
  usb: dwc2: debugfs: Print parameter no_clock_gating
  usb: dwc2: Skip clock gating on Broadcom SoCs
  serial: 8250_bcm2835aux: add PM suspend/resume support
  ARM: bcm2835_defconfig: Enable SUSPEND

 arch/arm/configs/bcm2835_defconfig        |  2 --
 drivers/firmware/raspberrypi.c            |  3 ++-
 drivers/gpu/drm/vc4/vc4_hdmi.c            | 18 +++++++++++++++++-
 drivers/irqchip/irq-bcm2835.c             |  4 +++-
 drivers/mailbox/bcm2835-mailbox.c         |  3 ++-
 drivers/pmdomain/bcm/raspberrypi-power.c  | 17 ++++++++++++-----
 drivers/tty/serial/8250/8250_bcm2835aux.c | 23 +++++++++++++++++++++++
 drivers/usb/dwc2/debugfs.c                |  1 +
 drivers/usb/dwc2/params.c                 |  1 +
 9 files changed, 61 insertions(+), 11 deletions(-)

--
2.34.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2024-07-23 17:28 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-30 15:36 [PATCH 00/11] ARM: bcm2835: Implement initial S2Idle for Raspberry Pi Stefan Wahren
2024-06-30 15:36 ` [PATCH 01/11] firmware: raspberrypi: Improve timeout warning Stefan Wahren
2024-07-04 14:10   ` Florian Fainelli
2024-06-30 15:36 ` [PATCH 02/11] mailbox: bcm2835: Fix timeout during suspend mode Stefan Wahren
2024-07-04 14:10   ` Florian Fainelli
2024-06-30 15:36 ` [PATCH 03/11] pmdomain: raspberrypi-power: Adjust packet definition Stefan Wahren
2024-07-04 14:11   ` Florian Fainelli
2024-06-30 15:36 ` [PATCH 04/11] pmdomain: raspberrypi-power: Avoid powering down USB Stefan Wahren
2024-06-30 15:36 ` [PATCH 05/11] irqchip/bcm2835: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND Stefan Wahren
2024-07-04 14:11   ` Florian Fainelli
2024-06-30 15:36 ` [PATCH 06/11] drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get Stefan Wahren
2024-07-02 13:48   ` Maxime Ripard
2024-07-02 19:46   ` Maíra Canal
2024-07-23 17:27   ` Stefan Wahren
2024-06-30 15:36 ` [PATCH 07/11] drm/vc4: hdmi: Disable connector status polling during suspend Stefan Wahren
2024-07-02 13:48   ` Maxime Ripard
2024-07-03 10:28     ` Stefan Wahren
2024-07-03 15:32       ` Stefan Wahren
2024-07-03 15:58         ` Dave Stevenson
2024-07-02 20:02   ` Peter Robinson
2024-07-04 16:25     ` Stefan Wahren
2024-06-30 15:36 ` [PATCH 08/11] usb: dwc2: debugfs: Print parameter no_clock_gating Stefan Wahren
2024-07-01  5:56   ` Minas Harutyunyan
2024-07-04 14:13   ` Florian Fainelli
2024-06-30 15:36 ` [PATCH 09/11] usb: dwc2: Skip clock gating on Broadcom SoCs Stefan Wahren
2024-07-01  5:56   ` Minas Harutyunyan
2024-07-04 14:14   ` Florian Fainelli
2024-07-04 15:33     ` Stefan Wahren
2024-07-05  8:48     ` Lukas Wunner
2024-07-05 10:22       ` Stefan Wahren
2024-07-05 15:03         ` Lukas Wunner
2024-07-05 15:21           ` Stefan Wahren
2024-07-05 17:16             ` Jeremy Linton
2024-07-05 21:14               ` Lukas Wunner
2024-07-10 13:33                 ` Stefan Wahren
2024-07-10 15:50                 ` Jeremy Linton
2024-06-30 16:53 ` [PATCH RFT 10/11] serial: 8250_bcm2835aux: add PM suspend/resume support Stefan Wahren
2024-07-04 14:12   ` Florian Fainelli
2024-07-04 15:40     ` Stefan Wahren
2024-06-30 17:19 ` [PATCH 11/11] ARM: bcm2835_defconfig: Enable SUSPEND Stefan Wahren
2024-07-04 14:13   ` Florian Fainelli
2024-07-02 20:08 ` [PATCH 00/11] ARM: bcm2835: Implement initial S2Idle for Raspberry Pi Peter Robinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox