This series implement S2Idle support for the BCM2835, which is mostly used on the Raspberry Pi boards. 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 series based on an idea of Doug Anderson. The USB domain is now powered down and the USB devices are still usable after resume. 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 S2Idle = 1.33 W In comparison with HDMI & USB keyboard connected (but neither active nor wakeup source): running but CPU idle = 1.82 W S2Idle = 1.33 W The series has been successfully tested on the following platforms: Raspberry Pi 1 B Raspberry Pi 3 B+ Changes in V6: - adapt cover letter to focus on DWC2 (was ARM: bcm2835: Implement initial S2Idle for Raspberry Pi) - drop already applied patches and bcm2835_defconfig changes - rebase on Linux 6.14-rc1 Changes in V5: - add missing version Changes in V4: - added Reviewed-by from Doug - fix DWC2 register backup - add revert because of Raspberry Pi 3B+ regression Changes in V3: - replace old USB recovery patch with canary approach [3], which should work with other platforms V5: https://lore.kernel.org/linux-usb/20241025103621.4780-1-wahrenst@xxxxxxx/ Stefan Wahren (3): usb: dwc2: gadget: Introduce register restore flags usb: dwc2: Refactor backup/restore of registers usb: dwc2: Implement recovery after PM domain off drivers/usb/dwc2/core.c | 1 + drivers/usb/dwc2/core.h | 23 ++++++- drivers/usb/dwc2/gadget.c | 116 +++++++++++++++++++----------------- drivers/usb/dwc2/hcd.c | 99 +++++++++++++++--------------- drivers/usb/dwc2/platform.c | 38 ++++++++++++ 5 files changed, 171 insertions(+), 106 deletions(-) -- 2.34.1