Skip to content

Commit 766a5ea

Browse files
Chenhongrenaescolar
authored andcommitted
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>
1 parent 20cb4c3 commit 766a5ea

File tree

4 files changed

+1506
-0
lines changed

4 files changed

+1506
-0
lines changed

drivers/usb/udc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ zephyr_library_sources_ifdef(CONFIG_UDC_KINETIS udc_kinetis.c)
1212
zephyr_library_sources_ifdef(CONFIG_UDC_SKELETON udc_skeleton.c)
1313
zephyr_library_sources_ifdef(CONFIG_UDC_VIRTUAL udc_virtual.c)
1414
zephyr_library_sources_ifdef(CONFIG_UDC_STM32 udc_stm32.c)
15+
zephyr_library_sources_ifdef(CONFIG_UDC_IT82XX2 udc_it82xx2.c)

drivers/usb/udc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ source "drivers/usb/udc/Kconfig.kinetis"
5353
source "drivers/usb/udc/Kconfig.skeleton"
5454
source "drivers/usb/udc/Kconfig.virtual"
5555
source "drivers/usb/udc/Kconfig.stm32"
56+
source "drivers/usb/udc/Kconfig.it82xx2"
5657

5758
endif # UDC_DRIVER

drivers/usb/udc/Kconfig.it82xx2

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2023 ITE Corporation.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config UDC_IT82XX2
5+
bool "IT82XX2 USB device controller driver"
6+
default y
7+
depends on DT_HAS_ITE_IT82XX2_USB_ENABLED
8+
help
9+
IT82xx2 USB device controller driver.
10+
11+
if UDC_IT82XX2
12+
13+
config UDC_IT82xx2_EVENT_COUNT
14+
int "UDC IT82xx2 event count"
15+
range 4 64
16+
default 8
17+
help
18+
IT82xx2 event count.
19+
20+
config UDC_IT82xx2_STACK_SIZE
21+
int "IT82xx2 UDC driver internal thread stack size"
22+
default 1024
23+
help
24+
Size of the stack used in the driver for IT82xx2 USBD ISR event
25+
handling.
26+
27+
endif # UDC_IT82XX2

0 commit comments

Comments
 (0)