Skip to content

arm64: dts: apple: t8152-j873g: enable Woodcote PMU RTC and SMC RTC - #3938

Merged
DjDeveloperr merged 4 commits into
mainfrom
feat/t8152-j873g-pmu-rtc
Dec 2, 2026
Merged

DjDeveloperr merged 4 commits into
mainfrom
feat/t8152-j873g-pmu-rtc

Conversation

@sithglan

@sithglan sithglan commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

What: Enable both the Woodcote PMU RTC (/dev/rtc0 with hardware wakealarm) and SMC RTC (/dev/rtc1) on Mac mini M6 (apple,j873g / T8152):

  • nvmem: apple-spmi-nvmem: add apple,woodcote-pmic to the child-population allowlist so devm_of_platform_populate() probes its pmu_rtc child.
  • mfd: macsmc: register the OF-matched macsmc-rtc cell in apple_smc_telemetry_devs for apple,t8152-smc.
  • dt-bindings: rtc: apple,j700-pmu-rtc: document apple,t8152-pmu-rtc with apple,t6041-pmu-rtc fallback (Woodcote shares the exact 0x2000 register layout and 0x2100 48-bit rtc_offset scratchpad per the J873g ADT).
  • arm64: dts: apple: t8152-j873g: wire nub_spmi0 AIC IRQ 675 as an interrupt controller, add rtc_offset@2100 and pmu_rtc (SPMI IRQ 2, wakeup-source) on pmic@e, and add apple,smc-rtc under smc.

Tested: Live J873g (Mac mini M6, 27.2 mBoot-20457.41.3 stub, aura 1.0.0b19-gb226aae1) at exact head cfa038589ade, boot_id=f4b808b9:

  • apple-pmu-rtc 308714000.spmi:pmic@e:rtc registered as /dev/rtc0 with writable wakealarm and apple_spmi 2 Edge IRQ, and macsmc-rtc registered as /dev/rtc1; both read matching UTC wall time to the second (2026-12-02 14:06:43).
  • Awake alarm test (rtcwake -d /dev/rtc0 -m no -s 3): IRQ 77 incremented 0 -> 1.
  • 3/3 s2idle cycles (rtcwake -d /dev/rtc0 -m freeze -s 5): suspend_stats/success 0 -> 3, fail 0, IRQ 77 1 -> 4; RTL8127 10GbE end0, N1 Wi-Fi wlp1s0f0, and G18G Borealis Vulkan (Apple M6 (G18G B1)) all stayed healthy post-wake with 0 BUG/Oops/WARN/GPU faults.
  • scripts/checkpatch.pl --strict --git HEAD~4..HEAD: 0 errors, 0 warnings, 0 checks across all 4 commits.

Risk: two-way · scoped to apple,woodcote-pmic, apple,t8152-smc, and t8152-j873g.dts, following the existing Abbey PMU RTC (t6040/t8132) and macsmc-rtc patterns.

Not yet: Deep-sleep (mem) wake testing on T8152 (no apple,t8152-sleep provider yet); other T8152 boards.

Allow apple-spmi-nvmem to call devm_of_platform_populate() on
apple,woodcote-pmic (T8152 / M6 primary PMIC) so its PMU RTC child
device probes.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Add the OF-matched macsmc-rtc cell to apple_smc_telemetry_devs so
T8152 boards that describe an apple,smc-rtc child node expose
/dev/rtc* via CLKT and the PMU rtc_offset NVMEM cell.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Document apple,t8152-pmu-rtc as compatible with apple,t6041-pmu-rtc for
the Woodcote PMU RTC on T8152 (M6) boards, which shares the exact
0x2000 register layout and 0x2100 48-bit rtc_offset scratchpad.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…and SMC RTC

Describe the nub_spmi0 AIC interrupt (IRQ 675 per the J873g ADT) as an
interrupt controller, add the Woodcote PMU RTC child node
(apple,t8152-pmu-rtc, apple,t6041-pmu-rtc, SPMI IRQ 2, wakeup-source)
and 48-bit rtc_offset NVMEM cell at 0x2100 on pmic@e, and wire the
apple,smc-rtc child node under smc.

This exposes both /dev/rtc0 (apple-pmu-rtc with hardware wakealarm for
timed s2idle wakes) and /dev/rtc1 (macsmc-rtc) on Mac mini M6 (J873g).

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan
sithglan requested review from a team as code owners December 2, 2026 14:08

@RyanTheTide RyanTheTide 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.

The driver registrations are scoped to the new Woodcote PMIC and the OF-described SMC RTC. The J873g receipt exercises both clocks, the PMU alarm interrupt, and three timed s2idle wakes. This covers the RTC change. The separate default-command-line boot gap remains in the nightly matrix.

@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.

Verdict: APPROVE (cfa038589ade).

