drivers: udc: add UDC driver for RP2040 USB device controller
This driver is mostly rewritten from scratch, with some parts borrowed from the usb_dc_rpi_pico driver implemented by Pete Johanson. This driver does not use any function from RPI PICO HAL and actually could be furter improved to not use any defines or types from the HAL as they are confusing and overdo it with volatile qualifiers. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
a10f2e87cc
commit
c41071d2ac
4 changed files with 1185 additions and 0 deletions
|
@ -16,3 +16,4 @@ zephyr_library_sources_ifdef(CONFIG_UDC_IT82XX2 udc_it82xx2.c)
|
|||
zephyr_library_sources_ifdef(CONFIG_UDC_NXP_EHCI udc_mcux_ehci.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_UDC_NXP_IP3511 udc_mcux_ip3511.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_UDC_NUMAKER udc_numaker.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_UDC_RPI_PICO udc_rpi_pico.c)
|
||||
|
|
|
@ -63,5 +63,6 @@ source "drivers/usb/udc/Kconfig.stm32"
|
|||
source "drivers/usb/udc/Kconfig.it82xx2"
|
||||
source "drivers/usb/udc/Kconfig.mcux"
|
||||
source "drivers/usb/udc/Kconfig.numaker"
|
||||
source "drivers/usb/udc/Kconfig.rpi_pico"
|
||||
|
||||
endif # UDC_DRIVER
|
||||
|
|
26
drivers/usb/udc/Kconfig.rpi_pico
Normal file
26
drivers/usb/udc/Kconfig.rpi_pico
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Copyright (c) 2024 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config UDC_RPI_PICO
|
||||
bool "Driver for an Raspberry PI Pico USB device controller"
|
||||
default y
|
||||
depends on DT_HAS_RASPBERRYPI_PICO_USBD_ENABLED
|
||||
select SYS_MEM_BLOCKS
|
||||
help
|
||||
Driver for an Raspberry PI Pico USB device controller.
|
||||
|
||||
if UDC_RPI_PICO
|
||||
|
||||
config UDC_RPI_PICO_STACK_SIZE
|
||||
int "UDC controller driver internal thread stack size"
|
||||
default 512
|
||||
help
|
||||
Device controller driver internal thread stack size.
|
||||
|
||||
config UDC_RPI_PICO_THREAD_PRIORITY
|
||||
int "UDC controller driver thread priority"
|
||||
default 8
|
||||
help
|
||||
Device controller driver thread priority.
|
||||
|
||||
endif # UDC_RPI_PICO
|
1157
drivers/usb/udc/udc_rpi_pico.c
Normal file
1157
drivers/usb/udc/udc_rpi_pico.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue