Skip to content

arm64: dts: apple: t8112: share the SoC hwmon channels with the J473 - #2923

Merged
RyanTheTide merged 2 commits into
integration/aurorafrom
m2air-oracle/t8112-hwmon-shared
Nov 23, 2026
Merged

RyanTheTide merged 2 commits into
integration/aurorafrom
m2air-oracle/t8112-hwmon-shared

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The M2 Mac mini (J473) is missing SMC temperature and power channels that the M2 MacBook Air already describes in its device tree.

Change

Share the T8112 temperature and rail descriptions between J473 and J413. Keep J413-only rails in the Air device tree and preserve the temperature indices used by its thermal zones.

Testing

On fleet82 with the default command line, the J473 reported all 88 DT sensor labels. P-cluster rail power rose from 57 mW idle to 12.93 W under load. The J413 kept all 102 DT channels, its sysfs label set, and its five CPU thermal zones. Both reported zero SELinux denials and zero new kernel errors. The J473 reproduced the baseline SEP service timeout.

DTB and hardware checks
  • Current head 4a894c5482e522350d4366ef11d7aaf1060f9099 reproduces the J473, J413, and J413-fw27 test-kit DTBs byte for byte. Its J415 and J493 DTBs match the base byte for byte.
  • The hardware tests booted each Mac's production Stage 2 with the board DTB replaced and the fleet82 kernel and command line. Both returned to production. The 88 J473 DT channels were present, and there were no missing-key warnings. The J413 control and test both reported 106 sysfs labels and registered the same thermal zones.
  • The J473 GPU was off during the test. The GPU temperature inputs reported no data. The J413 rail labels are unchanged, but the indices of 11 board-only voltage, current, and power inputs move.

Original implementation and hardware tests assisted by Claude Opus 5.5.

Assisted-by: LLM (Codex)

The M2 Mac mini (J473) publishes 14 SMC hwmon channels and the M2
MacBook Air (J413) 102, on the same SoC. The J413 board files hold the
channels that belong to the SoC and its PMU: the GPU and CPU die
temperatures and the PMU rails. The J473 SMC has 71 of those keys and
its device tree names none of them.

Move them into two files that a T8112 board includes after its own
hwmon files:

t8112-hwmon.dtsi has the 29 die temperatures (Tg0e/Tg0m/Tg0q with their
no-data threshold for a powered-off GPU, TCMb, Te04, Te06 and 23 Tp
keys). All four T8112 boards include it.

t8112-hwmon-rails.dtsi has the 42 rail channels both SMCs publish. The
J413 and the J473 include it. The 11 rail keys the J473 SMC lacks (VP0R,
VP2l, VP8l, VPkl, IP8l, IPBR, IPkl, PP8l, PPBR, PPkl, PR8b) stay in
t8112-j413-hwmon-rails.dtsi.

The consumer labels were measured on the J413 and hold on the J473. Its
SMC values at idle, with the P cluster loaded and with the E cluster
loaded, 20 s each: PP0b 430, 12717 and 49 mW; PPbb 13, 6 and 2116 mW;
PP1b 0 with the GPU off. The Tp, Te and TCMb keys all read and follow
the load.

The J415 and J493 SMCs have not been read. macsmc-hwmon skips a voltage,
current or power node whose key the SMC lacks. For a temperature node on
this provider it logs one warning and hides the channel, keeping the
index. Neither fails the probe, so those two boards get the die
temperatures. They do not get the rails, whose labels are proven only on
the J413 and J473.

The temperature channels keep their order on every board: the ones in
t8112.dtsi that the thermal zones index come first, then the board's,
then these. In the J413 DTB the temperature nodes are unchanged; among
the voltage, current and power nodes the 11 J413-only ones now come
last, so their inN, currN and powerN numbers move. The labels do not
change and nothing indexes those channels.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at bc7933e.

