From 64a6995104f0fe83b64a7d48a33493a7cf8cb8ad Mon Sep 17 00:00:00 2001 From: ricktav <82380971+ricktav@users.noreply.github.com> Date: Tue, 24 Nov 2026 08:22:50 +0100 Subject: [PATCH 1/2] A9: keep the AOP GPIO domain on, so s2idle wakes with the AOP running With the AOP started (t8010/0040, 0041), an iPhone 6s Plus hangs in s2idle: genpd turns aop_gpio off in the noirq phase while the AOP firmware keeps running. Mark aop_gpio always-on, as ps_aop is. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SFMaVf5sMxs7xEyPFZWGEj --- ...s800-0-3-Keep-the-AOP-GPIO-domain-on.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 kernel/patches/devices/t8010/0048-arm64-dts-apple-s800-0-3-Keep-the-AOP-GPIO-domain-on.patch diff --git a/kernel/patches/devices/t8010/0048-arm64-dts-apple-s800-0-3-Keep-the-AOP-GPIO-domain-on.patch b/kernel/patches/devices/t8010/0048-arm64-dts-apple-s800-0-3-Keep-the-AOP-GPIO-domain-on.patch new file mode 100644 index 00000000..f35efcc9 --- /dev/null +++ b/kernel/patches/devices/t8010/0048-arm64-dts-apple-s800-0-3-Keep-the-AOP-GPIO-domain-on.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: ricktav <82380971+ricktav@users.noreply.github.com> +Date: Tue, 24 Nov 2026 08:17:06 +0100 +Subject: [PATCH] arm64: dts: apple: s800-0-3: Keep the AOP GPIO domain on + +The AOP's firmware keeps running while Linux sleeps, but its GPIO +block's power domain, aop_gpio, is not always-on like the AOP's own. +In s2idle genpd turns aop_gpio off in the noirq phase. On an iPhone 6s +Plus (N66) with the AOP started, pm_test=platform then never returned, +and a real s2idle could not be woken by the Power or Home button; +without the AOP driver both worked. Presumably the running firmware +touches the powered-off block and the bus hangs. + +Mark aop_gpio always-on, as ps_aop is. With only that changed, on the +same phone with the AOP running, pm_test=platform returns after its +5 s, and s2idle wakes on the Power button, after which the AOP still +answers (the barometer reads). + +The file is shared by every S8000 and S8003 board, so this also +changes the iPad 5, which starts the AOP too. It is not tested there. + +Assisted-by: LLM +Signed-off-by: ricktav <82380971+ricktav@users.noreply.github.com> +--- + arch/arm64/boot/dts/apple/s800-0-3-pmgr.dtsi | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm64/boot/dts/apple/s800-0-3-pmgr.dtsi b/arch/arm64/boot/dts/apple/s800-0-3-pmgr.dtsi +index 3af0a7093..fc73bfdae 100644 +--- a/arch/arm64/boot/dts/apple/s800-0-3-pmgr.dtsi ++++ b/arch/arm64/boot/dts/apple/s800-0-3-pmgr.dtsi +@@ -731,6 +731,7 @@ ps_aop_gpio: power-controller@80010 { + #reset-cells = <0>; + label = "aop_gpio"; + power-domains = <&ps_aop>; ++ apple,always-on; /* The running AOP firmware uses its GPIOs */ + }; + + ps_aop_cpu: power-controller@80040 { From 685c57598eda1100c02c7da07bb00b51d66b257c Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Tue, 24 Nov 2026 19:16:13 +0800 Subject: [PATCH 2/2] devices: n66 sleeps with the AOP running The iPhone 6s Plus suspend note now says that with the AOP started it needs the AOP GPIO domain kept on (t8010/0048), and how that was tested. Assisted-by: LLM --- devices/n66/device.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/n66/device.toml b/devices/n66/device.toml index b88214b4..7439b52d 100644 --- a/devices/n66/device.toml +++ b/devices/n66/device.toml @@ -51,7 +51,7 @@ cellular = "missing" battery = "untested" # bq27540 gauge on uart5 behind the SN2400's HDQ mux charging = "untested" # SN2400 charger charging_control = "missing" # The SN2400 driver has no writable limit yet -suspend = "working" # s2idle from idle and from Power, 6 of 6 (3 s to 9 min), wakes on Home and Power; cable plugged in asleep (Omarchy A from storage, 2026-11-23) +suspend = "working" # s2idle from idle and from Power, 6 of 6 (3 s to 9 min), wakes on Home and Power; cable plugged in asleep (Omarchy A from storage, 2026-11-23). With the AOP running it needs the AOP GPIO domain kept on (t8010/0048): pm_test=platform and a Power wake, the AOP still answering after (RAM boot, 2026-11-24) resume = "working" # every one of the 6 sleeps woke on Home or Power with the screen back in 1-15 ms and the USB network back (Omarchy A from storage, 2026-11-23) usb_serial = "untested" usb_network = "untested"