geerlingguy / raspberry-pi-pcie-devices

Raspberry Pi PCI Express device compatibility database
http://pipci.jeffgeerling.com
GNU General Public License v3.0
1.63k stars 145 forks source link

Read over I2C to a PCIe device #624

Closed JohnGoogl closed 7 months ago

JohnGoogl commented 7 months ago

Hi Team, I'm relatively new to Raspberry Pi and embedded systems, so please forgive me if this question seems basic.

I'm working with a scenario where I want to read data over the I2C protocol to a device connected via PCIe. However, I'm unsure if this is a directly achievable approach.

Is it possible to communicate with a PCIe device using I2C on the Raspberry Pi? If not, are there any alternative approaches I should consider? Any insights or resources you can share on this topic would be incredibly helpful!

Thanks in advance for your support!

Best Regards, Paul Johns

JohnGoogl commented 7 months ago

Would appreciate any thoughts on this please!!

6by9 commented 7 months ago

Your query makes little sense.

If you have a PCIe device, then the interface to it is PCIe, not I2C.

If the PCIe device exposes an I2C controller, then that would be mapped in the same way as any other I2C controller would. This is exactly what you have with Pi5 having all the I2C controllers and GPIOs connected to RP1 over PCIe.

If your situation is neither of those, then you'll have to give some more details.

JohnGoogl commented 7 months ago

Hi, @6by9 Thank you for the inputs.

Yes, NVMe interface setup to PCIe using 'hat+' and 'nvme list' working Ok, let me know if any further details required.

If possible, please share respective docs/blogs if any available.

geerlingguy commented 7 months ago

@JohnGoogl - I think what @6by9 means is what are you trying to do?

I know there's the NVMe-MI spec, are you trying to manage NVMe devices over PCIe? What for? Something else? It is impossible to help without any clear idea of what you're trying to accomplish.

Typically if you want to interact with devices using I2C, it'd be helpful to know what device, and for what purpose. And PCIe doesn't directly expose I2C, which is why I think we are a bit confused about this.

I'm going to move this to 'discussion'.