[AS5835-54X] Fix I2C bus order (#9146)

Why I did it
To fix I2C bus order to meet with HW SPEC. Let i801 use bus-0 and ismt use bus-1

How I did it
Modprobe i801 and then do ismt. So i801 will use bus-0 and ismt will use bus-1.

How to verify it
Test show cmd and sensors work well

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
This commit is contained in:
jostar-yang 2022-03-05 09:33:50 +08:00 committed by GitHub
parent 55a0722a33
commit 85976cbca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,5 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="intel_iommu=off modprobe.blacklist=i2c-ismt,i2c_ismt,i2c-i801,i2c_i801"

View File

@ -128,6 +128,8 @@ def driver_check():
kos = [
'modprobe i2c_dev',
'modprobe i2c_i801',
'modprobe i2c_ismt',
'modprobe i2c_mux_pca954x force_deselect_on_exit=1',
'modprobe accton_as5835_54x_cpld' ,
'modprobe ym2651y' ,
@ -283,6 +285,14 @@ def device_install():
if FORCE == 0:
return status
# set all pca954x idle_disconnect
cmd = 'echo -2 | tee /sys/bus/i2c/drivers/pca954x/*-00*/idle_state'
status, output = log_os_system(cmd, 1)
if status:
print(output)
if FORCE == 0:
return status
for i in range(49, 55): #Set qsfp port to normal state
log_os_system("echo 0 > /sys/bus/i2c/devices/3-0062/module_reset_" + str(i), 1)