Reviewed all 4 commits (3d0a4948, 84d30c6c, 78211ba6, cfa03858):

  • drivers/nvmem/apple-spmi-nvmem.c: adding apple,woodcote-pmic to the child-population allowlist matches the existing PMIC family allowlist cleanly.
  • drivers/mfd/macsmc.c: adding OF-matched macsmc-rtc to apple_smc_telemetry_devs scopes it strictly to apple,t8152-smc boards describing an apple,smc-rtc child node.
  • Documentation/devicetree/bindings/rtc/apple,j700-pmu-rtc.yaml + arch/arm64/boot/dts/apple/t8152-j873g.dts: apple,t8152-pmu-rtc (with apple,t6041-pmu-rtc fallback), nub_spmi0 AIC IRQ 675 interrupt controller, rtc_offset@2100 (0x6 bytes), pmu_rtc (SPMI IRQ 2, wakeup-source), and apple,smc-rtc under smc all follow the existing Abbey/Maverick PMU RTC and macsmc-rtc wiring cleanly. (Note: trivial 1-line adjacency in apple,j700-pmu-rtc.yaml with #3936 whichever merges second.)
  • Exact-head J873g hardware verification (boot_id=f4b808b9) covers both /dev/rtc0 and /dev/rtc1 UTC parity, awake alarm IRQ 0 -> 1, and 3/3 rtcwake -d /dev/rtc0 -m freeze -s 5 cycles with network and G18G Borealis intact.
  • pr-text is green; let queued apple-build and dt-checks complete green before merging (note that host-tests currently has an unrelated failure on main in apple-dcp / display-sleep-merge-tests.py dcp->ext272 from #3815).

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:power Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at cfa03858: not ready yet

Check Detail
CI at head running running: apple-build, host-tests, KUnit plan
Review ok approved by RyanTheTide, satchlj
Requested changes ok none
Hardware row at head ok in the PR body at cfa03858
Conflicts ok none
PR text ok Risk: two-way · scoped to apple,woodcote-pmic, apple,t8152-smc, and t8152-j873g.dts, following the existing Abbey PMU RTC (t6040/t8132) and macsmc-rtc patterns.

Areas: area:bringup, area:power

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

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Local CI receipt for cfa03858

Hosted apple-build, KUnit plan and host-tests have been queued since 14:09 UTC. dt-checks and pr-text are already green on this head. These are the same checks, run on the merge tree.

Merge tree: cfa03858 onto main a76093e3 (merge base deedd808) merges cleanly. That is local commit dd08e673, tree e080683b. Main has since moved to 3820bed1, and that merge is also clean (tree a41a9d36). The four PR files are byte-identical in both trees. The other 18 changed files are main's own amdgpu, PCI ROM and centauri Wi-Fi changes.

Setup: an x86_64 build host cross-compiling for arm64 (clang 23.1.3, LLVM=1, rustc 1.100.1), reusing a warm asahi-profile O= dir. Each check ran twice in the same O= dir, once with main's version of the touched files and once with the merge.

Check Command main merge
W=1 objects make ARCH=arm64 LLVM=1 O=<out> W=1 drivers/mfd/macsmc.o drivers/nvmem/apple-spmi-nvmem.o 0 warnings 0 warnings
dtb make ARCH=arm64 LLVM=1 O=<out> W=1 apple/t8152-j873g.dtb 8 warnings same 8
binding make ARCH=arm64 LLVM=1 O=<out> dt_binding_check DT_SCHEMA_FILES=rtc/apple,j700-pmu-rtc.yaml (dtschema 2026.9, yamllint 1.38.0) clean clean
dtbs_check make ARCH=arm64 LLVM=1 O=<out> CHECK_DTBS=y apple/t8152-j873g.dtb 3 lines same 3
checkpatch scripts/checkpatch.pl --strict --git deedd808..cfa03858 0 errors, 0 warnings, 0 checks on all 4 commits
KUnit build same W=1 object build with CONFIG_KUNIT=y, CONFIG_MFD_MACSMC_KUNIT_TEST=y, CONFIG_NVMEM_APPLE_SPMI_KUNIT_TEST=y 0 warnings 0 warnings, both suites compiled in
host tests python3 -I tools/asahi/run-host-tests.py --only pmu-rtc and --only macsmc 13/13 and 1/1 pass

Notes

  • The 8 dtc warnings are the unit_address_vs_reg ones already in t8152-j873-gpu.dtsi. The 3 dtbs_check lines are the GPU and gfx mailbox nodes that have no schema yet. The new PMU rtc, rtc-offset and SMC rtc nodes validate with no findings.
  • scripts/ci/apple-kunit.py plan on the merge selects macsmc apple-spmi-nvmem. Both kunitconfigs need CONFIG_ARCH_APPLE=y, so they can't run under UML, and this host doesn't use QEMU. The suites were built, not run. Neither suite exercises the changed lines (the T8152 SMC cell table and the PMIC compatible list).
  • Checked against the diff: apple_smc_telemetry_devs is used only for apple,t8152-smc, and apple,woodcote-pmic appears only in t8152-j873g.dts. Other SoCs see no change.

Result: everything passes, with no new warnings against main.

@DjDeveloperr
DjDeveloperr merged commit 97b8dfc into main Dec 2, 2026
9 of 14 checks passed
@DjDeveloperr
DjDeveloperr deleted the feat/t8152-j873g-pmu-rtc branch December 2, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:power Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants