Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[platform] update ingrasys platform change #2860

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x2f8
CONSOLE_DEV=1
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x2f8
CONSOLE_DEV=1
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x2f8
CONSOLE_DEV=1
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
1 change: 1 addition & 0 deletions device/ingrasys/x86_64-ingrasys_s9100-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x2f8
CONSOLE_DEV=1
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
class board(eeprom_tlvinfo.TlvInfoDecoder):

def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0055/eeprom"
self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0051/eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
2 changes: 1 addition & 1 deletion device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ chip "w83795adg-*"
ignore in0
label in1 "VDD_CORE"
set in1_min 0.90 * 0.98
set in1_max 0.90 * 1.02
set in1_max 0.936
ignore in2
label in3 "1.8V"
set in3_min 1.8 * 0.97
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="module_blacklist=gpio_ich"
6 changes: 4 additions & 2 deletions platform/barefoot/bfn-platform-ingrasys.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
BFN_INGRASYS_PLATFORM = bfnplatform-ingrasys_8.2.0_amd64.deb
$(BFN_INGRASYS_PLATFORM)_URL = "https://github.com/Ingrasys-sonic/packages/raw/master/lib/bfnplatform-ingrasys_8.4.0_8.5.0_amd64.deb"
ifdef BLDENV
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Barefoot SDE already update to ver 8.8.1, the platform deb need to sync with SDE
  2. Currently the new version only support stretch

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the master version is stretch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the "ifdef BLDEVN" not needed here ? According to bfn-platform.mk, there are two different platform deb packages for stretch and jessie, but in our case only stretch is supported, so add the "ifdef BLDEVN" without "else".
Refer to https://github.com/Azure/sonic-buildimage/blob/master/platform/barefoot/bfn-platform.mk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the "ifdef BLDEVN" removed, the installation of the platform deb will fail due to dependency issue for jessie. Since our platform deb no longer support jessie build but only for stretch build, it should be ok not installing the deb for jessie build. Any better suggestion ?

BFN_INGRASYS_PLATFORM = bfnplatform-ingrasys_8.8.1_docker_amd64.deb
$(BFN_INGRASYS_PLATFORM)_URL = "https://github.com/Ingrasys-sonic/packages/raw/master/lib/bfnplatform-ingrasys_master_amd64.deb"
endif

SONIC_ONLINE_DEBS += $(BFN_INGRASYS_PLATFORM) # $(BFN_SAI_DEV)
$(BFN_SAI_DEV)_DEPENDS += $(BFN_INGRASYS_PLATFORM)
2 changes: 1 addition & 1 deletion platform/barefoot/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include $(PLATFORM_PATH)/libsaithrift-dev.mk
include $(PLATFORM_PATH)/docker-ptf-bfn.mk
include $(PLATFORM_PATH)/bfn-platform.mk
#include $(PLATFORM_PATH)/bfn-platform-wnc.mk
#include $(PLATFORM_PATH)/bfn-platform-ingrasys.mk
include $(PLATFORM_PATH)/bfn-platform-ingrasys.mk
include $(PLATFORM_PATH)/bfn-modules.mk

SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT) \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# postinst script for s9180

depmod -a

#DEBHELPER#
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# postinst script for s9280

depmod -a

