Skip to content

meta-facebook: gc2-es: support DVT HSC sensor MP5998#2672

Closed
Joseph-Shih-ww wants to merge 1 commit intofacebook:mainfrom
Wiwynn:Jim/fbgc2-es/support_DVT_HSC_sensor_MP5998
Closed

meta-facebook: gc2-es: support DVT HSC sensor MP5998#2672
Joseph-Shih-ww wants to merge 1 commit intofacebook:mainfrom
Wiwynn:Jim/fbgc2-es/support_DVT_HSC_sensor_MP5998

Conversation

@Joseph-Shih-ww
Copy link

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

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
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 11, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 11, 2026

@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.)

@meta-codesync
Copy link

meta-codesync bot commented Feb 13, 2026

@amithash merged this pull request in 0f1b47e.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants