[PATCH 0/8] usb: eth: Add CDC ECM/NCM support

Jonas Karlman jonas at kwiboo.se
Sat Jul 11 18:07:58 CEST 2026


This series adds support for CDC ECM and CDC NCM devices.

U-Boot currently only has support for automatic binding of the first
device configuration for devices, so this implementaion works by adding
bindings for VID/PID pairs and letting the drivers try to change active
configuration during probe.

The driver implementations was created based of the CDC ECM 1.2 and
CDC NCM 1.1 specifications and was tested on a few different USB
Ethernet adapters using ASIX or Realtek IC.

Patch 1-3 import headers and macros from Linux kernel.
Patch 4 export a helper that drivers can use to select a different
device configuration.
Patch 5-6 adds drivers for CDC ECM and CDC NCM.
Patch 7-8 allows ASIX and Realtek adapters to use CDC ECM and CDC NCM.

Jonas Karlman (8):
  usb: Import USB_DEVICE_VER() macro from Linux
  usb: Import USB_INTERFACE_INFO() macro from Linux
  usb: Sync linux/usb/cdc.h from Linux
  usb: Extract usb_select_configuration_no() helper
  usb: eth: Add CDC ECM support
  usb: eth: Add CDC NCM driver
  usb: eth: Bind ASIX AX88179A/AX88772D/AX88279 to CDC ECM/NCM driver
  usb: eth: Bind Realtek RTL815x to CDC ECM driver

 common/usb.c                 |  59 +++--
 doc/README.usb               |   2 +
 drivers/usb/eth/Kconfig      |  18 ++
 drivers/usb/eth/Makefile     |   2 +
 drivers/usb/eth/asix88179.c  |   5 +
 drivers/usb/eth/cdc_common.c | 265 +++++++++++++++++++
 drivers/usb/eth/cdc_common.h |  35 +++
 drivers/usb/eth/cdc_ecm.c    | 292 +++++++++++++++++++++
 drivers/usb/eth/cdc_ncm.c    | 483 +++++++++++++++++++++++++++++++++++
 include/linux/usb/cdc.h      | 233 ++++++++++++++++-
 include/usb.h                |  48 ++++
 11 files changed, 1417 insertions(+), 25 deletions(-)
 create mode 100644 drivers/usb/eth/cdc_common.c
 create mode 100644 drivers/usb/eth/cdc_common.h
 create mode 100644 drivers/usb/eth/cdc_ecm.c
 create mode 100644 drivers/usb/eth/cdc_ncm.c

-- 
2.54.0



More information about the U-Boot mailing list