Skip to content

Commit d9f8e29

Browse files
committed
subsys: usb: host: class: Add CDC ECM class support for USBH
Add support for the USB CDC ECM (Ethernet Control Model) class to the USB host subsystem. This implementation enables Ethernet functionality for USB host. Signed-off-by: Santhosh Charles <[email protected]>
1 parent 7a5d53a commit d9f8e29

File tree

5 files changed

+697
-0
lines changed

5 files changed

+697
-0
lines changed

subsys/usb/host/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ zephyr_library_sources_ifdef(
1818
usbh_shell.c
1919
)
2020

21+
zephyr_library_sources_ifdef(
22+
CONFIG_USBH_CDC_ECM_CLASS
23+
class/usbh_cdc_ecm.c
24+
)
25+
2126
zephyr_library_sources_ifdef(
2227
CONFIG_USBIP
2328
usbip.c

subsys/usb/host/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ config USBH_MAX_UHC_MSG
5454
Maximum number of USB host controller events that can be queued.
5555

5656
rsource "Kconfig.usbip"
57+
rsource "class/Kconfig"
5758

5859
endif # USB_HOST_STACK

subsys/usb/host/class/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2025 Linumiz GmbH
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
rsource "Kconfig.cdc_ecm_host"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025 Linumiz GmbH
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config USBH_CDC_ECM_CLASS
5+
bool "USB Host CDC ECM Class implementation"
6+
default y
7+
depends on NET_L2_ETHERNET
8+
depends on DT_HAS_ZEPHYR_USBH_CDC_ECM_ENABLED
9+
help
10+
USB Host CDC Ethernet Control Model (ECM) implementation.
11+
Supports communication with CDC ECM-compliant USB Ethernet devices.
12+
13+
if USBH_CDC_ECM_CLASS
14+
15+
module = USBH_CDC_ECM
16+
module-str = "usbh cdc_ecm"
17+
default-count = 1
18+
source "subsys/logging/Kconfig.template.log_config"
19+
20+
endif # USBH_CDC_ECM_CLASS

0 commit comments

Comments
 (0)