forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[platform/broadcom] Add Celestica Silverstone-DP platform module
- Loading branch information
Showing
19 changed files
with
3,118 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONSOLE_SPEED=115200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-silverstone-dp.init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/bash | ||
|
||
### BEGIN INIT INFO | ||
# Provides: setup-board | ||
# Required-Start: $portmap | ||
# Required-Stop: | ||
# Should-Start: | ||
# Should-Stop: | ||
# Default-Start: S | ||
# Default-Stop: 0 6 | ||
# Short-Description: Setup SilverStone DP board. | ||
### END INIT INFO | ||
|
||
|
||
case "$1" in | ||
start) | ||
echo -n "Setting up board... " | ||
|
||
modprobe i2c-dev | ||
modprobe ipmi_devintf | ||
modprobe mc24lc64t | ||
modprobe baseboard-lpc | ||
modprobe i2c-ocores | ||
modprobe cls-switchboard | ||
modprobe xcvr-cls | ||
modprobe switch_cpld | ||
|
||
# Instantiate TLV EEPROM device on I801 bus | ||
devname=`cat /sys/bus/i2c/devices/i2c-0/name` | ||
if [[ $devname == 'SMBus I801 adapter at '* ]]; then | ||
echo 24lc64t 0x56 > /sys/bus/i2c/devices/i2c-0/new_device | ||
fi | ||
|
||
# Clear syseeprom cache | ||
decode-syseeprom --init 2> /dev/null & | ||
|
||
# Attach switchboard CPLD i2c device | ||
echo switch_cpld 0x30 > /sys/bus/i2c/devices/i2c-4/new_device | ||
|
||
# Attach Optical Module EEPROM | ||
# use optoe1 for QSFP, use optoe3 for QSFP-DD. | ||
for i in {10..33} | ||
do | ||
echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-$i/new_device | ||
done | ||
|
||
for i in {34..39} | ||
do | ||
echo optoe3 0x50 > /sys/bus/i2c/devices/i2c-$i/new_device | ||
done | ||
|
||
echo "done." | ||
;; | ||
|
||
stop) | ||
echo "done." | ||
;; | ||
|
||
force-reload|restart) | ||
echo "Not supported" | ||
;; | ||
|
||
*) | ||
echo "Usage: /etc/init.d/platform-modules-silverstone.init {start|stop}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
2 changes: 2 additions & 0 deletions
2
platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-silverstone-dp.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
silverstone-dp/cfg/silverstone-dp-modules.conf etc/modules-load.d | ||
silverstone-dp/systemd/platform-modules-silverstone-dp.service lib/systemd/system |
3 changes: 3 additions & 0 deletions
3
platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-silverstone-dp.postinst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
depmod -a | ||
systemctl enable platform-modules-silverstone-dp.service | ||
systemctl start platform-modules-silverstone-dp.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
platform/broadcom/sonic-platform-modules-cel/silverstone-dp/cfg/silverstone-dp-modules.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# /etc/modules: kernel modules to load at boot time. | ||
# | ||
# This file contains the names of kernel modules that should be loaded | ||
# at boot time, one per line. Lines beginning with "#" are ignored. | ||
|
||
i2c-i801 | ||
i2c-isch | ||
i2c-ismt | ||
i2c-dev | ||
i2c-mux | ||
i2c-smbus | ||
|
||
i2c-mux-pca954x | ||
ipmi_devintf | ||
ipmi_si |
1 change: 1 addition & 0 deletions
1
platform/broadcom/sonic-platform-modules-cel/silverstone-dp/modules/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
obj-m := baseboard-lpc.o mc24lc64t.o cls-switchboard.o xcvr-cls.o i2c-ocores.o switch_cpld.o |
Oops, something went wrong.