mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 09:17:08 +00:00
updated init.py for Accton AS5812
This commit is contained in:
@@ -17,5 +17,47 @@ class OnlPlatform_x86_64_accton_as5812_54x_r0(OnlPlatformAccton):
|
||||
return ".5812.54"
|
||||
|
||||
def baseconfig(self):
|
||||
return os.system(os.path.join(self.platform_basedir(), "boot", "x86-64-accton-as5812-54x-r0-devices.sh")) == 0
|
||||
########### initialize I2C bus 0 ###########
|
||||
|
||||
# initialize CPLDs
|
||||
self.new_i2c_devices(
|
||||
[
|
||||
('as5812_54x_cpld1', 0x60, 0),
|
||||
('as5812_54x_cpld2', 0x61, 0),
|
||||
('as5812_54x_cpld3', 0x62, 0),
|
||||
]
|
||||
)
|
||||
# initialize SFP devices
|
||||
for port in range(1, 49):
|
||||
self.new_i2c_device('as5812_54x_sfp%d' % port, 0x50, port+1)
|
||||
self.new_i2c_device('as5812_54x_sfp%d' % port, 0x51, port+1)
|
||||
|
||||
# Initialize QSFP devices
|
||||
self.new_i2c_device('as5812_54x_sfp49', 0x50, 50)
|
||||
self.new_i2c_device('as5812_54x_sfp52', 0x50, 51)
|
||||
self.new_i2c_device('as5812_54x_sfp50', 0x50, 52)
|
||||
self.new_i2c_device('as5812_54x_sfp53', 0x50, 53)
|
||||
self.new_i2c_device('as5812_54x_sfp51', 0x50, 54)
|
||||
self.new_i2c_device('as5812_54x_sfp54', 0x50, 55)
|
||||
|
||||
########### initialize I2C bus 1 ###########
|
||||
self.new_i2c_devices(
|
||||
[
|
||||
# initiate multiplexer (PCA9548)
|
||||
('pca9548', 0x70, 1),
|
||||
|
||||
# initiate PSU-1 AC Power
|
||||
('as5812_54x_psu', 0x38, 57),
|
||||
('cpr_4011_4mxx', 0x3c, 57),
|
||||
|
||||
# initiate PSU-2 AC Power
|
||||
('as5812_54x_psu', 0x3b, 58),
|
||||
('cpr_4011_4mxx', 0x3f, 58),
|
||||
|
||||
# initiate lm75
|
||||
('lm75', 0x48, 61),
|
||||
('lm75', 0x49, 62),
|
||||
('lm75', 0x4a, 63),
|
||||
]
|
||||
)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user