History log of /fuchsia/zircon/system/dev/usb/dwc3/dwc3.h
Revision Date Author Comments
# d0d4c020 25-Sep-2018 Suraj Malhotra <surajmalhotra@google.com>

[dwc3] Migrate to use mmio_buffer_t.

Tested: Compiles.
Change-Id: Ia943017dadcefbfc16076e33cf97684dc9a2e9d4


# 6204ffc4 12-Sep-2018 Mike Voydanoff <voydanoff@google.com>

[usb] Rename "USB device" to "USB peripheral" when referring to USB peripheral role

Before this CL, "USB device" could mean two things:

1) a USB device attached to Zircon in USB host role, or
2) Zircon acting as a USB device attached to another host.

This change renames the 2) use case to "USB peripheral" to make the two roles
more clearly defined.

TEST: manual testing on Hikey, switching roles between host and peripheral
with the usbctl tool. (Hikey is currently the only platform that supports this).

Change-Id: Ic0143f51d7616fae1f04d298081dcf22a2c232fa


# 744eea72 24-Aug-2018 Mike Voydanoff <voydanoff@google.com>

[dev][usb][dwc3] Fix deadlock when switching from host to device role.

TEST: manual testing on hikey960
Change-Id: I943eb7a29e017573384f46d8bca83dc32b0aa410


# babe1cf5 25-Jul-2018 Adam Barth <abarth@chromium.org>

[sync] Apply C API rubric to libsync

Test: No behavior change
Change-Id: I30a413f7fb5d3f4e741e5204532b82e73595c086


# 71e1b090 28-Jun-2018 Mike Voydanoff <voydanoff@google.com>

[dev][usb][dwc3] Make dwc3 driver responsible for starting and stopping XHCI

The dwc3 controller supports both host and device mode.
The dwc3 host support is the same as XHCI, so we use the XHCI driver
when in host mode.
Previously the board driver was responsible for starting and stopping
the XHCI driver when switching in and out of host mode.
Now the dwc3 driver does this, simplifying the support needed from the board drivers.

Test: Manual testing on hikey960 and madrone. USB host starts successfully at boot,
"usbctl mode device" switches to device mode and "usbctl mode host" switches
back to host.

Change-Id: Idbeab8264cd805b66b5ad6d722807e4611f7a030


# af71cbda 06-Apr-2018 Mike Voydanoff <voydanoff@google.com>

[dev][usb] Add support for automatic zero length packets

Set send_zlp flag on usb_request_t if you want zero length packets
sent automatically when transfer length is a multiple of max packet size.

ZX-1952 #done

Change-Id: I78e1cf3231179ec77b20b1ca95e5b765e7ed5dac


# b080203a 30-Mar-2018 Mike Voydanoff <voydanoff@google.com>

[ddk][platform-bus] Replace pdev_vmo_buffer_t helper with io_buffer_t

ZX-1859 #done

Change-Id: If5810bf0ac7bab3d51cfdb5253c272f07d462d3c


# 3934a894 20-Mar-2018 Mike Voydanoff <voydanoff@google.com>

[dev][usb][dwc3] Replace pdev_vmo_buffer_t usage with io_buffer_t

Change-Id: I200fcfb544da56dcd0b7b60e415a8313022b0947


# a9b31560 13-Mar-2018 Mike Voydanoff <voydanoff@google.com>

[dev][usb][dwc3] Switch to io_buffer_init_with_bti()

Change-Id: Ieb7672516d02d6d84efeb2fa3cd798329f1d0e15


# ed98ba24 08-Nov-2017 Mike Voydanoff <voydanoff@google.com>

[dev][usb][dwc3] Use pdev_map_contig_vmo() for contiguous DMA buffers

This allows the driver to run without having the root resource.

Change-Id: Ifc6ba46a8aa611a18f57aea9ca698cd40229bc40


# 4af3a9a0 08-Nov-2017 Mike Voydanoff <voydanoff@google.com>

[dev][platform-bus] Add API for allocating contiguous VMOs

to prepare for get_root_resource() removal

Change-Id: I86fd3b079ff85042e61addec6eaec73cdb671d2a


# 76db569f 19-Oct-2017 Jocelyn Dang <jocelyndang@google.com>

[dev][usb][dwc3] Migrate to usb_request

Adds request_queue to dci_protocol

Change-Id: I7b9d0d533a172c2fd7adc78c46ec1c4746c7e0a4


# 68423d50 10-Oct-2017 Mike Voydanoff <voydanoff@google.com>

[dev][usb] Add support for specifying default USB mode in platform bus driver

The USB switch protocol now has a get_initial_mode() API to allow the
platform bus to specify whether USB starts in host or device mode.

Change-Id: Icdd0c15689c356252fe6ff7ca9bed8d8bba95fcd


# afcfccee 20-Sep-2017 Mike Voydanoff <voydanoff@google.com>

[dev][usb][dwc3] Use new zx_interrupt_signal() behavior to terminate event thread

zx_interrupt_wait() now returns ZX_ERR_CANCELED after calling zx_interrupt_signal()

Change-Id: I557d40a983a435f0af807bee79e5c21d02a812de


# 4305f11a 19-Sep-2017 Mike Voydanoff <voydanoff@google.com>

[usb][hikey] USB mode switching support

Squashed commit of:

[dev][usb] Add support for USB mode switching

On devices that support it, we can now switch USB modes between:

USB_MODE_NONE - USB is not active
USB_MODE_HOST - act as a USB host
USB_MODE_DEVICE - act as a USB device or peripheral
USB_MODE_OTG - set mode using OTG protocol (not supported yet)

The mode is set via an ioctl on the ZX_PROTOCOL_USB_DEVICE protocol,
and the usbctl command line utility has been updated to support switching
between these modes.

The DCI device controller driver will implement a new protocol
ZX_PROTOCOL_USB_MODE_SWITCH to facilitate mode switching.

The usb-device driver has been refactored a bit to support mode switching.
Child devices for the USB functions are now removed when exiting device mode
and are re-added when resuming device mode.

We also remove the usb_dci_set_enabled() call from the DCI protocol,
since it is now replaced by ZX_PROTOCOL_USB_MODE_SWITCH.

[dev][usb-virtual-bus] Update to use new USB mode switching protocol

[dev][usb][dwc3] Add support for USB mode switching

We now shut down the device mode functionality and enable host mode
when the mode is switched to USB_MODE_HOST and resume the device mode controller
when returning to USB_MODE_DEVICE.

[hi3660][hikey960] Add support for USB mode switching and USB host

Add support for enabling/disabling USB host mode to the hi3360-bus driver
and add device for binding the XHCI driver when host mode is active.

Also added definitions for the GPIOs we are using so far.

Change-Id: I9c9f7d1058b129acba772b9d2d820cd30fb7f8ca


# dacc1d80 12-Sep-2017 Mike Voydanoff <voydanoff@google.com>

[dev] Rename "mxdev" to "zxdev" in ddktl and various drivers.

Change-Id: I000e42c26d9f8379de40447690694a35f6be93e2


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# 953029eb 04-Sep-2017 Mike Voydanoff <voydanoff@google.com>

[dev][usb][dwc3] First cut at DWC3 USB controller driver

Implements basic peripheral mode support for DWC3

Still to do for peripheral mode:
- USB 3 support
- Isochronous endpoint support
- Scatter/gather support
- OTG support for better connect/disconnect detection

and beyond peripheral mode:
- USB host support (we will layer the XHCI driver on top of this driver for host support)
- role switching between host and peripheral mode
- power management

Change-Id: I028f7af18f4434e17e1fe5fe36f0d1a83a409e55