Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.sdio

PROTOCOLS

Device

Defined in fuchsia.hardware.sdio/sdio.fidl

DisableFn

Request

NameType

Response

NameType
result Device_DisableFn_Result

DisableFnIntr

Request

NameType

Response

NameType
result Device_DisableFnIntr_Result

DoRwByte

Request

NameType
write bool
addr uint32
write_byte uint8

Response

NameType
result Device_DoRwByte_Result

DoRwTxn

Request

NameType
txn SdioRwTxn

Response

NameType
result Device_DoRwTxn_Result

DoVendorControlRwByte

Reads or writes to a vendor CCCR register. addr must be in [0xF0, 0xFF].

Request

NameType
write bool
addr uint8
write_byte uint8

Response

NameType
result Device_DoVendorControlRwByte_Result

EnableFn

Request

NameType

Response

NameType
result Device_EnableFn_Result

EnableFnIntr

Request

NameType

Response

NameType
result Device_EnableFnIntr_Result

GetBlockSize

Request

NameType

Response

NameType
result Device_GetBlockSize_Result

GetDevHwInfo

Request

NameType

Response

NameType
result Device_GetDevHwInfo_Result

GetInBandIntr

Request

NameType

Response

NameType
result Device_GetInBandIntr_Result

IntrPending

Returns true if an interrupt is pending for function fn_idx, false otherwise.

Request

NameType

Response

NameType
result 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

NameType

Response

NameType
result Device_IoAbort_Result

UpdateBlockSize

Request

NameType
blk_sz uint16
deflt bool

Response

NameType
result Device_UpdateBlockSize_Result

Sdio

Defined in fuchsia.hardware.sdio/sdio.fidl

DisableFn

Request

NameType

Response

NameType
s zx/status

DisableFnIntr

Request

NameType

Response

NameType
s zx/status

DoRwByte

Request

NameType
write bool
addr uint32
write_byte uint8

Response

NameType
s zx/status
read_byte uint8

DoRwTxn

Request

NameType
txn SdioRwTxn

Response

NameType
s zx/status

DoRwTxnNew

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 DoRwTxnNew 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

NameType
txn SdioRwTxnNew

Response

NameType
status zx/status

DoVendorControlRwByte

Reads or writes to a vendor CCCR register. addr must be in [0xF0, 0xFF].

Request

NameType
write bool
addr uint8
write_byte uint8

Response

NameType
s zx/status
read_byte uint8

EnableFn

Request

NameType

Response

NameType
s zx/status

EnableFnIntr

Request

NameType

Response

NameType
s zx/status

GetBlockSize

Request

NameType

Response

NameType
s zx/status
cur_blk_size uint16

GetDevHwInfo

Request

NameType

Response

NameType
s zx/status
hw_info SdioHwInfo

GetInBandIntr

Request

NameType

Response

NameType
s zx/status
irq handle<interrupt>

IntrPending

Returns true if an interrupt is pending for function fn_idx, false otherwise.

Request

NameType

Response

NameType
s zx/status
pending bool

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

NameType

Response

NameType
s zx/status

RegisterVmo

Request

NameType
vmo_id uint32
vmo handle<vmo>
offset uint64
size uint64
vmo_rights uint32

Response

NameType
status zx/status

RunDiagnostics

Runs tests and logs the results in order to diagnose issues with the bus. Clients should call this before shutting down due to unrecoverable errors. This method may block for some time to send commands to the card, so it should be the last call made by the client. Note: SDIO devices may have different drivers bound to different functions. Clients must not call RunDiagnostics in these cases, since doing so could interfere with other clients. TODO(fxbug.dev/64166): Remove this when the SDIO issues have been investigated.

Request

NameType

UnregisterVmo

Request

NameType
vmo_id uint32

Response

NameType
status zx/status
vmo handle<vmo>

UpdateBlockSize

Request

NameType
blk_sz uint16
deflt bool

Response

NameType
s zx/status

STRUCTS

Device_DisableFnIntr_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault

Device_DisableFn_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault

Device_DoRwByte_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
read_byte uint8 No default

Device_DoRwTxn_Response resource

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
txn SdioRwTxn No default

Device_DoVendorControlRwByte_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
read_byte uint8 No default

