Changes between Version 6 and Version 7 of uboot


Ignore:
Timestamp:
06/21/2024 07:24:29 PM (3 months ago)
Author:
Tim Harvey
Comment:

added USB ACM Gadget documentation (USB as a serial console)

Legend:

Unmodified
Added
Removed
Modified
  • uboot

    v6 v7  
    715715}}}
    716716
     717This requires CONFIG_USB_FUNCTION_MASS_STORAGE to be enabled and a USB host controller that can operate in gadget mode
     718
     719
     720[=#gadgetacm]
     721==== USB CDC ACM (Serial) Gadget
     722You can use USB in device mode for console input/output to a host PC which supports the standard CDC ACM USB driver:
     723 * Examples:
     724  - use only ACM for console
     725{{{#!bash
     726setenv stderr usbacm && setenv stdout usbacm && setenv stdin usbacm
     727}}}
     728  - use both ACM as well as original env based UART serial console (requires CONFIG_CONSOLE_MUX=y):
     729{{{#!bash
     730setenv stderr ${stderr},usbacm && setenv stdout ${stdout},usbacm && setenv stdin ${stdin},usbacm
     731}}}
     732
     733After doing this on your host PC the device is connected to with a USB-C to Host cable you should see a USB ACM device enumerate and can use it:
     734 * example on a Linux PC you will see the following in syslog (dmesg):
     735{{{#!bash
     736usb 3-10.5.5: new high-speed USB device number 21 using xhci_hcd
     737usb 3-10.5.5: New USB device found, idVendor=0525, idProduct=a4a5, bcdDevice= 2.21
     738usb 3-10.5.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
     739usb 3-10.5.5: Product: USB download gadget
     740usb 3-10.5.5: Manufacturer: Gateworks
     741usb 3-10.5.5: SerialNumber: 445096
     742usb-storage 3-10.5.5:1.0: USB Mass Storage device detected
     743usb-storage 3-10.5.5:1.0: Quirks match for vid 0525 pid a4a5: 10000
     744cdc_acm 3-10.5.5:1.0: ttyACM0: USB ACM device
     745
     746# connect to ttyACM0 with a terminal program such as screen/minicom/picocom
     747screen /dev/ttyACM0
     748}}}
     749
     750
     751This requires CONFIG_USB_FUNCTION_ACM to be enabled and a USB host controller that can operate in gadget mode
     752
    717753
    718754[=#pci]