DellEMC bullseye merge (#2)

Upgrade DellEMC platforms to bullseye.
This commit is contained in:
Aravind Mani 2021-10-29 01:57:30 +05:30 committed by Saikrishna Arcot
parent 5b284767f6
commit c3c6a178c8
15 changed files with 180 additions and 144 deletions

View File

@ -47,40 +47,39 @@ class SfpUtil(SfpUtilBase):
PORTS_IN_BLOCK = 34
BASE_RES_PATH = "/sys/bus/pci/devices/0000:09:00.0/resource0"
_port_to_i2c_mapping = {
1: 4,
2: 5,
3: 6,
4: 7,
5: 8,
6: 9,
7: 10,
8: 11,
9: 12,
10: 13,
11: 14,
12: 15,
13: 16,
14: 17,
15: 18,
16: 19,
17: 20,
18: 21,
19: 22,
20: 23,
21: 24,
22: 25,
23: 26,
24: 27,
25: 28,
26: 29,
27: 30,
28: 31,
29: 32,
30: 33,
31: 34,
32: 35,
1: 10,
2: 11,
3: 12,
4: 13,
5: 14,
6: 15,
7: 16,
8: 17,
9: 18,
10: 19,
11: 20,
12: 21,
13: 22,
14: 23,
15: 24,
16: 25,
17: 26,
18: 27,
19: 28,
20: 29,
21: 30,
22: 31,
23: 32,
24: 33,
25: 34,
26: 35,
27: 36,
28: 37,
29: 38,
30: 39,
31: 40,
32: 41,
33: 1,
34: 2,
}

View File

@ -1,7 +1,7 @@
include $(PLATFORM_PATH)/sai-modules.mk
include $(PLATFORM_PATH)/sai.mk
include $(PLATFORM_PATH)/platform-modules-nokia.mk
#include $(PLATFORM_PATH)/platform-modules-dell.mk
include $(PLATFORM_PATH)/platform-modules-dell.mk
#include $(PLATFORM_PATH)/platform-modules-arista.mk
#include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
include $(PLATFORM_PATH)/platform-modules-accton.mk

View File

@ -7,22 +7,22 @@ Standards-Version: 3.9.3
Package: platform-modules-s6000
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-z9100
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-s6100
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-z9264f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-s5212f
@ -37,12 +37,12 @@ Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-s5232f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-s5248f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-n3248te
@ -52,7 +52,7 @@ Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-z9332f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Depends: linux-image-5.10.0-8-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
Package: platform-modules-n3248pxe

View File

@ -194,9 +194,10 @@ elif [ "$1" == "deinit" ]; then
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
remove_python_api_package
else
echo "s5224f_platform : Invalid option !"
fi

View File

@ -150,17 +150,10 @@ platform_firmware_versions() {
install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
rv=$(pip install $device/$platform/sonic_platform-1.0-py2-none-any.whl)
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
}
remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip uninstall -y sonic-platform > /dev/null 2>/dev/null)
fi
rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
@ -201,7 +194,7 @@ init_devnum
if [ "$1" == "init" ]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe ipmi_devintf
modprobe ipmi_si kipmid_max_busy_us=1000
modprobe i2c_ocores
@ -217,6 +210,11 @@ if [ "$1" == "init" ]; then
/usr/bin/qsfp_irq_enable.py
platform_firmware_versions
echo 1000 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us
echo -2 > /sys/bus/i2c/drivers/pca954x/603-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/604-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/605-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/606-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/607-0074/idle_state
elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
@ -225,9 +223,12 @@ elif [ "$1" == "deinit" ]; then
switch_board_qsfp_mux "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
remove_python_api_package
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_s5232f_fpga_ocores
remove_python_api_package
else
echo "s5232f_platform : Invalid option !"
fi

View File

@ -149,7 +149,7 @@ init_devnum
if [ "$1" == "init" ]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe ipmi_devintf
modprobe ipmi_si
modprobe i2c_ocores
@ -162,15 +162,27 @@ if [ "$1" == "init" ]; then
#/usr/bin/qsfp_irq_enable.py
install_python_api_package
platform_firmware_versions
echo -2 > /sys/bus/i2c/drivers/pca954x/603-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/604-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/605-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/606-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/607-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/608-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/609-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/610-0074/idle_state
elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_qsfp_mux "delete_device"
remove_python_api_package
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_s5248f_fpga_ocores
remove_python_api_package
else
echo "s5248f_platform : Invalid option !"
fi

