Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This guidance applies to Windows 11, version 25H2 and later.
i3chost.sys acts as a bus driver and creates PDOs for detected / declared I3C Targets on the bus. This is unlike the I2C SPB model, where ACPI acts as the enumerator for I2C Targets.
Microsoft provides two inbox drivers for Targets: WinI3C (wini3ctarget.sys) and HIDI3C (hidi3c.dll). I3C solutions must use these drivers rather than third-party Target drivers.
Target enumeration
As described in Bus initialization, i3chost.sys enumerates all Targets upon bus initialization. For Targets supporting dynamic addressing, this is achieved via an ENTDAA CCC.
For Targets requiring SETDASA, the following flow is used as part of enumeration as i3chost.sys retrieves additional device properties used to enumerate the Target:
- Target is issued a SETDASA CCC to assign a dynamic address.
- Target is issued a direct GETPID CCC to retrieve the provisioned ID.
- Target is issued a direct GETBCR CCC to retrieve the BCR.
- Target is issued a direct GETDCR CCC to retrieve the DCR.
- Target PDO is created.
Once the Target PDO has been created, the following sequence occurs upon initial device start:
- Target is probed (see Target probe)
- If a speed limitation is indicated in the Target BCR, a direct GETMXDS CCC is issued to the Target (see Target speed limitations).
- Target is issued a direct GETCAPS CCC.
Target probe
When the Target transitions from a low power state to D0 (or upon initial D0 entry / start), i3chost.sys undertakes a probe sequence to determine if the Target is still present on the bus and has its previously assigned dynamic address. The probe has the following sequence:
- A direct GETSTATUS CCC is issued to the Target's last known dynamic address.
- If this is successful, the probe is completed.
- If NACK, goto (2).
- If the Target has an I2C static address, a transfer is sent to the I3C broadcast address (to put Target into I3C mode)
- The Target is given a short delay (approximately 100 ms) to hot-join the bus.
- If the Target hot-joins (see Target rejoin), the probe is completed.
- If the Target does not hot-join, goto (4).
- Another direct GETSTATUS CCC is issued to the Target's last known dynamic address.
- If successful, the probe is completed.
- If NACK, goto (5).
- An ENTDAA CCC is sent.
- If the Target rejoins as part of this, the probe is completed.
- If the Target does not rejoin, goto (6).
- If the Target does not have a static address, the probe is failed.
- If the Target has a static address, a SETDASA CCC is sent to the Target.
- If this fails the probe is failed.
- If this is successful, goto (8).
- A direct GETSTATUS CCC is sent to the Target's newly assigned dynamic address.
- If successful, the probe is completed.
- If not successful, the probe is failed.
Target rejoin
A Target may lose its state, for example during a low-power state, and attempt to rejoin the bus through a hot-join, participation in an ENTDAA sequence, or both. i3chost.sys detects this and readdresses the Target.
A rejoin is detected when a Target (identified via Provisioned ID) that previously had an assigned dynamic address is assigned a new dynamic address as part of ENTDAA processing. When this occurs:
- All outstanding IO is stopped. In-flight IO directed to the old dynamic address may be completed with a status indicating a NACK occurred.
- Target drivers (e.g.
wini3ctarget.sys) are notified that the Target has rejoined. - IBI processing is stopped.
- IO to the Target is restarted.
Target reset
i3chost.sys provides a facility to reset an I3C Target (and exposed via WinI3C). When software requests a Target reset, it may provide a Vendor CCC to be used to actuate the reset. If this is not provided, and ACPI reset is supported, i3chost.sys will initiate an ACPI reset of the Target.
When reset is requested:
- In-flight IO will be stopped.
- Vendor CCC will be sent or ACPI reset will be called as appropriate.
- Target will be probed (see Target probe)
- If Target responds to its previous dynamic address, the reset will be failed as the Target did not lose state.
- A direct GETSTATUS CCC is sent to validate the Target's new dynamic address.
- IO to Target is restarted.
Note
Software shall not be notified of a rejoin if it occurs in the context of a requested Target Reset.
Provisioned ID requirements
The Provisioned ID (PID) is a 48-bit value defined by the MIPI I3C specification (section 5.1.4.1.1) that a Target shall present during dynamic address assignment (ENTDAA). Windows uses the Provisioned ID as the durable Target identity and correlates to a physically-present Target with its ACPI-described static data.
Requirements and guidance:
- A Target that participates in dynamic address assignment via ENTDAA shall present a non-zero Provisioned ID.
- For vendor-fixed Provisioned IDs, each Target of the same part on a bus shall have a unique VendorInstanceId so that otherwise-identical Targets can be told apart.
- Targets of the same kind shall share the same VendorPartId.
- Firmware describes a Target's Provisioned ID in the Target's _ADR object so Windows can match the ACPI-described Target to the physically-enumerated Target. See ACPI requirements.
Windows decodes and publishes the Provisioned ID and its constituent fields on the Target device-node.
Target speed limitations
Targets may specify speed limitations through a combination of indicating BCR.Max Data Speed Limitation = 1, and responding to a Direct GETMXDS CCC from i3chost.sys.
It is required that all Targets support SDR CCC communication at full bus speed (up to 12.5 MHz).
Where Targets indicate speed limitations via GETMXDS, slower SDR speeds will be used for non-CCC SDR transfers to the Target, with separate speed limitations respected for transfers to and from the Target.
Target power management
Target power states operate mostly independently of the main HostController-Device power state - a Target may be in Dx while HostController-Device is in D0 and vice-versa.
For a typical WinI3C Target, i3chost.sys will report support for a D3 state and device wake from D3. It is expected that Target will remain in D0 while IBIs are configured enabled. (Note: HIDI3C Targets behave differently; see HIDI3C).
System integrators shall configure Target ACPI such that power may be removed from the Target when it is placed into a low power state.
Target device identifiers
When the inbox I3C HostController-Device driver (i3chost.sys) enumerates a Target, it creates a PnP device-node. It assigns the device-node a set of HardwareIds and CompatibleIds derived from Target characteristics, including:-
- Provisioned ID
- Device Characteristics Register (DCR)
- Id of the HostController-Instance attached to this Target's bus.
Note
I3C Targets shall use inbox HIDI3C (hidi3c.dll) or WinI3C (wini3ctarget.sys) drivers. HardwareId/CompatibleId identifiers allows for extension INFs to decorate device descriptions or configuration of supported settings via the registry. Third-party Target drivers are not permitted or supported on the I3C stack.
Bus address and ACPI correlation
During enumeration, i3chost.sys assigns each Target a PnP bus address that matches the _ADR value defined for the device in ACPI. The MIPI I3C DisCo specification defines the structure of _ADR as a combination of the HostController-Instance index and either the Target's Provisioned ID or its static address. Matching the bus address to _ADR establishes the correct PnP relationship between the created PDO and its ACPI description.
| Component | Description |
|---|---|
| BusKind | Enumerating Transport of the HostController-Device of the HostController-Instance attached to this Target's bus. |
| HCDVEN | Transport-specific VendorId of the HostController-Device of the HostController-Instance attached to this Target's bus. |
| HCDDEV | Transport-specific DeviceId of the HostController-Device of the HostController-Instance attached to this Target's bus. |
| HCI | Id of the HostController-Instance attached to this Target's bus. |
| MID | Target's MIPI Manufacturer Id |
| PROVLO | Low 32bits of Target's Provisioned ID |
| VAD | Vendor Additional bits from Target's Provisioned ID |
| PID | Vendor Part Id from Target's Provisioned ID |
| DCR | Target's MIPI I3C Device Characteristics Register (DCR) |
| SA | Target's static-address from ACPI |
HardwareIds
HardwareIds uniquely identify a Target so that a vendor-provided Target extension INF can be matched for the purpose of configuration of registry settings or device description decoration. A Target's 48-bit Provisioned ID follows one of two forms, both of which contain a MIPI-allocated Manufacturer ID (MID) and a type selector:
- Vendor-fixed value - composed of a Part ID (PID), a 4-bit Instance ID identifying an individual device of that part on the bus, and a 12-bit Additional field (VAD).
- Random value - a random number carried in the low 32 bits of the Provisioned ID.
The driver emits HardwareIds from most specific to least specific, optionally qualified by the HostController-Device and HostController-Instance identity.
Representative HardwareIds:
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>&HCI_<nn>\&MID_<mid>&PROVLO_<low32>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>\&MID_<mid>&PROVLO_<low32>
I3C\MID_<mid>&PROVLO_<low32>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>&HCI_<nn>\&MID_<mid>&PID_<pid>&VAD_<vad>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>\&MID_<mid>&PID_<pid>&VAD_<vad>
I3C\MID_<mid>&PID_<pid>&VAD_<vad>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>&HCI_<nn>\&MID_<mid>&PID_<pid>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>\&MID_<mid>&PID_<pid>
I3C\MID_<mid>&PID_<pid>
CompatibleIds
CompatibleIds allows load of a class driver (e.g. hidi3c.dll). Every I3C Target implements a one-byte DCR whose value maps to a device class defined by MIPI, or to a vendor-defined value. i3chost.sys emits CompatibleIds based on the DCR, with optional qualification by the HostController-Device/HostController-Instance identity, from most specific to least specific. For Targets that use an I2C static address, a static-address CompatibleId is also emitted.
Representative CompatibleIds:
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>&HCI_<nn>\DCR_<dcr>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>\DCR_<dcr>
I3C\DCR_<dcr>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>&HCI_<nn>&SA_<addr>
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>&HCI_<nn>\Target
I3C\<BusKind>:HCDVEN_<vid>&HCDDEV_<did>\Target
I3C\Target
Vendor drivers / extension INFs shall not match on the "I3C\DCR_<dcr>" or "I3C\Target" CompatibleIds.
Target devnode properties
The HostController-Device creates a child device-node for every discovered Target.
i3chost.sys publishes queryable properties on each Target's device-node, including:
| Property | Type | Description |
|---|---|---|
DEVPKEY_I3C_Target_ProvisionedId |
UINT64 |
The Target's raw 48-bit Provisioned ID. |
DEVPKEY_I3C_Target_VendorPartId |
UINT32 |
The VendorPartId of a Vendor-type Provisioned ID. Vendor-unique ID for a distinct 'kind' of Target (e.g. a specific sensor model). Only present if the Provisioned ID type is 'Vendor' |
DEVPKEY_I3C_Target_VendorInstanceId |
UINT32 |
The VendorInstanceId of a Vendor-type Provisioned ID. Vendor-unique ID to differentiate individual Targets on the same bus that share the same 'kind'/PartId Only present if the Provisioned ID type is 'Vendor' |
DEVPKEY_I3C_Target_VendorAdditional |
UINT32 |
The VendorAdditional of a Vendor-type Provisioned ID. This has Vendor-specific meaning. Only present if the Provisioned ID type is 'Vendor' |
DEVPKEY_I3C_Target_RandomValue |
UINT32 |
The RandomValue of a Random-type Provisioned ID. This has no specific meaning, and only serves as a unique identifier (for Target differentiation) on the bus. Only present if the Provisioned ID type is 'Random' |
DEVPKEY_I3C_Target_ManufacturerId |
UINT32 |
The Target's MIPI ManufacturerId. |
DEVPKEY_I3C_Target_DCR |
UINT32 |
The Target's Device Characteristics Register |
DEVPKEY_I3C_Target_BCR |
UINT32 |
The Target's Bus Characteristics Register |
DEVPKEY_I3C_Target_HostControllerInstance_Index |
INT32 |
The index of the HostController-Instance the Target is attached to. |
DEVPKEY_I3C_Target_Is_HDR_Supported |
BOOLEAN |
Indicates whether the Target + HostController-Instance combination can service HDR transfers. |
DEVPKEY_I3C_Target_DynamicAddress |
BYTE |
The Target's current DynamicAddress. May change at anytime. |
DEVPKEY_I3C_Target_StaticAddress |
BYTE |
The Target's I2C static address from ACPI Disco static data (if any). |
DEVPKEY_I3C_Target_Is_ACPI_Reset_Supported |
BOOLEAN |
Indicates if an ACPI _RST method is provided for the Target. |
HIDI3C
Microsoft provides an inbox HIDI3C (HID over I3C) driver (hidi3c.dll), to support HID scenarios for I3C Targets.
The Microsoft HID over I3C specification describes how I3C Targets communicate with the inbox HIDI3C driver.
The HID over I3C driver loads for I3C Targets reporting DCR value of 0x28, which results in a full Compatible ID of: I3C\DCR_28.
ACPI and power states
Unlike generic I3C / WinI3C Targets, HIDI3C capable Targets are reported by i3chost.sys as supporting a logical D2 state, and wake from D2. This D2 state is purely logical and requires no implementation in platform ACPI. However, D3 shall be implemented to remove power from the Target when possible to reduce battery consumption.
WinI3C
This section covers hardware integration and the vendor extension INF. For user-mode programming guidance, see Get started with the WinI3C API. WinI3C is a low-level alternative to HIDI3C for client (i.e. application/service) access to vendor-specific Targets. WinI3C is akin to WinUSB (which provides low-level access to USB devices), but for I3C Targets.
No access is provided to I3C HostController-Devices/HostController-Instances.
Architecture
| Component | Description |
|---|---|
wini3ctarget.sys |
Publishes Device-Interfaces; device-interface-class specified by a WinI3C Vendor Extension INF. Power-Policy-Owner (PPO). |
wini3c.dll |
Provides user-mode Win32 API surface for Target enumeration and I/O. |
Target and client requirements
Only vendor-specific Targets (e.g. OEM EC/firmware device) shall use the WinI3C stack. An accompanying WinI3C Vendor Extension INF + vendor-client shall be provided by the vendor to use the Target.
All WinI3C-Targets shall be accessed by the WinI3C Win32 user-mode API (wini3c.dll). Access to WinI3C-Targets via third-party drivers is NOT permitted.
All non-HIDI3C Targets (i.e. DCR != 0x28) are enumerated as WinI3C-Targets by the WinI3C stack. The WinI3C stack does NOT permit third-party filter drivers.
Targets intended for use without a vendor-client (i.e. generally accessible to all clients) shall use HIDI3C and utilize public HID Usages.
WinI3C extension INF
By default, WinI3C-Targets are NOT accessible (i.e. no device-interfaces are published by wini3ctarget.sys). To make a WinI3C-Target accessible, the vendor shall supply a WinI3C Vendor Extension INF, triggering a device-interface to be published of the supplied device-interface-class. This is part of a layered mitigation strategy to prevent clients from 'opening all WinI3C devices', causing unintentional denial-of-service to the vendor-specific client.
For more information about extension INFs, see Using an extension INF file.
For external distribution, this WinI3C Vendor Extension INF shall be published to Windows Update and signed by Microsoft.
Note
A single WinI3C Extension INF may be used for multiple Targets.
Structure
WinI3C specific configuration is done via setting regvalues in the Device's Hardware Key (HKR).
HardwareIds shall be specified (see Target device identifiers), to target specific Vendor WinI3C-Targets. This typically includes the ManufacturerId (MID) and ProductId (PID).
| Regvalue | Type | Notes |
|---|---|---|
| WinI3CDeviceInterfaceClassGUID | REG_SZ | The DeviceInterfaceClass of the DeviceInterface created for the matching device. GUID, written as a string (e.g. "{8a4e6fed-cf0e-42b5-95df-85f45707e5b6}") Required. |
| WinI3CIdleTimeoutSeconds | REG_DWORD | The D0 idle-timeout. Shall be between 1 and 60 (seconds) Optional (default = 5) |
Example
This INF is a template. Replace the entire WinI3CDeviceInterfaceClassGUID value containing REPLACEME with a valid vendor-defined device-interface-class GUID, and use that same GUID in the client. Update the example hardware ID, package information, and architecture placeholders for your device.
[Version]
Signature = "$WINDOWS NT$"
Class = Extension
ClassGuid = {e2f84ce7-8efa-411c-aa69-97454ca4cb57}
Provider = %WinI3CExtensionPackage_ProviderName%
ExtensionId = {B5AFD0C9-FBA8-4087-81B0-995ED7DA72F3}
DriverVer = 01/01/2013,1.0.0.0 ; Ensure wini3ctarget.inf is overridden.
CatalogFile = WinI3CExtensionPackage.cat
PnpLockdown = 1
[Manufacturer]
%WinI3CExtensionPackage_ProviderName% = Standard,NT$ARCH$
[Standard.NT$ARCH$]
%WinI3CExtensionPackage_DeviceDesc%=WinI3CExtensionPackage, I3C\MID_02CB&PID_AB04
[WinI3CExtensionPackage]
; No changes
[WinI3CExtensionPackage.HW]
AddReg = WinI3CExtensionPackage.HW_AddReg
[WinI3CExtensionPackage.HW_AddReg]
HKR,,WinI3CDeviceInterfaceClassGUID, %REG_SZ%, "{8a4e6fed-cf0e-42b5-95df-85f45707e5b6-REPLACEME}"
HKR,,WinI3CIdleTimeoutSeconds, %REG_DWORD%, 10
HKR,,FriendlyName,, %WinI3CExtensionPackage_DeviceDesc%
[Strings]
WinI3CExtensionPackage_ProviderName = "Contoso"
WinI3CExtensionPackage_DeviceDesc = "Sample WinI3C Target Device"
REG_SZ = 0x00000000
REG_DWORD = 0x00010001