drivers: udc: add IT82xx2 USB device controller driver

Add UDC driver for IT82xx2 SoC. This commit passes tests with
1. samples/subsys/usb/cdc_acm/
2. samples/subsys/usb/console/
3. The extend endpoint test with CDC ACM tool
4. USB suspend/resume detection

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
This commit is contained in:
Ren Chen 2023-11-24 14:41:57 -06:00 committed by Alberto Escolar
commit 766a5ea574
4 changed files with 1506 additions and 0 deletions

View file

@ -12,3 +12,4 @@ zephyr_library_sources_ifdef(CONFIG_UDC_KINETIS udc_kinetis.c)
zephyr_library_sources_ifdef(CONFIG_UDC_SKELETON udc_skeleton.c)
zephyr_library_sources_ifdef(CONFIG_UDC_VIRTUAL udc_virtual.c)
zephyr_library_sources_ifdef(CONFIG_UDC_STM32 udc_stm32.c)
zephyr_library_sources_ifdef(CONFIG_UDC_IT82XX2 udc_it82xx2.c)

View file

@ -53,5 +53,6 @@ source "drivers/usb/udc/Kconfig.kinetis"
source "drivers/usb/udc/Kconfig.skeleton"
source "drivers/usb/udc/Kconfig.virtual"
source "drivers/usb/udc/Kconfig.stm32"
source "drivers/usb/udc/Kconfig.it82xx2"
endif # UDC_DRIVER

View file

@ -0,0 +1,27 @@
# Copyright (c) 2023 ITE Corporation.
# SPDX-License-Identifier: Apache-2.0
config UDC_IT82XX2
bool "IT82XX2 USB device controller driver"
default y
depends on DT_HAS_ITE_IT82XX2_USB_ENABLED
help
IT82xx2 USB device controller driver.
if UDC_IT82XX2
config UDC_IT82xx2_EVENT_COUNT
int "UDC IT82xx2 event count"
range 4 64
default 8
help
IT82xx2 event count.
config UDC_IT82xx2_STACK_SIZE
int "IT82xx2 UDC driver internal thread stack size"
default 1024
help
Size of the stack used in the driver for IT82xx2 USBD ISR event
handling.
endif # UDC_IT82XX2

File diff suppressed because it is too large Load diff