apache / apache/nuttx

[HELP] How to add USB OTG driver for the SOC into Nuttx?

Open
#19,756 1 comment 0 reactions 0 assignees View on GitHub
Community: Question
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### Description

I am trying to add USB OTG driver (host and device) for an SOC, where the USB controller is DWC2.
The controller in the SOC can work in host mode, so it can connect to a USB device (e.g. USB disk and mount FatFS onto it to access the files in the USB disk).
Or it can switch to device mode (e.g. adb device) to other USB host, like PC or cell phone.

So I think I need to add driver codes for the DWC2 controller, but I did NOT find a good reference to USB driver architecture of Nuttx.
How can I get started on the DWC2 driver in the Nuttx?

### Verification

- [x] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Research direction

Start by learning NuttX's USB driver architecture and how the DWC2 controller supports host and device modes. Define the driver work around connecting a USB disk and mounting FatFS in host mode, plus exposing an ADB device connection in device mode; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.