Skip to content

soc: apple: pmp-telemetry: expose read-only hwmon temperatures on T8122 - #3974

Merged
RyanTheTide merged 1 commit into
mainfrom
m3uport/t8122-pmp-telemetry
Dec 2, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
m3uport/t8122-pmp-telemetry

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

What: Expose read-only apple_pmp hwmon temperatures on T8122 (apple,t8122-pmp-v2), while keeping apple_pmp_telemetry_supported(), GPU policy leases (apple_pmp_gpu_get() -> -ENODEV), and the T8132-specific apple-pmp-thermal child scoped to apple,t8132-pmp-v2.

T8122 27.2 (26B123) PMP firmware (c6ccb960-ac83-34a2-9493-c3131bd5ae4b) exposes the same six named temperature records (ta000m, te000m, te001m, tp000m, tp001m, tp002m) in PMP SRAM data as T8132, located dynamically via apple_pmp_temps_locate() from SRAM header word 0x234 (0x36000 on J615 27.2).

  • drivers/soc/apple/pmp-telemetry.c: add apple_pmp_hwmon_supported() (apple_pmp_telemetry_supported(np) || of_device_is_compatible(np, "apple,t8122-pmp-v2")) and sensors->has_gpu_policy, returning -ENODEV from apple_pmp_gpu_get() and skipping apple-pmp-thermal registration when !sensors->has_gpu_policy.

Tested: J615 (MacBook Air 15" M3, T8122, macOS 27.2 / 26B123 stub, Stage 2 c9800c1d87243555, default cmdline, SELinux Enforcing, silent) at exact head 78bd50d599dd1c4c4ecf286f43f37c47d4ba2692 (kernel 7.3.0-m3uportd2):

  • PMP hwmon & SRAM locator: apple_pmp 2d0500000.pmp: temperature records at 0x59dcc 0x59e70 0x59f14 0x59fb8 0x5a05c 0x5a100 (data from 0x36000); /sys/class/hwmon/hwmon3 (apple_pmp) boot readings: hotspot 42250, Ta000m=34250, Te000m=36000, Te001m=35250, Tp000m=42250, Tp001m=35000 (mC).
  • GPU cooling & Vulkan: aurora-g16 292400000.gpu: M4 cooling: ... governor=0 power=0 backstop=0 limit=S8 (clean S1 -> S8 step-up); vulkaninfo: Apple M3 (G15G C0) OK.
  • Suspend/resume & stability: 2/2 s2idle (rtcwake -m freeze on rtc0 apple-pmu-rtc) PASS; apple_pmp hwmon live after resume (cycle 2: hotspot 35500, Ta000m=34250, Te000m=35250, Te001m=35250, Tp000m=41500, Tp001m=34750 mC); Wi-Fi OK, 0 Oops/WARN/fault, 0 AVC, Enforcing.
  • Checks: scripts/checkpatch.pl --no-tree: 0 errors, 0 warnings; git merge-tree --write-tree aurora/main HEAD: clean against ae1fe6357d1709.

Risk: two-way · T8122 (M3) — read-only hwmon sensor exposure on apple,t8122-pmp-v2 using the existing SRAM record locator; T8132 and all other SoCs are unchanged, GPU policy leases remain gated on has_gpu_policy, and a plain revert restores prior behavior.

T8122 27.2 (26B123) PMP firmware exposes the same six named temperature
records (ta000m, te000m, te001m, tp000m, tp001m, tp002m) in PMP SRAM
data as T8132, located dynamically via apple_pmp_temps_locate() from
SRAM header word 0x234 (0x36000 on J615 27.2).

Register the shared read-only apple_pmp hwmon device on
apple,t8122-pmp-v2 while keeping apple_pmp_telemetry_supported(), GPU
policy leases, and the T8132-specific apple-pmp-thermal child scoped to
apple,t8132-pmp-v2 so G16 GPU cooling on T8122 continues to use
thermal-zone telemetry and reaches S8 cleanly.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team as code owners December 2, 2026 18:22

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 78bd50d599dd across drivers/soc/apple/pmp-telemetry.c and its callers (drivers/soc/apple/pmp.rs, drivers/gpu/drm/asahi/g16/glue.c):

  • Clean compatible-based gating (apple,t8122-pmp-v2) for read-only apple_pmp hwmon via apple_pmp_hwmon_supported() while keeping apple_pmp_telemetry_supported() scoped to apple,t8132-pmp-v2.
  • sensors->has_gpu_policy defense-in-depth looks solid: apple_pmp_gpu_get() returns -ENODEV with all locks/refs cleanly released, and apple_pmp_telemetry_register() skips the apple-pmp-thermal child when !has_gpu_policy while keeping devm teardown (apple_pmp_telemetry_release) wired up before list insertion, locate work, and hwmon registration.
  • DCO, ## Risk, checkpatch 0/0, and exact-head J615 27.2 default-cmdline + 2/2 s2idle + G16 S8 cooling row all check out.

LGTM.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at 78bd50d5: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review ok approved by satchlj
Requested changes ok none
Hardware row at head ok in the PR body at 78bd50d5
Conflicts ok none
PR text ok Risk: two-way · T8122 (M3) — read-only hwmon sensor exposure on apple,t8122-pmp-v2 using the existing SRAM record locator; T8132 and all other SoCs are unchanged, GPU policy leases remain gated on hasgpupolicy, and a plain revert restores prior behavior.

Areas: area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 2, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging at 78bd50d599dd (B2 merge train, 12-01 merge bar). Approval at this head: satchlj. Row: J615 (MacBook Air 15" M3, T8122, macOS 27.2 / 26B123 stub) exact-head PASS row at 78bd50d599dd (in PR body: apple_pmp hwmon live before + after 2/2 s2idle, GPU S1->S8 clean, vulkaninfo OK, 0 Oops/WARN/AVC).. CI: pr-text + readiness green at 78bd50d5; exact-head 7.3.0-m3uportd2 kernel build + checkpatch --no-tree 0/0 clean (hosted self-hosted runner queued on disk floor; no KUnit/host-tests target pmp-telemetry.c). Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit bf7d80c into main Dec 2, 2026
8 of 12 checks passed
@RyanTheTide
RyanTheTide deleted the m3uport/t8122-pmp-telemetry branch December 2, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants