-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Planned USB device/host support rework/enhancements #42066
Comments
For driver support, will you plan to enable Synopsys DWC USB2.0 OTG controller ? thx |
Do we need a separate tracking ticket for USB Host? |
No, not at this time. My plan is that host controller driver API immediately follows device controller API (+ device stack), details of host support come afterwards. |
@jfischer-no Is there any of this that can be parallelized if additional resources are made available? Also, what forum are we to use to have some open discussions about the API changes and requirements? |
Not yet. |
Plan updated. |
hello, i use usb audio these , and the usb audio leak some feature unit, like volume . It there have some plan to do this? |
@jfischer-no do you think we should push this to the v3.3 milestone? (it's currently tagged for v3.2) |
Hi, any estimate for when host support will be available ? |
+1 |
Yes, but it is not directly relevant to this topic.
ASAP! |
@MaureenHelm any interest from NXP to support the mcux usb host (and device) drivers for LPC and i.MXRT in zephyr? |
Wrt. Audio. Could someone please enlighten me on the status/plans for async USB support? We need the SoC to poll the PC host for new Audio data. |
I commented to a similar question above. It would be nice if you open a well-described enhancement issue or discussion, but it does not belong here!
It appeared to me in a dream that progress on NXP USB controller support is inversely proportional to how often you ask the same question in different topics. |
I don't work at NXP anymore. Please contact @dleach02 for NXP-related questions. |
This comment was marked as spam.
This comment was marked as spam.
@jfischer-no What is the status of this? Is this on track to be finished before release 3.4? |
Obviously only what is explicitly marked for the v3.4.0 #42066 (comment) |
Porting all classes is marked for 3.4.0, but considering feature freeze date (2023/05/26) is just in few weeks it might not be possible. |
Some components support both device and host mode. This partition between uhc and udc may lead to code duplication for those components. What do you think of a third folder along with "uhc" and "udc" to hold shuch code ? (something like "common" or "core" maybe ?) |
Yes, there is interest from NXP and USB host support. @jfischer-no, what is the right forum to discuss this? Is it here in this ticket? |
@dleach02 Please not here, maybe discussions, but once you have started implementing a UHC driver, please add a note to the description or ask me for an update. However, the priority is and should be to get the new device support to a state where we can start calling the current stack legacy. This means there should be alternatives to all the class implementations we have for the current stack, and a few more drivers. |
Okay @jfischer-no. My primary interest is USB host mode. Trying to figure out the pathway to getting this up and running on one of our platforms, maybe the RT5xxx. |
Hi, I saw the phrase "Introduction of USB device controller API." Does it mean that there is a resource available for me to study and understand the new USB device driver, such as a basic usage guide or a comparison with the old one? Thanks! |
Hi @jfischer-no I am working on this task.
|
Hi @jfischer-no I (from NXP) want to contribute the USB host stack because NXP has interest for Zephyr USB host. What can I help for developing the Zephyr USB host stack? If you already have the overall thought about the host stack, I can help to do the implementation. In short, I want to contribute USB Host stack and accelerate its implementation. Thanks. Our team is the owner of the NXP SDK USB stack, so we have a lot of experience on USB2.0. |
Nice ❤️ . However, here is no independent USB host stack, it is part of the USB support, see my comment #42066 (comment). Thanks for the upcoming contribution to Zephyr's USB support, especially on ASAP porting NXP USB device driver to new UDC API where each NXP controller type has its own driver and not as clumsy as the existing usb_dc_mcux. |
If I look at the list of items for moving over to the new UDC it looks like mostly porting vendor's USB drivers. I think it makes sense to work in parallel on the host layer instead of serializing this effort. If we are blocked by other vendors conversions we may never get to the host work. We have needs for host support and the resources available to assist in this effort. Just need some guidance on how you want this done. |
is the USB-ip supposed to work with native_sim and the device_next stack? |
If it is about help for troubleshooting, feel free to join the Discord server, the Mailing lists, the Discussions section, or open a new issue if you encountered what appears to be a bug. |
Please see #74141 |
Why not use TinyUSB instead of making a new stack? It has device and host support already. It has an OS abstraction layer as well. License is MIT. Both Espressif and Raspberry Pi use it in their SDKs already. |
This is a meta issue for maintainers and developers of relevant subsystems to track progress on new USB support.
Introduction
Currently we have only USB device support in Zephyr OS. Existing USB device support has many disadvantages and issues, like missing support for multiple driver instances, no endpoint (request) buffers management, missing class instances management and possibility to configure/enable class instance at runtime, not a good notification channel to the user/application, messy callback architecture, no API to set/reconfigure idVendor/iSerialNumber/bcdDevice at runtime, confusing usb_dc_ep_read()/usb_dc_ep_write() API, and more.
There is no USB host support in the project. It is asked again and again for it and there was effort like #30361, but that is far from suitable. USB device stack would also benefit from the host support and allow self-contained tests with emulated device and host controllers, and better support for USBIP.
Since many problems with the USB device support are due to the way it is designed (imported in Zephyr OS), we would like to redesign USB device support. That means USB device controller driver API and USB device stack will be rewritten in parallel and independent to existing implementation. Due to the need for testing/validation, USB host controller driver API and some parts of higher level will also be implemented.
Rough plan
New USB device support (PR usb: add new (experimental) USB device support #38679)
usb_dc_numaker
toUDC API
#74660usb_dc_smartbond
toUDC API
#74662usb_dc_rpi_pico
toUDC API
#74666usb_dc_sam_usbhs
toUDC API
#74663usb_dc_sam0
toUDC API
#74667usb_dc_sam_usbc
toUDC API
#74665USB host support (PR usb: add USB host controller API, support for virtual controller, and experimental host support #50985)
Timeline for transitioning to USB device "next" support
Main "switch":
zephyr/subsys/usb/device_next/Kconfig
Line 5 in 745ace8
The text was updated successfully, but these errors were encountered: