Repository navigation
Conversation
fb8edd9 to
2fddae2
Compare
|
Heads-up: this stack (#1798, #1799, #1800) now conflicts with integration/aurora in Could you refresh #1797 onto the current integration/aurora and rebase the three on it? When resolving, please keep those two commits' interrupt-driven receive path as it is. We'll review the listed commits once the stack is mergeable again. |
2fddae2 to
e2555c5
Compare
|
Rebased onto the refreshed #1797 (ceade2e, on integration/aurora 292773f). The branch is now e2555c5 (was 2fddae2) and merges cleanly again.
The testing lines in the description are updated: |
e2555c5 to
814b959
Compare
|
Rebased onto the refreshed #1797 (d87e41e, on integration/aurora 514ae1f). The branch is now 814b959 (was e2555c5) and merges cleanly again. One commit is new: arm64: configs: asahi: build the T8152 ACIOPHY USB3 PHY. #1939 added With #1797 and the three J873g PRs, at 514ae1f: |
814b959 to
b6c31d8
Compare
|
Rebased onto the refreshed #1797 (bbfdefa, on integration/aurora 0abc2f3). The branch is now b6c31d8 (was 814b959) and merges cleanly again. Booted on the M6 with the rebased stack: "apple-aciophy-usb3 383000000.phy: USB3 up", and both front-port hubs run at 10000 Mb/s. DT and host checks are as on #1797. |
|
Thanks for getting USB3 up on the M6 front ports. 10 Gbit/s to the hub is a nice result. Two things before this can go in. First, we avoid a second implementation of a mechanism the tree already has. Second, the file header and the comment near line 148 name macOS driver classes and functions. Please describe the sequence by its registers and steps only, with no reference to macOS internals. When it lives in |
1906255 to
6e2ae8b
Compare
|
Thanks. I've done the second point. The head is now
No functional change: the driver builds with no W=1 warnings, and the diff is comments only. I agree with the first point, moving the PHY into |
|
Thanks for cleaning up the comments and commit messages. The description by registers and steps reads well. The plan for |
6655b2d to
78a6311
Compare
|
The
Two things came up only on hardware:
Tests on the J873g (exact head):
|
|
Thanks for the |
|
@sithglan, a tidy-up pass over the open PRs here. These of yours need something:
If any of these are no longer needed, closing them helps; otherwise a merge or rebase onto integration/aurora is usually all they need. Thanks! |
78a6311 to
2603161
Compare
|
@RyanTheTide thanks. All eight are rebased onto integration/aurora
#1797 ( Conflicts, all small:
Two host tests that are new on integration,
Both tests now pass at every commit of every branch. Apart from these fixture lines and the context lines around the conflicts, Checks on every head:
None of these heads have been booted on hardware yet. Assisted-by: LLM (Claude:Opus 5.5) |
|
Re-review of 2603161: thanks for the rebase, it merges cleanly now. The ATC commit's driver code is unchanged. It only adds the new fields and a T8152-only stub to the Assisted-by: LLM (Claude:Opus 5.5) |
2603161 to
283270c
Compare
|
Restacked on #1797 e9724fe, which gives the USB DARTs and DWC3 nodes ATC1_USB/ATC2_USB. The only conflict was Assisted-by: LLM (Claude:Opus 5.5) |
283270c to
860b217
Compare
The two front USB-C ports of the Mac mini (2026, J873g) sit behind an on-board USB3 hub. The hub's SuperSpeed lanes are wired to the Type-C PHY of the SoC's ATC2 directly, without a Type-C mux or port controller in between, so that PHY only ever runs one fixed USB3 configuration. Describe the T8152 variant in that role, with a boolean apple,fixed-usb3 that marks such a port: the PHY runs USB3 on lane 0 from probe on, ignores mux and orientation changes and provides only the USB3 PHY of its controller. The controller's USB2 side and reset stay with the bootloader, so the T8152 PHY has no #reset-cells and no Type-C switch properties. The PHY is described by its core and pipehandler banks. On T8152 the core bank also holds the USB controller's DARTs, and the PHY's power and reset block sits behind them. It needs four power domains, listed in the order they are powered up: the ATC's USB_AON power state, its common PSD service and its COMMON_DP_0 and COMMON_DP_1 power states. The other variants keep their single power domain and #reset-cells. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J873g front ports reach their on-board USB3 hub through ATC2's Type-C PHY, wired to the hub without a Type-C mux. So far the hub ran at USB2 only: the bootloader leaves the PHY powered down and the PIPE on the controller's dummy PHY. Support the T8152 PHY in that role in the shared ATC driver. T8152 shares the T8142 generation's power and reset block, tunables and PIPE handler, with a different layout: the USB controller's DARTs sit at 0x20000 and 0x40000 of the ATC window, so the power and reset block follows at 0x60000, its lane swap is bit 1 there, and the reset the power-up releases first is a separate always-on sync reset at 0x60030. The crossbar is at 0x4c and the USB3 mode's existing setting, USB3+DP with single PMA 0x008, gives the value 0x110; there is no lane mode register to program. Describe this in the match data, with zero for the layout of the other SoCs, and leave the power-up and power-down, the tunables, the crossbar and the PIPE switch to the existing code. What remains T8152 code: - Lane 0 is powered up on its own after the common-a tunables (LFPS receivers, sleep, clamp, AHB reset) and down again with the PHY. Without it the lane registers stay in AHB reset, drop the lane tunables and the PHY never reports PIPE PhyStatus. The crossbar is set right after, before the remaining tunables, as in the T8152 sequence. - While the PIPE moves to the PHY, the BIST overrides hold lane 0's PIPE reset and power-down, stepping from P2 to P3, and the non-selected PHY override is released under them. The T8152 PIPE handler takes the lock request but does not acknowledge it: with the controller out of reset, no acknowledge came within 150 ms in either direction, while the PIPE moved to USB3 and back to the dummy PHY under the request. So T8152 changes the PIPE under the request without waiting for the acknowledge; otherwise every USB3 start fails. A fixed-USB3 port, apple,fixed-usb3, is a host by construction. Probe maps only the core and PIPE windows, the core without claiming it as it holds the DARTs, powers the PHY's power domains in the order they are listed and brings the PHY up in USB3. It registers only the USB3 PHY: no reset controller, Type-C mux or switch, as the controller's reset and USB2 side stay with the bootloader. The PIPE is routed when the controller powers the USB3 PHY on, after its core reset, which also sets the PHY up again after a power-off. If that fails the host starts with its PIPE parked, so the hub keeps USB2. The T8152 register sequence is the one of the earlier standalone driver, with which the hub enumerated at 10 Gb/s. The other SoCs keep their register accesses: the new layout fields are zero for them, and the new code runs for T8152 or a fixed-USB3 port only. KUnit cases check the T8152 crossbar, lane and power block accesses. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The two front USB-C ports sit behind an on-board VL822 hub on usb-drd2. The hub's USB2 side is on the controller's eUSB2 PHY, which the loader sets up, and its USB3 side on ATC2's Type-C PHY, wired directly without a Type-C mux. So far the controller was limited to high speed and the hub ran at USB2 only. Describe ATC2's PHY as an apple,t8152-atcphy with apple,fixed-usb3, hand it to usb-drd2 as its USB3 PHY and drop the controller's high-speed limit. Nothing changes for usb-drd1 (the back-left port). The PHY's power domains are ATC2's USB_AON, COMMON_DP_0 and COMMON_DP_1 PMGR power states, in a new node for the ATCs' block of PMGR states at 0x308290000, and its common domain, PSD service 57 (ADT clock-gates 57). The T8152 USB3 bring-up runs the power states without automatic power management, so they are marked apple,no-auto-pm. The tunables are the groups of the ADT's atc-phy2 node (26A434) that apply to USB3 on lane 0, in the order they are applied: the common and PLL defaults as common-a, the fabric, PLL and USBC0 groups as common-b and the lane 0 groups as lane0-usb. Some of them differ between the four ATCs of the same machine, so they likely carry per-device calibration. There is no atcphy2 alias, as the loader's ATC tunable copy would replace them with values for another PHY layout. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
860b217 to
641f9d7
Compare
|
Rebased onto
Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist review at 641f9d7e1b056efc90d271e318c54e5ec3d5a094.
Checklist Summary
- §1 No model gating: PASS on code structure (
apple,t8152-atcphymatch data +apple,fixed-usb3DT property; no chip/board/firmware-version string gates). BLOCKER on multi-Mac coverage — see Blocker 1 below. - §2 Production-ready, no hacks: PASS — works on the default kernel command line with no new module/cmdline parameters or sleep-over-race hacks; standalone
aciophy-usb3.cduplication was properly folded intodrivers/phy/apple/atc.c. - §3 Safety: PASS — no hardcoded hardware safety limits; keeping
ps_atc2_usb_aonasapple,always-onis empirically justified (switching it off drops bootloader-initialized controller reset/PIPE state). - §4 Clean-room and attribution: PASS — earlier macOS class/function names are scrubbed; all 3 commits (
7ecbaf37d869,e06185b31bca,641f9d7e1b05) carry human author/committer (Thomas Glanzmann) and humanSigned-off-by:only with zero AI commit trailers; PR body includesAssisted-by:. - §5 Evidence: FAIL (blocking) — CI (
dt-checks,host-tests) is green (2/2) and KUnitphy-apple-atc*(41/41) + earlier J873g USB3/unbind/rmmod rows are good, but required hardware no-regression and exact-head regression evidence are missing. - §6 Naming: PASS — no Honeykrisp/hk/Asahi/m1n1 regressions.
Actionable Blockers
-
§1 / §5 — Missing shared-
atc.cno-regression evidence on non-T8152 Macs:- This PR modifies shared paths in
drivers/phy/apple/atc.c(atcphy_power_on,atcphy_power_off,atcphy_configure,atcphy_configure_lanes,atcphy_pipehandler_lock,atcphy_usb3_set_mode,atcphy_probe) used across every Apple Silicon generation. - Under §1 ("Prove the change on every Mac you have that contains the block, not only the one you wrote it for") and §5, please add no-regression hardware test results on at least one other Mac using
phy-apple-atc(for example your J813 M5 MacBook Air, plus any available M1 Pro / M2 / M4 Pro / A18 Pro rows covering USB3 enumeration, plug/unplug, and suspend/resume as previously noted in the thread).
- This PR modifies shared paths in
-
§5 — Missing exact-head J873g boot and regression row:
- The current rebased head
641f9d7e1b05(standalone 3 commits onintegration/auroraafter#1797and#2459merged) has only DTB build + CI checks and has not been booted on J873g directly (the last boot row was from#2178's stack prior to the rebase). - Please boot this exact head on the J873g on the default kernel command line and post the §5 regression row (
0 SELinux denials,0 failed units,0 new kernel errors, plus front VL822 10000M enumeration).
- The current rebased head
Non-blocking notes
- Stale PR description: The top of the PR body still says
"Stacked on #1797 ... and #2459 ... its two commits are included unchanged", which is no longer true after the641f9d7e1b05rebase dropped them. Please update the description to reflect the standalone 3-commit series. drivers/phy/apple/atc.c(atcphy_power_off): Becauseif (!atcphy->hw->sync_reset)guards theATCPHY_MISCclear, T8152 skips clearingATCPHY_T8152_MISC_LANE_SWAP(bit 1) on power-off. Benign on a fixed non-swapped lane 0 port (cleared again inatcphy_configure_lanes), but worth noting if T8152 ever enables swapped lanes.arch/arm64/boot/dts/apple/t8152-j873-usb.dtsi: Hardcodingapple,tunable-*from one machine's 26A434 ADT (where the comment notes per-ATC/per-device calibration differences) follows existing interim DTS precedent (e.g.t8132-j713-atcphy-tunables.dtsi); teachingaurato copy T8152 ATC tunables from each machine's own ADT remains the right follow-up.
Assisted-by: LLM (Gemini 4 Neon)
|
@DjDeveloperr thanks.
Assisted-by: LLM (Claude:Opus 5.5) |
Three commits on integration/aurora
daa9e2de18bd. #1797 (the J873g's aurora-wip merge, which brings #1205's USB2 hosts) and #2459 (T8152 PSD power domains) have merged, so this is no longer stacked on them.The J873g's (Mac mini M6, T8152) front USB-C ports sit behind an on-board VL822 hub on ATC2. With #1205 the hub's USB2 side works through
usb-drd2. This adds its USB3 side in the shared ATC PHY driver:apple,t8152-atcphyandapple,fixed-usb3, the PHY's power domains, and its common-a, common-b and lane0-usb tunable groups.Layout in the match data. The T8152 match data reuses the T8142 PIPE handler fields. Three new layout fields are zero for every other SoC:
cfg_offset: the power and reset block is at 0x60000, behind the controller's DARTs.lane_swap: bit 1 there.sync_reset: the sync reset at 0x60030.Crossbar 0x110 is the existing USB3 setting. T8152 has no lane-mode register to write.
T8152-specific code:
PIPE lock. The T8152 PIPE handler never acknowledges the lock. The PIPE changes under the request without waiting for an acknowledge (
pipe_lock_unacked).apple,fixed-usb3marks a host-only port. Only the USB3 PHY is registered: no reset controller, Type-C mux or switch. The PIPE is routed when dwc3 powers the PHY on.Power through genpd: ATC2's USB_AON and COMMON_DP_0/1 via
pmgr-pwrstate, and PSD service 57 via pmdomain: apple: T8152 PSD services as power domains #2459.Tests: KUnit cases, and the host-test fixtures that copy
atc.cstructures get the new fields.usb2gets the PHY as itsusb3-phyand dropsmaximum-speed = "high-speed".Things to know
phy-apple-atcand the PSD and power-state providers. If the PHY isn't built or fails to probe, the front ports lose USB2 as well.apple,always-on. It holds the USB controller's reset and the PIPE handler state that the loader sets up. Switched off (for example, by unloading the PHY driver while USB_AON was still switchable), the controller stays in reset until the next boot.atcphy2alias, so the loader's ATC tunable copy leaves them alone.Testing (M6, on #1797 + #2459 before they merged; the exact head
641f9d7e1b05is still to be booted)Restacked on 2026-11-22 onto #1797 e9724fe, which gives the USB DARTs ATC1_USB/ATC2_USB. The ATC PMGR node now holds those two states next to ATC2's DP and USB_AON states. That tree, as part of #2178's head, booted on the J873g with the front hub, keyboard and receiver as before.
Earlier rows:
rmmod/modprobe phy-apple-atc: the three switchable domains go off and on again, and the hub comes back on USB2 and USB3.phy-apple-atc*: 41/41, includingphy-apple-atc-t8152. It covers the crossbar, lane 0 up and down, the power block at 0x60000/0x60030 with the DART words left untouched, and the unacknowledged lock.tools/asahi/run-host-tests.py: 427/427.scripts/dtc/apple-dt-check.shagainst Merge aurora-wip 210c8f6e into integration/aurora (J873g NVMe, 10GbE, power off, USB2, audio) #1797 (ec172bbcc1ed): 0 new and 0 removed warnings (137 DTBs). Both changed bindings pass dt_binding_check.--strictis clean.cc @Acelogic @RyanTheTide @DjDeveloperr @LiamRay10
Assisted-by: LLM (Claude:Opus 5.5)