Skip to content

Commit 3fd3602

Browse files
committed
drivers: udc_ambiq: Implemented UDC driver for apollo4p
Added implementation for udc_ambiq with its required Kconfig and CMakelist updates. Signed-off-by: Chew Zeh Yang <[email protected]>
1 parent 5b9c7f3 commit 3fd3602

File tree

5 files changed

+1009
-0
lines changed

5 files changed

+1009
-0
lines changed

drivers/usb/udc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ zephyr_library_sources_ifdef(CONFIG_UDC_NXP_EHCI udc_mcux_ehci.c)
1818
zephyr_library_sources_ifdef(CONFIG_UDC_NXP_IP3511 udc_mcux_ip3511.c)
1919
zephyr_library_sources_ifdef(CONFIG_UDC_NUMAKER udc_numaker.c)
2020
zephyr_library_sources_ifdef(CONFIG_UDC_RPI_PICO udc_rpi_pico.c)
21+
zephyr_library_sources_ifdef(CONFIG_UDC_AMBIQ udc_ambiq.c)

drivers/usb/udc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,6 @@ source "drivers/usb/udc/Kconfig.it82xx2"
6565
source "drivers/usb/udc/Kconfig.mcux"
6666
source "drivers/usb/udc/Kconfig.numaker"
6767
source "drivers/usb/udc/Kconfig.rpi_pico"
68+
source "drivers/usb/udc/Kconfig.ambiq"
6869

6970
endif # UDC_DRIVER

drivers/usb/udc/Kconfig.ambiq

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (c) 2024 Ambiq Micro Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config UDC_AMBIQ
5+
bool "USB device controller driver for ambiq devices"
6+
default y
7+
depends on DT_HAS_AMBIQ_USB_ENABLED
8+
select GPIO
9+
select AMBIQ_HAL
10+
select AMBIQ_HAL_USE_USB
11+
help
12+
Enable USB Device Controller Driver.
13+
14+
config UDC_AMBIQ_STACK_SIZE
15+
int "UDC AMBIQ driver internal thread stack size"
16+
depends on UDC_AMBIQ
17+
default 2048
18+
help
19+
AMBIQ driver internal thread stack size.
20+
21+
config UDC_AMBIQ_THREAD_PRIORITY
22+
int "UDC AMBIQ driver thread priority"
23+
depends on UDC_AMBIQ
24+
default 8
25+
help
26+
AMBIQ driver thread priority.
27+
28+
29+
config UDC_AMBIQ_MAX_QMESSAGES
30+
int "UDC AMBIQ maximum number of ISR event messages"
31+
range 4 64
32+
default 8
33+
help
34+
AMBIQ maximum number of ISR event messages.

0 commit comments

Comments
 (0)