Skip to content

soc: apple: clpc: T6050 platform profiles after macOS's power modes - #1656

Merged
DjDeveloperr merged 3 commits into
integration/aurorafrom
djdev/t6050-clpc-power-profiles
Nov 12, 2026
Merged

DjDeveloperr merged 3 commits into
integration/aurorafrom
djdev/t6050-clpc-power-profiles

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

T6050's CLPC now offers macOS's three power modes as platform profiles: low-power, balanced and performance. Low-power matches macOS's Low Power mode on the M5 Pro: a one-thread clock ceiling and a 15 W package power target.

Needs the platform_profile class PR to register on a device-tree boot. Without it, the driver warns "no platform profile" and runs as before.

What macOS does (J714sAP, 26A428 under aura, traced under the same loads in each mode)

  • Automatic and High Power set no CPU limit. An 18-thread FMA loop starts at the top clocks in both, and the P cluster slows only as the package heats.
  • Low Power:
    • one P thread runs at 2844 MHz, the 2880 MHz state above the ADT's cpu-low-power-frequency-max (2808 MHz);
    • under the FMA loop, the package holds at 14.3-14.7 W (XNU's power report to the PMP), with the P cluster at 1980 MHz and the M clusters at 2652 MHz.

Change

  • Platform profiles low-power, balanced and performance. Balanced and performance set no limit.
  • Low-power:
    • every cluster stays at or below the first table frequency at or above low_power_khz (2808 MHz);
    • every 100 ms (the ADT's pkg-low-power-target-tc), the CLPC reads the package power from the SMC (PHPC);
    • the SMC updates that key once a second (measured: every 1.01 s, idle and under load), so only a new reading acts. Above low_power_mw (15 W), one table step comes off the cluster with the highest ceiling; below 90% of it, one goes back on the cluster with the lowest. The clusters come down together.
  • The ceilings are frequency QoS (max) requests, so thermal limits still win. They are withdrawn with the cpufreq policy, as the ANE floor already is.
  • A new optional apple,smc phandle on the CLPC node points at the SMC (binding, and t6050-die0.dtsi). Without it, the low-power profile has only its ceiling.
  • debugfs status shows the profile, the last reading, how many readings were new, and each cluster's ceiling.
  • Kconfig: select ACPI_PLATFORM_PROFILE if ACPI, depends on MFD_MACSMC || !MFD_MACSMC. The driver calls apple_smc_read_u32(), so with MFD_MACSMC=m APPLE_CLPC can be =m at most. The M5 and Neo configs have MFD_MACSMC=y and are unchanged.
  • Only T6050 sets low_power_khz. On the other SoCs the new code returns at once. The policy-removal notifier now also drops the per-cluster requests; its ANE path is unchanged.

Validation (J714sAP, M5 Pro, MEAS 2026-11-12)

Test kernel 7.3.0-m5-lmp2 = integration/aurora f1b79c4 (the intg4 default) + the class PR + this PR exactly (slot k3c, one boot, desktop up). The FMA loop runs for 40 s, the one-thread spin on CPU 12. Package power is the SMC's PHPC.

profile 18-thread FMA one P thread package under FMA clusters under FMA (M0 / M1 / P)
balanced 143.5 Gfma/s 4226 MHz 60.3 W (56.3-64.0) 4380 / 4380 / 4608 MHz
low-power, run 1 76.3 Gfma/s 2816 MHz 14.7-14.9 W from 12 s on 1644 / 1992 / 1980 MHz
low-power, run 2 76.3 Gfma/s 2819 MHz 14.3-14.5 W from 12 s on 1644 / 1992 / 1980 MHz
macOS Automatic / Low Power / High Power (same loads) 148.8 / 67.0 / 146.5 4297 / 2844 / 4240 MHz Low Power: 14.3-14.7 W Low Power: 2652 / 2652 / 1980 MHz
  • Ramp: low-power starts at the 2880/2964 MHz ceilings. Package power peaks at 25.6 W in the first 2 s, then falls one step per SMC reading, to the target in about 11 s, with no overshoot. macOS is at its operating point from the start.
  • Performance (slot k3b, lmp1): 141.5 Gfma/s and 4296 MHz, run third and hottest. No limit, as with macOS's High Power.
  • Back to balanced: every scaling_max_freq returned to cpuinfo_max_freq. 0 update errors over 30,606 samples; no oops/WARN.
  • Loop history: an earlier version (lmp1, slot k3b) read PHPC every 25 samples and stepped the fastest cluster first. It held a 14.1 W mean but swung 9.9-18.0 W and pinned the P cluster at 300 MHz. This version replaces that loop.
  • No double cap: aurora-platform's power-saver budget stands aside when this handler exists (aurora-platform PR). Run on lmp1, it logged "kernel apple-clpc profile handler present; not capping" and changed no scaling_max_freq.
  • Build: incremental over intg4's output; checkpatch clean apart from the name/sign-off pair. The CLPC host test was not run on the build host (owner's machine); CI runs it.

🤖 Generated with Claude Code

The CLPC's low-power platform profile on T6050 holds the CPU clusters to
the package power the SMC reports. Describe the optional phandle that
points the CLPC at the SMC.

Signed-off-by: Diljit Singh <[email protected]>
The CLPC's low-power platform profile reads the package power from the
SMC.

Signed-off-by: Diljit Singh <[email protected]>
macOS has three power modes on the M5 Pro (J714sAP, 26A428, traced under
the same loads in each). Automatic and High Power set no CPU limit: an
18-thread FMA loop starts at the top clocks in both and slows only as the
package heats. Low Power holds one thread at the 2880 MHz state, above the
ADT's clpc cpu-low-power-frequency-max (2808 MHz), and under the FMA loop
the package at 14.3-14.7 W (XNU's power report to the PMP) with the P
cluster at 1980 MHz.

Offer them as the platform profiles low-power, balanced and performance.
Balanced and performance set no limit. Low-power holds every cluster at
the first frequency at or above low_power_khz and reads the package power
from the SMC (PHPC) every 100 ms (the ADT's pkg-low-power-target-tc). The
SMC updates that reading once a second, so only a new reading acts: above
low_power_mw it takes one table step off the cluster with the highest
ceiling, and below 90% of it one goes back on the cluster with the
lowest, so the clusters come down together. The ceilings are frequency QoS
requests, so thermal limits still win.

The SMC is reached through a new optional apple,smc phandle on the CLPC
node; without it the low-power profile has only its ceiling.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr DjDeveloperr reopened this Nov 12, 2026
@DjDeveloperr DjDeveloperr reopened this Nov 12, 2026
@DjDeveloperr DjDeveloperr reopened this Nov 12, 2026
@DjDeveloperr DjDeveloperr reopened this Nov 12, 2026
@DjDeveloperr
DjDeveloperr merged commit fa59399 into integration/aurora Nov 12, 2026
36 of 40 checks passed
@RyanTheTide
RyanTheTide deleted the djdev/t6050-clpc-power-profiles branch November 16, 2026 05:04
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.

1 participant