PROTOCOLS
UfsPhy
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
GetProperties
Returns the PHY driver's static capabilities. The controller driver calls this once at initialization to decide which power-management features it may use. A PHY driver that does not implement this method is treated as supporting none of the optional features.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
UfsPhy_GetProperties_Result
|
Init
Perform the UFS PHY specific initialization which happens before link startup.
Request
| Name | Type |
|---|---|
ufs_hci |
client_end:Ufshci
|
Response
| Name | Type |
|---|---|
payload |
UfsPhy_Init_Result
|
PrePowerModeChange
Perform PHY calibration and configuration prior to power mode / gear change.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
UfsPhy_PrePowerModeChange_Result
|
SetPowerState
Transitions the PHY to state. See PowerState for the hardware preconditions of each
target state.
Power States and Held Resources
Each lower power state holds a strict subset of the resources held by the state above it:
| State | Power Domains | Core Clocks & Rails | M-PHY Low-V Rail | Aux Clock |
|-------------------|---------------|---------------------|------------------|-----------|
| ACTIVE | ON | ON | ON | ON |
| LINK_IDLE | ON | ON | ON | OFF |
| HIBERNATE_SLEEP | ON | ON | OFF | OFF |
| POWER_DOWN | OFF | OFF | OFF | OFF |
Allowed Transitions
- Same state (
S -> S): Always idempotent; returnsZX_OKwithout modifying hardware. - Higher power to lower power (
ACTIVE -> LINK_IDLE,ACTIVE/LINK_IDLE -> HIBERNATE_SLEEP, orACTIVE/LINK_IDLE/HIBERNATE_SLEEP -> POWER_DOWN): Allowed. Releases the additional resources not required in the target state. - Any lower power state to
ACTIVE(LINK_IDLE/HIBERNATE_SLEEP/POWER_DOWN -> ACTIVE): Allowed. Restores all resources required forACTIVE. - Lower power to a higher non-
ACTIVEstate (POWER_DOWN -> LINK_IDLE,POWER_DOWN -> HIBERNATE_SLEEP, orHIBERNATE_SLEEP -> LINK_IDLE): Rejected withZX_ERR_BAD_STATE. The caller must transition toACTIVEfirst.
Error Semantics
- Transitions to
ACTIVE,LINK_IDLE, orHIBERNATE_SLEEP: On failure, the PHY rolls back any partial changes (best-effort) and remains in its previous state. - Transitions to
POWER_DOWN: Every power-down step is attempted even if an earlier step fails, the first error is returned, and the PHY transitions toPOWER_DOWN.
Reentrancy
The UFS driver may call SetPowerState while holding the locks that serialize its own
UIC traffic (it does so for the ACTIVE and LINK_IDLE votes issued around doorbells and
interrupts). Implementations must therefore complete SetPowerState without calling back
into Ufshci (DmeGet/DmeSet); any DME work belongs in Init or PrePowerModeChange.
Request
| Name | Type |
|---|---|
state |
PowerState
|
Response
| Name | Type |
|---|---|
payload |
UfsPhy_SetPowerState_Result
|
Ufshci
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
Interface provided by the UFS MAC (controller driver) to the PHY driver, allowing the PHY driver to send UIC commands (like DME_SET) or access MAC-level registers required for PHY initialization.
DmeGet
Send a UIC DME_GET command to the UFS controller. If the MIB attribute's value has not been set via the DME_SET command, a hardware reset default value is returned by the device. For invalid mib_attribute or gen_selector_index values, a ZX_ERR_INTERNAL error is returned.
Request
| Name | Type |
|---|---|
mib_attribute |
uint16
|
gen_selector_index |
uint16
|
Response
| Name | Type |
|---|---|
payload |
Ufshci_DmeGet_Result
|
DmeSet
Send a UIC DME_SET command to the UFS controller.
Request
| Name | Type |
|---|---|
mib_attribute |
uint16
|
gen_selector_index |
uint16
|
value |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Ufshci_DmeSet_Result
|
STRUCTS
UfsPhy_Init_Response
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
<EMPTY>
UfsPhy_PrePowerModeChange_Response
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
<EMPTY>
UfsPhy_SetPowerState_Response
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
<EMPTY>
Ufshci_DmeGet_Response
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Field | Type | Description | Default |
|---|---|---|---|
value |
uint32
|
No default |
Ufshci_DmeSet_Response
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
<EMPTY>
ENUMS
PowerState flexible
Type: uint8
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
Operating power states of the UFS PHY, ordered from highest to lowest power consumption.
| Name | Value | Description |
|---|---|---|
ACTIVE |
1 |
All PHY power domains, regulators, and auxiliary clocks are enabled; UFSHCI registers and the UniPro link are accessible. Can be entered from any state with no hardware preconditions. When waking from
|
LINK_IDLE |
2 |
The UniPro link is idle in Autonomous Hibernate (AH8) with no in-flight UFSHCI commands or register accesses. Auxiliary clocks may be gated while all power rails and domains remain enabled. Preconditions: Can only be entered from |
HIBERNATE_SLEEP |
3 |
The UFS device is in Sleep ( Preconditions: Can only be entered from |
POWER_DOWN |
4 |
The host controller is stopped ( Preconditions: Can be entered from any state after the caller has stopped the host
controller ( |
TABLES
UfsPhy_GetProperties_Response
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
supports_suspend_resume |
bool
|
Whether |
UNIONS
UfsPhy_GetProperties_Result strict
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
UfsPhy_GetProperties_Response
|
|
3 |
framework_err |
internal
|
UfsPhy_Init_Result strict
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
UfsPhy_Init_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
UfsPhy_PrePowerModeChange_Result strict
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
UfsPhy_PrePowerModeChange_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
UfsPhy_SetPowerState_Result strict
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
UfsPhy_SetPowerState_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Ufshci_DmeGet_Result strict
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Ufshci_DmeGet_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Ufshci_DmeSet_Result strict
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Ufshci_DmeSet_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
SERVICES
Service
Defined in fuchsia.hardware.ufs.phy/ufs_phy.fidl
| Name | Type | Transport |
|---|---|---|
| phy |
fuchsia.hardware.ufs.phy/UfsPhy
|
Channel |
| inline_crypto |
fuchsia.hardware.inlineencryption/Controller
|
Channel |