Skip to content

Commit

Permalink
[Accton][platform][device]: Enhance AS5835-54T sonic_platform feature.
Browse files Browse the repository at this point in the history
Detail:
    #### Why I did it
    Enhance features and sonic-platform and fixed bugs on this platform.

    #### How I did it
    It's base on [PR14387](sonic-net/sonic-buildimage#14387) and enhance features.
    Finally to sonic-mgmt(202311) pytest successfully.

    #### How to verify it

    1. Check sonic-platform command and show good:
    `show platform {fan, temperature, firmware status, syseeprom, psustatus}`
    2. Do sonic-mgmt pytest:

    #### Description for the changelog

Signed-off-by: michael_shih <[email protected]>
  • Loading branch information
ec-michael-shih authored and tigerfu000 committed Feb 13, 2025
1 parent 186b9dd commit c093cba
Show file tree
Hide file tree
Showing 23 changed files with 290 additions and 487 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,33 +289,27 @@
},

"Ethernet48": {
"default_brkout_mode": "1x100G[40G]",
"autoneg": "off"
"default_brkout_mode": "1x100G[40G]"
},

"Ethernet52": {
"default_brkout_mode": "1x100G[40G]",
"autoneg": "off"
"default_brkout_mode": "1x100G[40G]"
},

"Ethernet56": {
"default_brkout_mode": "1x100G[40G]",
"autoneg": "off"
"default_brkout_mode": "1x100G[40G]"
},

"Ethernet60": {
"default_brkout_mode": "1x100G[40G]",
"autoneg": "off"
"default_brkout_mode": "1x100G[40G]"
},

"Ethernet64": {
"default_brkout_mode": "1x100G[40G]",
"autoneg": "off"
"default_brkout_mode": "1x100G[40G]"
},

