Repository navigation
arm64: dts: apple: t604x: enable ADT-present peripherals and move tunnel PIODMA (on #3512) - #3559
Conversation
t6040_pciec_hw was modelled on T8132: the kernel_init (oe-fabric) cold
init, the T8132 port reset values and SID-indexed RID2SID slots. The
ADT's apciec,t6040 has no oe-fabric region (config, rc, port0, fabric,
debug, ioa, ltssm, intr2axi), so cold init failed mapping it (-ENODATA).
Its fabric, rc, debug, config and DART tunables are T6050's with small
value differences.
Make it an Intr2AXI controller with T6050's no_port_reset, and allocate
RID2SID slots as T6050 does: with iommu-map-mask 0xff the Studio
Display's xHCI (RID 0x300) and its Thunderbolt bridge (RID 0x100) share
SID 0, and an SID-indexed slot failed the xHCI's enable with a silent
-EBUSY ("Can't enable PCI device, BIOS handoff failed").
Tested on the J614s with a Studio Display (2022) on the left port: cold
init completes (link up), the display's Titan Ridge bridges and xHCI
enumerate and xhci_hcd binds, #1589.
Signed-off-by: Petr Škuta <[email protected]>
Enable the left port's tunneled PCIe (usb4_0_pcie_tunnel, apciec0_dart, usb4_0_pcie) and keep the ACIO's apple,pcie-tunnel, so a Thunderbolt device's PCIe functions reach a root port. No boot loader hands the port over, so the kernel cold-initializes it (apple,pciec-kernel-init). From the j614s ADT (macOS 26 IODeviceTree) apciec0 and dart-apciec0: - the controller's fabric, rc and debug tunables and the port's config tunables; - the DART's tunables and its DMA window: vm-base 1 TiB + 2 GiB, vm-size 0x7ff00000, the first 16 KiB a dead mapping; - bypass streams 253 and 255 (bypass-253, bypass-255): the port's own writes, its MSIs turned into AIC writes, use them. Without the bypass no MSI arrived (xHCI "Command Aborted") and the DART fault IRQ stormed. As on T6050's PCIe-C DART: full error reporting, CTC flush and the ATC0 PCIe power domain. Tested on the J614s with a Studio Display (2022): its USB2 and USB3 Gen2 hubs, speakers and microphones (snd-usb-audio), camera (uvcvideo), HID and a USB-C port (a USB 3.1 drive at 5 Gb/s) work, #1589. Signed-off-by: Petr Škuta <[email protected]>
The ADT's apciec0-2 and dart-apciec0-2 carry identical tunables, DMA windows and bypass streams, so describe the PCIe-C of the left port once in t6040-j614s-pciec.dtsi and use it for all three ports. Port 0 is unchanged; ports 1 and 2 keep their ACIO's apple,pcie-tunnel now. Signed-off-by: Petr Škuta <[email protected]>
The PCIe-C DART window, bypass streams and the DART, controller and port tunables are T6040 SoC data: the J616s ADT carries the same values as the J614s for apciec0-2 and dart-apciec0-2. Move them from t6040-j614s-pciec.dtsi to t6040-pciec.dtsi, included by t6040.dtsi, so a T6040 board only enables the tunnel, DART and controller of each port. The J614s DTB is unchanged. Other T6040 boards gain the properties on nodes that stay disabled. Signed-off-by: Petr Škuta <[email protected]>
Signed-off-by: Ryan Murray <[email protected]> # Conflicts: # arch/arm64/boot/dts/apple/t6040.dtsi
The PCIe-C tunnels (apciec0-2 with dart-apciec0-2) are part of the T6040 and have no board wiring: the J614s, J616s and J773s ADTs all list the same three controllers and DARTs with identical tunables. Enable the tunnel, its DART and its controller in t6040-pciec.dtsi instead of in each board, and stop deleting the routers' apple,pcie-tunnel link on the J616s, which left an enclosure on any of its Thunderbolt ports without PCIe. Nothing comes up on its own: a controller is only populated when its USB4 router, which the board enables, asks for a PCIe tunnel. On boards whose routers are still off (J773s) the nodes stay idle. The J614s and T6041 DTBs are unchanged; the J616s and J616s tether DTBs gain the three tunnels. Signed-off-by: Ryan Murray <[email protected]>
Each PCIe-C DART sits in its port's ATC PCIe power domain. Now that the tunnels are enabled on every T6040 board, enable that domain with them, so a board that does not enable it itself (J773s) does not carry an enabled DART on a disabled domain. The J614s and J616s already enable these domains; their DTBs are unchanged. Signed-off-by: Ryan Murray <[email protected]>
Enable ADT-present peripherals across the T6040 (M4 Pro) and T6041 (M4 Max) shared device trees, and move the T6040 PCIe-C tunnel PIODMA engines into their usb4-pcie-tunnel containers so ACIO populates and tears them down with each tunnel: - t604x.dtsi: enable i2c4, i2c6, and i2c8 (power domains and pinmux already active in shared files). - t6040.dtsi / t6040-pmgr.dtsi: enable pinctrl_smc without interrupt-controller (SMC firmware owns its IRQ groups, matching pinctrl_nub), nub_spmi3/4 with ps_nub_spmi3/4, aop_spmi0, and serial0 with ps_uart0. - t6040-peripherals.dtsi: enable aon_ptd, cpu_debug, atc0..2_dpin0/1, battery_monitor (disabled on desktop t6040-j773s), and radio_pmu; keep peripheral_clocks disabled (no clock provider driver yet). - t6040-usb4.dtsi / t6040-pciec.dtsi / adt-coverage/t6040-j616s.txt: move apciec0..2_piodma into usb4_0..2_pcie_tunnel as dma@ nodes, enable them via T6040_PCIEC(), and update the J616s coverage paths. - t6040-j616s.dts: enable sd_card_control, display_pcon, [email protected], and the read-only DP855 downstream i2c bus and TMP103 sensors. - t6041.dtsi / t6041-j614-j616-j575-scaler.dtsi: enable aop_spmi0, ps_aes/aes, aon_ptd, ps_scodec/apr0, and shared scaler0/1 plus their DARTs and power domains; keep max_scaler_clocks disabled. Unsafe (dcuart), loader-gated (DCP/DCPEXT/SEP/SIO/AVE1/PMP reports), and unbacked clock providers remain disabled. Signed-off-by: Ryan Murray <[email protected]>
There was a problem hiding this comment.
Verdict: FINISH, then merge at 7954fa29
Blockers:
t6040-j616s.dts(dp855downstreami2c+ti,[email protected]): Re-enabling these nodes undoes an intentional hardware-verified disablement (with the panel on, DP855 refuses AP accesses with ack 3; with the panel off, registers read back zero). Althoughread-onlyavoids writingTMP103_CONF_REGat probe time, exposing threetmp103hwmon devices causes userspace monitoring tools (sensors, etc.) to fail with transfer errors whenever the panel is on and read bogus zeros when it is off. Keep the DP855 downstreami2cbus and itstmp103children disabled unless AP access is actually proven on J616s.t6040.dtsi(pinctrl_smc): Droppinginterrupt-controller,#interrupt-cells,interrupt-parent, and all 7interrupts(AIC_IRQ 985..991) strips accurate hardware description frompinctrl_smcsolely to enable a node that has no consumers and still lacks SMC interrupt-group ownership handoff. Keeppinctrl_smcdisabled with its hardware interrupt description intact until a consumer and handoff exist.- Stack, CI, hardware row, and required review: Stacked on unmerged
#3512(638bd1cb); wait for#3512to land (or rebase/retarget after merge), get the 22 queued CI checks green, add the live J616s (and T6041 check coveringapr0/scaler0/scaler1on J614c) exact-head boot row, and complete the required non-author review.
Checked:
- Commit
7954fa29across all modified DT files (t604x.dtsi,t6040*.dtsi,t6041*.dtsi,t6040-j616s.dts,t6040-j773s.dts,t6041-j614-j616-j575-scaler.dtsi,adt-coverage/t6040-j616s.txt):- Verified
apciec0..2_piodmamove cleanly intousb4_0..2_pcie_tunnelwith matchingadt-coverage/t6040-j616s.txtpaths. - Verified
aop_spmi0,apr0, andscaler0/scaler1are already live on J616c/J575c (andaop_spmi0on J616s/J773s), withps_fab1/5/6_socenabled int6041-pmgr.dtsiandps_msr0/1_dartaliasingps_msr0/1, andbattery_monitordisabled on desktopt6040-j773s.dts. - Verified
nub_spmi3/nub_spmi4carry nointerruptsand havealways-onpower domains, whiledcuart,peripheral_clocks,max_scaler_clocks, and loader-gated blocks remain disabled.
- Verified
Evidence
- Head:
7954fa29(MERGEABLEonmain, stacked on#3512638bd1cb, 13 files). - CI at review time: 22 checks
QUEUED.
…isabled Keep the DP855 downstream i2c bus and its three TMP103 sensors disabled on t6040-j616s (DP855 refuses AP accesses with ack 3 while the panel is on and reads back zeros while off, so exposing hwmon nodes breaks userspace tools) and keep pinctrl_smc disabled with its full hardware interrupt description intact in t6040.dtsi until a consumer and SMC IRQ handoff exist. Signed-off-by: Ryan Murray <[email protected]>
|
Addressed both review blockers in fast-forward commit
Re-verified at |
|
Pinging @aurora-silicon/omarchy-mac @aurora-silicon/aurora-maintainers for review notice at |
|
Second-family (T8122 M3 MacBook Air J615) guarded DT-only control row at exact head
|
|
Primary target (T6040 M4 Pro MacBook Pro J616s) guarded DT-only boot row at exact head
Both exact-head J616s (T6040) and J615 (T8122) guarded DT-only rows pass at |
There was a problem hiding this comment.
Verdict: MERGE at b491804 after the base PR and hosted checks are green.
Checked: the patch keeps the DP855 downstream bus and SMC pin controller disabled. The J616s receipt verifies their live status, three PCIe tunnels, a successful RTC wake, and a clean return to fleet89. The J615 control also passed and restored its saved boot. Reviewed the reported seven-DTB schema comparison with no new warnings. Keep the #3512 dependency and hosted checks pending.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What: Enable safe ADT-present peripheral blocks across the T6040 (M4 Pro) and T6041 (M4 Max) shared device trees (
t604x.dtsi,t6040*.dtsi,t6041*.dtsi,t6040-j616s.dts,t6040-j773s.dts) and moveapciec0..2_piodmainto theirusb4-pcie-tunnel-{0..2}containers asdma@nodes. Reduces disabled nodes by -113 across all 7 T604x DTBs (1639 -> 1526). Stacked on #3512 (638bd1cb34ba).Tested:
b4918049efe896across all 7 T604x DTBs (and all 139/139 Apple DTBs):CHECK_DTBS=y7 -> 7 (0 new warnings),apple-adt-coverage.py(t6040-j616s)MISSING=0 mapped=595 waived=307 broken=0,apple-dart-pd-check.py13 -> 13 (0 new),apple-sibling-drift.py146 -> 146 (0 new),scripts/checkpatch.pl --strict0 errors / 0 warnings / 0 checks.t6040) guarded DT-only boot row at exactb4918049efe896: PASS (receipt): trial Stage 23b6f79f1a2f8a084on saved7.3.0-aurora-fleet89,FCHECK PASS(s2idle via rtc1 rc=0, ping0%before/after,fault-lines=0,avc=0,deferred=0),TUNCHECK PASS acio_okay=3 tunnels_okay=3,row VERDICT PASS(baseline/trial/post-restore), 32/32 newly enabled nodes verifiedokayin live/sys/firmware/fdt, both review-protected nodes verifieddisabled, 0 new kernel errors (2 -> 2), restored clean (dc24e24452dfa082).t8122) guarded DT-only boot row at exactb4918049efe896: PASS (receipt): trial Stage 2c5d7ef6ceb959d97on saved7.3.0-aurora-fleet90-airs2,FCHECK PASS(s2idle via rtc0 rc=0,fault-lines=0,avc=0),row VERDICT PASS(baseline/trial/post-restore), clean merge onmain(4ffd63af1907) produces byte-identicalt8122-j615.dtb(887035d64a0a95c5) andt6000-j316s.dtb(93578f4084e42da7), restored clean (dd01f13c34bbce63).Risk: two-way · Apple M4 Pro / M4 Max (T6040/T6041, 7 boards); DT-only delta over #3512, zero changes to non-T604x DTBs or kernel code.
Not yet: Waiting on stacked base #3512 to merge and GitHub Actions CI checks to finish green at
b4918049efe896.Revert:
git revert <merge-sha>restores every T604x DTB tomainwith no kernel/userspace/firmware state dependencies.Before you request review
638bd1cb34ba; disjoint from active display/GPU/audio PRs).Details
Shared
.dtsifirst across T6040 (M4 Pro) and T6041 (M4 Max):t604x.dtsi: enablei2c4,i2c6, andi2c8(ps_i2c4/6/8and pinmux already active).t6040.dtsi/t6040-pmgr.dtsi: enablenub_spmi3/nub_spmi4(nointerrupts, withapple,always-onps_nub_spmi3/ps_nub_spmi4),aop_spmi0(already enabled onj616s,j773s,j575c,j616c), andserial0withps_uart0. Keeppinctrl_smcdisabled with its hardware interrupt description intact until a consumer and SMC IRQ handoff exist.t6040-peripherals.dtsi: enableaon_ptd,cpu_debug,atc{0,1,2}_dpin{0,1},battery_monitor(kept disabled on desktop Mac minit6040-j773s.dts), andradio_pmu; document whyperipheral_clocksstays disabled.t6040-usb4.dtsi/t6040-pciec.dtsi/adt-coverage/t6040-j616s.txt: moveapciec{0,1,2}_piodmaintousb4_{0,1,2}_pcie_tunnelasdma@nodes, enable viaT6040_PCIEC(), and update the 3 J616s ADT coverage paths.t6040-j616s.dts: enablesd_card_control,display_pcon, andretimer@18/19/1a; keep the DP855 downstreami2cbus and its threetmp103sensors disabled (DP855 refuses AP accesses with ack 3 while the panel is on and reads zero while off).t6041.dtsi/t6041-j614-j616-j575-scaler.dtsi: enableaop_spmi0,ps_aes/aes,aon_ptd,ps_scodec/ps_scodec_streaming/apr0_dart/apr0, and sharedscaler0/scaler1plus their DARTs and power domains; document whymax_scaler_clocksstays disabled.dcuart,pinctrl_smc, DP855 downstreami2c/tmp103, loader-gated DCP/DCPEXT/SEP/SIO/AVE1/PMP reports, desktop-absentbattery_monitoronj773s, and unbacked clock providers (peripheral_clocks,max_scaler_clocks).Evidence
Local validation vs #3512 (
638bd1cb34ba):make ARCH=arm64 CHECK_DTBS=yacross all 7t604*.dtb(and all 139/139 Apple DTBs compile cleanly): 7 -> 7 (0 new warnings)scripts/dtc/apple-adt-coverage.py(t6040-j616s):MISSING=0 mapped=595 waived=307 broken=0 total=902scripts/dtc/apple-dart-pd-check.py: 13 -> 13 (0 new)scripts/dtc/apple-sibling-drift.py: 146 -> 146 (0 new)scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checksDisabled-node counts (#3512 ->
feat/dt-complete-t604xb4918049efe896, total -113):t6040-j614s.dtbt6040-j616s.dtbt6040-j616s-tether.dtbt6040-j773s.dtbt6041-j575c.dtbt6041-j614c.dtbt6041-j616c.dtb