fuchsia.hardware.usb.dci

Added: HEAD

PROTOCOLS

UsbDci

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

AllocEndpoint

Requests the DCI driver to allocate a physical endpoint.

This is used by the peripheral manager to dynamically allocate a physical endpoint matching the requested direction, endpoint_type, and max_packet_size specified in EndpointAllocationRequest. This method must only be called if GetHardwareInfo reported supports_dynamic_ep_sizing as true.

The allocation is atomic. If the DCI driver cannot satisfy the request, it returns an error and no hardware state is modified.

Closing the UsbDci channel will automatically free all endpoints allocated through it.

  • error:
    • ZX_ERR_IO_NOT_PRESENT: The DCI controller is not ready to take allocation requests (for example, in controller drivers that update hardware registers during allocation, if underlying hardware conditions such as power, clocks, reset, or MMIO accessibility have not yet been met).
    • ZX_ERR_NO_RESOURCES: No physical endpoints matching the request are available.
    • ZX_ERR_NOT_SUPPORTED: The DCI driver does not support dynamic endpoint allocation.

Request

NameType
payload EndpointAllocationRequest

Response

NameType
payload UsbDci_AllocEndpoint_Result

CancelAll

Cancel all pending transactions for the given endpoint.

Request

NameType
ep_address uint8

Response

NameType
payload UsbDci_CancelAll_Result

ConfigureEndpoint

Configure and endpoint with the given configuration.

See usb20 9.6.6

Request

NameType
ep_descriptor fuchsia.hardware.usb.descriptor/UsbEndpointDescriptor
ss_comp_descriptor fuchsia.hardware.usb.descriptor/UsbSsEpCompDescriptor

Response

NameType
payload UsbDci_ConfigureEndpoint_Result

ConnectToEndpoint

Connects to endpoint. Returns

  • ZX_ERR_NOT_FOUND: if endpoint address does not exist.
  • ZX_ERR_ALREADY_BOUND: if the endpoint is already bound.

Request

NameType
ep_addr uint8
ep server_end:fuchsia.hardware.usb.endpoint/Endpoint

Response

NameType
payload UsbDci_ConnectToEndpoint_Result

DisableEndpoint

Disable the given endpoint.

Request

NameType
ep_address uint8

Response

NameType
payload UsbDci_DisableEndpoint_Result

EndpointClearStall

Clear stall condition for the given endpoint.

See usb32 8.5.3.4

Request

NameType
ep_address uint8

Response

NameType
payload UsbDci_EndpointClearStall_Result

EndpointSetStall

Set stall condition for the given endpoint.

See usb20 8.5.3.4

Request

NameType
ep_address uint8

Response

NameType
payload UsbDci_EndpointSetStall_Result

FreeEndpoint

Frees a previously dynamically allocated endpoint.

Releases the physical endpoint back to the DCI driver's pool. The endpoint must be disabled via DisableEndpoint before calling this method.

  • error:
    • ZX_ERR_IO_NOT_PRESENT: The DCI controller is not ready or accessible to process endpoint deallocation requests.
    • ZX_ERR_NOT_FOUND: The endpoint was not dynamically allocated.
    • ZX_ERR_BAD_STATE: The endpoint is still active or enabled.

Request

NameType
ep_address uint8

Response

NameType
payload UsbDci_FreeEndpoint_Result

GetHardwareInfo

Queries the DCI driver for hardware-specific endpoint limits.

This method retrieves the static endpoint configuration and capabilities of the DCI controller. It is typically called once by the peripheral manager during startup.

  • error:
    • ZX_ERR_IO_NOT_PRESENT: The DCI controller is not ready or accessible to handle hardware queries (for example, if underlying hardware conditions such as power, clock enablement, or MMIO register accessibility have not yet been met).
    • ZX_ERR_NOT_SUPPORTED: The DCI driver does not support hardware queries (legacy driver).

Request

<EMPTY>

Response

NameType
payload UsbDci_GetHardwareInfo_Result

SetInterface

Bind the interface as given by the child node.

Request

NameType
interface client_end:UsbDciInterface

Response

NameType
payload UsbDci_SetInterface_Result

StartController

Start running in peripheral mode. Connects the device to the host. Usually called when all functions are ready.

Request

<EMPTY>

Response

NameType
payload UsbDci_StartController_Result

StopController

Stop running in peripheral mode. Disconnects the device from the host. Usually called when a function is cleared.

Request

<EMPTY>

Response

NameType
payload UsbDci_StopController_Result

UsbDciInterface

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

Interface for parent (typically DCI driver) to call into its child (currently usb-peripheral driver). UsbDci::Use SetInterface() to bind client_end in the parent driver.

Control

Dispatch a control transaction.

See usb20 8.5.3 and 9.6

Request

NameType
setup fuchsia.hardware.usb.descriptor/UsbSetup
write vector<uint8>:65508

Response

NameType
payload UsbDciInterface_Control_Result

SetConnected

Inform driver of current port connection state.

Request

NameType
is_connected bool

Response

NameType
payload UsbDciInterface_SetConnected_Result

