Skip to content

kboot: preserve shared USB suppliers of disabled descriptions - #153

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
satchlj:upstream/j613-usb-pruning-20261110
Nov 11, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
satchlj:upstream/j613-usb-pruning-20261110

Conversation

@satchlj

@satchlj satchlj commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

GPT-6.1 Sol on @satchlj's behalf

Prevent an already-disabled unused USB description from causing the loader to disable a PHY/DART shared with a live DRD. Check its status before collecting supplier phandles. The regression runs the actual production pruning routine with real libfdt trees: main fails the disabled-OTG case; this patch passes it and preserves pruning of active missing devices and admission of present DRDs.

Draft: this rebuilt aura change has not booted on hardware. Today the successful J613 Stage 2 retained its loader binary byte-identically and instead deleted the unused OTG node from the bundled kernel DTBs. This PR generalizes that observed repair in aura; it must not be described as the loader code tested today. No other new loader change was needed by the trial beyond current main. Existing main already copies the PCIe-C and PCIe-adapter tunables through loader aliases.

The companion kernel series targets aurora-silicon/linux integration/aurora and carries the hardware-tested OTG deletion, plus J613 USB4 policy/resources. Its deletion makes that kernel independent of this aura fix. Conversely, this loader fix does not enable USB4 without the kernel resources/driver. Companion kernel PR: aurora-silicon/linux#1490 . No other unmerged loader dependency.

Board Hardware result (November 10 trial, not this rebased head)
J613 / T8122, M3 MacBook Air First link on both ports at 40 Gb/s against an M4 Mac mini running macOS; XDomain, thunderbolt-net, ping both ways. Single-stream iperf, MTU 1500, 10 seconds: 15.08 Gb/s out and 3.21 Gb/s in on left-front; 15.41 Gb/s out on left-back. One clean replug; no-cable regression gate passed.
Other boards Not hardware tested by this work.

No sleep testing, including sleep with a link. Storage/dock/DP tunnels, the USB2/USB3 tour, three-cycle repeated replug and orientation flip were not tested. DP tunnels remain disabled on J613. A separate left-back DP alt-mode Dell test reached 3840x2160@60; this is not a DP tunnel test. Throughput is below macOS and under investigation; no tuning or parity claim.

Validation on this head:

  • New production USB pruning host regression: pass, with a demonstrated failure on main.
  • Python suite: 589 passed, 48 skipped.
  • Payload profile, native25 J613/J615 board selection (including negative mutation), and T8122 display-handoff host scenarios: pass.
  • Full-start host runner does not compile on macOS because of existing ssize_t typedef conflicts; no full aura binary build/boot claimed. No hardware was accessed.

This is a generic loader correction: previously-disabled descriptions are skipped on every board. Active missing devices retain their pruning behavior. Other boards were not hardware-tested, so this remains draft before merge.

Provenance: the failed trial's live FDT showed exactly the shared ATC0 PHY and DARTs disabled. Host execution of the public loader pruning routine reproduced it; deleting the unused disabled node removed it in the successful trial. This inference is from the FDT/ADT and public loader behavior, not Apple source or a J613 macOS ACIO restart trace. No private traces, Apple source or firmware are included.

Human DCO identity is Satya Benson; AI attribution follows the kernel convention Assisted-by: LLM (Codex, GPT-6.1 Sol).

A disabled unused OTG node can share the ATC0 PHY and DARTs with an enabled DRD. Do not collect its suppliers while pruning devices absent from the ADT. The J613 trial repaired this by deleting the OTG node from the bundled DT; this loader fix generalizes that repair and needs its own hardware boot before merge. The host regression executes the production routine and fails on main.

Signed-off-by: Satya Benson <satya@benson.earth>
Assisted-by: LLM

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.

The disabled-description skip and production pruning regression address the reported shared-supplier failure, and current CI passes. This is generic pruning code for every board, so keep draft until an exact-head J613 shared-OTG/DRD trial and an additional board's absent-device/USB2/3 regression are recorded. The old successful trial used a DT workaround, not this loader head. Kernel1490 still needs the matching bundled DT resources; this loader fix alone is not that compatibility update.

@satchlj

satchlj commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Claude Fable 5.2 on @satchlj's behalf

