Determine I2C bus index numbers on INTEL part of ODYSSEY-X86J41X5, not Arduino part

I am trying get some understanding of how to work with I2C devices attached to one of the two I2C busses that are exposed on the 40 pin GPIO connector. I am learning a little, but have a lot of questions.

First, I want to make it is understood that I am talking about I2C on the Intel processor NOT the Arduino processor!

My first question : does anyone have a good way of either determining or fixing the I2C bus ordinals, so they doNOT change on reboot?

I am seeing the bus numbers change on reboot for the two I2C busses on the GPIO connector.

the available I2C’s busses that are exposed on the GPIO appear to be the ones managed by the ‘Synopsys DesignWare I2C adapter’

The bus numbers of these are between 0 and 7. This bus number is used by most of the I2C interface routines. Of these tools I have found for python and c, while you can change the bus number in these routines, none of them seem to expect the bus number to changing on boot.

i2c-3	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-1	smbus     	SMBus I801 adapter at f040      	SMBus adapter
i2c-6	i2c       	i915 gmbus misc                 	I2C adapter
i2c-4	i2c       	i915 gmbus dpb                  	I2C adapter
i2c-2	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-0	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-7	i2c       	AUX C/port C                    	I2C adapter
i2c-5	i2c       	i915 gmbus dpc                  	I2C adapter

Thanks for your help!

Ok, we will follow this issues.

Sorry for my late reply.
When I tried to remove the driver of “SMBus I801 adapter at f040”(i2c-i801.ko).
The i2c list seems to not change anymore.
you can have a try.

Hello @xiongjian thank you for the reply and information.

I removed the SMBus driver that you suggested and after several reboots and power cycles, the I2C busses no longer seem to be moving.

However, I am a bit concerned about removing the SMBus I801 driver as I do not want to interrupt any important system functions, such as temperature monitoring, fan control…

Can you confirm that the removal of this driver in Linux will not cause issues with the system?

Steps I used under Ubuntu 20.04:

lsmod | grep "801"
modprobe -r i2c_i801
# created  /etc/modprobe.d/i2c_i801.conf
# with contents :
blacklist i2c-i801
install i2c-i801 /bin/false

blacklist i2c_i801
install i2c_i801 /bin/false

# rebuild kernel
update-initramfs -u
reboot
lsmod | grep "801"
# no longer finds any instances 

root@ODYSSEY-X86J4125:/home/user# i2cdetect -l
i2c-3	i2c       	i915 gmbus dpb                  	I2C adapter
i2c-1	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-6	i2c       	AUX C/port C                    	I2C adapter
i2c-4	i2c       	i915 gmbus dpc                  	I2C adapter
i2c-2	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-0	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-5	i2c       	i915 gmbus misc                 	I2C adapter
root@ODYSSEY-X86J4125:/home/user# i2cdetect -r -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 71 -- -- -- -- -- --

Thanks again!

Actually,I don’t know if the removing of i2c-i801.ko will cause the issues with the system in the future.
So,I tried to rebuild the kernel without the i2c-i801.ko.And then I insmod it and it’s relative driver(i2c-smbus.ko) after the system started up.