Unable to passthrough PCIe device (I2C controller)

glcos

New Member
Jan 25, 2025
2
0
1
The pve host is an Odroid H4+ computer with Intel N97 Alder Lake CPU running lastest Proxmox VE 8.3

I'm trying to passthrough the I2C PCIe controller so that I can see my I2C devices from inside a VM.
From the pve host OS the I2C bus is handled correctly and I can see a test I2C device

Capture1.PNG

The I2C test device is properly detected with address 3c

Capture2.PNG

The corresponding PCI controllers are these below

00:15.0 Serial bus controller: Intel Corporation Device 54e8
00:15.1 Serial bus controller: Intel Corporation Device 54e9

Capture4.PNG

I edited the kernel command line like this:

Capture5.PNG

loaded relevant kernel modules:

Capture6.PNG

IOMMU and DMAR look correct

iommu.PNG

dmar.PNG

Enabled PCI passthrough from web gui

pci.PNG

In the guest OS (Ubuntu Server 24.04.1 LTS) I can see the I2C controller being detected

i2c-guest.PNG

but when I try to list the I2C devices present on the bus I get several timeout errors and the devices are not detected

csr@guest02:~$ sudo i2cdetect -y -r 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout while trying to abort cur>
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout in disabling adapter
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready
Jan 25 15:01:42 guest02 kernel: i2c_designware i2c_designware.0: timeout waiting for bus ready

Any help is really appreciated
 

Attachments

  • pci.PNG
    pci.PNG
    34.7 KB · Views: 0
Interresting idea. I wasn't aware of any PCIe-based I2C controllers and sadly have no answer for you. I could imagine that USB-based adapters will work, but haven't tried. Would a container also work for you? I2C should be easier to bind-mount than to passthrough.

EDIT: I have an H3+ and also those controllers. Maybe I should try to passthrough them too.
 
Last edited:
  • Like
Reactions: glcos
I could imagine that USB-based adapters will work
Tested with MCP2221 USB-I2C/UART Combo and it does work well, but since the H4+ has an hardware I2C GPIO it is much better to use that instead.

Would a container also work for you? I2C should be easier to bind-mount than to passthrough.
Not tested with a container, would really like to make it working with a VM

I have an H3+ and also those controllers. Maybe I should try to passthrough them too
That would be great