Repository navigation
Conversation
Allow the five ACIO register windows, LSTX GPIO and router firmware tunables used by T8142. Describe its native PCIe-C compatible and require the shared MSI vector base. Include the T8142 pinctrl fallback chain used by the AOP LSTX pin. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
300baa0 to
6113f94
Compare
DjDeveloperr
left a comment
There was a problem hiding this comment.
I reviewed only the front-port commit. ACIO0 mirrors ACIO1 exactly: I diffed the two blocks, and only addresses, AIC numbers, the reset index, LSTX pin 19, the ATC0 domains, the PCI domain and the BAR windows differ. The MSI slice (1837 at vector 96) gives the same 1741 base as the rear and internal ports, so it holds under the current driver check and under the DT-derived one I asked for on #2142. The gpio-reserved-ranges update frees exactly pins 19 and 21. Approve once #2142 is in. Please add one front-port boot of this exact DTB with an aura that has aura#302: the tested build used usb4_0_pcie with an older aura.
T8142 uses the Intr2AXI controller layout but its three-cell AIC interrupt specifier and MSI window differ from T6050. Match it natively. This allows a tunnelled NVMe controller to allocate working MSI-X interrupts. For T8132 and T8142 the slice is checked against the device tree alone. msi-ranges names the AIC input of global vector apple,msi-vector-base in a linear window, so the window's AIC base is msi-ranges minus apple,msi-vector-base, and the slice is checked by its shape: an edge-rising SPI, 32 vectors, 32-aligned, above the internal port's vectors and inside the 8-bit map target. This replaces T8132's table of ECAM apertures and its AIC base 1506 behind a machine check. The T8132 trees give 1602 - 0x60 = 1634 - 0x80 = 1506, and every J813 PCIe node gives 1741. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Use the qualified MxWrap startup sequence: CIO reset leaves the CPU running, then RTKit readiness precedes the LSTX handoff. Admit native T8142 PCIe-C hosts without a T6050 fallback. Keep DP IN disabled. Deep sleep removes CIO power. Remove idle NVMe hierarchies before stopping the router and request fresh cable state on resume. Refuse sleep when a disk is open or another endpoint driver cannot be removed safely. Extend the production-C admission tests with native T8142 and a negative control. The T8142 behaviours are named flags of its match data (sleep_removes_domains, restart_on_wake, phy_shared_with_dwc3), so a later SoC that behaves the same sets them instead of extending a comparison. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Describe ACIO1, its mailbox and LSTX pin, and the PCIe-C tunnel. Populate both DARTs under their powered parents. Use connector port 4 so the existing DisplayPort alternate-mode route can retain port 3. Name the PCIe-C tunable alias usb4-1-pcie, as t6040-usb4.dtsi does; aura looks it up under that spelling since aurora-silicon/aura#302. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Only the rear port's ACIO1 router and PCIe-C tunnel are described. The front connector's PD controller enters USB4 by itself when a USB4 device is attached (DATA_STATUS bit 23), and nothing in the kernel takes the link over: a USB4 NVMe enclosure that works on the rear port shows up neither as USB4 nor as USB on the front port. Describe ACIO0 like ACIO1, with the values of the ADT acio0, acio-cpu0, dart-acio0, apciec0 and dart-apciec0 nodes: router 0x401ac0000, mailbox 0x401108000, PCIe-C 0x404000000 with ECAM 0x1c50000000 and its MSI slice at vector 96 (AIC 1837), CIO reset 0, LSTX AOP pin 19 and the ATC0 power states 0x3c8, 0x3d0, 0x4d8 and 0x4e0. The bootloader fills the tunables and the DROM through the usb4-0-* aliases, as for the rear port. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
6113f94 to
f6ed2df
Compare
|
Thanks for the review. Rebased onto #2142's new head Boot of this exact DTB on the J813 with aura
|
The J813 front USB-C port does not work with a USB4 device: a USB4 NVMe enclosure that works on the rear port enumerates neither as USB4 nor as USB on the front port. The front connector's PD controller enters USB4 by itself (DATA_STATUS bit 23, USB4 connection), but only the rear port's ACIO1 router and PCIe-C tunnel are described, so nothing takes the link over.
This describes ACIO0 like ACIO1, with the values of the ADT acio0, acio-cpu0, dart-acio0, apciec0 and dart-apciec0 nodes: router 0x401ac0000, mailbox 0x401108000, NHI, DARTs, PCIe-C 0x404000000 with ECAM 0x1c50000000 and its MSI slice at vector 96 (AIC 1837, which gives the window base 1741 like every other J813 PCIe node), CIO reset line 0, LSTX AOP pin 19 and the ATC0 power states. Device tree only: the T8142 router, PCIe-C and CIO reset support from #2142 handles the second port unchanged, and aura fills the tunables and the DROM for every
/arm-io/acioNthrough theusb4-0-*aliases.Depends on #2142: this branch is #2142's head (13483df) plus one commit, "arm64: dts: apple: enable the J813 front USB4 port". Please review only that commit here.
Hardware: J813 / T8142, UGREEN USB4 enclosure (vendor 0x00b8, device 0x2463), Samsung 980 PRO 2 TB.
Validation:
apple-dt-check.shagainst Enable native rear-port USB4 and PCIe storage on J813 #2142's head: no new or removed warnings (137 DTBs).usb4_0_pcie, because the enrolled aura predates aura#302; this PR usesusb4-0-pcielike Enable native rear-port USB4 and PCIe storage on J813 #2142'susb4-1-pcieand needs aura#302 in the same way. Apart from that alias name, the tested commit and this one are identical.Scope: USB4 DisplayPort tunnels stay disabled, as on the rear port. The unplug and sleep-entry messages "tunnel reset acknowledgment timed out" / "Failed to lock pipehandler" and the IRQ-affinity messages appear on the front port exactly as they already do on the rear port.
cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10