Skip to content

usb: Full charging current from a Mac on every board - #108

Merged
henrikklee merged 2 commits into
OrchardLinux:mainfrom
brkosebay:j71t/mac-current
Nov 12, 2026
Merged

henrikklee merged 2 commits into
OrchardLinux:mainfrom
brkosebay:j71t/mac-current

Conversation

@brkosebay

@brkosebay brkosebay commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Part 6 of 23 of the iPad 5 (J71t) series in this repository; merge after #106.

Problem

A Mac grants an iPad more than the standard USB current, but the charger took the gadget's reported budget unchecked and the composite gadget could draw the extra current while the bus was suspended.

Change

Cap and log the USB host budget in the TriStar charger, draw no extra Apple current while suspended, and let the initramfs and orchard USB helpers opt J71t into the Mac current profile. Documented in docs/bring-up/charging/j71t-mac-current.md, with tests.

Testing

  • Hardware: iPad 5 Wi-Fi (J71t). Hands-on testing on 2026-11-11 with an integrated build of this series, made before the final failure-path fixes, covered charging from a Mac.
  • 2026-11-12: after a USB host session, reconnecting the Mac brought back the 2400 mA Apple current grant (CDP 1.5 A).
  • Host: the Linux test suite passes at this branch's head, and the kernel and m1n1 patch series apply on apple-16k and apple-4k. At the top of the series the applied kernel tree is identical to the one in the built release image.
  • Other boards that share these drivers or compatibles have not been tested.

Dependencies

Depends on #106.

This branch is stacked on the PRs it depends on and carries their commits; the change of this PR is its last commit, "j71t: Guarded Mac current profile".

This update keeps the branch's earlier history: it merges the current base into the branch and adds the reworked change as a new commit on top.

🤖 Generated with Claude Code

@brkosebay
brkosebay marked this pull request as ready for review November 8, 2026 15:51
@brkosebay brkosebay changed the title J71t guarded Mac current profile j71t: Guarded Mac current profile Nov 12, 2026
brkosebay and others added 2 commits November 13, 2026 07:01
The Lightning charger took the current a USB host grants as reported;
it now caps it at the board's maximum. The gadget no longer draws an
Apple host's extra current while the bus is suspended. Both apply to
every board with this charger and gadget.

From orchard PR OrchardLinux#108 (commit 0674e1d), the two kernel patches.
macOS grants 2400 mA only to USB product IDs on its own list. Installed
Orchard systems now present Apple's vendor ID with product ID 0x1014
from that list, as an interface-association composite so macOS binds
its generic composite driver (which delivers the grant) beside the CDC
network and serial drivers. A Mac then charges the tablet at full
speed; the charger caps the grant at the board maximum. The host CLI
recognises 0x1014 as an installed system only with an Orchard serial,
and the Linux access rules include it. RAM payloads keep their ID.

From orchard PR OrchardLinux#108 (commit 0674e1d): the identity there was opt-in
and J71t-only; it is now the default for every board.
@henrikklee henrikklee changed the title j71t: Guarded Mac current profile usb: Full charging current from a Mac on every board Nov 12, 2026
@henrikklee

Copy link
Copy Markdown
Contributor

Landing this with your two kernel patches as your commit (grant capped at the board maximum, no extra current while suspended; the budget log is a debug message). The Mac current identity (0x1014, IAD class) is now the default for every installed system rather than a J71t opt-in, and hosts recognise 0x1014 as an installed system only with an Orchard serial. Your previous head is kept as tag contrib/brkosebay-j71t-mac-current. Please check the 2400 mA grant from a Mac on the next nightly.

@henrikklee
henrikklee merged commit 83867fe into OrchardLinux:main Nov 12, 2026
11 checks passed
henrikklee pushed a commit that referenced this pull request Nov 12, 2026
How macOS decides to grant 2400 mA (its power table, the 40/40 vendor
request, why the device class must be the IAD composite), what the
tablet does with a grant, the device acceptance check, and the NCM stall
findings from the J71t bring-up.

From orchard PR #108 (commit 0674e1d, docs/bring-up/charging/
j71t-mac-current.md), updated to what landed: the identity is the
default for every installed system, macOS approves it once thanks to the
stable USB serial, and the opt-in file and host test sections are gone.
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.

2 participants