Repository navigation
phy: apple: t6040: CIO mode, and the T6041 USB4 resources - #1126
AxxzyWasTaken wants to merge 4 commits into
Conversation
The J616C has the same ACIO, NHI, DART and PCIe-C blocks as T6040 at the same addresses and interrupts, checked against its ADT. Take the T6040 description and stop deleting the power domains and mailboxes it needs. Everything stays disabled. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
Take the lanes for USB4 or the Thunderbolt alternate mode: the common tunables and the CIO ones, the crossbar with orientation in one bit, both lanes released, then the same PHY firmware as USB3. USB3 stays parked until the lanes come back. The order is AppleT6040TypeCPhy mode 2 from the 25G83 kernelcache and matches the T6050 recipe, except for the AHB clock request at CFG +0x28. Not run on hardware. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
Reset: ADT pmgr reg[44] +0x2024, the T6000 layout, as macOS uses it. The slot per port and the LSTX pin function are inferred. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
|
Thanks for this. Three things for anyone testing it on a J616c:
🤖 Generated with Claude Code |
|
Hardware result for the PHY CIO mode commit (cf72776): it ran on the J616s (M4 Pro) in the linux#1220 proof boot. The CIO PHY came up, the USB4 router linked to an M2 at 2 x 20 Gb/s, and thunderbolt-net reached 18.5 Gbit/s. The commit is carried in #1220 as a cherry-pick with your authorship and Signed-off-by, and with the 'Not run on hardware' note kept as you wrote it. The T6041 DT commits here are untouched; this PR stays open for them. |
Take aurora-silicon#1052's fixes, which t6041.dtsi inherits through t6040-usb4.dtsi: the ACIO sram window is now the router's __DATA segment (e0dac7b), the NHI ring interrupts are in the right order, and the PCIe adapters are named for the boot loader. The J616C ADT gives the same __DATA segment on all three ports (acio-cpuN iop-acioN-nub segment-ranges: cio+0x1080000, 0x26000). Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
|
Thanks. What changed:
Tested: |
RyanTheTide
left a comment
There was a problem hiding this comment.
The base branch, work/conn1-t6040-usb4, belongs to #1052, which is closed. integration/aurora has moved past it:
- cf72776 (PHY CIO mode) is in integration/aurora through #1220 (6cf0ab0).
- integration/aurora's arch/arm64/boot/dts/apple/t6040-usb4.dtsi already has
pmgr_cio,cio_resetand the LSTX pins for all three routers, with the reset controller disabled until a board enables its routers. - integration/aurora's t6041.dtsi includes t604x.dtsi and not t6040.dtsi, so the
/delete-node/lines this PR removes are not there, and t6041.dtsi conflicts.
Please rebase a6f4e8c and 02e6c3f onto integration/aurora and retarget the PR there. On that base the change is: include t6040-usb4.dtsi (or the T6041 part of it) from t6041.dtsi, make sure the ps_atcN_* power domains it references exist for T6041, and drop the pmgr_cio/LSTX copies that t6040-usb4.dtsi now provides. Then post the t6041-j616c.dtb W=1 build and dtbs_check results again.
|
For the rebase: the comment on the pmgr reg[44] entry in t6041.dtsi names a macOS method. integration/aurora now words the matching t6040-usb4.dtsi comment as a hardware description (#1625), so please follow that. The description's attach/detach paragraph also names the macOS class and kernelcache build. Please describe the sequence by its steps instead. |
Draft, not run on hardware. I don't have a Thunderbolt or USB4 device, so I'm hoping someone with an M4 Pro or M4 Max and a device can test it. Stacked on #1052.
t6040-usb2.c, the piece PCI: apple: draft T6040 USB4 tunnel resources #1052 calls the missing PHY transition. It runs on USB4 or Thunderbolt alt mode entry. USB3 stays parked until the lanes come back.t6041.dtsi. Addresses and interrupts match this Mac's ADT.0x502822024, T6000 layout) and the LSTX pins (AOP 49, 51, 53).The attach and detach order comes from
AppleT6040TypeCPhymode 2 in the 25G83 kernelcache. It matches #946's T6050 recipe step for step, apart from the AHB clock request at CFG+0x28.Still missing:
0x11there, not T6050's0x21.apple,t6041-pmgr-cioandapple,t6041-cio-resetisn't written.Inferred, please check:
pre-loaded,runningandreconfig-firmware.lstx_after_bootdoes it after. If FW_READY never comes, try that flag first.Tested:
t6041-j616c.dtbbuilds, andphy-apple-t6040-usb2.ocompiles clean atW=1. The USB path changes are a small refactor, also not booted.