The move holds up. I preprocessed and compiled all five T8112 DTs at e0a9448 and at this head, then compared the smc_hwmon children:

  1. Unchanged boards: J413 and J413-fw27 have the same 102 channels, with identical node names, key-ids, labels and thresholds. The temperature order is unchanged, so thermal-sensors = <&smc_hwmon 1..5> still points at Te05/Tp01/Tp05/Tp09/Tp0D. Only the 11 J413-only V/I/P channels move to the end. Nothing in the tree indexes those, but any userspace that reads J413 rails by inN/currN/powerN number will see them move.
  2. Additions: J473 goes 17 -> 88, J415 20 -> 49 and J493 21 -> 50. No existing node was merged or relabelled, and no board has a duplicate key-id or label. Every node name matches its key-id and the binding's ^<type>-[A-Za-z0-9]{4}$ patterns.
  3. Protection: nothing depends on the new channels. apple,soc-die-keys is the same 8-key list on every board and none of the 71 new keys are in it, so the macsmc_soc_die zone has the same members. The only trip-bearing zones are J413's five CPU zones, and their indices hold. A missing key on J415/J493 hides its channel and keeps its index (#thermal-sensor-cells is present), so a later thermal zone cannot shift.
  4. Commit message / t8112-hwmon-rails.dtsi:13-14: the J473 values do not match the row in the PR body. The commit says PP0b idle 430 mW and PPbb 6 mW with the P cluster loaded; the row says 57 mW and 1.04 W. Please quote the row you are citing, or say they come from two runs.
  5. Testing: the J473 and M2 Air (J413) rows use DTBs identical to this head (same patch-id; channel lists match). Please attach both boards' sensors output (or the DT-vs-sysfs label dump) to the PR; only summaries are posted now. J415 and J493 are still owed: one boot each, to show which of the 29 temperatures their SMCs lack.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Formal adversarial §1–§6 pre-PR checklist review at bc7933ef6bf1b73ab2fb6ab0bb6ab31877793736 (COMMENT — 0 code/policy blockers; waiting on CI).

Checklist Summary

  • §1 (No model gating): Pass — device-tree-only sharing of T8112 SoC die temperatures (t8112-hwmon.dtsi) across J413/J415/J473/J493 and shared PMU rails (t8112-hwmon-rails.dtsi) across J413/J473; no driver changes or model gates. Both available T8112 Macs in the lab (J413 and J473) were tested on hardware, and J415/J493 are explicitly noted as unavailable in the lab.
  • §2 (Production-ready, no hacks): Pass — default kernel (7.3.0-aurora-fleet82) and default command line.
  • §3 (Safety): Pass — read-only SMC hwmon channels only. Verified zero duplicate apple,key-id definitions across t8112.dtsi, hwmon-common.dtsi, hwmon-laptop.dtsi, hwmon-mini.dtsi, hwmon-fan.dtsi, t8112-hwmon.dtsi, t8112-hwmon-rails.dtsi, and t8112-j413-hwmon-rails.dtsi. Thermal-zone sensor indices 1–5 (Te05, Tp01, Tp05, Tp09, Tp0D) remain at the head of &smc_hwmon in t8112.dtsi, untouched by the trailing includes. Checked drivers/hwmon/macsmc-hwmon.c:1264-1269: missing V/I/P keys are skipped and missing temperature keys on a thermal-sensor provider are hidden with a warning while preserving channel indices, so J415/J493 probe cannot fail on an absent key.
  • §4 (Clean-room & attribution): Pass — commit bc7933ef6bf1 carries human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and human Signed-off-by: only (zero AI trailers in commits); PR body includes Assisted-by:.
  • §5 (Evidence): Waiting on CI — J473 (88/88 channels, P/E-cluster load response verified, GPU temps no-data while powered off, no hidden-channel warning, no new journal errors) and J413 (102/102 DT channels, 106/106 sysfs labels identical to production, all thermal zones registered, no new errors) are both evidenced on hardware. GitHub CI is still queued (dt-checks QUEUED, host-tests QUEUED). Cannot approve until CI (especially dt-checks / dtbs_check) completes green.
  • §6 (Naming): Pass.