First hardware boot of this PR's exact head 182d13e, J613 M3 MacBook Air (T8122), @satchlj present. Loader built bare (RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1), composed with the device trees of aurora-silicon/linux#1490 at e1644365d442 and booted once as a one-shot trial Stage 2 with that kernel (USB4 built in). Note the kernel is one commit plus the integration merge behind #1490's current head d6ae1d7cb165, so this is an exact-head result for this PR only.

  • Handoff: trial loader selected, /chosen trial property present, kernel reached userspace in about 40 s; ssh, Wi-Fi, 8 CPUs, no failed units. Display stayed on the boot framebuffer and internal input was absent, both expected for this plain-integration kernel.
  • No cable: both CIO nodes bound to the Thunderbolt driver, no router started.
  • Thunderbolt to a Mac mini (macOS) on each of the two ports in turn: router firmware up, 2 lanes x 20 Gb/s, peer discovered as an XDomain host, thunderbolt-net up, ping both ways 3/3.
  • Thunderbolt to a second Aurora Linux host (Mac Studio M5 Max, T6050, local kernel) on one port: 2 x 20 Gb/s on both ends, each end lists the other as a Linux host, ping both ways 3/3; iperf3 30 s at MTU 1500: J613 sending 17.5 Gb/s (1 stream) and 17.4 (4 streams), J613 receiving 3.6 and 4.3 Gb/s with very heavy TCP retransmits. One physical unplug/replug re-linked on both ends. One link stop/start on the peer: the J613 logged lane errors, a host disconnect and AT-register read timeouts, then re-linked without any action on its side once the peer recovered (44 s to traffic).
  • Returned to the installed Stage 2 and default kernel with one plain reboot; installed loader, boot.bin and menu digests unchanged.

Not run: sleep with a link up, DisplayPort or PCIe tunnels, docks or storage, the J613 as the restarting side, any other board.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.

Recorded the new exact-loader-head J613 boot and two-port Thunderbolt report, including successful return to unchanged installed loader/menu digests. This closes the earlier statement that182d13e0 had never booted on hardware. The kernel revision in that trial is explicitly older and does not qualify current Linux1490.

One scope detail matters: the trial's kernel e1644365d442 still has /delete-node/ &usb_otg0 in t8122-j613.dts. The loader binary was tested, but that DT removes the disabled-OTG/shared-supplier condition; the production-function host regression remains the evidence for that specific branch. This report also explicitly covers no second board or ordinary USB2/3 dock/storage regression.

All nine current-head CI checks remain green and no source blocker was found in the disabled-description skip. Keep the remaining generic-pruning/second-board gate open and retain draft while the already-discussed shared-board regression is pending. The reported peer-restart timeouts and throughput remain attributed limitations, not a clean USB4/sleep qualification. No further M3 test, Stage1/default-loader change or hardware action is requested by this thread.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Hardware result on J616s (T6040, M4 Pro), unattended.

Setup: one-shot Stage 2 trial. The production Stage 2 runs aura bd9f3e8 (this PR's base). The trial image is that same file with only the aura binary replaced by a build of 182d13e; the DTB, U-Boot and option tail are byte-identical. Stage 1 2296392, kernel 7.3.0 at integration/aurora 84d091f7. The trial booted (chosen/aurora,trial set, stage2 version 1.0.0b10-g182d13e0) and was not committed.

Row Production (bd9f3e8) Trial (182d13e)
xHCI controllers 2 bound, each with a USB2 bus (480M) and a USB3 bus (10000M) same
Devices plugged in USB2 hub 2109:2817 at 480M, USB3 hub 2109:0817 at 5000M same
Type-C ports 4 ports, 3 with a partner; roles device/host/device/host same
Loader DT edits (embedded DTB vs live tree) 48 nodes changed, all disabled->okay (6 DCP typec routes, phy@39aa90000, ...); none set to disabled identical set
DART faults / AVC / failed units 0 / 0 / 0 0 / 0 / 0
gdm active after kernel start 9.34 s 8.62 s

Pruning of a missing device: UNTESTED. All three usb@ nodes in the J616s DTB match ADT devices, and the loader disabled no usb, cio or i2c node in either boot. The new branch (skip a description that is already disabled) is not exercised on this board either: the J616s DTB has no disabled usb@ node. Its two disabled i2c@ nodes have no iommus/phys, so skipping them changes nothing. The J700 DTB also has a single enabled usb@ node.

So on J616s this is a no-regression result for present devices only.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.

Ready for source merge after the additional exact-loader hardware evidence. The attended J613 report confirms182d13e0 boots and restores unchanged defaults; Ryan's J616s/T6040 trial changes only the aura binary against the PR base and preserves USB2/USB3 hubs, Type-C roles, live DT edits and zero fault counts. All nine checks pass on the unchanged head, with no unresolved inline objections. A fresh independent source review found no blocker.

The five-line correction skips an already-disabled description before supplier collection; active missing-device pruning is unchanged. The production/libfdt regression directly exercises the original shared-supplier failure, active-missing pruning and present-DRD control, including a demonstrated failure on the old code. I accept that targeted production regression together with the two hardware boots as sufficient for this narrow source correction; the repository hardware-test requirement is met without claiming physical coverage of every branch.

Qualification limit retained: neither hardware trial naturally exercises missing-device/shared-supplier pruning (the J613 trial DT deletes usb_otg0). That row remains untested on hardware. This merge does not qualify current Linux1490, linked suspend, all USB4 tunnels/storage, or the reported throughput/restart behavior. No further hardware, Stage1 or default-loader operation is requested.

@DjDeveloperr
DjDeveloperr marked this pull request as ready for review November 11, 2026 16:39
@DjDeveloperr
DjDeveloperr merged commit d81af35 into aurora-silicon:main Nov 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants