fuchsia.hardware.usb.connector

State of a physical USB connector (receptacle), as reported by the port controller that manages it, such as a USB Type-C port controller (TCPC).

The port controller decides how the USB data side should behave from what is attached (for example, Type-C CC state and BC1.2 charger detection), and USB drivers such as the PHY and controller follow it. Power-related state (presence, current limits) is reported separately through fuchsia.hardware.power.usb.

Added: HEAD

PROTOCOLS

Connector

Defined in fuchsia.hardware.usb.connector/connector.fidl

Protocol for querying static capabilities and watching dynamic state changes of a physical USB connector.

GetSpec

Returns static hardware characteristics of the USB connector that do not change during operation.

Request

<EMPTY>

Response

NameType
payload Connector_GetSpec_Result

Watch

Hanging get for the connector state. Returns immediately on the first call, then when the state has changed since the last returned value. State transitions are delivered in order and not coalesced across calls (for example, DEVICE -> NONE -> DEVICE delivers NONE on the next call and DEVICE on the following call).

If present, setup_wake_lease keeps the system awake while the server processes the call. If the call is answered immediately, as the first call always is, the server hands it back as wake_lease unless it returns a wake lease of its own. If the call is parked, the server drops it.

If present, wake_lease is a wake lease that the client should hold while it handles the returned state. On a suspend-capable system, the server must return a wake lease on every transition of a field in Spec.wake_on (which must include data_role, including transitions to NONE so downstream drivers can drain transfers and power down before suspend), or hand back setup_wake_lease on an immediate reply when no server lease is attached.

Returns:

  • ZX_ERR_BAD_STATE: A Watch call is already pending on this channel; the existing pending call remains intact.

Request

NameType
setup_wake_lease fuchsia.power.system/LeaseToken

Response

NameType
payload Connector_Watch_Result

STRUCTS

Connector_GetSpec_Response

Defined in fuchsia.hardware.usb.connector/connector.fidl

FieldTypeDescriptionDefault
spec Spec No default

Connector_Watch_Response resource

Defined in fuchsia.hardware.usb.connector/connector.fidl

FieldTypeDescriptionDefault
state ConnectorState No default
wake_lease fuchsia.power.system/LeaseToken No default

ENUMS

DataRole flexible

Type: uint32

Defined in fuchsia.hardware.usb.connector/connector.fidl

The USB data role the controller behind a connector should operate in.

NameValueDescription
0

No USB data: nothing is attached, the partner provides no USB data (for example a dedicated charger), or data is not yet allowed (for example charger detection is still running on the port controller's own data switch; platforms whose charger detector borrows the SoC PHY require a future DETECTING role or side channel rather than NONE).

1

Peripheral: the data lines are connected to a USB host.

2

Host: the data lines are connected to a USB device.

Orientation flexible

Type: uint32

Defined in fuchsia.hardware.usb.connector/connector.fidl

Orientation of the plug in a USB Type-C receptacle, indicating which CC pin the partner is attached on so a Type-C mux can route lanes according to the active mode.

NameValueDescription
1

The partner is attached on CC1.

2

The partner is attached on CC2 (the plug is flipped).

TABLES

ConnectorState

Defined in fuchsia.hardware.usb.connector/connector.fidl

Dynamic state of a USB connector.

OrdinalFieldTypeDescription
data_role DataRole

The data role the USB controller should operate in. Always set by the server.

orientation Orientation

The Type-C plug orientation, set whenever a partner's CC orientation is resolved (independently of data_role) and omitted when unattached, unknown, or non-Type-C.

Spec

Defined in fuchsia.hardware.usb.connector/connector.fidl

Static hardware characteristics and driver capabilities of a physical USB connector.

OrdinalFieldTypeDescription
supported_data_roles vector<DataRole>

Data roles supported by this connector (for example [DEVICE] or [DEVICE, HOST]).

wake_on ConnectorState

ConnectorState fields whose changes actively wake the system from suspend and return a wake_lease on Watch (must include data_role). Only field presence (set vs. unset) is significant; the actual values in the table are ignored.

UNIONS

Connector_GetSpec_Result strict

Defined in fuchsia.hardware.usb.connector/connector.fidl

OrdinalVariantTypeDescription
response Connector_GetSpec_Response
err zx/Status
framework_err internal

Connector_Watch_Result strict resource

Defined in fuchsia.hardware.usb.connector/connector.fidl

OrdinalVariantTypeDescription
response Connector_Watch_Response
err zx/Status
framework_err internal

SERVICES

Service

Defined in fuchsia.hardware.usb.connector/connector.fidl

NameTypeTransport
connector fuchsia.hardware.usb.connector/Connector Channel