Non-blocking Notes

  • Please explicitly note SELinux denial and failed-unit counts (0/0) alongside "no new journal errors" for the J473 and J413 rows to satisfy the §5 regression wording verbatim.
  • Tiny PR-body wording nit: the summary states "Each board includes the shared files after its own hwmon files", whereas t8112-j413.dts includes t8112-hwmon-rails.dtsi before t8112-j413-hwmon-rails.dtsi (accurately described in the commit message).

Assisted-by: LLM (Gemini 4 Neon)

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Both dt-checks and host-tests are green on bc7933ef6bf1. Clean DT-only J473/J413 SMC hwmon addition with 0 code or policy blockers — ready for MERGETRAIN-LINUX4.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Independent source review at bc7933ef6bf1. The shared include preserves the J413 temperature channel indices 1–5 and moves only the board-only rail numbering. The posted J473 17→88 and J413 102→102 DT channel rows cover the primary change. The J415 and J493 also receive the shared temperatures, so record the pending board checks there; if #2260 lands first, verify the shared include order and temperature indices on the combined tree. No blocker in the J473/J413 DT change at this head.

Keep the new shared sensor descriptions on the J473 and J413. The trimmed change produces the same J473, J413 and J413-fw27 DTBs as the board tests, and the same J415 and J493 DTBs as the base.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Independent source review at 4a894c5482e5. Re-reviewed the follow-up from bc7933e. The only two edits remove the shared hwmon include from J415 and J493; the J413 and J473 source paths are unchanged. The reported five DTB comparisons and three byte comparisons against the hardware kit close the board coverage pending in my earlier review. No remaining source blocker for the J413/J473 scope. Retain the thermal index check if the base changes with #2260.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

I rebuilt the three T8112 DTBs at 4a894c5482e5 and matched each byte for byte against the DTB embedded in the Stage 2 image used in the fleet82 hardware tests.

Board DT channels on the booted control → candidate Observed sysfs labels AVCs Failed units
J473 14 → 88 22 → 93 0 1 on control and candidate (aurora-sep.service)
J413 102 → 102 106 → 106, same labels 0 0

All five J413 CPU thermal zones registered on both boots. The J473 test ran with the GPU off. Its GPU temperature channels were present, with no temperature reading while the GPU was off.

Control distinction and J473 label list

The J473 PR base contains 17 DT descriptors. The booted control contains 14. The difference is three GPU temperature labels. All descriptors from both controls retain their key and label. The list below is the 74 descriptors added relative to the booted control, extracted from the matching embedded DTB. The J413 13.5 and fw27 DTBs each retain all 102 key/label pairs. The hardware row is from the J413 13.5 boot.

IP0b	P-cluster IP0b
IP1b	GPU IP1b
IP2b	PMU IP2b
IP4b	PMU IP4b
IP7b	PMU IP7b
IP7l	PMU IP7l
IP9b	PMU IP9b
IPbb	E-cluster IPbb
IR4l	Rail IR4l
IR5b	Rail IR5b
IR8b	Rail IR8b
IRcl	Rail IRcl
PP0b	P-cluster PP0b
PP1b	GPU PP1b
PP2b	PMU PP2b
PP4b	PMU PP4b
PP7b	PMU PP7b
PP7l	PMU PP7l
PP9b	PMU PP9b
PPbb	E-cluster PPbb
PR4l	Rail PR4l
PR5b	Rail PR5b
PRcl	Rail PRcl
TCMb	SoC Die TCMb
Te04	E-cluster Te04
Te06	E-cluster Te06
Tg0e	GPU Tg0e
Tg0f	GPU Tg0f
Tg0m	GPU Tg0m
Tg0n	GPU Tg0n
Tg0q	GPU Tg0q
Tg0r	GPU Tg0r
Tp00	P-cluster Tp00
Tp02	P-cluster Tp02
Tp04	P-cluster Tp04
Tp06	P-cluster Tp06
Tp08	P-cluster Tp08
Tp0A	P-cluster Tp0A
Tp0C	P-cluster Tp0C
Tp0E	P-cluster Tp0E
Tp0a	P-cluster Tp0a
Tp0b	P-cluster Tp0b
Tp0c	P-cluster Tp0c
Tp0e	P-cluster Tp0e
Tp0f	P-cluster Tp0f
Tp0g	P-cluster Tp0g
Tp0i	P-cluster Tp0i
Tp0j	P-cluster Tp0j
Tp0k	P-cluster Tp0k
Tp0m	P-cluster Tp0m
Tp0n	P-cluster Tp0n
Tp0o	P-cluster Tp0o
Tp0q	P-cluster Tp0q
Tp0r	P-cluster Tp0r
Tp0s	P-cluster Tp0s
VP0b	P-cluster VP0b
VP1b	GPU VP1b
VP2b	PMU VP2b
VP3b	PMU VP3b
VP4b	PMU VP4b
VP7b	PMU VP7b
VP7l	PMU VP7l
VP9b	PMU VP9b
VP9l	PMU VP9l
VPbb	E-cluster VPbb
VPdb	PMU VPdb
VR4l	Rail VR4l
VR5b	Rail VR5b
VR6b	Rail VR6b
VR8b	Rail VR8b
VRab	Rail VRab
VRcb	Rail VRcb
VRcl	Rail VRcl
VReb	Rail VReb

