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 2 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_8.8.1_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
Expand Up @@ -174,12 +174,18 @@ function _i2c_init {
echo "# Description: I2C Init"
echo "========================================================="

depmod -a
linyutsung marked this conversation as resolved.
Show resolved Hide resolved

rmmod eeprom
rmmod i2c_i801
rmmod optoe
rmmod sff_8436_eeprom
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 @@ -240,9 +246,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 @@ -644,9 +648,10 @@ 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
# value low for gpio direction not official support
#echo low > /sys/class/gpio/gpio${i}/direction
linyutsung marked this conversation as resolved.
Show resolved Hide resolved
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 +661,10 @@ 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
# value low for gpio direction not official support
#echo low > /sys/class/gpio/gpio${i}/direction
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 +1135,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,6 +383,8 @@ function _i2c_init {
echo "# Description: I2C Init"
echo "========================================================="

depmod -a

#remove optoe module
rmmod optoe

Expand Down Expand Up @@ -494,6 +496,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 @@ -1160,8 +1165,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 @@ -250,9 +250,13 @@ function _i2c_init {

#rmmod i2c_ismt
_util_rmmod i2c_i801
_util_rmmod optoe
_util_rmmod sff_8436_eeprom
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 @@ -302,9 +306,7 @@ function _i2c_init {
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 @@ -1144,7 +1146,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,17 @@ function _i2c_init {
echo "# Description: I2C Init"
echo "========================================================="

depmod -a

#rmmod i2c_ismt
_util_rmmod i2c_i801
_util_rmmod optoe
_util_rmmod sff_8436_eeprom
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 @@ -1022,7 +1028,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