"Ethernet68": {
"default_brkout_mode": "1x100G[40G]",
"autoneg": "off"
"default_brkout_mode": "1x100G[40G]"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
# name lanes alias index speed autoneg
Ethernet0 2 Eth1(Port1) 1 10000 on
Ethernet1 1 Eth2(Port2) 2 10000 on
Ethernet2 4 Eth3(Port3) 3 10000 on
Ethernet3 3 Eth4(Port4) 4 10000 on
Ethernet4 6 Eth5(Port5) 5 10000 on
Ethernet5 5 Eth6(Port6) 6 10000 on
Ethernet6 8 Eth7(Port7) 7 10000 on
Ethernet7 7 Eth8(Port8) 8 10000 on
Ethernet8 10 Eth9(Port9) 9 10000 on
Ethernet9 9 Eth10(Port10) 10 10000 on
Ethernet10 12 Eth11(Port11) 11 10000 on
Ethernet11 11 Eth12(Port12) 12 10000 on
Ethernet12 14 Eth13(Port13) 13 10000 on
Ethernet13 13 Eth14(Port14) 14 10000 on
Ethernet14 16 Eth15(Port15) 15 10000 on
Ethernet15 15 Eth16(Port16) 16 10000 on
Ethernet16 18 Eth17(Port17) 17 10000 on
Ethernet17 17 Eth18(Port18) 18 10000 on
Ethernet18 20 Eth19(Port19) 19 10000 on
Ethernet19 19 Eth20(Port20) 20 10000 on
Ethernet20 22 Eth21(Port21) 21 10000 on
Ethernet21 21 Eth22(Port22) 22 10000 on
Ethernet22 24 Eth23(Port23) 23 10000 on
Ethernet23 23 Eth24(Port24) 24 10000 on
Ethernet24 54 Eth25(Port25) 25 10000 on
Ethernet25 53 Eth26(Port26) 26 10000 on
Ethernet26 56 Eth27(Port27) 27 10000 on
Ethernet27 55 Eth28(Port28) 28 10000 on
Ethernet28 58 Eth29(Port29) 29 10000 on
Ethernet29 57 Eth30(Port30) 30 10000 on
Ethernet30 60 Eth31(Port31) 31 10000 on
Ethernet31 59 Eth32(Port32) 32 10000 on
Ethernet32 62 Eth33(Port33) 33 10000 on
Ethernet33 61 Eth34(Port34) 34 10000 on
Ethernet34 64 Eth35(Port35) 35 10000 on
Ethernet35 63 Eth36(Port36) 36 10000 on
Ethernet36 66 Eth37(Port37) 37 10000 on
Ethernet37 65 Eth38(Port38) 38 10000 on
Ethernet38 68 Eth39(Port39) 39 10000 on
Ethernet39 67 Eth40(Port40) 40 10000 on
Ethernet40 70 Eth41(Port41) 41 10000 on
Ethernet41 69 Eth42(Port42) 42 10000 on
Ethernet42 72 Eth43(Port43) 43 10000 on
Ethernet43 71 Eth44(Port44) 44 10000 on
Ethernet44 74 Eth45(Port45) 45 10000 on
Ethernet45 73 Eth46(Port46) 46 10000 on
Ethernet46 76 Eth47(Port47) 47 10000 on
Ethernet47 75 Eth48(Port48) 48 10000 on
Ethernet48 37,38,39,40 Eth49(Port49) 49 100000 off
Ethernet52 29,30,31,32 Eth50(Port50) 50 100000 off
Ethernet56 33,34,35,36 Eth51(Port51) 51 100000 off
Ethernet60 49,50,51,52 Eth52(Port52) 52 100000 off
Ethernet64 45,46,47,48 Eth53(Port53) 53 100000 off
Ethernet68 41,42,43,44 Eth54(Port54) 54 100000 off
# name lanes alias index speed
Ethernet0 2 Eth1(Port1) 1 10000
Ethernet1 1 Eth2(Port2) 2 10000
Ethernet2 4 Eth3(Port3) 3 10000
Ethernet3 3 Eth4(Port4) 4 10000
Ethernet4 6 Eth5(Port5) 5 10000
Ethernet5 5 Eth6(Port6) 6 10000
Ethernet6 8 Eth7(Port7) 7 10000
Ethernet7 7 Eth8(Port8) 8 10000
Ethernet8 10 Eth9(Port9) 9 10000
Ethernet9 9 Eth10(Port10) 10 10000
Ethernet10 12 Eth11(Port11) 11 10000
Ethernet11 11 Eth12(Port12) 12 10000
Ethernet12 14 Eth13(Port13) 13 10000
Ethernet13 13 Eth14(Port14) 14 10000
Ethernet14 16 Eth15(Port15) 15 10000
Ethernet15 15 Eth16(Port16) 16 10000
Ethernet16 18 Eth17(Port17) 17 10000
Ethernet17 17 Eth18(Port18) 18 10000
Ethernet18 20 Eth19(Port19) 19 10000
Ethernet19 19 Eth20(Port20) 20 10000
Ethernet20 22 Eth21(Port21) 21 10000
Ethernet21 21 Eth22(Port22) 22 10000
Ethernet22 24 Eth23(Port23) 23 10000
Ethernet23 23 Eth24(Port24) 24 10000
Ethernet24 54 Eth25(Port25) 25 10000
Ethernet25 53 Eth26(Port26) 26 10000
Ethernet26 56 Eth27(Port27) 27 10000
Ethernet27 55 Eth28(Port28) 28 10000
Ethernet28 58 Eth29(Port29) 29 10000
Ethernet29 57 Eth30(Port30) 30 10000
Ethernet30 60 Eth31(Port31) 31 10000
Ethernet31 59 Eth32(Port32) 32 10000
Ethernet32 62 Eth33(Port33) 33 10000
Ethernet33 61 Eth34(Port34) 34 10000
Ethernet34 64 Eth35(Port35) 35 10000
Ethernet35 63 Eth36(Port36) 36 10000
Ethernet36 66 Eth37(Port37) 37 10000
Ethernet37 65 Eth38(Port38) 38 10000
Ethernet38 68 Eth39(Port39) 39 10000
Ethernet39 67 Eth40(Port40) 40 10000
Ethernet40 70 Eth41(Port41) 41 10000
Ethernet41 69 Eth42(Port42) 42 10000
Ethernet42 72 Eth43(Port43) 43 10000
Ethernet43 71 Eth44(Port44) 44 10000
Ethernet44 74 Eth45(Port45) 45 10000
Ethernet45 73 Eth46(Port46) 46 10000
Ethernet46 76 Eth47(Port47) 47 10000
Ethernet47 75 Eth48(Port48) 48 10000
Ethernet48 37,38,39,40 Eth49(Port49) 49 100000
Ethernet52 29,30,31,32 Eth50(Port50) 50 100000
Ethernet56 33,34,35,36 Eth51(Port51) 51 100000
Ethernet60 49,50,51,52 Eth52(Port52) 52 100000
Ethernet64 45,46,47,48 Eth53(Port53) 53 100000
Ethernet68 41,42,43,44 Eth54(Port54) 54 100000
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}
},

