oxidecomputer / oxidecomputer/hubris

TMP117 on PSC is not a temperature sensor

Open
#2,547 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

psc service processor
Dominant language
Rust
Stars
3.6k
Forks
239
Avg merge
1d 12h
Merged PRs (30d)
23

Description

root@oxz_switch0:~# faux-mgs --interface psc0 inventory
Jun 03 17:23:17.951 INFO creating SP handle on interface psc0, component: faux-mgs
Jun 03 17:23:17.952 INFO initial discovery complete, addr: [fe80::aa40:25ff:fe06:107%76]:11111, interface: psc0, socket: control-plane-agent, component: faux-mgs
COMPONENT        STATUS       DEVICE           DESCRIPTION (CAPABILITIES)
sp               Present      sp               Service Processor (DeviceCapabilities(1))
system-led       Present      system-led       System attention LED (DeviceCapabilities(8))
U31              Present      tmp116           Temperature sensor (DeviceCapabilities(0))
U32              Present      at24csw080       FRU ID EEPROM (DeviceCapabilities(0))
PSU0/ID          Present      m24c02           PSU 0 EEPROM (DeviceCapabilities(0))
PSU0             Present      mwocp68          PSU 0 MCU (DeviceCapabilities(2))
PSU1/ID          Present      m24c02           PSU 1 EEPROM (DeviceCapabilities(0))
PSU1             Present      mwocp68          PSU 1 MCU (DeviceCapabilities(2))
PSU2/ID          Present      m24c02           PSU 2 EEPROM (DeviceCapabilities(0))
PSU2             Present      mwocp68          PSU 2 MCU (DeviceCapabilities(2))
PSU3/ID          NotPresent   m24c02           PSU 3 EEPROM (DeviceCapabilities(0))
PSU3             NotPresent   mwocp68          PSU 3 MCU (DeviceCapabilities(2))
PSU4/ID          NotPresent   m24c02           PSU 4 EEPROM (DeviceCapabilities(0))
PSU4             NotPresent   mwocp68          PSU 4 MCU (DeviceCapabilities(2))
PSU5/ID          NotPresent   m24c02           PSU 5 EEPROM (DeviceCapabilities(0))
PSU5             NotPresent   mwocp68          PSU 5 MCU (DeviceCapabilities(2))
root@oxz_switch0:~# faux-mgs --interface psc0 component-details U31
Jun 03 17:23:45.766 INFO creating SP handle on interface psc0, component: faux-mgs
Jun 03 17:23:45.802 INFO initial discovery complete, addr: [fe80::aa40:25ff:fe06:107%76]:11111, interface: psc0, socket: control-plane-agent, component: faux-mgs
root@oxz_switch0:~#

Note that U31 does not have the DeviceCapabilities bit for HAS_MEASUREMENT_CHANNELS. When I try to actually read its component details, I don't get any details.

I believe this is because the config for the temperature sensor on the PSC looks like this:

https://github.com/oxidecomputer/hubris/blob/8f5e0f7c2417aa70a341120cc02c4ceb581156af/app/psc/base.toml#L382-L387

In contrast to a board like Gimlet, where it looks like this:

https://github.com/oxidecomputer/hubris/blob/8f5e0f7c2417aa70a341120cc02c4ceb581156af/app/gimlet/base.toml#L442-L450

Note that:

  • We don't have a sensors config on PSC, so the I2C sensor codegen doesn't know it's a sensor
  • We also say it's a tmp116 instead of a tmp117. While I believe these parts are pretty similar, the Hubris driver for the temperature sensor is called tmp117, and I bet that if we added a sensor config here it wouldn't build because there's no drv_i2c_devices module called tmp116
  • PSC also doesn't have a thermal loop, so we might need to add something in sensor-polling to actually tell it to read from the sensor, as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the PSC temperature-sensor configuration in app/psc/base.toml with the sensor configuration in app/gimlet/base.toml, including the tmp116/tmp117 device name. Read the related sensor-polling code to determine how PSC should read U31 without a thermal loop. Done means U31 exposes HAS_MEASUREMENT_CHANNELS and faux-mgs component-details returns its measurement data.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.