SetSpeed

Inform driver of current bus speed.

Request

NameType
speed fuchsia.hardware.usb.descriptor/UsbSpeed

Response

NameType
payload UsbDciInterface_SetSpeed_Result

STRUCTS

UsbDciInterface_Control_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

FieldTypeDescriptionDefault
read vector<uint8> No default

UsbDciInterface_SetConnected_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDciInterface_SetSpeed_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_AllocEndpoint_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

FieldTypeDescriptionDefault
ep_address uint8 No default

UsbDci_CancelAll_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_ConfigureEndpoint_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_ConnectToEndpoint_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_DisableEndpoint_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_EndpointClearStall_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_EndpointSetStall_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_FreeEndpoint_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_GetHardwareInfo_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

FieldTypeDescriptionDefault
info DciHardwareInfo No default

UsbDci_SetInterface_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_StartController_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

UsbDci_StopController_Response

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

<EMPTY>

TABLES

DciHardwareInfo

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

Overall hardware capability summary of the DCI controller.

OrdinalFieldTypeDescription
endpoints vector<EndpointInfo>:32

List of physical endpoint capabilities supported by the controller.

Required if supports_dynamic_ep_sizing is false.

supports_dynamic_ep_sizing bool

If true, usb-peripheral must use UsbDci.AllocEndpoint.

Optional. Interpreted as false if absent.

EndpointAllocationRequest

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

Request parameters when dynamically allocating a physical endpoint from the DCI driver.

OrdinalFieldTypeDescription
direction fuchsia.hardware.usb.descriptor/EndpointDirection

The required direction of the endpoint (IN or OUT).

Required.

endpoint_type fuchsia.hardware.usb.descriptor/EndpointType

The transfer type required for this endpoint (BULK, CONTROL, ISOCHRONOUS, or INTERRUPT).

Required.

max_packet_size uint16

The maximum packet size required by this endpoint in bytes.

Required.

EndpointInfo

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

Static configuration and supported types for a physical endpoint.

OrdinalFieldTypeDescription
ep_address uint8

The endpoint address, as defined in USB 2.0 specification section 9.6.6. e.g., 0x81 (IN 1), 0x02 (OUT 2).

Required.

supported_types vector<SupportedEndpointInfo>:4

The transfer types supported by this physical endpoint, along with any type-specific hardware limits.

Required.

SupportedEndpointInfo

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

Hardware capability and limit information for a specific endpoint transfer type.

OrdinalFieldTypeDescription
endpoint_type fuchsia.hardware.usb.descriptor/EndpointType

The transfer type supported (BULK, CONTROL, ISOCHRONOUS, or INTERRUPT).

Required.

max_packet_size_limit uint16

The maximum packet size supported for this transfer type in bytes.

Required.

min_lead_time uint64

For isochronous endpoints: minimum lead time required in number of transfers.

Optional even when endpoint_type is ISOCHRONOUS. Interpreted as 0 (no additional lead time required) if absent.

UNIONS

UsbDciInterface_Control_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDciInterface_Control_Response
err zx/Status
framework_err internal

UsbDciInterface_SetConnected_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDciInterface_SetConnected_Response
err zx/Status
framework_err internal

UsbDciInterface_SetSpeed_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDciInterface_SetSpeed_Response
err zx/Status
framework_err internal

UsbDci_AllocEndpoint_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_AllocEndpoint_Response
err zx/Status
framework_err internal

UsbDci_CancelAll_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_CancelAll_Response
err zx/Status
framework_err internal

UsbDci_ConfigureEndpoint_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_ConfigureEndpoint_Response
err zx/Status
framework_err internal

UsbDci_ConnectToEndpoint_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_ConnectToEndpoint_Response
err zx/Status
framework_err internal

UsbDci_DisableEndpoint_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_DisableEndpoint_Response
err zx/Status
framework_err internal

UsbDci_EndpointClearStall_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_EndpointClearStall_Response
err zx/Status
framework_err internal

UsbDci_EndpointSetStall_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_EndpointSetStall_Response
err zx/Status
framework_err internal

UsbDci_FreeEndpoint_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_FreeEndpoint_Response
err zx/Status
framework_err internal

UsbDci_GetHardwareInfo_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_GetHardwareInfo_Response
err zx/Status
framework_err internal

UsbDci_SetInterface_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_SetInterface_Response
err zx/Status
framework_err internal

UsbDci_StartController_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_StartController_Response
err zx/Status
framework_err internal

UsbDci_StopController_Result strict

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

OrdinalVariantTypeDescription
response UsbDci_StopController_Response
err zx/Status
framework_err internal

CONSTANTS

NameValueTypeDescription
MAX_CONTROL_REQUEST_LEN 65508 uint64
MAX_ENDPOINTS 32 uint32
MAX_SUPPORTED_TYPES 4 uint32

SERVICES

UsbDciService

Defined in fuchsia.hardware.usb.dci/usb-dci.fidl

NameTypeTransport
device fuchsia.hardware.usb.dci/UsbDci Channel