View File

@ -150,7 +150,7 @@ init_devnum
if [ "$1" == "init" ]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe ipmi_devintf
modprobe ipmi_si
modprobe i2c_ocores
@ -162,14 +162,32 @@ if [ "$1" == "init" ]; then
switch_board_led_default
#python /usr/bin/qsfp_irq_enable.py
platform_firmware_versions
echo -2 > /sys/bus/i2c/drivers/pca954x/603-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/604-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/605-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/606-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/607-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/608-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/609-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/610-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/611-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/612-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/613-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/614-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/615-0074/idle_state
elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_qsfp_mux "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_s5296f_fpga_ocores
remove_python_api_package
else
echo "s5296f_platform : Invalid option !"
fi

View File

@ -10,6 +10,8 @@
#include <linux/i2c/sff-8436.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/gpio/machine.h>
#include <linux/gpio_keys.h>
#include <linux/nvram.h>
#define S6000_MUX_BASE_NR 10
@ -47,17 +49,23 @@ static struct i2c_mux_gpio_platform_data s6000_mux_platform_data = {
.base_nr = S6000_MUX_BASE_NR,
.values = s6000_mux_values,
.n_values = ARRAY_SIZE(s6000_mux_values),
#if 0
.gpios = s6000_mux_gpios,
.n_gpios = ARRAY_SIZE(s6000_mux_gpios),
#endif
.idle = 0,
};
static struct gpiod_lookup_table dell_gpio_desc = {
.dev_id = "i2c-mux-gpio",
.table = {
GPIO_LOOKUP_IDX("sch_gpio.3168", 1, "mux", 0, GPIO_ACTIVE_HIGH ),
GPIO_LOOKUP_IDX("sch_gpio.3168", 2, "mux", 1, GPIO_ACTIVE_HIGH ),
{ },
},
};
static struct platform_device s6000_mux = {
.name = "i2c-mux-gpio",
.id = 0,
.dev = {
.init_name = "i2c-mux-gpio",
.platform_data = &s6000_mux_platform_data,
.release = device_release
},
@ -1295,7 +1303,6 @@ static int __init dell_s6000_platform_init(void)
bool gpio_allocated = false;
printk("dell_s6000_platform module initialization\n");
ret = gpio_request(GPIO_I2C_MUX_PIN, "gpio10");
if(ret < 0) {
printk(KERN_WARNING "Failed to request gpio 10");
@ -1315,6 +1322,7 @@ static int __init dell_s6000_platform_init(void)
goto error_gpio_init;
}
gpiod_add_lookup_table(&dell_gpio_desc);
ret = platform_driver_register(&cpld_driver);
if (ret) {
printk(KERN_WARNING "Fail to register cpld driver\n");
@ -1382,7 +1390,7 @@ error_gpio_init:
static void __exit dell_s6000_platform_exit(void)
{
int i;
gpiod_remove_lookup_table(&dell_gpio_desc);
for (i = 0; i < MUX_CHANNEL_NUM; i++)
platform_device_unregister(&s6000_qsfp_mux[i]);
platform_device_unregister(&s6000_cpld);

View File

@ -128,17 +128,10 @@ switch_board_qsfp_lpmode() {
install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
rv=$(pip install $device/$platform/sonic_platform-1.0-py2-none-any.whl)
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
}
remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip uninstall -y sonic-platform > /dev/null 2>/dev/null)
fi
rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)

View File

@ -5,17 +5,10 @@
install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
rv=$(pip install $device/$platform/sonic_platform-1.0-py2-none-any.whl)
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
}
remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip uninstall -y sonic-platform > /dev/null 2>/dev/null)
fi
rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
@ -27,7 +20,7 @@ if [[ "$1" == "init" ]]; then
pericom="/sys/bus/pci/devices/0000:08:00.0"
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe dell_ich
modprobe dell_s6100_iom_cpld
modprobe dell_s6100_lpc
@ -53,6 +46,17 @@ if [[ "$1" == "init" ]]; then
systemctl start s6100-i2c-enumerate.service
fi
echo -2 > /sys/bus/i2c/drivers/pca954x/0-0070/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/4-0071/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/6-0071/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/6-0072/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/7-0071/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/7-0072/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/8-0071/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/8-0072/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/9-0071/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/9-0072/idle_state
install_python_api_package
monit reload