Assisted-by: LLM (Codex)

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Formal §1–§6 pre-PR re-review at 4a894c5482e522350d4366ef11d7aaf1060f9099 (CI: 2/2 green — dt-checks and host-tests; mergeable=true, clean against integration/aurora).

Follow-up Verification (from bc7933ef6bf1)

  • Commit 4a894c5482e5 cleanly removes #include "t8112-hwmon.dtsi" from the unmeasured t8112-j415.dts and t8112-j493.dts, keeping those DTBs byte-for-byte identical to base while leaving the hardware-tested t8112-j413.dts and t8112-j473.dts DTBs byte-for-byte identical to the tested Stage 2 images.
  • The PR comment adds the full J473 74-descriptor label diff plus explicit §5 regression counts for both boards.

Pre-PR Checklist (§1–§6)

  • §1 No model gating: Pass — DT-only sharing of measured T8112 SoC die temperatures (t8112-hwmon.dtsi) and common PMU rails (t8112-hwmon-rails.dtsi) between J413 and J473, with J413-only rails retained in t8112-j413-hwmon-rails.dtsi.
  • §2 Production-ready: Pass — default fleet82 kernel and default command line.
  • §3 Safety: Pass — read-only SMC hwmon channels only; zero duplicate keys; t8112.dtsi thermal-zone sensor indices 1–5 (Te05, Tp01, Tp05, Tp09, Tp0D) remain unchanged at the head of &smc_hwmon.
  • §4 Clean-room & attribution: Pass — both commits (bc7933ef6bf1, 4a894c5482e5) carry human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and human Signed-off-by: only, zero AI trailers in commits; Assisted-by: disclosed in PR body.
  • §5 Evidence: Pass — default-cmdline fleet82 hardware rows on both affected boards with byte-matched DTBs at 4a894c5482e5:
    • J473 (M2 Mac mini): 14 → 88 DT channels, 22 → 93 sysfs labels, P-cluster load response verified (PP0b 57 mW → 12.93 W), GPU temps report no-data while off, 0 missing-key warnings, 0 AVCs, 0 new kernel errors, 1 baseline failed unit (aurora-sep.service, unchanged from control).
    • J413 (M2 MacBook Air): 102 → 102 DT channels, 106 → 106 sysfs labels identical to control, all 5 CPU thermal zones registered, 0 AVCs, 0 failed units, 0 new kernel errors.
  • §6 Naming: Pass.

Non-blocking Note

  • If #2260 lands before this PR merges, re-verify the &smc_hwmon include order and thermal-zone sensor indices on the combined tree.

Verdict

APPROVE — all §1–§6 criteria and live CI (dt-checks, host-tests) pass cleanly at 4a894c5482e522350d4366ef11d7aaf1060f9099. Ready for MERGETRAIN-LINUX4.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide merged commit 256b848 into integration/aurora Nov 23, 2026
2 checks passed
@RyanTheTide
RyanTheTide deleted the m2air-oracle/t8112-hwmon-shared branch November 27, 2026 13:21
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