Device_EnableFnIntr_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault

Device_EnableFn_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault

Device_GetBlockSize_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
cur_blk_size uint16 No default

Device_GetDevHwInfo_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
hw_info SdioHwInfo No default

Device_GetInBandIntr_Response resource

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
irq handle<interrupt> No default

Device_IntrPending_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
pending bool No default

Device_IoAbort_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault

Device_UpdateBlockSize_Response

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault

SdioDeviceHwInfo

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
num_funcs uint32

number of sdio funcs including func 0

No default
sdio_vsn uint32 No default
cccr_vsn uint32 No default
caps uint32 No default

SdioDeviceHwInfo

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
num_funcs uint32

number of sdio funcs including func 0

No default
sdio_vsn uint32 No default
cccr_vsn uint32 No default
caps uint32 No default

SdioFuncHwInfo

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
manufacturer_id uint32 No default
product_id uint32 No default
max_blk_size uint32 No default
max_tran_speed uint32 No default
fn_intf_code uint8 No default

SdioFuncHwInfo

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
manufacturer_id uint32 No default
product_id uint32 No default
max_blk_size uint32 No default
max_tran_speed uint32 No default
fn_intf_code uint8 No default

SdioHwInfo

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
dev_hw_info SdioDeviceHwInfo No default
funcs_hw_info [8] No default
host_max_transfer_size uint32 No default

SdioHwInfo

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
dev_hw_info SdioDeviceHwInfo No default
funcs_hw_info [8] No default
host_max_transfer_size uint32 No default

SdioRwTxn resource

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
addr uint32 No default
data_size uint32 No default
incr bool No default
write bool No default
use_dma bool No default
dma_vmo handle<vmo>

Used if use_dma is true

No default
virt vector<uint8>

Used if use_dma is false

No default
buf_offset uint64

offset into dma_vmo or virt

No default

SdioRwTxn resource

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
addr uint32 No default
data_size uint32 No default
incr bool No default
write bool No default
use_dma bool No default
dma_vmo handle<vmo>?

Used if use_dma is true

No default
virt vector<uint8>[2097152]?

Used if use_dma is false

No default
buf_offset uint64

offset into dma_vmo or virt

No default

SdioRwTxnNew resource

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescriptionDefault
addr uint32 No default
incr bool No default
write bool No default
buffers vector<fuchsia.hardware.sdmmc/SdmmcBufferRegion> No default

ENUMS

SdioCard strict

Type: uint32

Defined in fuchsia.hardware.sdio/sdio.fidl

NameValueDescription
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

SdioDeviceCapabilities strict

Type: uint32

Defined in fuchsia.hardware.sdio/sdio.fidl

NameValueDescription
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

UNIONS

Device_DisableFnIntr_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_DisableFnIntr_Response
err zx/status

Device_DisableFn_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_DisableFn_Response
err zx/status

Device_DoRwByte_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_DoRwByte_Response
err zx/status

Device_DoRwTxn_Result strict resource

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_DoRwTxn_Response
err zx/status

Device_DoVendorControlRwByte_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_DoVendorControlRwByte_Response
err zx/status

Device_EnableFnIntr_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_EnableFnIntr_Response
err zx/status

Device_EnableFn_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_EnableFn_Response
err zx/status

Device_GetBlockSize_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_GetBlockSize_Response
err zx/status

Device_GetDevHwInfo_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_GetDevHwInfo_Response
err zx/status

Device_GetInBandIntr_Result strict resource

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_GetInBandIntr_Response
err zx/status

Device_IntrPending_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_IntrPending_Response
err zx/status

Device_IoAbort_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_IoAbort_Response
err zx/status

Device_UpdateBlockSize_Result strict

Defined in fuchsia.hardware.sdio/sdio.fidl

NameTypeDescription
response Device_UpdateBlockSize_Response
err zx/status

CONSTANTS

NameValueTypeDescription
MAX_TRANSFER_SIZE 2097152 uint32

SDIO max block size is 2048, so this is an arbitrary limit of 1024 blocks.

SDIO_FN_1 1 uint8
SDIO_FN_2 2 uint8
SDIO_MAX_FUNCS 8 uint8

Including func 0