Skip to content

arm64: configs: j813: build DWC3 dual-role - #2537

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
dtfill/j813-dwc3-dual-role
Nov 20, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
dtfill/j813-dwc3-dual-role

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

j813.config builds DWC3 host-only. Once the J813/J815 controllers are described as dr_mode = "otg" (#2511), each one logs "Configuration mismatch. dr_mode forced to host" at its first probe.

Change

Build the core dual-role (CONFIG_USB_DWC3_DUAL_ROLE, with CONFIG_USB_GADGET). dwc3-apple picks each port's role from its Type-C controller. With usb-role-switch described, the core keeps OTG. With today's dr_mode = "host" it stays host, and there's no warning either way.

Testing (buildbox)

  • allnoconfig + the fragment: the resolved .config differs from the old fragment's only by USB_DWC3_HOST -> USB_DWC3_DUAL_ROLE, plus USB_GADGET and its two defaults.
  • The arm64 Image builds (dwc3 drd.o/gadget.o now in), with the same 4 compiler warnings as before, none in USB.

Still to run

J813 boot with the next kernel built from this fragment: no "Configuration mismatch" lines, and USB-C host devices enumerate as before.

Assisted-by: LLM (Claude:Opus 5.5)

dwc3-apple picks each J813/J815 port's role from its Type-C controller,
and the DT is moving the controllers from dr_mode = "host" to "otg" with
usb-role-switch (linux#2511). j813.config builds the core host-only, so
with an "otg" description the core forces every controller back to host at
its first probe and logs "Configuration mismatch. dr_mode forced to host".

Build the core dual-role, with the gadget framework it needs. With
dr_mode = "otg" and the role switch described, the core keeps OTG; with
the current dr_mode = "host" it stays host as before, also without the
warning.

Built from allnoconfig with this fragment: the resolved configuration only
changes CONFIG_USB_DWC3_HOST to CONFIG_USB_DWC3_DUAL_ROLE and adds
CONFIG_USB_GADGET (with its two defaults), and the Image builds with the
same compiler warnings as before.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>

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

Reviewed at 2d22d56.

USB_DWC3_HOST -> USB_DWC3_DUAL_ROLE plus USB_GADGET is the right fragment for dr_mode = "otg" with a role switch, and with today's dr_mode = "host" the core stays host. The fragment doesn't match the sep-source path filters, so host-tests is the applicable check, and it passed on this head. The J813 boot row is owed with the next kernel built from this fragment.

@DjDeveloperr
DjDeveloperr merged commit 790c274 into integration/aurora Nov 20, 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.

2 participants