Repository navigation
arm64: configs: j813: build DWC3 dual-role - #2537
Merged
Merged
Conversation
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
approved these changes
Nov 20, 2026
DjDeveloperr
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
j813.configbuilds DWC3 host-only. Once the J813/J815 controllers are described asdr_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, withCONFIG_USB_GADGET). dwc3-apple picks each port's role from its Type-C controller. Withusb-role-switchdescribed, the core keeps OTG. With today'sdr_mode = "host"it stays host, and there's no warning either way.Testing (buildbox)
USB_DWC3_HOST->USB_DWC3_DUAL_ROLE, plusUSB_GADGETand its two defaults.drd.o/gadget.onow 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)