From 6e854c1ddfeb8874e083e2e41ff9ceafc7f31e9d Mon Sep 17 00:00:00 2001 From: Steven Noble Date: Fri, 25 Dec 2015 01:50:53 +0000 Subject: [PATCH 1/3] updated init.py for Accton AS7512 --- .../x86-64-accton-as7512-32x-r0/__init__.py | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py index f03fc79e..04bc64b1 100644 --- a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py +++ b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py @@ -13,4 +13,100 @@ class OnlPlatform_x86_64_accton_as7512_32x_r0(OnlPlatformAccton): return ".7512.32" def baseconfig(self): + ########### initialize I2C bus 0 ########### + # initialize multiplexer (PCA9548) + self.new_i2c_devices( + [ + ('pca9458', 0x76, 0), + ] + ) + + # initiate chassis fan + self.new_i2c_devices( + [ + ('as7512_32x_fan', 0x66, 2), + ] + ) + + # inititate LM75 + self.new_i2c_devices( + [ + ('lm75', 0x48, 3), + ('lm75', 0x49, 3), + ('lm75', 0x4a, 3), + ] + ) + # initialize CPLD + self.new_i2c_devices( + [ + ('accton_i2c_cpld', 0x60, 4), + ('accton_i2c_cpld', 0x62, 5), + ('accton_i2c_cpld', 0x64, 6), + ] + ) + ########### initialize I2C bus 1 ########### + self.new_i2c_devices( + [ + # initiate system eeprom + ('24c02', 057, 1), + + # initiate multiplexer (PCA9548) + ('pca9548', 0x71, 1), + + # initiate PSU-1 + ('as7512_32x_psu1', 0x50, 10), + ('ym2651', 0x58, 11), + + # initiate PSU-2 + ('as7512_32x_psu2', 0x53, 11), + ('ym2651', 0x5b, 10), + + #initiate max6657 thermal sensor + ('max6657', 0x4c, 15), + + # initiate multiplexer (PCA9548) + ('pca9548', 0x72, 1), + ('pca9548', 0x73, 1), + ('pca9548', 0x74, 1), + ('pca9548', 0x75, 1), + ] + ) + + # initialize QSFP port 1~32 + + self.new_i2c_device('as7512_54x_sfp1', 0x50, 18) + self.new_i2c_device('as7512_54x_sfp2', 0x50, 19) + self.new_i2c_device('as7512_54x_sfp3', 0x50, 20) + self.new_i2c_device('as7512_54x_sfp4', 0x50, 21) + self.new_i2c_device('as7512_54x_sfp5', 0x50, 22) + self.new_i2c_device('as7512_54x_sfp6', 0x50, 23) + self.new_i2c_device('as7512_54x_sfp7', 0x50, 24) + self.new_i2c_device('as7512_54x_sfp8', 0x50, 25) + self.new_i2c_device('as7512_54x_sfp9', 0x50, 26) + self.new_i2c_device('as7512_54x_sfp10, 0x50, 27) + self.new_i2c_device('as7512_54x_sfp11, 0x50, 28) + self.new_i2c_device('as7512_54x_sfp12, 0x50, 29) + self.new_i2c_device('as7512_54x_sfp13, 0x50, 30) + self.new_i2c_device('as7512_54x_sfp14, 0x50, 31) + self.new_i2c_device('as7512_54x_sfp15, 0x50, 32) + self.new_i2c_device('as7512_54x_sfp16, 0x50, 33) + self.new_i2c_device('as7512_54x_sfp17, 0x50, 34) + self.new_i2c_device('as7512_54x_sfp18, 0x50, 35) + self.new_i2c_device('as7512_54x_sfp19, 0x50, 36) + self.new_i2c_device('as7512_54x_sfp20, 0x50, 37) + self.new_i2c_device('as7512_54x_sfp21, 0x50, 38) + self.new_i2c_device('as7512_54x_sfp22, 0x50, 39) + self.new_i2c_device('as7512_54x_sfp23, 0x50, 40) + self.new_i2c_device('as7512_54x_sfp24, 0x50, 41) + self.new_i2c_device('as7512_54x_sfp25, 0x50, 42) + self.new_i2c_device('as7512_54x_sfp26, 0x50, 43) + self.new_i2c_device('as7512_54x_sfp27, 0x50, 44) + self.new_i2c_device('as7512_54x_sfp28, 0x50, 45) + self.new_i2c_device('as7512_54x_sfp29, 0x50, 46) + self.new_i2c_device('as7512_54x_sfp30, 0x50, 47) + self.new_i2c_device('as7512_54x_sfp31, 0x50, 48) + self.new_i2c_device('as7512_54x_sfp32, 0x50, 49) + ] + ) + return True From e638ecaa3302491ae7a449a695a2a3563b6ffee3 Mon Sep 17 00:00:00 2001 From: Steven Noble Date: Fri, 25 Dec 2015 16:40:12 +0000 Subject: [PATCH 2/3] minor fixes in init.py --- .../r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py index 04bc64b1..503acb7e 100644 --- a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py +++ b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py @@ -15,14 +15,14 @@ class OnlPlatform_x86_64_accton_as7512_32x_r0(OnlPlatformAccton): def baseconfig(self): ########### initialize I2C bus 0 ########### # initialize multiplexer (PCA9548) - self.new_i2c_devices( + self.new_i2c_device( [ ('pca9458', 0x76, 0), ] ) # initiate chassis fan - self.new_i2c_devices( + self.new_i2c_device( [ ('as7512_32x_fan', 0x66, 2), ] From 91425e7fa14174d2042e7198e77652981b95055c Mon Sep 17 00:00:00 2001 From: Steven Noble Date: Sun, 27 Dec 2015 18:55:40 +0000 Subject: [PATCH 3/3] fixed incorrect 54x designation --- .../onlp/builds/src/README | 2 +- .../x86-64-accton-as7512-32x-r0/__init__.py | 64 +++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/onlp/builds/src/README b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/onlp/builds/src/README index 72089c9a..37f04e0f 100644 --- a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/onlp/builds/src/README +++ b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/onlp/builds/src/README @@ -1,6 +1,6 @@ ############################################################################### # -# x86_64_accton_as5712_54x README +# x86_64_accton_as7512_32x README # ############################################################################### diff --git a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py index 503acb7e..1785b22c 100644 --- a/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py +++ b/packages/platforms/accton/x86-64/x86-64-accton-as7512-32x/platform-config/r0/src/python/x86-64-accton-as7512-32x-r0/__init__.py @@ -74,38 +74,38 @@ class OnlPlatform_x86_64_accton_as7512_32x_r0(OnlPlatformAccton): # initialize QSFP port 1~32 - self.new_i2c_device('as7512_54x_sfp1', 0x50, 18) - self.new_i2c_device('as7512_54x_sfp2', 0x50, 19) - self.new_i2c_device('as7512_54x_sfp3', 0x50, 20) - self.new_i2c_device('as7512_54x_sfp4', 0x50, 21) - self.new_i2c_device('as7512_54x_sfp5', 0x50, 22) - self.new_i2c_device('as7512_54x_sfp6', 0x50, 23) - self.new_i2c_device('as7512_54x_sfp7', 0x50, 24) - self.new_i2c_device('as7512_54x_sfp8', 0x50, 25) - self.new_i2c_device('as7512_54x_sfp9', 0x50, 26) - self.new_i2c_device('as7512_54x_sfp10, 0x50, 27) - self.new_i2c_device('as7512_54x_sfp11, 0x50, 28) - self.new_i2c_device('as7512_54x_sfp12, 0x50, 29) - self.new_i2c_device('as7512_54x_sfp13, 0x50, 30) - self.new_i2c_device('as7512_54x_sfp14, 0x50, 31) - self.new_i2c_device('as7512_54x_sfp15, 0x50, 32) - self.new_i2c_device('as7512_54x_sfp16, 0x50, 33) - self.new_i2c_device('as7512_54x_sfp17, 0x50, 34) - self.new_i2c_device('as7512_54x_sfp18, 0x50, 35) - self.new_i2c_device('as7512_54x_sfp19, 0x50, 36) - self.new_i2c_device('as7512_54x_sfp20, 0x50, 37) - self.new_i2c_device('as7512_54x_sfp21, 0x50, 38) - self.new_i2c_device('as7512_54x_sfp22, 0x50, 39) - self.new_i2c_device('as7512_54x_sfp23, 0x50, 40) - self.new_i2c_device('as7512_54x_sfp24, 0x50, 41) - self.new_i2c_device('as7512_54x_sfp25, 0x50, 42) - self.new_i2c_device('as7512_54x_sfp26, 0x50, 43) - self.new_i2c_device('as7512_54x_sfp27, 0x50, 44) - self.new_i2c_device('as7512_54x_sfp28, 0x50, 45) - self.new_i2c_device('as7512_54x_sfp29, 0x50, 46) - self.new_i2c_device('as7512_54x_sfp30, 0x50, 47) - self.new_i2c_device('as7512_54x_sfp31, 0x50, 48) - self.new_i2c_device('as7512_54x_sfp32, 0x50, 49) + self.new_i2c_device('as7512_32x_sfp1', 0x50, 18) + self.new_i2c_device('as7512_32x_sfp2', 0x50, 19) + self.new_i2c_device('as7512_32x_sfp3', 0x50, 20) + self.new_i2c_device('as7512_32x_sfp4', 0x50, 21) + self.new_i2c_device('as7512_32x_sfp5', 0x50, 22) + self.new_i2c_device('as7512_32x_sfp6', 0x50, 23) + self.new_i2c_device('as7512_32x_sfp7', 0x50, 24) + self.new_i2c_device('as7512_32x_sfp8', 0x50, 25) + self.new_i2c_device('as7512_32x_sfp9', 0x50, 26) + self.new_i2c_device('as7512_32x_sfp10, 0x50, 27) + self.new_i2c_device('as7512_32x_sfp11, 0x50, 28) + self.new_i2c_device('as7512_32x_sfp12, 0x50, 29) + self.new_i2c_device('as7512_32x_sfp13, 0x50, 30) + self.new_i2c_device('as7512_32x_sfp14, 0x50, 31) + self.new_i2c_device('as7512_32x_sfp15, 0x50, 32) + self.new_i2c_device('as7512_32x_sfp16, 0x50, 33) + self.new_i2c_device('as7512_32x_sfp17, 0x50, 34) + self.new_i2c_device('as7512_32x_sfp18, 0x50, 35) + self.new_i2c_device('as7512_32x_sfp19, 0x50, 36) + self.new_i2c_device('as7512_32x_sfp20, 0x50, 37) + self.new_i2c_device('as7512_32x_sfp21, 0x50, 38) + self.new_i2c_device('as7512_32x_sfp22, 0x50, 39) + self.new_i2c_device('as7512_32x_sfp23, 0x50, 40) + self.new_i2c_device('as7512_32x_sfp24, 0x50, 41) + self.new_i2c_device('as7512_32x_sfp25, 0x50, 42) + self.new_i2c_device('as7512_32x_sfp26, 0x50, 43) + self.new_i2c_device('as7512_32x_sfp27, 0x50, 44) + self.new_i2c_device('as7512_32x_sfp28, 0x50, 45) + self.new_i2c_device('as7512_32x_sfp29, 0x50, 46) + self.new_i2c_device('as7512_32x_sfp30, 0x50, 47) + self.new_i2c_device('as7512_32x_sfp31, 0x50, 48) + self.new_i2c_device('as7512_32x_sfp32, 0x50, 49) ] )