PROTOCOLS
Debug
Defined in fuchsia.hardware.spmi/spmi.fidl
ConnectTarget
Connects to the target device with the given ID. Equivalent to connecting to TargetService
via the corresponding driver node.
Returns INVALID_ARGS
if target_id
is greater than or equal to MAX_TARGETS
.
May return an error if there is no such target on the bus; otherwise errors will be returned
when attempting to access the client.
Request
Name | Type |
---|---|
target_id |
uint8
|
server |
server_end:Device
|
Response
Name | Type |
---|---|
payload |
Debug_ConnectTarget_Result
|
GetControllerProperties
Returns the properties of the host SPMI controller.
Request
<EMPTY>
Response
Name | Type |
---|---|
payload |
DebugGetControllerPropertiesResponse
|
Device
Defined in fuchsia.hardware.spmi/spmi.fidl
Each instance of Device
represents a target/secondary SPMI device on a SPMI bus.
To support multiple SPMI devices, multiple nodes must be instantiated.
CancelWatchControllerWriteCommands
Cancels an pending call to WatchControllerWriteCommands
. address
and size
must
exactly match a previous call to WatchControllerWriteCommands()
, otherwise NOT_FOUND
is returned.
Request
Name | Type |
---|---|
address |
uint8
|
size |
uint16
|
Response
Name | Type |
---|---|
payload |
Device_CancelWatchControllerWriteCommands_Result
|
ExtendedRegisterReadLong
Issue one Extended Register Read Long SPMI command to the SPMI device.
Used to read from a 16 bit SPMI register space. Up to 8 bytes can be read at a time.
When successful, it returns size_bytes
in data
read from address
in the device.
Request
Name | Type |
---|---|
address |
uint16
|
size_bytes |
uint32
|
Response
Name | Type |
---|---|
payload |
Device_ExtendedRegisterReadLong_Result
|
ExtendedRegisterWriteLong
Issue one Extended Register Write Long SPMI command to the SPMI device.
Used to write to a 16 bit SPMI register space. Up to 8 bytes can be written at a time.
When this command is successful, data
will be written to address
in the device.
Request
Name | Type |
---|---|
address |
uint16
|
data |
vector<uint8>:8
|
Response
Name | Type |
---|---|
payload |
Device_ExtendedRegisterWriteLong_Result
|
GetProperties
Get the properties of the SPMI device.
Request
<EMPTY>
Response
Name | Type |
---|---|
payload |
Device_GetProperties_Result
|
WatchControllerWriteCommands
Hanging-get method to receive controller write commands from the device. address
and
size
specify the register range to monitor for commands. Multiple overlapping calls to
this method are not allowed.
Returns INVALID_ARGS
if address
or size
are invalid, or BAD_STATE
if another call
is pending for this register range. Returns CANCELED
if
CancelWatchControllerWriteCommands()
was called for this register range.
Request
Name | Type |
---|---|
address |
uint8
|
size |
uint16
|
Response
Name | Type |
---|---|
payload |
Device_WatchControllerWriteCommands_Result
|
STRUCTS
Debug_ConnectTarget_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
<EMPTY>
Device_CancelWatchControllerWriteCommands_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
<EMPTY>
Device_ExtendedRegisterReadLong_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
Field | Type | Description | Default |
---|---|---|---|
data |
vector<uint8>:8
|
No default |
Device_ExtendedRegisterWriteLong_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
<EMPTY>
Device_WatchControllerWriteCommands_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
Field | Type | Description | Default |
---|---|---|---|
writes |
vector<Register8>:256
|
No default |
Register8
Defined in fuchsia.hardware.spmi/spmi.fidl
A single register read from or written to with an SPMI command that uses an 8-bit address.
Field | Type | Description | Default |
---|---|---|---|
address |
uint8
|
No default | |
data |
uint8
|
No default |
ENUMS
DriverError flexible
Type: uint32
Defined in fuchsia.hardware.spmi/spmi.fidl
Errors that this driver may return.
Name | Value | Description |
---|---|---|
INTERNAL |
1 |
The driver encountered an otherwise unspecified error while performing the operation. |
NOT_SUPPORTED |
2 |
The operation is not implemented, supported, or enabled. |
INVALID_ARGS |
3 |
An argument is invalid. |
BAD_STATE |
4 |
The operation failed because the current state of the driver does not allow it, or a precondition of the operation is not satisfied. |
IO_REFUSED |
5 |
The device returned a NACK (negative Acknowledgment). The client may retry the operation after a NACK was sent for instance due to a parity error. |
CANCELED |
6 |
The hanging-get method was canceled. |
NOT_FOUND |
7 |
No pending hanging-get method was found for the given arguments. |
TABLES
ControllerInfo
Defined in fuchsia.hardware.spmi/metadata.fidl
'SPMI'
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
id |
uint32
|
Board-specific controller ID. Optional. |
2 |
targets |
vector<TargetInfo>:16
|
SPMI target devices on this bus. Optional. |
DebugGetControllerPropertiesResponse
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
name |
string:64
|
User friendly string for the controller name. If not set, the controller name is unknown. If included, this string must be non-empty. Optional. |
Device_GetProperties_Response
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
sid |
uint8
|
Unique SPMI target/secondary identifier, corresponds to the SPMI specification sid. Up to 16 secondaries are identifed with an id from 0 to 15 inclusive. Required. |
2 |
name |
string:64
|
User friendly string for the device name. If not set, the device name is unknown. If included, this string must be non-empty. Optional. |
SubTargetInfo
Defined in fuchsia.hardware.spmi/metadata.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
address |
uint16
|
The SPMI base register address. Accesses to this sub-target will be restricted to the range
[0, |
2 |
size |
uint32
|
The size of the SPMI register region accessible to this sub-target. The sum of |
3 |
name |
string:64
|
The name of this sub-target. Optional. |
TargetInfo
Defined in fuchsia.hardware.spmi/metadata.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
id |
uint8
|
SPMI target ID in [0, |
2 |
sub_targets |
vector<SubTargetInfo>:65536
|
Sub-target register regions within this target. Optional. |
3 |
name |
string:64
|
The name of this target. Optional. |
UNIONS
Debug_ConnectTarget_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Debug_ConnectTarget_Response
|
|
2 |
err |
DriverError
|
Device_CancelWatchControllerWriteCommands_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_CancelWatchControllerWriteCommands_Response
|
|
2 |
err |
DriverError
|
|
3 |
framework_err |
internal
|
Device_ExtendedRegisterReadLong_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_ExtendedRegisterReadLong_Response
|
|
2 |
err |
DriverError
|
|
3 |
framework_err |
internal
|
Device_ExtendedRegisterWriteLong_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_ExtendedRegisterWriteLong_Response
|
|
2 |
err |
DriverError
|
|
3 |
framework_err |
internal
|
Device_GetProperties_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_GetProperties_Response
|
|
3 |
framework_err |
internal
|
Device_WatchControllerWriteCommands_Result strict
Defined in fuchsia.hardware.spmi/spmi.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Device_WatchControllerWriteCommands_Response
|
|
2 |
err |
DriverError
|
|
3 |
framework_err |
internal
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
CONTROLLER_INFO_METADATA_TYPE |
1229803603
|
uint32 |
|
MAX_CONTROLLER_WRITE_COMMANDS |
256
|
uint32 |
An arbitrary limit on the number of register writes that can be returned to
|
MAX_EXTENDED_LONG_TRANSFER_SIZE |
8
|
uint32 |
The maximum number of bytes that can be read or written in a single Extended Long SPMI command. |
MAX_SPMI_NAME_LEN |
64
|
uint32 |
Maximum length of the SPMI device name. |
MAX_SUB_TARGETS |
65536
|
uint32 |
|
MAX_TARGETS |
16
|
uint32 |
SERVICES
DebugService
Defined in fuchsia.hardware.spmi/spmi.fidl
Name | Type | Transport |
---|---|---|
device |
fuchsia.hardware.spmi/Debug
|
Channel |
SubTargetService
Defined in fuchsia.hardware.spmi/spmi.fidl
Name | Type | Transport |
---|---|---|
device |
fuchsia.hardware.spmi/Device
|
Channel |
TargetService
Defined in fuchsia.hardware.spmi/spmi.fidl
Name | Type | Transport |
---|---|---|
device |
fuchsia.hardware.spmi/Device
|
Channel |