Skip to content

arm64: dts: apple: t6050: K-board parity: shared PMU RTC and SD reader, port-1 DART domain, Max PMIC buses by hardware - #3363

Merged
RyanTheTide merged 6 commits into
mainfrom
fix/t6050-kboard-parity
Nov 27, 2026
Merged

RyanTheTide merged 6 commits into
mainfrom
fix/t6050-kboard-parity

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The four T6050 "K" MacBook Pros (K114s, K114c, K116s, K116c) are not at DT parity on main. The PMU RTC and the SD card reader are described only on some of them, although every board's ADT has the same hardware. PCIe port 1's DART has no power domain. And the M5 Max PMIC buses are switched on by a hand-kept list of six boards.

Change

Five device-tree commits, smallest first, each checked against the boards' ADTs (live K114s and K116s, IPSW DeviceTrees for K114c and K116c, live J716c for the Max side):

  1. The PMU RTC moves into the shared t6050-k114-k116.dtsi; K114c, K114s and K116c gain it. All four ADTs give the same RTC registers.
  2. dart_apcie1 (PCIe port 1's DART) takes ps_apcie_sys_gp, as port 0's does.
  3. K116s maps port 1 through dart_apcie1 from t6050-die0.dtsi instead of a second node for the same DART.
  4. The SD card reader (PCIe port 1) moves into the shared K dtsi; K114s and K116c gain it. The live K114s ADT confirms the PERST# pin, the power output and the link tunables.
  5. A new t6050-soc-max.dtsi: the M5 Max PMIC buses (nub-spmi1, nub-spmi4) are selected by a hardware macro (T6050_MAX_PMIC_BUSES) instead of a six-board list. Every Max ADT has them and no Pro ADT does. Byte-identical DTBs.

The full coverage matrix (every block x the four boards: which blocks are on main, what the ADTs say, the 14" vs 16" and Pro vs Max deltas) is in the lane evidence. Blocks that need owner rows or are owned by open PRs are left alone: media engines (#2278), SMC hwmon/fans (#2281), SEP/Touch ID (#2115), camera (#2275), ANE on the 16" boards (#2293), AOP/jack on K116c (#2285/#2277), PMP turn-on, sleep, the 16" MagSafe/USB4 router.

Tested: DTB checks only so far. After every commit, all 11 T6050 DTBs were built and compared: only the boards named above change, and the others are byte-identical. dtschema shows 10 messages before and after (0 new), and apple-dart-pd-check reports new 0 (fixed 1). K114s hardware row (RTC wake, SD reader) follows in a comment.

Risk: two-way · K114s, K114c, K116c gain the PMU RTC; K114s and K116c gain the SD reader; the four K boards' port-1 DART gets a power domain; all other T6050 DTBs are byte-identical.

Still to run

  • K114s at this head: rtcwake from the PMU RTC, and an SD card in the reader.
  • K116s (Axboe) / K114c / K116c rows: Joshua's agent and the board owners, if they can.

…4s and K116c

Only the K116s described the PMU's RTC and alarm. The K114c, K114s and
K116c had the SMC's RTC only, so they had no alarm to wake a firmware
sleep from.

The four boards' ADTs (27.2) give the PMU, nub-spmi0/spmi-abbeyL1, the
same RTC registers: info-rtc 0x2002, info-rtc_alarm_ctrl 0x2000,
info-rtc_alarm_offset 0x2008, info-rtc_irq_mask_offset 0x200e,
info-rtc_scrpad 0x2100 and info-clock_offset <0x2100 6>, the T6041 PMU's
layout. The live K114s ADT has the same values. So the K116s node moves
into t6050-k114-k116.dtsi unchanged.

The K116s DTB and the other T6050 DTBs are byte-identical; K114c, K114s
and K116c gain only the rtc node under the PMU.

Signed-off-by: Ryan Murray <[email protected]>
…main

dart_apcie1, PCIe port 1's DART (the SD reader's, ADT /arm-io/dart-apcie1
at 0x411000000), names no power domain. The K114c enables it with no
domain, and the DART power-domain check flags it on every K board that
gains the SD reader.

The ADT gives dart-apcie1 no power-gates of its own: it sits in the
apcie block, whose power-gates (ADT apcie0) start with APCIE_GP and
APCIE_SYS_GP, next to port 0's DART, which takes APCIE_SYS_GP since
"give the K boards' port 0 DART its power domain". The T6040's
apcie1_dart at the same address takes ps_apcie_sys_gp too. So
dart_apcie1 takes ps_apcie_sys_gp, which t6050-k114-k116-usb.dtsi
already enables as firmware-owned on all four boards.

The four K board DTBs gain only that power-domains property; the other
T6050 DTBs are byte-identical.

Signed-off-by: Ryan Murray <[email protected]>
…die0.dtsi

The tree has two nodes for ADT /arm-io/dart-apcie1 (0x411000000):
dart_apcie1 in t6050-die0.dtsi, under the SoC bus, and apcie1_dart in
t6050-peripherals.dtsi, under /soc. The K114c and J714s map PCIe port 1
through dart_apcie1; the K116s alone enables apcie1_dart, which names no
power domain.

Map port 1 through dart_apcie1 on the K116s too, as the K114c does: the
iommu-map, post-init-providers and the enabled, manual-availability node
now refer to it, and the port's DART gets the APCIE_SYS_GP domain the K
boards give it. apcie1_dart is left disabled, as on every other T6050
board. That also lets the K boards share one port 1 description.

Only the K116s DTB changes: dart_apcie1 is enabled with
apple,manual-availability instead of apcie1_dart. The DART power-domain
check counts one finding fewer.

Signed-off-by: Ryan Murray <[email protected]>
…4s and K116c

Only the K114c and K116s described PCIe port 1 and its SD card reader,
each in its own copy; the K114s and K116c had no SD reader.

The four boards' ADTs (27.2) have the same apcie0 port 1: port1, phy1
and intr2axi1 at reg[22], reg[24] and reg[25], the shared PHY state at
reg[3], IRQ 1531, pci-bridge1 function-perst on gpio0 pin 0x51 (81), and
a pcie-sdreader with function-sd_pwr_en pKW8('pcIO', 0x0, 0x190000) and
card-detect and write-protect polarity 1, behind dart-apcie1. The live
K114s ADT has pci-bridge1's link tunables as the K114c description has
them: apcie-config-tunables, pcie-rc-tunables and pcie-rc-gen3/4/5-
shadow-tunables. So:

- t6050-k114-k116.dtsi describes port 1, the GL9755 and dart_apcie1 as
  the K114c did, adds sd_pwr_en as pcIO output 3 after the three shared
  ones and exposes pin 81.
- t6050-k114.dtsi exposes pin 81 for the 14-inch boards.
- The K114c keeps none of it in its own file.
- The K116s keeps its single pcIO output and points port 1's power at
  it (output 0).

The K114c and K116s DTBs are byte-identical, as are the other T6050
DTBs. The K114s and K116c gain port 1 with the SD reader, dart_apcie1,
the fourth pcIO output and pin 81. The shared block is Joshua Warren's
K114c description, tested on the K114c.

Signed-off-by: Ryan Murray <[email protected]>
… not by board

t6050-peripherals.dtsi describes nub-spmi1 and nub-spmi4 only for a list of
six boards (J714c, J716c, J775c, J775d, K114c, K116c). What the six have in
common is the die: they are the M5 Max boards (the J775d's die 0 is one).

The 27.2 ADTs agree. nub-spmi1 (spmi-mosquitoM1, interrupt 731) and
nub-spmi4 (spmi-jerezC0 and spmi-jerezC1, interrupt 746) are in the J714cAP,
J716cAP, J775cAP, J775dAP, K114cAP and K116cAP DeviceTrees and in the live
J716c ADT, and in none of the M5 Pro's: J714sAP, J716sAP, J873sAP, K114sAP,
K116sAP and the live K114s and K116s ADTs.

So the new t6050-soc-max.dtsi, the M5 Max's die-0 part, defines
T6050_MAX_PMIC_BUSES. The two buses are now guarded by that hardware macro, as
the ATC2 router is by T6050_ATC2_USB4_ROUTER, and the six boards include the
file before t6050-peripherals.dtsi. It is the place for the Max's other SoC
blocks, the PMP tunables and the second media engines among them.

All 11 T6050 DTBs are byte-identical.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 27, 2026 07:19
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merge readiness at 063f60ae: not ready yet

Check Detail
CI at head ok 3 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at 063f60ae
Conflicts ok none
PR text ok Risk: two-way · K114s, K114c, K116c gain the PMU RTC; K114s and K116c gain the SD reader; the four K boards' port-1 DART gets a power domain; all other T6050 DTBs are byte-identical. Still to run - K114s at this head: rtcwake from the PMU RTC, and an SD card in the reader. - K116s (Axboe) / K114c / K116c rows: Joshua's agent and the board owners, if they can.

Areas: area:bringup

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

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

K114s row at the #3363 DTB (one-shot, kernel 7.3.0-42, with #3350's panel merged in locally for the boot):

  • PMU RTC registers as rtc0 (apple-pmu-rtc, wakealarm present) and sets the system clock; the SMC RTC moves to rtc1.
  • SD reader: a Genesys GL9755 on PCIe port 1 (17a0:9755). A 59.7 GiB SDXC card comes up at UHS-I SDR104 as mmcblk0 with both partitions. After one s2idle cycle the card re-enumerated once (error -84 doing runtime resume, then removed and re-added).
  • Not a regression of this PR, but worth knowing: the RTC alarm does not wake the machine from s2idle (rtcwake -m freeze). The T6050 PMU alarm interrupt isn't described yet, because the gen-4 SPMI controller isn't an interrupt controller (see the comment in rtc-apple-pmu.c), so the alarm only wakes from firmware sleep.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at e36ad0d661e3. After #3383 lands, this branch needs main again (conflict in t6050-k114c.dts); I'll re-check the merged DTBs and re-approve at that head.

Blockers: none.

Checked: read all five commits; built all 11 T6050 DTBs at main and with this PR and compared them as sorted DTS; checked every new value against the live K114s, K116s and J716c ADTs; CI green (dt-checks, host-tests, pr-text); K114s row; the Max PMIC buses are now selected by die, not by a board list; no attribution.

Evidence
  • Semantic DTS diff, main 2d96d922 vs main plus this PR: J714c, J714s, J716c, J716s, J775c, J775d and J873s unchanged (the PMIC-bus macro is byte-identical, as claimed). K114c: dart_apcie1 gains power-domains = <&ps_apcie_sys_gp>, and the PMU gains rtc. K116s: port 1 maps through dart_apcie1 (with the power domain and manual availability) instead of apcie1_dart, which is disabled now. K114s/K116c: the PMU rtc, PCIe port 1 (regs, IRQ 1531, PERST# pin 81, pwren on pcIO output 3) with the GL9755, dart_apcie1, and pin 81 unreserved.
  • ADT values (live K114s): pci-bridge1 function-perst GPIO 0x51; apcie-config-tunables, pcie-rc-tunables and pcie-rc-gen3/4/5-shadow-tunables decode to the same (offset, size, mask, value) tuples as the DT; info-rtc 0x2002, rtc_alarm_offset 0x2008, rtc_irq_mask_offset 0x200e, rtc_scrpad 0x2100. nub-spmi1/nub-spmi4 are present on J716c (Max) and absent on K114s and K116s (Pro).
  • K114s row (09:02Z, after the last commit): apple-pmu-rtc is rtc0 with wakealarm; GL9755 SDXC at SDR104.
  • Follow-ups, not blocking (both also apply to the K114c/K116s, which already have these on main): (a) the SD card re-enumerates after s2idle (error -84 doing runtime resume), so a mounted card gets dropped across a sleep; worth an issue before people use cards in earnest. (b) The PMU RTC has wakeup-source but can't wake from s2idle yet (no alarm interrupt on the gen-4 SPMI).
  • K116s: the port-1 DART switch is a runtime change on a board nobody here can boot. It is the same dart_apcie1 + ps_apcie_sys_gp arrangement the K114s row ran. Axboe's row stays under Still to run.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merged main into the branch (normal push; head 063f60ae6328) after #3383. The t6050-k114c.dts conflict was two blocks that both sides had moved into t6050-k114-k116.dtsi: the SD reader (&pcie0 port 1 + &smc_pcio, this PR) and the boot NOR (#3383). Both are dropped from the board file; the shared copies are unchanged (same smc_pcio output commands). All 11 T6050 DTBs against main cec0503a5a: the seven non-K boards byte-identical. K114s, K114c and K116c gain the PMU RTC, K114s and K116c gain the SD reader, all four keep #3383's writable nvram. dtschema 10 = 10 messages (main's).

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 063f60ae6328, once dt-checks and host-tests finish green on this head.

Blockers: none.

Checked: this head is the five reviewed commits plus a main merge over #3383 (cec0503a); I rebuilt all 11 T6050 DTBs at main and at this head and compared them as sorted DTS. Each board's change from main is exactly the change I approved at e36ad0d6. The conflict resolution in t6050-k114c.dts keeps #3383's shared NOR and adds nothing new. No attribution.

Evidence
  • 063f60ae = merge of e36ad0d6 and main cec0503a; no other new commits.
  • Per board, the sorted set of changed DTS lines main cec0503a -> 063f60ae is identical to main 2d96d922 -> main plus e36ad0d6 (from my first review) for all 11 T6050 boards. So nothing was dropped or added in the resolution, and the NVRAM partition from #3383 is still on all four K boards.
  • My first review (ADT checks, K114s row, follow-ups) applies unchanged.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr code-owner ping (interim ruleset-gap rule, point 6): this is ready at 063f60ae. It has the review App's approval from a lane other than the author, KREVIEW's review, CI green (dt-checks, host-tests) and a K114s row at this head (PMU RTC as rtc0, SD reader). It's DT for the K boards only: every other T6050 DTB is byte-identical to main, so the families it doesn't touch have no runtime change. If you have no objection, I'll merge with the documented rationale after 03:01 AEDT. Revert: git revert -m 1 <merge>.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 27, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the interim ruleset-gap rule (COMMON-RULES 01:54), at 063f60ae. (1) The review App approved at this head, from a lane other than the author. (2) CI is green. (3) K114s row at this head (PMU RTC rc0, SD reader). (4) K-board DT only: every other T6050 DTB is byte-identical to main, so the families it doesn't touch have no runtime change. (5) There's no open blocking review. (6) Dj was pinged on this PR at 01:56 AEDT, more than an hour ago, with no objection. The App approval doesn't count only because the ruleset requires a code-owner review, which an App can't give. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit 9867e17 into main Nov 27, 2026
4 of 5 checks passed
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) blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant