meta-facebook: gc2-es: support DVT HSC sensor MP5998#2672
Closed
Joseph-Shih-ww wants to merge 1 commit intofacebook:mainfrom
Closed
meta-facebook: gc2-es: support DVT HSC sensor MP5998#2672Joseph-Shih-ww wants to merge 1 commit intofacebook:mainfrom
Joseph-Shih-ww wants to merge 1 commit intofacebook:mainfrom
Conversation
Add MP5998 HSC (Hot Swap Controller) sensor support for DVT platform. (GC20T5T7-112)
[Motivation]
- DVT platform uses MP5998 as HSC instead of ADM1278
- Need to support both HSC modules (ADM1278 and MP5998) for different hardware revisions
- Enable runtime HSC module detection and proper sensor monitoring
[Design]
1. HSC Module Auto-Detection:
- Add read_adm1278_model() to detect ADM1278/ADM1281 via PMBUS_MFR_MODEL
- Add read_mp5990_model() to detect MP5998 (model string "8995")
- Implement fallback detection logic in init_hsc_module()
- Runtime HSC chip identification through PMBus interface
2. MP5998 Sensor Configuration:
- I2C Bus: I2C_BUS2
- I2C Address: 0x4C (0x98 >> 1)
- Supported Sensors:
* MB_HSC_TEMP_C (0xE): On-die temperature monitoring
* MB_HSC_INPUT_VOLT_V (0x29): Input voltage monitoring
* MB_HSC_OUTPUT_CURR_A (0x30): Output current monitoring
* MB_HSC_INPUT_PWR_W (0x39): Input power monitoring
3. MP5998 Initialization Parameters:
Note: Advanced calibration features are not configured in this step.
Further tuning will be discussed with hardware team in future revisions.
- iout_cal_gain: 0xFFFF (use chip default for RCS=2kΩ)
- iout_oc_fault_limit: 0xFFFF (use chip default OCP threshold)
- ocw_sc_ref: 0xFFFF (use chip default short-circuit reference)
4. Post-Read Processing Functions:
MP5998 has different LSB resolution compared to MP5990 in our hardware configuration.
Conversion factors are applied to match the actual hardware implementation.
- post_mp5998_voltage_read():
* Converts voltage reading from original LSB (1/32 V) to actual LSB (1/64 V)
* Conversion formula: val = val * 0.5
* This compensates for the different voltage divider ratio in DVT hardware
- post_mp5998_power_read():
* Converts power reading from original LSB (1 W) to actual LSB (0.5 W)
* Conversion formula: val = val * 0.5
* This matches the power calculation with the actual current sensing configuration
[Test Result]
Verified on GC2-ES DVT platform with MP5998 HSC module.
All sensors report correctly:
root@bmc-oob:~# sensor-util server --force | grep HSC
MB_HSC_TEMP_C (0xE) : 26.000 C
MB_HSC_INPUT_VOLT_V (0x29) : 12.250 Volts
MB_HSC_OUTPUT_CURR_A (0x30) : 0.180 Amps
MB_HSC_INPUT_PWR_W (0x39) : 1.450 Watts
|
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D92953326. (Because this pull request was imported automatically, there will not be any future comments.) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add MP5998 HSC (Hot Swap Controller) sensor support for DVT platform. (GC20T5T7-112)
[Motivation]
[Design]
HSC Module Auto-Detection:
MP5998 Sensor Configuration:
MP5998 Initialization Parameters: Note: Advanced calibration features are not configured in this step. Further tuning will be discussed with hardware team in future revisions.
Post-Read Processing Functions: MP5998 has different LSB resolution compared to MP5990 in our hardware configuration. Conversion factors are applied to match the actual hardware implementation.
post_mp5998_voltage_read(): * Converts voltage reading from original LSB (1/32 V) to actual LSB (1/64 V) * Conversion formula: val = val * 0.5 * This compensates for the different voltage divider ratio in DVT hardware
post_mp5998_power_read():
[Test Result]
Verified on GC2-ES DVT platform with MP5998 HSC module. All sensors report correctly:
root@bmc-oob:~# sensor-util server --force | grep HSC
MB_HSC_TEMP_C (0xE) : 26.000 C
MB_HSC_INPUT_VOLT_V (0x29) : 12.250 Volts
MB_HSC_OUTPUT_CURR_A (0x30) : 0.180 Amps
MB_HSC_INPUT_PWR_W (0x39) : 1.450 Watts