From 01067b592bf30c25d2689ab25a6b7bf793902e6d Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Sat, 24 Oct 2026 16:38:43 -0400 Subject: [PATCH 1/3] dt-bindings: cpu: apple,t8140-cpuidle: Add t8132 compatible The T8132 (M4) idles like the T6040 and T8140: iBoot locks CYC_OVRD, and a plain WFI already lets the hardware power-gate an idle core. Add "apple,t8132-cpuidle" to select the same driver behaviour. Signed-off-by: Erik Bourget --- .../devicetree/bindings/cpu/apple,t8140-cpuidle.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml b/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml index 2a66141be3187..9ffa89ece40cd 100644 --- a/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml +++ b/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml @@ -4,13 +4,13 @@ $id: http://devicetree.org/schemas/cpu/apple,t8140-cpuidle.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Apple T6040 and T8140 CPU idle controller +title: Apple T6040, T8132 and T8140 CPU idle controller maintainers: - Ryan Murray description: - Selects the Apple CPU idle driver on T6040 and T8140 systems. On these + Selects the Apple CPU idle driver on T6040, T8132 and T8140 systems. On these SoCs the hardware decides when an idle core is power-gated after WFI; software cannot request core or cluster power-down, so WFI is the only idle state. @@ -22,6 +22,7 @@ properties: compatible: enum: - apple,t6041-cpuidle + - apple,t8132-cpuidle - apple,t8140-cpuidle required: From 552af4315e23d9a60f8d78d5b027b8089414da81 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Sat, 24 Oct 2026 16:38:55 -0400 Subject: [PATCH 2/3] cpuidle: apple: Add T8132 The T8132 (M4) behaves like the T6040: iBoot locks CYC_OVRD, so the CPU PD state cannot run, and a plain WFI already powers an idle core down (the arm64 idle code saves the registers it loses). Run both entries through WFI when the device tree has an "apple,t8132-cpuidle" node, as for "apple,t6041-cpuidle". Without a cpuidle driver, suspend-to-idle never reaches cpuidle_enter_s2idle(), so the tick is never frozen and timekeeping is never suspended. Normal idle does not change: it is already WFI. Signed-off-by: Erik Bourget --- drivers/cpuidle/cpuidle-apple.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/cpuidle/cpuidle-apple.c b/drivers/cpuidle/cpuidle-apple.c index 7a53c01792662..896b92440ec79 100644 --- a/drivers/cpuidle/cpuidle-apple.c +++ b/drivers/cpuidle/cpuidle-apple.c @@ -124,16 +124,19 @@ static struct cpuidle_driver apple_idle_driver = { static int apple_cpuidle_probe(struct platform_device *pdev) { - bool t604x = of_device_is_compatible(pdev->dev.of_node, "apple,t6041-cpuidle"); + struct device_node *np = pdev->dev.of_node; + bool wfi_only = of_device_is_compatible(np, "apple,t6041-cpuidle") || + of_device_is_compatible(np, "apple,t8132-cpuidle"); /* * CPU PD writes CYC_OVRD, which is an undefined instruction on - * T8140. Its WFI already lets the hardware power-gate idle - * secondary cores, so both entries must use WFI. Keep index 1: - * the generic s2idle selector skips fallback index 0, otherwise - * tick_freeze() and timekeeping suspension are never reached. + * T8140 and the M4 SoCs (T6041, T8132). Their WFI already lets + * the hardware power-gate idle cores, so both entries must use + * WFI. Keep index 1: the generic s2idle selector skips fallback + * index 0, otherwise tick_freeze() and timekeeping suspension are + * never reached. */ - if (of_machine_is_compatible("apple,t8140") || t604x) + if (of_machine_is_compatible("apple,t8140") || wfi_only) apple_idle_driver.states[STATE_PWRDOWN] = apple_idle_driver.states[STATE_WFI]; return cpuidle_register(&apple_idle_driver, NULL); @@ -141,6 +144,7 @@ static int apple_cpuidle_probe(struct platform_device *pdev) static const struct of_device_id apple_cpuidle_of_match[] = { { .compatible = "apple,t6041-cpuidle" }, + { .compatible = "apple,t8132-cpuidle" }, { .compatible = "apple,t8140-cpuidle" }, { } }; From 3ef17de48d0362cef5b13022f0674ba79f4ea314 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Sat, 24 Oct 2026 16:39:04 -0400 Subject: [PATCH 3/3] arm64: dts: apple: t8132: Add the CPU idle node and enable it on J713 Describe the T8132 CPU idle controller, disabled by default as on T6040 and T8140, and enable it on the MacBook Air J713. Signed-off-by: Erik Bourget --- arch/arm64/boot/dts/apple/t8132-j713.dts | 4 ++++ arch/arm64/boot/dts/apple/t8132.dtsi | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8132-j713.dts b/arch/arm64/boot/dts/apple/t8132-j713.dts index d878b72fd39ba..5345eb9c56f50 100644 --- a/arch/arm64/boot/dts/apple/t8132-j713.dts +++ b/arch/arm64/boot/dts/apple/t8132-j713.dts @@ -65,6 +65,10 @@ status = "okay"; }; +&cpuidle { + status = "okay"; +}; + &qspi { status = "okay"; diff --git a/arch/arm64/boot/dts/apple/t8132.dtsi b/arch/arm64/boot/dts/apple/t8132.dtsi index c82816625efd0..56dfd12d88233 100644 --- a/arch/arm64/boot/dts/apple/t8132.dtsi +++ b/arch/arm64/boot/dts/apple/t8132.dtsi @@ -17,6 +17,11 @@ #address-cells = <2>; #size-cells = <2>; + cpuidle: cpuidle { + compatible = "apple,t8132-cpuidle"; + status = "disabled"; + }; + cpus { #address-cells = <2>; #size-cells = <0>;