View File

@ -203,17 +203,10 @@ init_switch_port_led() {
install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
rv=$(pip install $device/$platform/sonic_platform-1.0-py2-none-any.whl)
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
}
remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv = $(pip uninstall -y sonic-platform > /dev/null 2>/dev/null)
fi
rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
@ -224,7 +217,7 @@ init_devnum
if [[ "$1" == "init" ]]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe dell_ich
modprobe dell_mailbox
modprobe dell_z9100_cpld

View File

@ -140,17 +140,10 @@ init_switch_port_led() {
install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
rv=$(pip install $device/$platform/sonic_platform-1.0-py2-none-any.whl)
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
}
remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip uninstall -y sonic-platform > /dev/null 2>/dev/null)
fi
rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
@ -218,7 +211,7 @@ init_devnum
if [ "$1" == "init" ]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe i2c-mux-pca954x
modprobe ipmi_devintf
modprobe ipmi_si
modprobe i2c_ocores
@ -233,7 +226,15 @@ if [ "$1" == "init" ]; then
install_python_api_package
/usr/bin/port_irq_enable.py
platform_firmware_versions
echo -2 > /sys/bus/i2c/drivers/pca954x/603-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/604-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/605-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/606-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/607-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/608-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/609-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/610-0074/idle_state
echo -2 > /sys/bus/i2c/drivers/pca954x/611-0074/idle_state
elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
@ -242,6 +243,11 @@ elif [ "$1" == "deinit" ]; then
switch_board_sfp "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r i2c-dev
modprobe -r acpi_ipmi
modprobe -r ipmi_devintf
modprobe -r ipmi_si
modprobe -r i2c_ocores
modprobe -r dell_z9264f_fpga_ocores
remove_python_api_package
else
echo "z9264f_platform : Invalid option !"

View File

