Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fan_service: add DARWIN48V platform support #264

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adamcalabrigo
Copy link
Contributor

Description

Adds initial fan_service support for DARWIN48V platform. The config is the same as DARWIN, but fan6 has been restored to the config and it's PWM is now set correctly due to updates in BSP.

Note that this depends on the changes in #257.

Test Plan

FBOSS OSS build passes with CentOS 9 and Linux kernel 6.4.

Validated on DARWIN48V hardware.

fan_service loads correctly:

# systemctl status  fan_service
● fan_service.service - Start fan_service
     Loaded: loaded (/etc/systemd/system/fan_service.service; enabled; preset: disabled)
     Active: active (running) since Tue 2024-10-08 00:39:22 UTC; 2h 23min ago
   Main PID: 4939 (run_fan_service)
      Tasks: 39 (limit: 200901)
     Memory: 5.2M
        CPU: 1.444s
     CGroup: /system.slice/fan_service.service
             ├─4939 /bin/bash /opt/fboss/bin/run_fan_service.sh
             └─4940 /opt/fboss/bin/fan_service -config_file /opt/fboss/share/platform_configs/fan_service.json

Service accesses sensors and sets PWM correctly:

I1008 00:39:59.711543  4956 ControlLogic.cpp:109] Successfully fetched optics data.
I1008 00:39:59.711549  4956 ControlLogic.cpp:571] Processing Sensors ...
E1008 00:39:59.711558  4956 ControlLogic.cpp:238] SC_TH3_DIODE1_TEMP: Sensor read value (after scaling) is 45.125
I1008 00:39:59.711600  4956 ControlLogic.cpp:220] SC_TH3_DIODE1_TEMP: Calculated PWM is 24
E1008 00:39:59.711607  4956 ControlLogic.cpp:238] SC_TH3_DIODE2_TEMP: Sensor read value (after scaling) is 43
I1008 00:39:59.711612  4956 ControlLogic.cpp:220] SC_TH3_DIODE2_TEMP: Calculated PWM is 24
I1008 00:39:59.711617  4956 ControlLogic.cpp:575] Processing Optics ...
I1008 00:39:59.711622  4956 ControlLogic.cpp:579] Processing Fans ...
I1008 00:39:59.712711  4956 ControlLogic.cpp:365] fan_1: is present in the host (through sysfs)
I1008 00:39:59.716715  4956 ControlLogic.cpp:168] fan_1: RPM read is 12820
I1008 00:39:59.717694  4956 ControlLogic.cpp:365] fan_2: is present in the host (through sysfs)
I1008 00:39:59.721721  4956 ControlLogic.cpp:168] fan_2: RPM read is 12875
I1008 00:39:59.722688  4956 ControlLogic.cpp:365] fan_3: is present in the host (through sysfs)
I1008 00:39:59.726713  4956 ControlLogic.cpp:168] fan_3: RPM read is 12820
I1008 00:39:59.727659  4956 ControlLogic.cpp:365] fan_4: is present in the host (through sysfs)
I1008 00:39:59.731714  4956 ControlLogic.cpp:168] fan_4: RPM read is 12987
I1008 00:39:59.732704  4956 ControlLogic.cpp:365] fan_5: is present in the host (through sysfs)
I1008 00:39:59.736705  4956 ControlLogic.cpp:168] fan_5: RPM read is 12931
I1008 00:39:59.736817  4956 ControlLogic.cpp:365] fan_6: is present in the host (through sysfs)
I1008 00:39:59.797636  4956 ControlLogic.cpp:168] fan_6: RPM read is 12522

@facebook-github-bot
Copy link
Contributor

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@adamcalabrigo has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants