From 0a2532804408ccd79ddbcfffaf167a9f5adcfd76 Mon Sep 17 00:00:00 2001 From: AxxzyWasTaken Date: Wed, 25 Nov 2026 08:47:30 +0000 Subject: [PATCH 1/2] dt-bindings: soc: apple,cluster-pwrgate: add T6041 T6041 has the per-core PMGR power-gate enable page at 0x50282c000 where the boot loader leaves the boot core's word clear, preventing it and its cluster from power-gating in WFI. Add the T6041 compatible and note T6041 and T8142 in the binding description. Signed-off-by: AxxzyWasTaken --- .../bindings/soc/apple/apple,cluster-pwrgate.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/apple/apple,cluster-pwrgate.yaml b/Documentation/devicetree/bindings/soc/apple/apple,cluster-pwrgate.yaml index 43539cc51a6a3..9c48556c7d68d 100644 --- a/Documentation/devicetree/bindings/soc/apple/apple,cluster-pwrgate.yaml +++ b/Documentation/devicetree/bindings/soc/apple/apple,cluster-pwrgate.yaml @@ -11,15 +11,16 @@ maintainers: description: | PMGR words whose top bit lets a CPU power down in WFI: one per cluster on - T8132 and T8140, one per core on T6050. A core that PMGR powers on comes up - allowed to, but the boot CPU was started by the boot ROM and only follows its - word, which the boot loader may leave clear. The words are set early in boot, - in the order listed. + T8132, T8140 and T8142, one per core on T6041 and T6050. A core that PMGR + powers on comes up allowed to, but the boot CPU was started by the boot ROM + and only follows its word, which the boot loader may leave clear. The words + are set early in boot, in the order listed. properties: compatible: items: - enum: + - apple,t6041-cluster-pwrgate - apple,t6050-cluster-pwrgate - apple,t8132-cluster-pwrgate - apple,t8140-cluster-pwrgate From b7c843bc90a21711f783a7734d490923621d2759 Mon Sep 17 00:00:00 2001 From: AxxzyWasTaken Date: Wed, 25 Nov 2026 08:47:30 +0000 Subject: [PATCH 2/2] arm64: dts: apple: t6041: add CPU cluster power-gate enables Add the cluster_pwrgate node to t6041.dtsi for the E core 0 (0x50282c000) and P0 core 0 / boot core (0x50282c040) power-gate enable words, matching the two wake gates restored by t6041-sleep. Setting bit 31 early in boot lets the boot core and P0 cluster power-gate in WFI without depending on the boot loader. Signed-off-by: AxxzyWasTaken --- arch/arm64/boot/dts/apple/t6041.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6041.dtsi b/arch/arm64/boot/dts/apple/t6041.dtsi index a4dfb2d600c9f..1d280a55ad408 100644 --- a/arch/arm64/boot/dts/apple/t6041.dtsi +++ b/arch/arm64/boot/dts/apple/t6041.dtsi @@ -494,6 +494,19 @@ #size-cells = <1>; }; + /* + * The CPU power-gate enables, in /arm-io/pmgr at 0x50282c000, one word + * per core: E core 0 at +0x0 and P0 core 0 (the boot core) at +0x40, + * matching the two wake gates t6041-sleep restores on resume. iBoot + * leaves the boot core's word clear, so P0 never powers down in WFI + * unless set early in boot. + */ + cluster_pwrgate: power-gate@50282c000 { + compatible = "apple,t6041-cluster-pwrgate", "apple,cluster-pwrgate"; + reg = <0x5 0x0282c000 0x0 0x4>, + <0x5 0x0282c040 0x0 0x4>; + }; + /* * Suspend-to-RAM at EL2 through aura's S2R mailbox; without the mailbox * it stays out. Stays disabled at the SoC level so boards without