USB device-mode support (#613)

This commit is contained in:
Shadowtrance
2026-08-13 05:29:35 +10:00
committed by GitHub
parent 37c507544b
commit cc8be3faef
94 changed files with 3466 additions and 399 deletions
@@ -0,0 +1,9 @@
description: ESP32 USB device-mode CDC-ACM addon (composites a USB serial console interface into whichever primary class - HID or MIDI - is active, or stands alone with no primary; deliberately excluded from MSC, which always presents as plain mass storage with no console). Requires CONFIG_TINYUSB_CDC_ENABLED.
compatible: "espressif,esp32-usbdevice-cdc"
properties:
_unused:
type: int
default: 0
description: Placeholder required by the binding schema; this driver has no device-tree configuration.
@@ -0,0 +1,9 @@
description: ESP32 USB device-mode HID class driver (present the board as a USB HID peripheral, e.g. a keyboard, to a host). Requires CONFIG_TINYUSB_HID_COUNT > 0.
compatible: "espressif,esp32-usbdevice-hid"
properties:
_unused:
type: int
default: 0
description: Placeholder required by the binding schema; this driver has no device-tree configuration.
@@ -0,0 +1,9 @@
description: ESP32 USB device-mode MIDI class driver (present the board as a USB MIDI peripheral to a host). Requires CONFIG_TINYUSB_MIDI_COUNT > 0.
compatible: "espressif,esp32-usbdevice-midi"
properties:
_unused:
type: int
default: 0
description: Placeholder required by the binding schema; this driver has no device-tree configuration.
@@ -0,0 +1,9 @@
description: ESP32 USB device-mode MSC class driver (present the board's SD card or internal flash as a USB mass storage device to a host). Requires CONFIG_TINYUSB_MSC_ENABLED.
compatible: "espressif,esp32-usbdevice-msc"
properties:
_unused:
type: int
default: 0
description: Placeholder required by the binding schema; this driver has no device-tree configuration.
@@ -0,0 +1,13 @@
description: ESP32 USB device-mode (peripheral) controller. Owns the single TinyUSB device-mode slot shared by its child classes (HID, MSC, ...); only one child class may be active at a time.
compatible: "espressif,esp32-usbdevice"
properties:
_unused:
type: int
default: 0
description: |
USB device-mode (peripheral) controller: presents itself as a USB device to a host (HID keyboard, mass storage, ...).
Only one of usbdevicehid0/usbdevicemsc0/usbdevicemidi0 may be active at a time -
usbdevicecdc0 is not part of that exclusion - it's an addon composited into whichever of HID/MIDI is active (never MSC)
toggle its status to enable/disable the USB serial console independent of which primary is running.