@ -56,14 +56,14 @@ switch_board_qsfp_mux() {
switch_board_qsfp() {
case $1 in
"new_device")
for ((i=4;i<=35;i++));
for ((i=10;i<=41;i++));
do
echo optoe3 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
done
;;
"delete_device")
for ((i=4;i<=35;i++));
for ((i=10;i<=41;i++));
do
echo 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
done
@ -112,7 +112,7 @@ switch_board_modsel() {
#This enables the led control for CPU and default states
switch_board_led_default() {
/usr/sbin/i2cset -y 37 0x0d 0x62 0xd0
/usr/sbin/i2cset -y 5 0x0d 0x62 0xd0
}
# Readout firmware version of the system and
@ -135,15 +135,15 @@ platform_firmware_versions() {
echo "BMC: $r" >> $FIRMWARE_VERSION_FILE
#BaseBoard CPLD 0x0d on i2c bus 5 ( physical FPGA I2C-5)
ver=`/usr/sbin/i2cget -y 37 0x0d 0x0`
ver=`/usr/sbin/i2cget -y 5 0x0d 0x0`
echo "Baseboard CPLD: $((ver))" >> $FIRMWARE_VERSION_FILE
#Switch CPLD 1 0x30 on i2c bus 4 ( physical FPGA I2C-4)
ver=`/usr/sbin/i2cget -y 36 0x30 0x0`
ver=`/usr/sbin/i2cget -y 4 0x30 0x0`
echo "Switch CPLD 1: $((ver))" >> $FIRMWARE_VERSION_FILE
#Switch CPLD 1 0x30 on i2c bus 4 ( physical FPGA I2C-4)
ver=`/usr/sbin/i2cget -y 36 0x31 0x0`
ver=`/usr/sbin/i2cget -y 4 0x31 0x0`
echo "Switch CPLD 2: $((ver))" >> $FIRMWARE_VERSION_FILE
}
@ -151,16 +151,10 @@ install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
rv=$(pip install $device/$platform/sonic_platform-1.0-py2-none-any.whl)
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
}
remove_python_api_package() {
rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip uninstall -y sonic-platform > /dev/null 2>/dev/null)
fi
rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
if [ $? -eq 0 ]; then
rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
@ -176,7 +170,7 @@ get_reboot_cause() {
if [[ ! -e $REBOOT_REASON_FILE ]]; then
echo "0" > $REBOOT_REASON_FILE
else
/usr/sbin/i2cget -y 37 0x0d 0x06 > $REBOOT_REASON_FILE
/usr/sbin/i2cget -y 5 0x0d 0x06 > $REBOOT_REASON_FILE
fi
}
@ -185,7 +179,7 @@ init_devnum
if [ "$1" == "init" ]; then
modprobe i2c-dev
modprobe i2c-mux-pca954x force_deselect_on_exit=1
modprobe cls-i2c-mux-pca954x
modprobe ipmi_devintf
modprobe ipmi_si kipmid_max_busy_us=1000
modprobe cls-i2c-ocore
@ -201,14 +195,20 @@ if [ "$1" == "init" ]; then
platform_firmware_versions
get_reboot_cause
echo 1000 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us
# Set the PCA9548 mux behavior
echo -2 > /sys/bus/i2c/drivers/cls_pca954x/3-0070/idle_state
echo -2 > /sys/bus/i2c/drivers/cls_pca954x/3-0071/idle_state
echo -2 > /sys/bus/i2c/drivers/cls_pca954x/3-0072/idle_state
echo -2 > /sys/bus/i2c/drivers/cls_pca954x/3-0073/idle_state
elif [ "$1" == "deinit" ]; then
sys_eeprom "delete_device"
switch_board_qsfp "delete_device"
switch_board_sfp "delete_device"
modprobe -r i2c-mux-pca954x
modprobe -r cls-i2c-mux-pca954x
modprobe -r i2c-dev
modprobe -r ipmi_devintf
modprobe -r acpi_ipmi
modprobe -r ipmi_si
modprobe -r cls-i2c-ocore
modprobe -r cls-switchboard

View File

@ -39,13 +39,13 @@ def get_cpld_version(bus, i2caddr):
return '{}'.format(hwaccess.i2c_get(bus, i2caddr, 0))
def get_cpld0_version():
return get_cpld_version(37, 0x0d)
return get_cpld_version(5, 0x0d)
def get_cpld1_version():
return get_cpld_version(36, 0x30)
return get_cpld_version(4, 0x30)
def get_cpld2_version():
return get_cpld_version(36, 0x31)
return get_cpld_version(4, 0x31)
def get_ssd_version():
val = 'NA'

View File

@ -228,39 +228,40 @@ class Sfp(SfpBase):
DELLEMC Platform-specific Sfp class
"""
BASE_RES_PATH = "/sys/bus/pci/devices/0000:09:00.0/resource0"
_port_to_i2c_mapping = {
1: 4,
2: 5,
3: 6,
4: 7,
5: 8,
6: 9,
7: 10,
8: 11,
9: 12,
10: 13,
11: 14,
12: 15,
13: 16,
14: 17,
15: 18,
16: 19,
17: 20,
18: 21,
19: 22,
20: 23,
21: 24,
22: 25,
23: 26,
24: 27,
25: 28,
26: 29,
27: 30,
28: 31,
29: 32,
30: 33,
31: 34,
32: 35,
1: 10,
2: 11,
3: 12,
4: 13,
5: 14,
6: 15,
7: 16,
8: 17,
9: 18,
10: 19,
11: 20,
12: 21,
13: 22,
14: 23,
15: 24,
16: 25,
17: 26,
18: 27,
19: 28,
20: 29,
21: 30,
22: 31,
23: 32,
24: 33,
25: 34,
26: 35,
27: 36,
28: 37,
29: 38,
30: 39,
31: 40,
32: 41,
33: 1,
34: 2
}