#DEBHELPER#
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,15 @@ function _i2c_init {
echo "# Description: I2C Init"
echo "========================================================="

rmmod eeprom
rmmod i2c_i801
# invoke deinit to make sure init sequence
_i2c_deinit

modprobe i2c_i801
modprobe i2c_dev
modprobe i2c_mux_pca954x force_deselect_on_exit=1
#modprobe cpld_wdt
modprobe sff_8436_eeprom
modprobe optoe
linyutsung marked this conversation as resolved.
Show resolved Hide resolved

if [ ! -e "${PATH_SYS_I2C_DEVICES}/i2c-${NUM_MUX1_CHAN0_DEVICE}" ]; then
_retry "echo 'pca9548 0x70' > ${PATH_I801_DEVICE}/new_device"
Expand Down Expand Up @@ -222,12 +225,6 @@ function _i2c_init {
echo "${PATH_MAIN_MUX_CHAN0_DEVICE} 0x72 already init."
fi

rmmod coretemp
rmmod jc42
rmmod w83795
rmmod lm75
rmmod lm90
rmmod eeprom
modprobe coretemp
modprobe w83795
modprobe lm75
Expand All @@ -240,9 +237,7 @@ function _i2c_init {
_i2c_fan_speed_init
_i2c_temp_init
modprobe jc42
rmmod gpio_ich
_i2c_gpio_init
modprobe gpio_ich
_i2c_mb_eeprom_init "new"
_i2c_qsfp_eeprom_init "new"
_i2c_sfp_eeprom_init "new"
Expand Down Expand Up @@ -285,7 +280,7 @@ function _mac_vdd_init {
#I2C Deinit
function _i2c_deinit {
_i2c_gpio_deinit
for mod in coretemp jc42 w83795 lm75 lm90 eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_ismt i2c_i801;
for mod in coretemp jc42 w83795 lm75 lm90 optoe sff_8436_eeprom eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_ismt i2c_i801;
do
[ "$(lsmod | grep "^$mod ")" != "" ] && rmmod $mod
done
Expand Down Expand Up @@ -644,9 +639,8 @@ function _i2c_gpio_init {
do
echo $i > /sys/class/gpio/export
echo 1 > /sys/class/gpio/gpio${i}/active_low
echo low > /sys/class/gpio/gpio${i}/direction
#echo out > /sys/class/gpio/gpio${i}/direction
#echo 0 > /sys/class/gpio/gpio${i}/value
echo out > /sys/class/gpio/gpio${i}/direction
echo 0 > /sys/class/gpio/gpio${i}/value
done

#RST Port 16-31
Expand All @@ -656,9 +650,8 @@ function _i2c_gpio_init {
do
echo $i > /sys/class/gpio/export
echo 1 > /sys/class/gpio/gpio${i}/active_low
echo low > /sys/class/gpio/gpio${i}/direction
#echo out > /sys/class/gpio/gpio${i}/direction
#echo 0 > /sys/class/gpio/gpio${i}/value
echo out > /sys/class/gpio/gpio${i}/direction
echo 0 > /sys/class/gpio/gpio${i}/value
done

#PSU I/O on Dummy Board 0x25
Expand Down Expand Up @@ -1129,10 +1122,10 @@ function _i2c_sfp_eeprom_init {
if [ "${action}" == "new" ] && \
! [ -L ${PATH_SYS_I2C_DEVICES}/${NUM_SFP1_DEVICE}-0050 ] && \
! [ -L ${PATH_SYS_I2C_DEVICES}/${NUM_SFP2_DEVICE}-0050 ]; then
#echo "sff8436 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP1_DEVICE}/new_device
#echo "sff8436 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP2_DEVICE}/new_device
echo "optoe1 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP1_DEVICE}/new_device
echo "optoe1 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP2_DEVICE}/new_device
echo "sff8436 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP1_DEVICE}/new_device
echo "sff8436 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP2_DEVICE}/new_device
#echo "optoe1 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP1_DEVICE}/new_device
#echo "optoe1 0x50" > ${PATH_SYS_I2C_DEVICES}/i2c-${NUM_SFP2_DEVICE}/new_device
elif [ "${action}" == "delete" ] && \
[ -L ${PATH_SYS_I2C_DEVICES}/${NUM_SFP1_DEVICE}-0050 ] && \
[ -L ${PATH_SYS_I2C_DEVICES}/${NUM_SFP2_DEVICE}-0050 ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,9 @@ function _i2c_init {
echo "# Description: I2C Init"
echo "========================================================="

#remove optoe module
rmmod optoe
# invoke deinit to make sure init sequence
_i2c_deinit

#rmmod i2c_ismt
_util_rmmod i2c_i801
modprobe i2c_i801
modprobe i2c_dev
modprobe i2c_mux_pca954x force_deselect_on_exit=1
Expand Down Expand Up @@ -494,6 +492,9 @@ function _i2c_init {
_util_rmmod eeprom
modprobe eeprom_mb
modprobe gpio-pca953x
modprobe sff_8436_eeprom
modprobe optoe

_i2c_io_exp_init
_i2c_sensors_init
_i2c_cpld_init
Expand Down Expand Up @@ -547,7 +548,7 @@ function _mac_vdd_init {
#I2C Deinit
function _i2c_deinit {
echo "i2c deinit..."
for mod in coretemp jc42 w83795 ingrasys_s9280_64x_psu ingrasys_s9280_64x_i2c_cpld eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_i801;
for mod in coretemp jc42 w83795 ingrasys_s9280_64x_psu ingrasys_s9280_64x_i2c_cpld optoe sff_8436_eeprom eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_i801;
do
_util_rmmod $mod
done
Expand Down Expand Up @@ -579,11 +580,6 @@ function _i2c_sensors_init {
echo "SENSORS init..."
local dev_path
# to make sure hwmon index in sysfs as expected,
# need to remove kernel module and then probe them in expected order
# remove all sensors kernel module
_util_rmmod coretemp
_util_rmmod jc42
_util_rmmod w83795
# probe coretemp kernel module
modprobe coretemp #hwmon0
# probe hwmon kernel module
Expand Down Expand Up @@ -1160,8 +1156,8 @@ function _i2c_sfp_eeprom_init {

if [ "${action}" == "new" ] && \
! [ -L ${PATH_SYS_I2C_DEVICES}/$eepromBus-$(printf "%04x" $eepromAddr) ]; then
#echo "sff8436 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/new_device
echo "optoe1 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/new_device
echo "sff8436 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/new_device
#echo "optoe1 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/new_device
elif [ "${action}" == "delete" ] && \
[ -L ${PATH_SYS_I2C_DEVICES}/$eepromBus-$(printf "%04x" $eepromAddr) ]; then
echo "$eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/delete_device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,14 @@ function _i2c_init {
echo "# Description: I2C Init"
echo "========================================================="

#rmmod i2c_ismt
_util_rmmod i2c_i801
# invoke deinit to make sure init sequence
_i2c_deinit

modprobe i2c_i801 disable_features=0x10
modprobe i2c_dev
modprobe i2c_mux_pca954x force_deselect_on_exit=1
modprobe sff_8436_eeprom
modprobe optoe

# add MUX PCA9548#0 on I801, assume to be i2c-1~8
if [ ! -e ${PATH_MUX_9548_0_CH0} ]; then
Expand Down Expand Up @@ -298,13 +301,10 @@ function _i2c_init {
fi

_i2c_hwm_init
_util_rmmod eeprom
modprobe eeprom_mb
modprobe gpio-pca953x
_i2c_io_exp_init
rmmod gpio_ich
_i2c_gpio_init
modprobe gpio_ich
_i2c_sensors_init
_i2c_psu_init

Expand Down Expand Up @@ -334,7 +334,7 @@ function _i2c_init {
function _i2c_deinit {
echo "i2c deinit..."
_i2c_gpio_deinit
for mod in coretemp jc42 w83795 eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_i801 ingrasys_s9130_32x_psu;
for mod in coretemp jc42 w83795 optoe sff_8436_eeprom eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_i801 ingrasys_s9130_32x_psu;
do
_util_rmmod $mod
done
Expand All @@ -345,11 +345,6 @@ function _i2c_sensors_init {
echo "SENSORS init..."
local dev_path
# to make sure hwmon index in sysfs as expected,
# need to remove kernel module and then probe them in expected order
# remove all sensors kernel module
_util_rmmod coretemp
_util_rmmod jc42
_util_rmmod w83795
# probe coretemp kernel module
modprobe coretemp
# probe hwmon kernel module
Expand Down Expand Up @@ -1144,7 +1139,8 @@ function _i2c_qsfp_eeprom_init {

if [ "${action}" == "new" ] && \
! [ -L ${PATH_SYS_I2C_DEVICES}/$eeprombus-$(printf "%04x" $eepromAddr) ]; then
echo "sff8436 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eeprombus/new_device
#echo "sff8436 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eeprombus/new_device
echo "optoe1 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eeprombus/new_device
elif [ "${action}" == "delete" ] && \
[ -L ${PATH_SYS_I2C_DEVICES}/$eeprombus-$(printf "%04x" $eepromAddr) ]; then
echo "$eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eeprombus/delete_device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,16 @@ function _i2c_init {
echo "# Description: I2C Init"
echo "========================================================="

#rmmod i2c_ismt
_util_rmmod i2c_i801
depmod -a

# invoke deinit to make sure init sequence
_i2c_deinit

modprobe i2c_i801
modprobe i2c_dev
modprobe i2c_mux_pca954x force_deselect_on_exit=1
modprobe sff_8436_eeprom
modprobe optoe

# add MUX PCA9548#0 on I801, assume to be i2c-1~8
if [ ! -e ${PATH_MUX_9548_0_CH0} ]; then
Expand Down Expand Up @@ -431,7 +436,6 @@ function _i2c_init {
fi

_i2c_hwm_init
_util_rmmod eeprom
modprobe eeprom_mb
modprobe gpio-pca953x
_i2c_io_exp_init
Expand Down Expand Up @@ -460,7 +464,7 @@ function _i2c_init {
#I2C Deinit
function _i2c_deinit {
echo "i2c deinit..."
for mod in coretemp jc42 w83795 eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_i801 ingrasys_s9230_64x_psu;
for mod in coretemp jc42 w83795 optoe sff_8436_eeprom eeprom eeprom_mb gpio-pca953x i2c_mux_pca954x i2c_i801 ingrasys_s9230_64x_psu;
do
_util_rmmod $mod
done
Expand Down Expand Up @@ -492,11 +496,6 @@ function _i2c_sensors_init {
echo "SENSORS init..."
local dev_path
# to make sure hwmon index in sysfs as expected,
# need to remove kernel module and then probe them in expected order
# remove all sensors kernel module
_util_rmmod coretemp
_util_rmmod jc42
_util_rmmod w83795
# probe coretemp kernel module
modprobe coretemp
# probe hwmon kernel module
Expand Down Expand Up @@ -1022,7 +1021,8 @@ function _i2c_qsfp_eeprom_init {

if [ "${action}" == "new" ] && \
! [ -L ${PATH_SYS_I2C_DEVICES}/$eepromBus-$(printf "%04x" $eepromAddr) ]; then
echo "sff8436 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/new_device
#echo "sff8436 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/new_device
echo "optoe1 $eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/new_device
elif [ "${action}" == "delete" ] && \
[ -L ${PATH_SYS_I2C_DEVICES}/$eepromBus-$(printf "%04x" $eepromAddr) ]; then
echo "$eepromAddr" > ${PATH_SYS_I2C_DEVICES}/i2c-$eepromBus/delete_device
Expand Down