PCIe to I2C bridge windows driver

2021-03-22T10:51:26.813+00:00

Hi All,

We have a product here which is a PCIe to I2C/SPI bridge. We are required to write a Windows Driver to control the I2C controller present inside the PCIe chip.

The hardware connection looks like this:


| |
| HostPC | ------- > PCIe to I2C bridge Device connected to PCIe slot---> I2C slave device
|_____________|

I went through the Simple Peripheral Bus (SPB) framework for this I2C controller. But the documentation is mainly concentrated on the I2C controller that are part of the SOC platform. For example, the documentation says that the information about the SPB controller or SPB peripheral device should be present as a part of the ACPI table.

Also it says that the application cannot directly send data to and from the SPB controller driver. We need to have a SPB peripheral driver also that bridges the application and the SPB controller.

My use case is like this:

  1. Provide the I2C controller driver for the PCIe to I2C bridge. I will provide specific IOCTLs to send Write or Read commands from the applciation. Let the customer connect whatever I2C device they want to be connected to the I2C controller. Let them drive that peripheral from the application without the need for a peripheral driver in between.
  2. I like my device to be acting as a USB to I2C bridge. Something like this:
    https://www.totalphase.com/products/aardvark-i2cspi/

Is there a Windows device driver framework to support my use case?

Thanks,
Ganesh.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,561 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,541 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sean Liming 4,506 Reputation points
    2021-03-23T16:28:45.19+00:00

    The I2C SpbCx.sys driver is part of an architecture to expose the I/O along with SPI and UART to Windows Runtime APIs through a mechanism called RHPROXY. The ACPI tables in the BIOS have to be modified to support the I/O in question.

    If the end goal is to support the already developed Windows Runtime I2C API than you might look to create an ASL that loads with the driver so it exposes the device properly: https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/enable-usermode-access.

    Other wise, you will have to create a custom driver and API. You might want to reach out to the folks at OSR for assistance: https://www.osr.com/

    0 comments No comments