Skip to content

Commit

Permalink
meru800biab: added led_manager support
Browse files Browse the repository at this point in the history
  • Loading branch information
aalamsi22 committed Oct 16, 2024
1 parent 3f47f02 commit 96912ff
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fboss/led_service/LedManagerInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ std::unique_ptr<LedManager> createLedManager() {
mode == PlatformType::PLATFORM_MERU800BFA ||
mode == PlatformType::PLATFORM_MERU800BFA_P1) {
return std::make_unique<Meru800bfaLedManager>();
} else if (mode == PlatformType::PLATFORM_MERU800BIA) {
} else if (
mode == PlatformType::PLATFORM_MERU800BIA ||
mode == PlatformType::PLATFORM_MERU800BIAB) {
return std::make_unique<Meru800biaLedManager>();
} else if (mode == PlatformType::PLATFORM_MORGAN800CC) {
return std::make_unique<Morgan800ccLedManager>();
Expand Down
54 changes: 54 additions & 0 deletions fboss/platform/configs/meru800biab/led_manager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"systemLedConfig": {
"presentLedColor": 1,
"presentLedSysfsPath": "/sys/class/leds/sys_led:green:status/brightness",
"absentLedColor": 2,
"absentLedSysfsPath": "/sys/class/leds/sys_led:red:status/brightness"
},
"fruTypeLedConfigs": {
"FAN": {
"presentLedColor": 1,
"presentLedSysfsPath": "/sys/class/leds/fan_led:green:status/brightness",
"absentLedColor": 2,
"absentLedSysfsPath": "/sys/class/leds/fan_led:red:status/brightness"
},
"PSU": {
"presentLedColor": 1,
"presentLedSysfsPath": "/sys/class/leds/psu_led:green:status/brightness",
"absentLedColor": 2,
"absentLedSysfsPath": "/sys/class/leds/psu_led:red:status/brightness"
}
},
"fruConfigs": [
{
"fruName": "FAN1",
"fruType": "FAN",
"presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present"
},
{
"fruName": "FAN2",
"fruType": "FAN",
"presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present"
},
{
"fruName": "FAN3",
"fruType": "FAN",
"presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present"
},
{
"fruName": "FAN4",
"fruType": "FAN",
"presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present"
},
{
"fruName": "PSU1",
"fruType": "PSU",
"presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present"
},
{
"fruName": "PSU2",
"fruType": "PSU",
"presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present"
}
]
}

0 comments on commit 96912ff

Please sign in to comment.