Skip to content

serial: apple-dockchannel: don't stall boot when no debug host reads the console - #943

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
j716c/t6050-dockchannel
Nov 9, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
j716c/t6050-dockchannel

Conversation

@erikwb

@erikwb erikwb commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

A DockChannel UART drains only while a debug USB host reads it. On a Mac that boots unattended with nothing attached, the TX FIFO stays full: every console character spun up to 10000 times and every close waited for output that never drained, so boot stalled.

apple,tx-never-wait makes console writes send what fits and drop the rest, and tty output drop after two drain ticks without room. Boards without the property are unchanged.

Commits by Jeff Queisser, for J775D, which boots unattended with nothing on its debug port.

Created with Claude Opus 5.5 in Claude Code.

@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.

Approved.

The J714sAP console DT has set apple,tx-never-wait on the DockChannel console since 11-08, with this exact code. That covers every M5 Pro RAM boot and the M5's default boot from its internal SSD. Console input and output work with the debug host attached, including long dmesg dumps.

Not tested: a boot with nothing reading the debug port.

Merges cleanly into current integration/aurora.

RyanTheTide added a commit that referenced this pull request Nov 9, 2026
@DjDeveloperr DjDeveloperr reopened this Nov 9, 2026
…r-wait

The DockChannel console drains only while a debug USB host reads the
channel. With none attached, as on an M5 Ultra Mac Studio (J775D) that
boots unattended, the TX FIFO stays full: the write loops spun up to
10000 reads of TX_FREE per character and every close waited for output
that could not drain, so boot and every console write stalled.

With apple,tx-never-wait, console writes (the driver's and the early
console's) send what TX_FREE says fits and drop the rest, tty output is
sent from the drain timer and dropped after two ticks without room, a
close does not wait, and tx_empty reports empty. Without the property,
every other DockChannel Mac's driver and early console behave as
before.

Testing: J775D boots unattended to its login with nothing reading the
channel (the property set), and with a reader attached the console
carries the whole boot log.

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Erik Bourget <erik@ebourget.net>
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Rebased onto integration/aurora (8d98b7a). The old head 8eda590 is kept as backup/j716c/t6050-dockchannel-pre-rebase-20261109.

Why: the first CI run on this branch failed dt-checks with 42 new warnings (apple,dockchannel-uart.yaml: ignoring, error parsing file, then every DockChannel node failed to match a schema). integration already documents apple,tx-never-wait in that binding (e0b7106, the J775D tree's compatibles), so the auto-merge of 29ccbef left the property in the file twice and dtschema refused the file.

So 29ccbef is dropped, and integration's description stays ("Transmit completes without waiting for a reader to drain the channel, so a console with nobody attached does not stall"). The driver commit is unchanged by the rebase (now 923e129, same author). integration had the property but no driver support, so this PR still adds the behaviour. The three driver files are byte-identical to the DockChannel console the M5 Pro boots with. CI is running on the new head.

🤖 Generated with Claude Code

@DjDeveloperr
DjDeveloperr force-pushed the j716c/t6050-dockchannel branch from 8eda590 to 923e129 Compare November 9, 2026 15:28
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Retested before merging on the M5 Pro (J714sAP, bare metal, SSD boot), kernel 7.3.0-m5-merge: the M5's integration kernel with this round's rebased heads in place of the old ones (every PR's own patch identical to what is merged; logs in work/m5-pr-merge-20261109). CI green.

Before merging, this round (these 14 PRs, #1323 and the rebased #1254/#1306/#938/#1316/#1199) was test-merged in order onto integration/aurora f9cf6f9 with no conflicts: apple-dt-check.sh 414 → 414 warning lines (0 new) over 137 DTBs, all 20 changed bindings pass, and a local host-test run fails only where integration itself fails with this host's newer toolchain. A full arm64 build of the same set on 8d98b7a was clean.

  • The DockChannel console (ttyDC0, apple,tx-never-wait) runs on both boots of the retest kernel, with the debug host attached. Rebased to drop the duplicate binding property (see the comment above).

🤖 Generated with Claude Code

@DjDeveloperr
DjDeveloperr merged commit a1545ba into integration/aurora Nov 9, 2026
1 check 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