PROTOCOLS
Device
Defined in fuchsia.hardware.sdio/sdio.fidl
AckInBandIntr
See above. Clients should call AckInBandIntr() after starting to wait on the interrupt
object just in case there is already an in-band interrupt pending for this function.
Request
<EMPTY>
DisableFn
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_DisableFn_Result
|
DisableFnIntr
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_DisableFnIntr_Result
|
DoRwTxn
Clients are responsible for performing the following cache operations:
After read requests:
- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that have been mapped by the client.
- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.
Note that writing to any portion of a buffer before DoRwTxn has returned can corrupt the received data.
Before write requests:
- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the client.
- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.
Request
| Name | Type |
|---|---|
txn |
SdioRwTxn
|
Response
| Name | Type |
|---|---|
payload |
Device_DoRwTxn_Result
|
DoVendorControlRwByte
Reads or writes to a vendor CCCR register. addr must be in [0xF0, 0xFF].
Request
| Name | Type |
|---|---|
write |
bool
|
addr |
uint8
|
write_byte |
uint8
|
Response
| Name | Type |
|---|---|
payload |
Device_DoVendorControlRwByte_Result
|
EnableFn
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_EnableFn_Result
|
EnableFnIntr
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_EnableFnIntr_Result
|
GetBlockSize
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_GetBlockSize_Result
|
GetDevHwInfo
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_GetDevHwInfo_Result
|
GetInBandIntr
Returns a virtual interrupt that will be triggered by the SDIO driver when the card signals
an interrupt corresponding to this function. No additional interrupts will be triggered
until AckInBandIntr() is called.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_GetInBandIntr_Result
|
IntrPending
Returns true if an interrupt is pending for function fn_idx, false otherwise.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_IntrPending_Result
|
IoAbort
The following functions access the card common control registers (CCCR) on function 0. Aborts an I/O operation occurring on the specified function.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_IoAbort_Result
|
IoReady
Returns the value of the I/O Ready bit for this function in CCCR.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_IoReady_Result
|
PerformTuning
Perform tuning in the background. Clients can use this to update the host controller delay settings in case the bus delay has changed due to temperature or other factors. For example, clients could call this periodically, or only in response to data CRC errors. The amount of time this call takes (and the amount of time that other requests are blocked for) is controller-dependent.
Returns ZX_ERR_ALREADY_BOUND if another call to PerformTuning() is already pending.
Otherwise returns ZX_OK or an error value if the SDMMC driver's tuning process failed (see
the SDMMC protocol).
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_PerformTuning_Result
|
ReadByte
Reads a byte from a register. If suppress_error_messages is true, the SDMMC stack will not
log error-severity messages.
Request
| Name | Type |
|---|---|
address |
uint32
|
suppress_error_messages |
bool
|
Response
| Name | Type |
|---|---|
payload |
Device_ReadByte_Result
|
RegisterVmo
Request
| Name | Type |
|---|---|
vmo_id |
uint32
|
vmo |
handle<vmo>
|
offset |
uint64
|
size |
uint64
|
vmo_rights |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Device_RegisterVmo_Result
|
RequestCardReset
Requests that the core driver hard reset the card and perform the SDIO initialization
sequence again. The callback will be called after the card has been re-initialized, and in
the meantime all IO calls from this client will return ZX_ERR_SHOULD_WAIT. If an error
occurs during initialization then all subsequent IO calls will return ZX_ERR_IO_NOT_PRESENT.
The only way to recover from this situation would be to call RequestCardReset() again.
The SDIO core driver will wait for all clients to call this method before performing the
reset and re-initialization. After the reset clients will have to perform their own
initialization steps again, such as calling EnableFnIntr() or UpdateBlockSize().
VMO registration methods can always be called regardless of the reset state.
The specific method used to hard reset the card is platform- or board-specific; examples include toggling a reset GPIO or power cycling the card.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_RequestCardReset_Result
|
UnregisterVmo
Request
| Name | Type |
|---|---|
vmo_id |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Device_UnregisterVmo_Result
|
UpdateBlockSize
Request
| Name | Type |
|---|---|
blk_sz |
uint16
|
deflt |
bool
|
Response
| Name | Type |
|---|---|
payload |
Device_UpdateBlockSize_Result
|
WriteByte
Writes a byte to a register. If read_after_write is true, the register is read after
writing and the value is returned, otherwise the original value is returned. If
suppress_error_messages is true, the write is expected to fail, and the SDMMC stack will
not log error-severity messages.
Request
| Name | Type |
|---|---|
address |
uint32
|
byte |
uint8
|
read_after_write |
bool
|
suppress_error_messages |
bool
|
Response
| Name | Type |
|---|---|
payload |
Device_WriteByte_Result
|
DriverDevice
Defined in fuchsia.hardware.sdio/sdio.fidl
A driver transport variant of the Device protocol.
AckInBandIntr
See above. Clients should call AckInBandIntr() after starting to wait on the interrupt
object just in case there is already an in-band interrupt pending for this function.
Request
<EMPTY>
DisableFn
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_DisableFn_Result
|
DisableFnIntr
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_DisableFnIntr_Result
|
DoRwTxn
Clients are responsible for performing the following cache operations:
After read requests:
- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that have been mapped by the client.
- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.
Note that writing to any portion of a buffer before DoRwTxn has returned can corrupt the received data.
Before write requests:
- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the client.
- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.
Request
| Name | Type |
|---|---|
txn |
SdioRwTxn
|
Response
| Name | Type |
|---|---|
payload |
Device_DoRwTxn_Result
|
DoVendorControlRwByte
Reads or writes to a vendor CCCR register. addr must be in [0xF0, 0xFF].
Request
| Name | Type |
|---|---|
write |
bool
|
addr |
uint8
|
write_byte |
uint8
|
Response
| Name | Type |
|---|---|
payload |
Device_DoVendorControlRwByte_Result
|
EnableFn
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_EnableFn_Result
|
EnableFnIntr
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_EnableFnIntr_Result
|
GetBlockSize
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_GetBlockSize_Result
|
GetDevHwInfo
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_GetDevHwInfo_Result
|
GetInBandIntr
Returns a virtual interrupt that will be triggered by the SDIO driver when the card signals
an interrupt corresponding to this function. No additional interrupts will be triggered
until AckInBandIntr() is called.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_GetInBandIntr_Result
|
IntrPending
Returns true if an interrupt is pending for function fn_idx, false otherwise.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_IntrPending_Result
|
IoAbort
The following functions access the card common control registers (CCCR) on function 0. Aborts an I/O operation occurring on the specified function.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_IoAbort_Result
|
IoReady
Returns the value of the I/O Ready bit for this function in CCCR.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_IoReady_Result
|
PerformTuning
Perform tuning in the background. Clients can use this to update the host controller delay settings in case the bus delay has changed due to temperature or other factors. For example, clients could call this periodically, or only in response to data CRC errors. The amount of time this call takes (and the amount of time that other requests are blocked for) is controller-dependent.
Returns ZX_ERR_ALREADY_BOUND if another call to PerformTuning() is already pending.
Otherwise returns ZX_OK or an error value if the SDMMC driver's tuning process failed (see
the SDMMC protocol).
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_PerformTuning_Result
|
ReadByte
Reads a byte from a register. If suppress_error_messages is true, the SDMMC stack will not
log error-severity messages.
Request
| Name | Type |
|---|---|
address |
uint32
|
suppress_error_messages |
bool
|
Response
| Name | Type |
|---|---|
payload |
Device_ReadByte_Result
|
RegisterVmo
Request
| Name | Type |
|---|---|
vmo_id |
uint32
|
vmo |
handle<vmo>
|
offset |
uint64
|
size |
uint64
|
vmo_rights |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Device_RegisterVmo_Result
|
RequestCardReset
Requests that the core driver hard reset the card and perform the SDIO initialization
sequence again. The callback will be called after the card has been re-initialized, and in
the meantime all IO calls from this client will return ZX_ERR_SHOULD_WAIT. If an error
occurs during initialization then all subsequent IO calls will return ZX_ERR_IO_NOT_PRESENT.
The only way to recover from this situation would be to call RequestCardReset() again.
The SDIO core driver will wait for all clients to call this method before performing the
reset and re-initialization. After the reset clients will have to perform their own
initialization steps again, such as calling EnableFnIntr() or UpdateBlockSize().
VMO registration methods can always be called regardless of the reset state.
The specific method used to hard reset the card is platform- or board-specific; examples include toggling a reset GPIO or power cycling the card.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_RequestCardReset_Result
|
UnregisterVmo
Request
| Name | Type |
|---|---|
vmo_id |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Device_UnregisterVmo_Result
|
UpdateBlockSize
Request
| Name | Type |
|---|---|
blk_sz |
uint16
|
deflt |
bool
|
Response
| Name | Type |
|---|---|
payload |
Device_UpdateBlockSize_Result
|
WriteByte
Writes a byte to a register. If read_after_write is true, the register is read after
writing and the value is returned, otherwise the original value is returned. If
suppress_error_messages is true, the write is expected to fail, and the SDMMC stack will
not log error-severity messages.
Request
| Name | Type |
|---|---|
address |
uint32
|
byte |
uint8
|
read_after_write |
bool
|
suppress_error_messages |
bool
|
Response
| Name | Type |
|---|---|
payload |
Device_WriteByte_Result
|
STRUCTS
Device_DisableFnIntr_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_DisableFn_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_DoRwTxn_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_DoVendorControlRwByte_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
read_byte |
uint8
|
No default |
Device_EnableFnIntr_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_EnableFn_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_GetBlockSize_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
cur_blk_size |
uint16
|
No default |
Device_GetDevHwInfo_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
hw_info |
SdioHwInfo
|
No default |
Device_GetInBandIntr_Response resource
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
irq |
handle<interrupt>
|
No default |
Device_IntrPending_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
pending |
bool
|
No default |
Device_IoAbort_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_IoReady_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
ready |
bool
|
No default |
Device_PerformTuning_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_ReadByte_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
byte |
uint8
|
No default |
Device_RegisterVmo_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_RequestCardReset_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_UnregisterVmo_Response resource
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
vmo |
handle<vmo>
|
No default |
Device_UpdateBlockSize_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
<EMPTY>
Device_WriteByte_Response
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
byte |
uint8
|
No default |
SdioDeviceHwInfo
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
num_funcs |
uint32
|
number of sdio funcs including func 0 |
No default |
sdio_vsn |
uint32
|
No default | |
cccr_vsn |
uint32
|
No default | |
caps |
SdioDeviceCapabilities
|
No default | |
max_tran_speed |
uint32
|
No default |
SdioFuncHwInfo
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
manufacturer_id |
uint32
|
No default | |
product_id |
uint32
|
No default | |
max_blk_size |
uint32
|
No default | |
fn_intf_code |
uint8
|
No default |
SdioHwInfo
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
dev_hw_info |
SdioDeviceHwInfo
|
No default | |
func_hw_info |
SdioFuncHwInfo
|
No default | |
host_max_transfer_size |
uint32
|
No default |
SdioRwTxn resource
Defined in fuchsia.hardware.sdio/sdio.fidl
| Field | Type | Description | Default |
|---|---|---|---|
addr |
uint32
|
No default | |
incr |
bool
|
No default | |
write |
bool
|
No default | |
buffers |
vector<fuchsia.hardware.sdmmc/SdmmcBufferRegion>
|
No default |
UNIONS
Device_DisableFnIntr_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_DisableFnIntr_Response
|
|
2 |
err |
zx/Status
|
Device_DisableFn_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_DisableFn_Response
|
|
2 |
err |
zx/Status
|
Device_DoRwTxn_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_DoRwTxn_Response
|
|
2 |
err |
zx/Status
|
Device_DoVendorControlRwByte_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_DoVendorControlRwByte_Response
|
|
2 |
err |
zx/Status
|
Device_EnableFnIntr_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_EnableFnIntr_Response
|
|
2 |
err |
zx/Status
|
Device_EnableFn_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_EnableFn_Response
|
|
2 |
err |
zx/Status
|
Device_GetBlockSize_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_GetBlockSize_Response
|
|
2 |
err |
zx/Status
|
Device_GetDevHwInfo_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_GetDevHwInfo_Response
|
|
2 |
err |
zx/Status
|
Device_GetInBandIntr_Result strict resource
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_GetInBandIntr_Response
|
|
2 |
err |
zx/Status
|
Device_IntrPending_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_IntrPending_Response
|
|
2 |
err |
zx/Status
|
Device_IoAbort_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_IoAbort_Response
|
|
2 |
err |
zx/Status
|
Device_IoReady_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_IoReady_Response
|
|
2 |
err |
zx/Status
|
Device_PerformTuning_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_PerformTuning_Response
|
|
2 |
err |
zx/Status
|
Device_ReadByte_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_ReadByte_Response
|
|
2 |
err |
zx/Status
|
Device_RegisterVmo_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_RegisterVmo_Response
|
|
2 |
err |
zx/Status
|
Device_RequestCardReset_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_RequestCardReset_Response
|
|
2 |
err |
zx/Status
|
Device_UnregisterVmo_Result strict resource
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_UnregisterVmo_Response
|
|
2 |
err |
zx/Status
|
Device_UpdateBlockSize_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_UpdateBlockSize_Response
|
|
2 |
err |
zx/Status
|
Device_WriteByte_Result strict
Defined in fuchsia.hardware.sdio/sdio.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_WriteByte_Response
|
|
2 |
err |
zx/Status
|
BITS
SdioDeviceCapabilities strict
Type: uint32
Defined in fuchsia.hardware.sdio/sdio.fidl
| Name | Value | Description |
|---|---|---|
MULTI_BLOCK |
1 | |
SRW |
2 | |
DIRECT_COMMAND |
4 | |
SUSPEND_RESUME |
8 | |
LOW_SPEED |
16 | |
HIGH_SPEED |
32 | |
HIGH_POWER |
64 | |
FOUR_BIT_BUS |
128 | |
HS_SDR12 |
256 | |
HS_SDR25 |
512 | |
UHS_SDR50 |
1024 | |
UHS_SDR104 |
2048 | |
UHS_DDR50 |
4096 | |
TYPE_A |
8192 | |
TYPE_B |
16384 | |
TYPE_C |
32768 | |
TYPE_D |
65536 |
CONSTANTS
| Name | Value | Type | Description |
|---|---|---|---|
| SDIO_MAX_FUNCS |
8
|
uint8 |
SERVICES
DriverService
Defined in fuchsia.hardware.sdio/sdio.fidl
| Name | Type | Transport |
|---|---|---|
| device |
fuchsia.hardware.sdio/DriverDevice
|
Driver |
Service
Defined in fuchsia.hardware.sdio/sdio.fidl
| Name | Type | Transport |
|---|---|---|
| device |
fuchsia.hardware.sdio/Device
|
Channel |