From 42faf93088cd73ebcb773fb2116688b8c6dfe4c5 Mon Sep 17 00:00:00 2001 From: Scott J Paulsen Date: Wed, 4 Dec 2024 16:54:47 -0800 Subject: [PATCH] Add fan presence to platform manager (#300) Summary: This add fan presence to the platform_manager.json file for the morgan800cc program. UT: I1203 10:20:23.575926 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan1_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@0 I1203 10:20:23.575988 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan2_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@1 I1203 10:20:23.576049 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan3_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@2 I1203 10:20:23.576102 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan4_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@3 I1203 10:20:23.576156 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan5_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@4 I1203 10:20:23.576209 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan6_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@5 I1203 10:20:23.576261 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan7_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@6 I1203 10:20:23.576317 887 PresenceChecker.cpp:60] Value at /sys/bus/pci/devices/0000:01:00.0/cisco_meta.fan_ctrl.1021/hwmon/hwmon2/fan8_presence is 1. desiredValue is 1. Assuming presence of PmUnit at /FCB_SLOT@0/FANTRAY_SLOT@7 Pull Request resolved: https://github.com/facebook/fboss/pull/300 Reviewed By: rationalis Differential Revision: D66661209 Pulled By: somasun fbshipit-source-id: 6961a24c1cf677bedc6acfbcea62381288698e87 --- .../configs/morgan800cc/platform_manager.json | 87 ++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/fboss/platform/configs/morgan800cc/platform_manager.json b/fboss/platform/configs/morgan800cc/platform_manager.json index 301257bdf774f..7b4583b367473 100644 --- a/fboss/platform/configs/morgan800cc/platform_manager.json +++ b/fboss/platform/configs/morgan800cc/platform_manager.json @@ -499,7 +499,92 @@ } }, "MORGAN800CC": { - "pluggedInSlotType": "FCB_SLOT" + "pluggedInSlotType": "FCB_SLOT", + "outgoingSlotConfigs": { + "FANTRAY_SLOT@0": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan1_presence", + "desiredValue": 1 + } + } + }, + "FANTRAY_SLOT@1": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan2_presence", + "desiredValue": 1 + } + } + }, + "FANTRAY_SLOT@2": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan3_presence", + "desiredValue": 1 + } + } + }, + "FANTRAY_SLOT@3": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan4_presence", + "desiredValue": 1 + } + } + }, + "FANTRAY_SLOT@4": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan5_presence", + "desiredValue": 1 + } + } + }, + "FANTRAY_SLOT@5": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan6_presence", + "desiredValue": 1 + } + } + }, + "FANTRAY_SLOT@6": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan7_presence", + "desiredValue": 1 + } + } + }, + "FANTRAY_SLOT@7": { + "slotType": "FANTRAY_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/[MCB_FAN_PWM]", + "presenceFileName": "fan8_presence", + "desiredValue": 1 + } + } + } + } + }, + "FAN": { + "pluggedInSlotType": "FANTRAY_SLOT" }, "PDB": { "pluggedInSlotType": "PDB_SLOT"