-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve PMBus handling for PSC (#252)
When bringing up the PSC firmware, I ran into a few issues. Both Hubris and Humility assume that for an I2C device with a ```toml power = { rails = [ ... ] } ``` field, all sensors (voltage / current / temperature / etc) correspond one-to-one with power rails. This is problematic for the power shelves, which have two rails (54V and 12V), two fans (uncorrelated to voltage rails), and _three_ temperature sensors (also unrelated to rails!). This PR adds support for an optional `sensors = [ ... ]` field within power, e.g. ```toml [[config.i2c.devices]] bus = "backplane" name = "psu0mcu" address = 0b1011_000 device = "mwocp68" description = "PSU 0 MCU" power = { rails = [ "V54_PSU0", "V12_PSU0" ], sensors = ["voltage", "current"] } sensors = { voltage = 2, current = 2, temperature = 3, speed = 2 } ``` The `sensors` field indicates that only `voltage` and `current` correspond one-to-one with rails; other sensor types are treated as independent. If the `sensors` field is blank (i.e. all of our existing TOML files), then every sensor corresponds one-to-one with rails, matching the current behavior. In addition, `humility pmbus --summarize` is modified to not `bail!` on an error; instead, it prints the error and continues. This makes working with the PSC nicer, because not all 6 PSUs will be populated at all times.
- Loading branch information
Showing
6 changed files
with
83 additions
and
42 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters