Skip to content

arm64: dts: apple: t8142-j704: Wire nub-spmi0's interrupt and the PMU RTC - #4365

Draft
EliasJernberg wants to merge 1 commit into
aurora-silicon:mainfrom
EliasJernberg:feat/t8142-j704-pmu-rtc
Draft

EliasJernberg wants to merge 1 commit into
aurora-silicon:mainfrom
EliasJernberg:feat/t8142-j704-pmu-rtc

Conversation

@EliasJernberg

Copy link
Copy Markdown

What: j704 gets the same PMU RTC wiring that j813 already has on main: nub-spmi0 becomes an interrupt controller with its AIC interrupt, and the Abbey PMU gets an apple,t8142-pmu-rtc child that uses event 2 as its alarm interrupt. 13 lines in t8142-j704-power.dtsi, no driver change, no new binding.

Why: without it, J704 has only the SMC RTC, with no alarm. /sys/class/rtc/rtc0/wakealarm is missing, so rtcwake and timed wake from suspend do not work.

Tested: J704 (M5).

  • Older revision of this node (test tree prs25, jobs 2757 and 2766): rtc0 is apple-pmu-rtc, 0.94 s off system time. A 20 s alarm wakes the machine from shallow s2idle (IRQ 112). A 27.5 s deep s2idle cycle ends on the RTC alarm, and Wi-Fi is back 2 s after resume.
  • This node plus arm64: dts: apple: t8142: wire nub_spmi0 IRQ and Abbey PMU RTC #3936 (test tree prs27, job 2772): 63 of 67 rows in our boot matrix, hwclock 0.68 s off, wakealarm present.
  • This branch, rebased on current main: dtb builds and dtbs_check only, see below.

Risk: two-way. Only J704's device tree. Reverting removes the RTC and the alarm, and the SMC RTC stays as before.

Not yet:

  • Deep s2idle on this exact revision (only on prs25).
  • Long sleep, lid closed on battery, and power draw while suspended.
  • No row on main plus this branch alone.

… RTC

Describe J704 the same way as J813: nub-spmi0 is an interrupt
controller on AIC 584 (ADT /arm-io/nub-spmi0 interrupts[1]), and
pmu-main's RTC alarm is its event 2 (pmu-main interrupts [2, 62]). The
alarm comparator at 0x2000 (info-rtc_alarm_ctrl, _offset 0x2008,
_mask 0x200e) has the T6041 layout, so the RTC can wake the machine
from suspend-to-idle.

Signed-off-by: Elias Jernberg <eliasjernberg@gmail.com>

This branch has not been deployed

No deployments
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