"PSU_FAN_MAX_SPEED":"26688"
"PSU_FAN_MAX_SPEED":"18000"
},

"FAN":
Expand Down
18 changes: 9 additions & 9 deletions device/accton/x86_64-accton_as5835_54t-r0/pddf/pddf-device.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,14 @@
{ "attr_name":"psu_mfr_id", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0X99", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"10" },
{ "attr_name":"psu_fan_dir", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xc3", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"5"},
{ "attr_name":"psu_v_out", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0x8b", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_min", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xa4", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_max", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xa5", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_i_out", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0x8c", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_p_out", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0x96", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_p_out_max", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xa7", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_fan1_speed_rpm", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0x90", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_temp1_input", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0x8d", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_max", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xa5", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_min", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xa4", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_p_out_max", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xa7", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_temp1_high_threshold", "attr_devaddr":"0x58", "attr_devtype":"pmbus", "attr_offset":"0xa8", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}

]
}
},
Expand Down Expand Up @@ -303,13 +302,13 @@
{ "attr_name":"psu_mfr_id", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0X99", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"10" },
{ "attr_name":"psu_fan_dir", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xc3", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"5"},
{ "attr_name":"psu_v_out", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x8b", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_min", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xa4", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_max", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xa5", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_i_out", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x8c", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_p_out", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x96", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_p_out_max", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xa7", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_fan1_speed_rpm", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x90", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_temp1_input", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x8d", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_max", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xa5", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_v_out_min", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xa4", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_p_out_max", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xa7", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"},
{ "attr_name":"psu_temp1_high_threshold", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xa8", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}
]
}
Expand Down Expand Up @@ -482,6 +481,7 @@
]
}
},

"MUX3":
{
"dev_info": { "device_type":"MUX", "device_name":"MUX3", "device_parent":"MUX1"},
Expand Down Expand Up @@ -752,7 +752,7 @@
"LOC_LED":
{
"dev_info": { "device_type":"LED", "device_name":"LOC_LED"},
"dev_attr": { "index":"0", "flag":"rw"},
"dev_attr": { "index":"0", "flag": "rw"},
"i2c" :
{
"attr_list":
Expand All @@ -766,7 +766,7 @@
"DIAG_LED":
{
"dev_info": { "device_type":"LED", "device_name":"DIAG_LED"},
"dev_attr": { "index":"0", "flag":"rw"},
"dev_attr": { "index":"0", "flag": "rw"},
"i2c" :
{
"attr_list":
Expand Down
12 changes: 9 additions & 3 deletions device/accton/x86_64-accton_as5835_54t-r0/platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@
},
"components": [
{
"name": "CPLD1"
"name": "MB_CPLD1"
},
{
"name": "CPLD2"
"name": "MB_CPLD2"
},
{
"name": "CPLD3"
"name": "MB_CPLD3"
},
{
"name": "FAN_CPLD"
},
{
"name": "CPU_CPLD"
},
{
"name": "BIOS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"chassis": {
"5835-54T-O-AC-F": {
"component": {
"CPLD1": { },
"CPLD2": { },
"CPLD3": { },
"MB_CPLD1": { },
"MB_CPLD2": { },
"MB_CPLD3": { },
"FAN_CPLD": { },
"CPU_CPLD": { },
"BIOS": { }
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
"devices_to_ignore": [
"asic",
"psu.voltage",
"psu.temperature",
"PSU1_FAN1.speed",
"PSU2_FAN1.speed"
"psu.temperature"
],
"user_defined_checkers": [],
"polling_interval": 60,
"led_color": {
"fault": "amber",
"normal": "green",
"booting": "green"
"booting": "off"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ifneq ($(KERNELRELEASE),)
obj-m:= accton_as5835_54t_cpld.o accton_as5835_54t_psu.o \
accton_as5835_54t_fan.o accton_as5835_54t_leds.o \
ym2651y.o pddf_custom_psu.o

CFLAGS_pddf_custom_psu.o := -I$(M)/../../../../pddf/i2c/modules/include
KBUILD_EXTRA_SYMBOLS := $(M)/../../../../pddf/i2c/Module.symvers.PDDF

Expand Down
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit c093cba

Please sign in to comment.