Using the New MIPI I3C HCI Spec

By Tomasz Pielaszkiewicz, Software Architect, Intel Chipset Division

The range of mechanical, motion, biometric and environmental sensors on smartphones and other devices is exploding, as product vendors seek to differentiate on the most innovative, inventive features and capabilities. The design challenges associated with that sensor proliferation, however, can be vexing for developers when every host controller exposes a different set of capabilities and demands its own system software or driver to support a given piece of hardware.

The new MIPI Alliance I3C Host Controller Interface (HCI) specification defines a common hardware-software interface between system-level software and the MIPI I3C bus. The interface defines a set of common capabilities of the host controller and several optional extensions. It is designed to allow the system-level software to uniformly access sensors, peripherals and other devices on I3C bus, enabling developers to seamlessly use hardware from multiple vendors. By rendering master hardware effectively agnostic for multi-vendor implementation, developers are freed to more easily integrate value-added, differentiating features for smartphones, wearables, Internet of Things (IoT), automotive and other use cases.

MIPI I3C HCI

Balancing Mandatory and Optional Features

 MIPI I3C HCI is intended to be robust not only for the most typical use cases and operations that are happening constantly at the boundary of software and hardware,but also those emerging, differentiating features that developers bring about in their products. The specification does so by delivering a common set of capabilities for the building of effective class definitions, while also allowing for vendor-specific extensions and optimizations.

MIPI I3C HCI

The working group that wrote MIPI I3C HCI sought to keep the list of mandatory features small(acceleration for device addressing, device context table, programmable I/O mode for controlling data transfer between the central processing unit and support hardware, etc.). Then, anticipating that host-controller designers may want to create extensions or some improved or expanded boutique features for a product, it wrote MIPI I3C HCI with key efficiencies to quickly and simply provide the interfaces—i.e., they are not mandatory, but, if these features are desired, this is how the interfaces could be provided for software.

One of the extensions allows for identification of hardware, for example. To perform some strategic operations for the hardware of a particular vendor, the developer can identify the vendor and the part number from the specific vendor via MIPI I3C HCI. Support for these extended vendor-specific capabilities enables more sophisticated hardware and/or additional functionality.

The team ensured that the HCI definition supports building protocols over HCI, such as camera control or debug. There are features in HCI that ease protocol-level operation and lessen burden in software, rather than having all features driven by the I3C bus specification. For example, in order to maximize the utility and efficiency of debug to detect, trace and eliminate software mistakes or to gain insight into embedded processor systems for performance measurements, converging on the common interfaces and protocols is essential.

Acceleration for Typical Use Cases

The I3C HCI is built to accelerate operations in typical use cases.

Say, for example, the developer needs the system to write some offset and then read from it. Typically, this would be two transactions on the bus: a first transaction to describe the offset, wait for interrupt, check to see it if it was successful, and then go with the data in the second transaction. MIPI I3C HCI efficiently collapses these two transactions into one shot from the software, offloading the typical operation to the hardware, which minimizes software-hardware interactions and improves power.

Another optimization example in MIPI I3C HCI is auto command, which provides an efficient way to read a large data buffer related to in-band interrupt, thus boosting application performance by allowing synchronous operations with multi-touch input, such as large human interface device (HID) reports,to complete quickly.The auto command allows retrieval of the payload on the in-band interrupt at much faster data rates.

Auto command allows for handling the in-band interrupt that carries data into the software mode. MIPI I3C HCI accelerates the process of getting data from the device that starts the interrupt and automatically putting it on a higher data rate. The latency to get this data is reduced, thereby improving the software/hardware interruptions for the typical use.

This is an especially valuable optimization for devices that provide large reports asynchronously. Maybe the application involves a smartphone moving around or changing position; there is no need to pull the accelerometer constantly.A developer could do it, but it is not efficient because the software and hardware are kept spinning all of the time. Instead, the device could report only the changes from the accelerometer under specific conditions—i.e., when a readout changes by a certain threshold, only then report the in-band interrupt and fetch it with the smallest latency possible.

Sharing Your Good Ideas

MIPI I3C HCI provides an efficient means for platform software to interface to the features provided by the master device on the MIPI I3C bus and ensures power-efficient operation of the host controller, specifically for typical operations. The end result is that developers are freed up time to focus on integrating camera, touch and other components and features to differentiate their products, as opposed to writing the software interfaces themselves.

If developers want to add their own features or improvements on top of this base definition, MIPI I3C HCI allows for those extensions. Developers who have typical use cases or features that would potentially benefit others in the software ecosystem are encouraged to share. The MIPI I3C HCI is publicly available for download.

Also, MIPI I3C HCI Version 1.1 is in development. Additional features for the new release are intended to improve the specification’s robustness and usability, simplify flows and clarify operation.

The MIPI Alliance welcomes contributions and input. For more information, please contact us at software@mipi.org.