Repository navigation
arm64: dts: apple: t6050: K-board parity: shared PMU RTC and SD reader, port-1 DART domain, Max PMIC buses by hardware - #3363
Conversation
…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]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
K114s row at the #3363 DTB (one-shot, kernel 7.3.0-42, with #3350's panel merged in locally for the boot):
|
There was a problem hiding this comment.
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
2d96d922vs main plus this PR: J714c, J714s, J716c, J716s, J775c, J775d and J873s unchanged (the PMIC-bus macro is byte-identical, as claimed). K114c:dart_apcie1gainspower-domains = <&ps_apcie_sys_gp>, and the PMU gainsrtc. K116s: port 1 maps throughdart_apcie1(with the power domain and manual availability) instead ofapcie1_dart, which is disabled now. K114s/K116c: the PMUrtc, PCIe port 1 (regs, IRQ 1531, PERST# pin 81,pwrenon pcIO output 3) with the GL9755,dart_apcie1, and pin 81 unreserved. - ADT values (live K114s):
pci-bridge1function-perstGPIO 0x51;apcie-config-tunables,pcie-rc-tunablesandpcie-rc-gen3/4/5-shadow-tunablesdecode to the same (offset, size, mask, value) tuples as the DT;info-rtc0x2002,rtc_alarm_offset0x2008,rtc_irq_mask_offset0x200e,rtc_scrpad0x2100.nub-spmi1/nub-spmi4are present on J716c (Max) and absent on K114s and K116s (Pro). - K114s row (09:02Z, after the last commit):
apple-pmu-rtcis 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 haswakeup-sourcebut 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_gparrangement the K114s row ran. Axboe's row stays under Still to run.
Signed-off-by: Ryan Murray <[email protected]>
|
Merged main into the branch (normal push; head |
There was a problem hiding this comment.
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 ofe36ad0d6and maincec0503a; no other new commits.- Per board, the sorted set of changed DTS lines main
cec0503a->063f60aeis identical to main2d96d922-> main pluse36ad0d6(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.
|
@DjDeveloperr code-owner ping (interim ruleset-gap rule, point 6): this is ready at |
|
Merging under the interim ruleset-gap rule (COMMON-RULES 01:54), at |
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):
t6050-k114-k116.dtsi; K114c, K114s and K116c gain it. All four ADTs give the same RTC registers.dart_apcie1(PCIe port 1's DART) takesps_apcie_sys_gp, as port 0's does.dart_apcie1fromt6050-die0.dtsiinstead of a second node for the same DART.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