Skip to content

Conversation

@jfischer-no
Copy link
Contributor

USB driver and stack updates from upstream

jfischer-no and others added 9 commits October 28, 2025 12:24
Factor out UDC_DWC2 dependency.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 0018e8d)
…RF54LM20A SoC

Kconfig option UDC_DWC2_USBHS_VBUS_READY_TIMEOUT depends on services
exclusively available for nRF54H20, but the option can also be used for
nRF54LM20A, where there are no service dependencies, and VREG can be
accessed by the driver directly. Let depend the option on the SOC
series, as the controller can be used by the different CPUs on the SOC.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 4fe2c5b)
…n Kconfig.dwc2

This is a follow up to commit 4fe2c5b.

The UDC_DWC2_USBHS_VBUS_READY_TIMEOUT Kconfig option should be available
also for nRF92 Series SoCs (as it was previously when it depended on
NRFS_HAS_VBUS_DETECTOR_SERVICE), otherwise some builds will fail for
such targets.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 6360c7f)
…esets

Do not queue new buffer after bus reset if there is one already queued.
This fixes memory leak on each bus reset if there are no SETUP transfers
received between resets.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit c180420)
Fix the check in dwc2_unset_dedicated_fifo() that wrongly included the
current endpoint when testing for higher FIFOs. This caused false
warnings and early returns.

Use ~BIT_MASK(ep_idx + 1) to only test FIFOs above the current EP.

Signed-off-by: Sylvio Alves <[email protected]>
(cherry picked from commit 7c1193c)
It is possible for usbd_disable() to be called when the core is
hibernated. When done so, the USB stack will attempt to deactivate all
the endpoints. Because the core is hibernated, register reads are
really undefined. This can lead to udc_dwc2_ep_deactivate() not calling
udc_dwc2_ep_disable() which will leave struct udc_ep_config busy flag
set.

When endpoint 0x00 busy flag is left to true, the driver won't allocate
buffer to receive SETUP data which is mandatory in Buffer DMA mode. This
leads to essentially dead device after reconnect, because the device
will not respond to any control transfers.

Solve the issue by modifying backup register value instead of real one
when endpoint is deactivated while core is hibernated.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 35620e20a91efb3284716698f2fa794d02ec6b97)
…ice is registered

Do not register the device when the class instance has already been
initialised. Fail on initialization if no HID device is registered.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit c62575e)
…runtime

Allow to set input or output report polling period at runtime.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit bca0ce0)
…d at runtime

Add an example of how to set the polling period at runtime.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit e295a38)
@carlescufi carlescufi merged commit 3c0e35c into nrfconnect:main Oct 28, 2025
17 checks 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.

5 participants