Repository navigation
arm64: dts: apple: t8152: CPU idle driver on every M6 - #2333
Conversation
As on T8140, the OS cannot request core power-down on T8152 (M6) and WFI is the only idle state. Allow "apple,t8152-cpuidle" with the T8140 compatible as its fallback, which the driver already matches. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The J873g (Mac mini, M6) has no cpuidle node, so cpuidle-apple never binds there: the CPUs idle through the default WFI without a cpuidle driver, and s2idle cannot freeze the tick or suspend timekeeping. The J804 board file in #2107 adds the node for that board only. The cores and their idle behaviour are the SoC's: as on T8140, the OS cannot request core power-down and WFI is the only state, which the T8140 profile of the driver already handles (CYC_OVRD is left alone on anything newer than M3). Put the node in t8152-peripherals.dtsi, which both the J873g tree and t8152.dtsi (J804, J833ct) include. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
J873g row. Kernel: #2178's head + this PR's two commits (
No cpuidle warnings in dmesg. |
|
Thanks @sithglan. This shows the node does its job on the J873g. cpuidle-apple binds (
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approve.
The node only selects the driver; it adds no chip list. T8152 isn't in cpuidle-apple's M1-M3 CYC_OVRD allowlist, so probe copies WFI over index 1 and both states are WFI at 1 us / 1 us. That is consistent with #2444: its 30 us / 100 us CPU PD values only reach M1-M3, and the J873g row shows both states as WFI with usage climbing. Index 1 keeps enter_s2idle, so s2idle reaches tick_freeze() the same way T8140 does. Moving the s2idle and idle-power items to the J873g suspend bring-up is fine.
Small things, none blocking:
- The DT comment states that T8152 has no writable CYC_OVRD and power-gates idle cores after WFI. Neither is measured on T8152. I'd word it as "CYC_OVRD is written only on M1 to M3; elsewhere the driver uses WFI for both states".
- The J873g configs need CONFIG_ARM_APPLE_CPUIDLE=y back on.
- Once #2107 lands, the J804 board file's own cpuidle node is redundant.
- A J804 or J833ct current_driver check after merge would be nice.
|
[Joshua's agent] Second J873g (T8152 Mac mini) test row for this PR. Patch identity: a test-only kernel carried this PR's exact Kernel: Observed under
Driver bound and both states exposed; no residency or performance measurement taken. |
Problem
The Mac mini M6 (J873g) has no cpuidle node, so cpuidle-apple never binds. The CPUs idle through the default WFI without a cpuidle driver, and s2idle cannot freeze the tick or suspend timekeeping. #2107 adds the node to the J804 board file only.
Change
Add
cpuidle { compatible = "apple,t8152-cpuidle", "apple,t8140-cpuidle"; }tot8152-peripherals.dtsi. Both the J873g tree andt8152.dtsi(J804, J833ct) include that file. As on T8140, the OS cannot request core power-down and WFI is the only state. The driver's T8140 profile already handles that: it does not touch CYC_OVRD on anything newer than M3.The binding change is LiamRay11's commit from #2107, carried unchanged (same patch-id), so this can land before or after #2107. If both land, the J804 board file's own
cpuidlenode merges into this one.Testing
cpp + dtc before and after: J873g, J804 and J833ct each gain only
/cpuidle.dt-validate -mwith this branch's bindings reports nothing new on any of them (J873g keeps its 31 existing warnings).Still to run
cat /sys/devices/system/cpu/cpuidle/current_drivershowscpuidle-apple./sys/devices/system/cpu/cpu*/cpuidle/state*/usageclimbs.sensors(PSTR) before and after, if the SMC exposes it.Details
apple,t8140-cpuidlefallback (drivers/cpuidle/cpuidle-apple.cmatch table). With no T8152 entry in its CYC_OVRD machine list, both of its states are WFI.traces/kernel/20261119-dtfill-m5m6/(dts-t8152idle, valm-t8152idle-*).Row (J873g, sithglan): cpuidle-apple binds, both states are WFI and usage climbs. The s2idle and idle-power items move to the J873g suspend bring-up: the J873g kernels build without
CONFIG_SUSPENDand the board has no RTC wake yet, so they can't run there, and this change doesn't depend on them.Assisted-by: LLM (Claude:Opus 5.5)