From f5df3dc5dd350326ba87bee50f69a4c06cef76f3 Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Thu, 19 Nov 2026 12:49:48 +0100 Subject: [PATCH 1/3] dt-bindings: power: apple,pmc: the CLPC's Low Power mode CPU ceiling macOS's Low Power mode CPU ceiling is a property of each machine, not of its SoC: the ADT's cpu-low-power-frequency-max is 2616 MHz on the 14-inch J614s and J614c and 2808 MHz on the 16-inch J616s and J616c. Add apple,low-power-frequency-max-mhz to the performance controller node, for the board to give that value. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Jos Dehaes --- Documentation/devicetree/bindings/power/apple,pmc.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/power/apple,pmc.yaml b/Documentation/devicetree/bindings/power/apple,pmc.yaml index fe47291dff0dc..0fa2980d647b9 100644 --- a/Documentation/devicetree/bindings/power/apple,pmc.yaml +++ b/Documentation/devicetree/bindings/power/apple,pmc.yaml @@ -268,6 +268,13 @@ patternProperties: The SMC, whose package power reading the low-power platform profile holds the CPU clusters to. + apple,low-power-frequency-max-mhz: + description: + The machine's CPU frequency ceiling in macOS's Low Power mode, in + MHz, as the ADT's cpu-low-power-frequency-max has it. The low-power + platform profile holds the CPU clusters to it, up to the next + frequency of their tables. + required: - compatible - reg From adde2e8ab76633215f346236a1e763acaaa51432 Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Thu, 19 Nov 2026 12:49:48 +0100 Subject: [PATCH 2/3] soc: apple: clpc: take the Low Power mode ceiling from the device tree The T6041 low-power profile took macOS's Low Power mode CPU ceiling from the J616c's ADT, 2808 MHz, for every M4 Max, and the M4 Pro got no profile. The ceiling is the machine's own: the 14-inch J614s and J614c have 2616 MHz there. Read the ceiling from the CLPC node's apple,low-power-frequency-max-mhz and offer the low-power profile wherever it is set, so no machine compatible decides it. T6040 and T6041 get no SoC default; T6050 keeps 2808 MHz for its boards that don't give their own. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Jos Dehaes --- drivers/soc/apple/clpc.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/drivers/soc/apple/clpc.c b/drivers/soc/apple/clpc.c index e257fefa310fa..153e82568cb9c 100644 --- a/drivers/soc/apple/clpc.c +++ b/drivers/soc/apple/clpc.c @@ -105,9 +105,8 @@ enum apple_clpc_rail { * @idle_on_time: sample every period even with no vote held, instead of * from a deferrable timer * @low_power_khz: CPU frequency ceiling of the low-power platform profile, - * taken up to the next table frequency; 0 for no platform profile - * @low_power_machine: the machine compatible @low_power_khz was read for; SoCs - * sharing this CLPC without it get no low-power profile. NULL for any + * taken up to the next table frequency, for a machine whose CLPC node has + * no apple,low-power-frequency-max-mhz; 0 for no platform profile then * @low_power_mw: package power (the SMC's PHPC key) the low-power profile * holds the CPU clusters to; 0 for none * @high_power_machine: the machine compatible on which the performance @@ -131,7 +130,6 @@ struct apple_clpc_hw { const char *ane_cluster_machine; bool idle_on_time; unsigned int low_power_khz; - const char *low_power_machine; unsigned int low_power_mw; const char *high_power_machine; }; @@ -237,7 +235,10 @@ struct apple_clpc { /* The platform profile and, for its power target, the SMC */ enum platform_profile_option profile; bool low_power; - /* hw->low_power_khz where it applies to this machine, else 0 */ + /* + * The low-power ceiling: the CLPC node's apple,low-power-frequency-max-mhz, + * else hw->low_power_khz; 0 for no low-power profile + */ unsigned int low_power_khz; struct device_node *smc_np; struct apple_smc *smc; @@ -1362,6 +1363,7 @@ static int apple_clpc_probe(struct platform_device *pdev) struct device_node *gpu = NULL; struct apple_clpc *clpc; unsigned int rail, i; + u32 mhz; int ret; clpc = devm_kzalloc(dev, sizeof(*clpc), GFP_KERNEL); @@ -1499,7 +1501,10 @@ static int apple_clpc_probe(struct platform_device *pdev) clpc->profile = PLATFORM_PROFILE_BALANCED; clpc->power_next = jiffies; - if (!clpc->hw->low_power_machine || of_machine_is_compatible(clpc->hw->low_power_machine)) + /* The machine's own ceiling, its ADT's cpu-low-power-frequency-max */ + if (!of_property_read_u32(dev->of_node, "apple,low-power-frequency-max-mhz", &mhz)) + clpc->low_power_khz = mhz * 1000; + else clpc->low_power_khz = clpc->hw->low_power_khz; if (clpc->low_power_khz && IS_REACHABLE(CONFIG_ACPI_PLATFORM_PROFILE)) { struct device *ppdev; @@ -1659,13 +1664,13 @@ static const struct apple_clpc_hw apple_clpc_hw_t6040 = { .ane_cluster_khz = 3756000, .ane_cluster_machine = "apple,t6040", /* - * The M4 Max's ADT has macOS's Low Power mode CPU ceiling, - * cpu-low-power-frequency-max = 2808 MHz, as T6050's does. macOS's package - * target in that mode is not measured here, so the profile has the - * ceiling only. The M4 Pro's value is not checked: not for it yet. + * macOS's Low Power mode CPU ceiling is each machine's own, its ADT's + * cpu-low-power-frequency-max: the boards' apple,low-power-frequency-max-mhz + * (2616 MHz on the 14-inch J614s and J614c, 2808 MHz on the 16-inch J616s + * and J616c). macOS's package target in that mode is not measured here, + * so the profile has the ceiling only. A machine without the property + * gets no low-power profile. */ - .low_power_khz = 2808000, - .low_power_machine = "apple,t6041", }; /* @@ -2039,6 +2044,10 @@ static const struct apple_clpc_hw apple_clpc_hw_t6050 = { .sustain = 3, .gpu_input = true, .idle_on_time = true, + /* + * The T6050 ADT's cpu-low-power-frequency-max, for the boards that don't + * give their own in apple,low-power-frequency-max-mhz + */ .low_power_khz = 2808000, .low_power_mw = 15000, /* High Power mode's record, as macOS 27.0 writes it on the 14-inch M5 Pro */ From 4b8f126a4712c6bf03116dfdc54d326a2dd42048 Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Thu, 19 Nov 2026 12:49:48 +0100 Subject: [PATCH 3/3] arm64: dts: apple: t604x: the J614 and J616 Low Power mode CPU ceilings Give each M4 Pro and M4 Max MacBook Pro its ADT's cpu-low-power-frequency-max: 2616 MHz on the 14-inch J614s and J614c, 2808 MHz on the 16-inch J616s and J616c. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Jos Dehaes --- arch/arm64/boot/dts/apple/t6040-j614s.dts | 5 +++++ arch/arm64/boot/dts/apple/t6040-j616s.dts | 5 +++++ arch/arm64/boot/dts/apple/t6041-j614c.dts | 5 +++++ arch/arm64/boot/dts/apple/t6041-j616c.dts | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6040-j614s.dts b/arch/arm64/boot/dts/apple/t6040-j614s.dts index 2d4bd56b1ba99..d86af22ccc4ce 100644 --- a/arch/arm64/boot/dts/apple/t6040-j614s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j614s.dts @@ -216,3 +216,8 @@ }; #include "t6040-j614s-extdisp-hdmi.dtsi" + +/* macOS Low Power mode CPU ceiling: the ADT's cpu-low-power-frequency-max */ +&clpc { + apple,low-power-frequency-max-mhz = <2616>; +}; diff --git a/arch/arm64/boot/dts/apple/t6040-j616s.dts b/arch/arm64/boot/dts/apple/t6040-j616s.dts index e81fb8b6b5d0d..62e7d802e170b 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j616s.dts @@ -388,3 +388,8 @@ &aes { status = "okay"; }; + +/* macOS Low Power mode CPU ceiling: the ADT's cpu-low-power-frequency-max */ +&clpc { + apple,low-power-frequency-max-mhz = <2808>; +}; diff --git a/arch/arm64/boot/dts/apple/t6041-j614c.dts b/arch/arm64/boot/dts/apple/t6041-j614c.dts index 6deb66068c70b..0ec4cb96f23e6 100644 --- a/arch/arm64/boot/dts/apple/t6041-j614c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j614c.dts @@ -96,3 +96,8 @@ &mesa { firmware-name = "apple/mesacal-j614c.bin", "apple/msrk-j614c.bin"; }; + +/* macOS Low Power mode CPU ceiling: the ADT's cpu-low-power-frequency-max */ +&clpc { + apple,low-power-frequency-max-mhz = <2616>; +}; diff --git a/arch/arm64/boot/dts/apple/t6041-j616c.dts b/arch/arm64/boot/dts/apple/t6041-j616c.dts index 26dd8dbc5f5c2..ba9b6772d88fc 100644 --- a/arch/arm64/boot/dts/apple/t6041-j616c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j616c.dts @@ -61,3 +61,8 @@ &mesa { firmware-name = "apple/mesacal-j616c.bin", "apple/msrk-j616c.bin"; }; + +/* macOS Low Power mode CPU ceiling: the ADT's cpu-low-power-frequency-max */ +&clpc { + apple,low-power-frequency-max-mhz = <2808>; +};