[DellEMC] Z9332: Change in i2c mapping (#7797)
#### Why I did it - After [sonic-linux-kernel#177](https://github.com/Azure/sonic-linux-kernel/pull/177) changes, the I2C mux channels of Baseboard and Switchboard CPLDs are moved from i2c-4 and i2c-5 to i2c-36 and i2c-37 respectively. - This caused QSFP driver initialization of i2c-36 to i2c-41 to fail causing the ports from Ethernet208 to Ethernet248 fail. #### How I did it - The fix to this problem is to change the order of QSFP driver initialization to I2C mux channels. - Instead of the order i2c-10 to i2c-41, the order i2c-4 to i2c-35 is being utilized. - Also, need to change the i2c-mux-channel number for Baseboard CPLD and switchboard CPLD in scripts to access them.
This commit is contained in:
parent
44d9489b8d
commit
31a8b1c87a
@ -31,38 +31,38 @@ class SfpUtil(SfpUtilBase):
|
|||||||
BASE_RES_PATH = "/sys/bus/pci/devices/0000:09:00.0/resource0"
|
BASE_RES_PATH = "/sys/bus/pci/devices/0000:09:00.0/resource0"
|
||||||
|
|
||||||
_port_to_i2c_mapping = {
|
_port_to_i2c_mapping = {
|
||||||
1: 10,
|
1: 4,
|
||||||
2: 11,
|
2: 5,
|
||||||
3: 12,
|
3: 6,
|
||||||
4: 13,
|
4: 7,
|
||||||
5: 14,
|
5: 8,
|
||||||
6: 15,
|
6: 9,
|
||||||
7: 16,
|
7: 10,
|
||||||
8: 17,
|
8: 11,
|
||||||
9: 18,
|
9: 12,
|
||||||
10: 19,
|
10: 13,
|
||||||
11: 20,
|
11: 14,
|
||||||
12: 21,
|
12: 15,
|
||||||
13: 22,
|
13: 16,
|
||||||
14: 23,
|
14: 17,
|
||||||
15: 24,
|
15: 18,
|
||||||
16: 25,
|
16: 19,
|
||||||
17: 26,
|
17: 20,
|
||||||
18: 27,
|
18: 21,
|
||||||
19: 28,
|
19: 22,
|
||||||
20: 29,
|
20: 23,
|
||||||
21: 30,
|
21: 24,
|
||||||
22: 31,
|
22: 25,
|
||||||
23: 32,
|
23: 26,
|
||||||
24: 33,
|
24: 27,
|
||||||
25: 34,
|
25: 28,
|
||||||
26: 35,
|
26: 29,
|
||||||
27: 36,
|
27: 30,
|
||||||
28: 37,
|
28: 31,
|
||||||
29: 38,
|
29: 32,
|
||||||
30: 39,
|
30: 33,
|
||||||
31: 40,
|
31: 34,
|
||||||
32: 41,
|
32: 35,
|
||||||
33: 1,
|
33: 1,
|
||||||
34: 2,
|
34: 2,
|
||||||
}
|
}
|
||||||
|
@ -56,14 +56,14 @@ switch_board_qsfp_mux() {
|
|||||||
switch_board_qsfp() {
|
switch_board_qsfp() {
|
||||||
case $1 in
|
case $1 in
|
||||||
"new_device")
|
"new_device")
|
||||||
for ((i=10;i<=41;i++));
|
for ((i=4;i<=35;i++));
|
||||||
do
|
do
|
||||||
echo optoe3 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
|
echo optoe3 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"delete_device")
|
"delete_device")
|
||||||
for ((i=10;i<=41;i++));
|
for ((i=4;i<=35;i++));
|
||||||
do
|
do
|
||||||
echo 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
|
echo 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
|
||||||
done
|
done
|
||||||
@ -112,7 +112,7 @@ switch_board_modsel() {
|
|||||||
|
|
||||||
#This enables the led control for CPU and default states
|
#This enables the led control for CPU and default states
|
||||||
switch_board_led_default() {
|
switch_board_led_default() {
|
||||||
/usr/sbin/i2cset -y 5 0x0d 0x62 0xd0
|
/usr/sbin/i2cset -y 37 0x0d 0x62 0xd0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Readout firmware version of the system and
|
# Readout firmware version of the system and
|
||||||
@ -135,15 +135,15 @@ platform_firmware_versions() {
|
|||||||
echo "BMC: $r" >> $FIRMWARE_VERSION_FILE
|
echo "BMC: $r" >> $FIRMWARE_VERSION_FILE
|
||||||
|
|
||||||
#BaseBoard CPLD 0x0d on i2c bus 5 ( physical FPGA I2C-5)
|
#BaseBoard CPLD 0x0d on i2c bus 5 ( physical FPGA I2C-5)
|
||||||
ver=`/usr/sbin/i2cget -y 5 0x0d 0x0`
|
ver=`/usr/sbin/i2cget -y 37 0x0d 0x0`
|
||||||
echo "Baseboard CPLD: $((ver))" >> $FIRMWARE_VERSION_FILE
|
echo "Baseboard CPLD: $((ver))" >> $FIRMWARE_VERSION_FILE
|
||||||
|
|
||||||
#Switch CPLD 1 0x30 on i2c bus 4 ( physical FPGA I2C-4)
|
#Switch CPLD 1 0x30 on i2c bus 4 ( physical FPGA I2C-4)
|
||||||
ver=`/usr/sbin/i2cget -y 4 0x30 0x0`
|
ver=`/usr/sbin/i2cget -y 36 0x30 0x0`
|
||||||
echo "Switch CPLD 1: $((ver))" >> $FIRMWARE_VERSION_FILE
|
echo "Switch CPLD 1: $((ver))" >> $FIRMWARE_VERSION_FILE
|
||||||
|
|
||||||
#Switch CPLD 1 0x30 on i2c bus 4 ( physical FPGA I2C-4)
|
#Switch CPLD 1 0x30 on i2c bus 4 ( physical FPGA I2C-4)
|
||||||
ver=`/usr/sbin/i2cget -y 4 0x31 0x0`
|
ver=`/usr/sbin/i2cget -y 36 0x31 0x0`
|
||||||
echo "Switch CPLD 2: $((ver))" >> $FIRMWARE_VERSION_FILE
|
echo "Switch CPLD 2: $((ver))" >> $FIRMWARE_VERSION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ get_reboot_cause() {
|
|||||||
if [[ ! -e $REBOOT_REASON_FILE ]]; then
|
if [[ ! -e $REBOOT_REASON_FILE ]]; then
|
||||||
echo "0" > $REBOOT_REASON_FILE
|
echo "0" > $REBOOT_REASON_FILE
|
||||||
else
|
else
|
||||||
/usr/sbin/i2cget -y 5 0x0d 0x06 > $REBOOT_REASON_FILE
|
/usr/sbin/i2cget -y 37 0x0d 0x06 > $REBOOT_REASON_FILE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,38 +74,38 @@ class Chassis(ChassisBase):
|
|||||||
|
|
||||||
_global_port_pres_dict = {}
|
_global_port_pres_dict = {}
|
||||||
_port_to_i2c_mapping = {
|
_port_to_i2c_mapping = {
|
||||||
1: 10,
|
1: 4,
|
||||||
2: 11,
|
2: 5,
|
||||||
3: 12,
|
3: 6,
|
||||||
4: 13,
|
4: 7,
|
||||||
5: 14,
|
5: 8,
|
||||||
6: 15,
|
6: 9,
|
||||||
7: 16,
|
7: 10,
|
||||||
8: 17,
|
8: 11,
|
||||||
9: 18,
|
9: 12,
|
||||||
10: 19,
|
10: 13,
|
||||||
11: 20,
|
11: 14,
|
||||||
12: 21,
|
12: 15,
|
||||||
13: 22,
|
13: 16,
|
||||||
14: 23,
|
14: 17,
|
||||||
15: 24,
|
15: 18,
|
||||||
16: 25,
|
16: 19,
|
||||||
17: 26,
|
17: 20,
|
||||||
18: 27,
|
18: 21,
|
||||||
19: 28,
|
19: 22,
|
||||||
20: 29,
|
20: 23,
|
||||||
21: 30,
|
21: 24,
|
||||||
22: 31,
|
22: 25,
|
||||||
23: 32,
|
23: 26,
|
||||||
24: 33,
|
24: 27,
|
||||||
25: 34,
|
25: 28,
|
||||||
26: 35,
|
26: 29,
|
||||||
27: 36,
|
27: 30,
|
||||||
28: 37,
|
28: 31,
|
||||||
29: 38,
|
29: 32,
|
||||||
30: 39,
|
30: 33,
|
||||||
31: 40,
|
31: 34,
|
||||||
32: 41,
|
32: 35,
|
||||||
33: 1,
|
33: 1,
|
||||||
34: 2,
|
34: 2,
|
||||||
}
|
}
|
||||||
|
@ -35,13 +35,13 @@ def get_cpld_version(bus, i2caddr):
|
|||||||
return '{}'.format(hwaccess.i2c_get(bus, i2caddr, 0))
|
return '{}'.format(hwaccess.i2c_get(bus, i2caddr, 0))
|
||||||
|
|
||||||
def get_cpld0_version():
|
def get_cpld0_version():
|
||||||
return get_cpld_version(5, 0x0d)
|
return get_cpld_version(37, 0x0d)
|
||||||
|
|
||||||
def get_cpld1_version():
|
def get_cpld1_version():
|
||||||
return get_cpld_version(4, 0x30)
|
return get_cpld_version(36, 0x30)
|
||||||
|
|
||||||
def get_cpld2_version():
|
def get_cpld2_version():
|
||||||
return get_cpld_version(4, 0x31)
|
return get_cpld_version(36, 0x31)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -227,38 +227,38 @@ class Sfp(SfpBase):
|
|||||||
"""
|
"""
|
||||||
BASE_RES_PATH = "/sys/bus/pci/devices/0000:09:00.0/resource0"
|
BASE_RES_PATH = "/sys/bus/pci/devices/0000:09:00.0/resource0"
|
||||||
_port_to_i2c_mapping = {
|
_port_to_i2c_mapping = {
|
||||||
1: 10,
|
1: 4,
|
||||||
2: 11,
|
2: 5,
|
||||||
3: 12,
|
3: 6,
|
||||||
4: 13,
|
4: 7,
|
||||||
5: 14,
|
5: 8,
|
||||||
6: 15,
|
6: 9,
|
||||||
7: 16,
|
7: 10,
|
||||||
8: 17,
|
8: 11,
|
||||||
9: 18,
|
9: 12,
|
||||||
10: 19,
|
10: 13,
|
||||||
11: 20,
|
11: 14,
|
||||||
12: 21,
|
12: 15,
|
||||||
13: 22,
|
13: 16,
|
||||||
14: 23,
|
14: 17,
|
||||||
15: 24,
|
15: 18,
|
||||||
16: 25,
|
16: 19,
|
||||||
17: 26,
|
17: 20,
|
||||||
18: 27,
|
18: 21,
|
||||||
19: 28,
|
19: 22,
|
||||||
20: 29,
|
20: 23,
|
||||||
21: 30,
|
21: 24,
|
||||||
22: 31,
|
22: 25,
|
||||||
23: 32,
|
23: 26,
|
||||||
24: 33,
|
24: 27,
|
||||||
25: 34,
|
25: 28,
|
||||||
26: 35,
|
26: 29,
|
||||||
27: 36,
|
27: 30,
|
||||||
28: 37,
|
28: 31,
|
||||||
29: 38,
|
29: 32,
|
||||||
30: 39,
|
30: 33,
|
||||||
31: 40,
|
31: 34,
|
||||||
32: 41,
|
32: 35,
|
||||||
33: 1,
|
33: 1,
|
||||||
34: 2
|
34: 2
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user