Skip to content

Janga: config: added 10 tpm422 overtemp config in fan service file#356

Closed
zhongedward wants to merge 6 commits into
facebook:mainfrom
zhongedward:add_janga_overtemp422_fan_service_config
Closed

Janga: config: added 10 tpm422 overtemp config in fan service file#356
zhongedward wants to merge 6 commits into
facebook:mainfrom
zhongedward:add_janga_overtemp422_fan_service_config

Conversation

@zhongedward

@zhongedward zhongedward commented Mar 21, 2025

Copy link
Copy Markdown
Contributor

Description
This PR added 10 tmp422 overtemp config for janga fan service.

Motivation
1.Added 10 tmp422 nodes to the fan service config. Threshold is 110 degrees and will run shoutdown cmd to shut down the J3A and J3B ASIC in case of over-temperature.
SMB_U68_TMP422_J3_A_TEMPDIODE_NIF1
SMB_U68_TMP422_J3_A_TEMPDIODE_HBM_PHY0
SMB_U150_TMP422_J3_A_TEMPDIODE_FAB1
SMB_U150_TMP422_J3_A_TEMPDIODE_HBM_PHY2
SMB_U351_TMP422_J3_B_TEMPDIODE_PADS
SMB_U351_TMP422_J3_B_TEMPDIODE_NIF0
SMB_U352_TMP422_J3_B_TEMPDIODE_NIF1
SMB_U352_TMP422_J3_B_TEMPDIODE_HBM_PHY0
SMB_U152_TMP422_J3_B_TEMPDIODE_FAB1
SMB_U152_TMP422_J3_B_TEMPDIODE_HBM_PHY2

image

2.If run the shutdown cmd "shutdownCmd": "echo 0 > /run/devmap/cplds/JANGA_SMB_CPLD/j3a_pwr_en;echo 0 > /run/devmap/cplds/JANGA_SMB_CPLD/j3b_pwr_en", Only shut down the J3A & J3B ASIC not the entire system.

Test Plan
1.The correctness of the format has been verified on this website https://jsonlint.com/
2.Used jq cmd to pretty the format.
3.Test log as follows:

sensor service read temp log:
image

fan service read temp log:
image

read reg value after shutdown:
image

The normal lspci:
14:05.0 PCI bridge: Intel Corporation Device 347d (rev 06)
15:00.0 Ethernet controller: Broadcom Inc. and subsidiaries Device 8890 (rev 02) ---->is J3A
16:00.0 Non-Volatile memory controller: Micron Technology Inc 7450 PRO NVMe SSD (rev 01)
17:00.0 Communication controller: Facebook, Inc. IO Bridge (rev 03)
18:00.0 Ethernet controller: Broadcom Inc. and subsidiaries Device 8890 (rev 02) ---->is J3B
fe:00.0 System peripheral: Intel Corporation Device 3450

After run the shutdown cmd:
image

sensors_110.txt
fan_test_110.txt
read_reg_110.txt

@zhongedward zhongedward changed the title janga: config: added 10 tpm422 overtemp config in fan service file Mar 21, 2025

@Abdullah4345 Abdullah4345 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

"pwmTransitionValue": 50,
"pwmLowerThreshold": 30,
"pwmUpperThreshold": 100,
"shutdownCmd": "i2cset -y -f \"fbiob iob_i2c_master.1009 at 0xfb504900\" 0x33 0x07 0x9f",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iob_i2c_master.1009 is not a reliable because instance id 1009 is relative to the config. If config changes, this may not work. cc @somasun @tao-ren

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use /run/devmap/i2c-busses?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @lucasr mentioned to create sysfs file in the CPLD driver but I cannot find the comment here. I agree it's easier to add the sysfs entry in CPLD driver, and then simplify the command in fan_Service.json.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tao-ren I removed the comment before. If we add a sysfs in the SMB CPLD driver, need to switch CPLD slave address from 0x3e to 0x33, only 0x33 address space have this control signal, we will add it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @clslucas, I didn't know the register is in the different slave module. Which CPLD are you referring to? Is it CPLD1 or CPLD2? Are the 2 slave addresses connected to the same IOB I2C controller?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clslucas , I think it's CPLD2 (with 2 slave modules 0x33 and 0x3e). Looks like 0x33 contains all the registers that are available to 0x3e; do you think we can switch cpld device address to 0x33 in platform_manager.json and add the required sysfs entry for this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tao-ren Yes, we will be able to do it soon, fristly we will add the sysfs in CPLD driver and then update this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tao-ren @kimdo8736 Updated the SMB CPLD driver to support the power sysfs in PR,https://github.com/facebookexternal/fboss.bsp.celestica/pull/486

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clslucas What is our plan for this PR? Are you going to update this PR that works with the new change in BSP? If so, when will it be done?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikechoifb updated via commit in this PR, thanks for your review.

@kimdo8736 kimdo8736 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow-up on shutdownCmd comment.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@zhongedward zhongedward requested a review from kimdo8736 April 21, 2025 06:07
@clslucas

clslucas commented May 7, 2025

Copy link
Copy Markdown
Contributor

@mikechoifb @kimdo8736 How about this PR, does it need to be resubmitted?

@tao-ren

tao-ren commented May 7, 2025

Copy link
Copy Markdown
Contributor

@mikechoifb @kimdo8736 How about this PR, does it need to be resubmitted?

Thanks for following up, @clslucas! Is BSP version updated to v3.1.0-1 in janga platform_manager.json? If so, it's safe to use the sysfs path in fan_service.config.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@clslucas

clslucas commented May 7, 2025

Copy link
Copy Markdown
Contributor

@tao-ren Thanks for your reminder, we have rebased the repo and updated platform_manager.json.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@somasun

somasun commented May 9, 2025

Copy link
Copy Markdown
Contributor

Thanks for addressing the comments. How do we enable them back? Is it just

echo 1 > /run/devmap/cplds/JANGA_SMB_CPLD/j3a_pwr_en; echo 1 > /run/devmap/cplds/JANGA_SMB_CPLD/j3b_pwr_en"
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@zhongedward

Copy link
Copy Markdown
Contributor Author

Thanks for addressing the comments. How do we enable them back? Is it just

echo 1 > /run/devmap/cplds/JANGA_SMB_CPLD/j3a_pwr_en; echo 1 > /run/devmap/cplds/JANGA_SMB_CPLD/j3b_pwr_en"

@somasun Yes.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@kimdo8736 merged this pull request in 6143d9c.

@zhongedward zhongedward deleted the add_janga_overtemp422_fan_service_config branch October 22, 2025 02:17
raghav-nexthop added a commit to nexthop-ai/fboss that referenced this pull request Feb 6, 2026
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please provide enough information so
that others can review your pull request. -->

**Pre-submission checklist**
- [ ] I've ran the linters locally and fixed lint errors related to the
files I modified in this PR. You can install the linters by running `pip
install -r requirements-dev.txt && pre-commit install`
- [ ] `pre-commit run`

# Summary

Update build manifests to include platform stack build
Update the config script to install platform stack tarball

<!-- Explain the motivation for making this change and any other context
that you think would help reviewers of your code. What existing problem
does the pull request solve? -->

# Test Plan

Manually built the platform stack
<!-- Demonstrate the code is solid. Example: The exact commands you ran
and their output, screenshots / videos if the pull request changes the
user interface. How exactly did you verify that your PR solves the issue
you wanted to solve? -->

<!-- If a relevant Github issue exists for this PR, please make sure you
link that issue to this PR -->

---------

Co-authored-by: Travis Brown <travisb@nexthop.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment