Skip to content

[Nexthop][m4061nhp] Fix the switch-card TMP464 channel mapping - #2025

Open
frank-nexthop wants to merge 1 commit into
meta:mainfrom
nexthop-ai:frank.upstream.m4061nhp-tmp464-channels
Open

frank-nexthop wants to merge 1 commit into
meta:mainfrom
nexthop-ai:frank.upstream.m4061nhp-tmp464-channels

Conversation

@frank-nexthop

Copy link
Copy Markdown
Contributor

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

The switch-card TMP464 on m4061nhp has five channels. The config followed an older four-channel mapping that put the ASIC thermal diode on temp2. As a result, the diode was checked against the 92 C board limit, two board sensors were checked against the 122 C diode limit, and temp5 was not read at all.

hwmon Location Before After
temp1 local SWITCH_CARD_TMP464_LOCAL 87/92 unchanged
temp2 near FPGA ASIC_DIODE_0 115/122 SWITCH_CARD_NEAR_FPGA 87/92
temp3 ASIC diode SWITCH_CARD_NEAR_ASIC 87/92 ASIC_DIODE_0 115/122
temp4 near ASIC SWITCH_CARD_PDC_INTAKE 115/122 SWITCH_CARD_NEAR_ASIC 87/92
temp5 near right PDC connector not read SWITCH_CARD_NEAR_PDC_RIGHT 87/92

The fan_service thermal shutdown conditions now point at the corrected sensors, and SWITCH_CARD_NEAR_PDC_RIGHT is added to them. numOvertempSensorForShutdown stays at 2, as on m4062nhp and m4340nhp.

Test Plan

On an m4061nhp, I logged temp1-5 and the ASIC's own temperature sensors every 5 s, disabled all ports for 8 minutes, then re-enabled them. Only temp3 followed the ASIC: it dropped within 30 s, bottomed out at about 2 minutes and settled within about 2 minutes of re-enabling. The other channels cooled and recovered slowly, like the rest of the board. temp2, the old diode channel, fell steadily with no rebound.

temp1 temp2 temp3 temp4 temp5 ASIC max
ports up 52.5 44.6 49.9 52.8 38.1 62.3
ports down 8 min 43.7 37.4 46.0 42.8 33.1 46.4
ports up 8 min 52.6 44.8 51.1 52.9 38.6 63.9

I ran sensor_service and fan_service on the new configs. Every sensor named in the fan_service shutdown conditions was published with a normal reading, fan_service loaded the new conditions, and it reported no overtemperature. Both JSON files round-trip through json.dumps(indent=2) unchanged.

The switch-card TMP464 has five channels, in hwmon order: temp1 local,
temp2 near the FPGA, temp3 the ASIC thermal diode, temp4 near the ASIC,
temp5 near the right PDC connector. The config followed an older
four-channel mapping that put the ASIC diode on temp2, so the diode had
board limits and two board sensors had diode limits, and temp5 was not
read. Rename temp2-temp4 and set their limits to match, add temp5, and
point the fan_service thermal shutdown conditions at the corrected
sensors. Verified on hardware: after disabling all ports, only temp3
follows the ASIC's own temperature sensors.

Signed-off-by: frank-nexthop <frank@nexthop.ai>
@frank-nexthop
frank-nexthop requested a review from a team as a code owner November 20, 2026 00:09
@meta-cla meta-cla Bot added the CLA Signed label Nov 20, 2026
@github-actions github-actions Bot added nexthop project:m4061nhp FBOSS project: m4061nhp labels Nov 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants