Skip to content

soc: apple: clpc: Low Power mode CPU ceiling from the device tree (J614s/J614c 2616, J616s/J616c 2808 MHz) - #1796

Open
joske wants to merge 3 commits into
aurora-silicon:integration/aurorafrom
joske:pr/t6041-j614c-low-power-ceiling
Open

joske wants to merge 3 commits into
aurora-silicon:integration/aurorafrom
joske:pr/t6041-j614c-low-power-ceiling

Conversation

@joske

@joske joske commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

#1727 gave the M4 Max macOS's Low Power mode, with the CPU ceiling from the J616c's ADT (cpu-low-power-frequency-max = 2808 MHz) for every apple,t6041 machine. The ceiling is a property of each machine: the macOS 26.6.2 ADTs have 2616 MHz on the 14-inch J614s and J614c, and 2808 MHz on the 16-inch J616s and J616c. So in power-saver the J614c's P clusters ran one table step higher than macOS lets them, and the M4 Pro got no profile at all.

Change

Following the review, the ceiling is now a device tree property instead of a machine table in the driver:

  • dt-bindings: apple,low-power-frequency-max-mhz on the CLPC node (performance-controller@1). It's in MHz, the ADT's own unit, so a loader can copy cpu-low-power-frequency-max as is.
  • clpc: the driver reads the property and offers the low-power profile wherever it's set. low_power_machine and its of_machine_is_compatible() check are gone. T6040 and T6041 have no SoC default, so a board without the property gets no profile. T6050 keeps its 2808 MHz as a fallback for boards that don't set the property, because I don't have the M5 boards' ADT values.
  • dts: the four M4 Pro and M4 Max MacBook Pros, with their ADT values: J614s and J614c 2616, J616s and J616c 2808. The M4 Pro now gets the profile too.

Testing

J614c (MacBook Pro 14" M4 Max), os-fw 26.6.2, with this change on my daily kernel (integration plus T6041 PRs), built with CONFIG_ACPI=y (see below).

  • The J614c DTB validates against the binding (dt-validate). The CLPC node has apple,low-power-frequency-max-mhz = <2616>.

  • scaling_max_freq:

    Cluster balanced power-saver
    P (policy0, policy10) 4512 MHz 2616 MHz
    E (policy1) 2592 MHz 2592 MHz

    Back to balanced restores 4512 MHz.

  • From the first version of this PR, with the same 2616 MHz ceiling: an all-core spin (16 threads) for 14 s, on battery, SMC "Total System Power" after 7 and 10 s:

    Profile P clusters System power
    balanced 4104 MHz 91.2 / 91.8 W
    power-saver 2616 MHz 43.2 / 43.3 W

    Idle is 4.7 W in both. Boost was off in that run, hence 4104 MHz (the top non-boost frequency) in balanced. It's on in the run above.

I couldn't test the J614s, J616s or J616c; their values come from their ADTs.

Note: the profile only registers with CONFIG_ACPI_PLATFORM_PROFILE, which lives under drivers/acpi/ and is only built with CONFIG_ACPI=y. The aurora package config still has # CONFIG_ACPI is not set, so with the shipped kernel no machine gets a platform profile. With no ACPI tables, an CONFIG_ACPI=y kernel logs "ACPI: Interpreter disabled" and boots from the DT as before.

🤖 Generated with Claude Code

@joske

joske commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr still clean against integration/aurora with CI green, and it's in the daily kernel I run on my J614c (power-saver caps the P clusters at 2616 MHz, as the J614c's ADT has it). Anything you'd like changed?

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for catching the 14"/16" difference, and for running it daily on the J614c.

One structural change before this goes in. We select behaviour by a hardware property, not by a list of machines, and this value is already a per-machine hardware property: the ADT's cpu-low-power-frequency-max.

  • drivers/soc/apple/clpc.c:1584-1588 adds { "apple,j614c", 2616000 }, { "apple,t6041", 2808000 }, and clpc.c:1295-1318 matches it with of_machine_is_compatible().
  • clpc.c:1628-1635 leaves the M4 Pro without a profile ("not for it yet"), although its ADTs carry the same 2616/2808 split you found.

Suggested shape: a DT property on the CLPC node (for example apple,low-power-frequency-max), set in each board's .dts from its ADT value or filled in by the loader. The driver reads it when it is present and offers the low-power profile wherever it is. Then J614c, J616c, J614s, J616s and T6050 all work the same way, with no machine table in the driver.

If you add the property, we can run power-saver rows on our M4 Pro and A18 Pro, and on the M1 Pro and M2 where the ADT has a value.

@joske
joske force-pushed the pr/t6041-j614c-low-power-ceiling branch from 44e3272 to 25ab204 Compare November 19, 2026 11:56
@joske

joske commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, that's a better shape. Reworked as you suggested, rebased on current integration/aurora:

  • dt-bindings: apple,low-power-frequency-max-mhz on the CLPC node. It's in MHz, the ADT's own unit, and -mhz is a standard unit suffix in dtschema (there's no -khz), so a loader can copy cpu-low-power-frequency-max as is.
  • clpc: the driver reads the property and offers the low-power profile wherever it's set. The machine table, low_power_machine and the of_machine_is_compatible() matching are gone. T6040 and T6041 have no SoC default, so a board without the property gets no profile. T6050 keeps its 2808 MHz as a fallback for boards that don't set the property, because I don't have the M5 boards' ADT values. Happy to drop the fallback once they're in their .dts files, if you prefer.
  • dts: the four MacBook Pro boards with the ADT values: J614s and J614c 2616, J616s and J616c 2808. With this the M4 Pro gets the profile too.

Tested on the J614c with the same change on my daily kernel:

  • The DTB validates against the binding (dt-validate).
  • The CLPC node has apple,low-power-frequency-max-mhz = <2616>. In power-saver both P clusters' scaling_max_freq is 2616 MHz. The E cluster stays at its 2592 MHz maximum. Back in balanced, both P clusters return to 4512 MHz.

A loader that fills the property from the ADT would cover the other machines without .dts changes. I can do that as an aura PR, if you'd rather have it there than in the board files.

Thanks for the offer to run power-saver rows on your M4 Pro, A18 Pro, M1 Pro and M2.

🤖 Generated with Claude Code

@joske joske changed the title soc: apple: clpc: T6041: the J614c's own Low Power mode ceiling soc: apple: clpc: Low Power mode CPU ceiling from the device tree (J614s/J614c 2616, J616s/J616c 2808 MHz) Nov 19, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, this is the shape we were after, and the J614c numbers are clear. One coordination point: #1906 adds a second property for the same ADT key (apple,low-power-cpu-max-khz, filled by the loader), so the two PRs should settle on one name and unit before either lands; a loader-filled property would also cover boards without a .dts value. The dt-checks job currently fails with "apple,pmc.yaml: ignoring, error parsing file", which needs a look.

joske and others added 3 commits November 19, 2026 19:41
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 <noreply@anthropic.com>
Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com>
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 <noreply@anthropic.com>
Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com>
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 <noreply@anthropic.com>
Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com>
@joske
joske force-pushed the pr/t6041-j614c-low-power-ceiling branch from 25ab204 to 4b8f126 Compare November 19, 2026 18:41
@joske

joske commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. The dt-checks failure was mine: a MHz: in the property description made the YAML invalid. Fixed in 4b8f126a47; dt-doc-validate passes on the binding.

On the name: I've proposed apple,low-power-frequency-max-mhz on #1906, so aura#358 can copy the ADT's MHz value as is. I'll follow whatever we agree on there.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants