Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fby35: gl: Correct SDR sensor unit #1366

Closed

Conversation

SaraLin-wiwynn
Copy link
Contributor

Description

  • Correct the sensor unit of SDR table. 0x00 is unsigned, 0x40 is 1's complements, and 0x80 is 2's complements.

Motivation

  • BMC using sensor unit to decide method to convert threshold.

Test plan

  • Build Code: Pass
  • Check threshold: Pass

Log

  1. Get sensor threshold.
  • Before root@bmc-oob:~# sensor-util slot1 --thre | grep MB
    MB_INLET_TEMP_C (0x1) : 29.00 C | (unr) | UCR: 60.00 | UNC: NA | UNR: -106.00 | LCR: NA | LNC: NA | LNR: NA
    MB_OUTLET_TEMP_C (0x2) : 28.00 C | (unr) | UCR: 80.00 | UNC: NA | UNR: -106.00 | LCR: NA | LNC: NA | LNR: NA
    ...
    MB_HSC_TEMP_C (0xE) : 25.00 C | (unr) | UCR: 80.00 | UNC: NA | UNR: -81.00 | LCR: NA | LNC: NA | LNR: NA
    ...
    MB_ADC_P12V_STBY_VOLT_V (0x17) : 12.85 Volts | (unr) | UCR: -1.77 | UNC: -1.89 | UNR: -0.77 | LCR: -4.43 | LNC: -4.31 | LNR: -5.01
    MB_ADC_P3V_BAT_VOLT_V (0x18) : 3.21 Volts | (ucr) | UCR: -0.08 | UNC: -0.11 | UNR: NA | LCR: -0.83 | LNC: -0.78 | LNR: NA
    MB_ADC_P3V3_STBY_VOLT_V (0x19) : 3.35 Volts | (unr) | UCR: -0.53 | UNC: -0.56 | UNR: -0.27 | LCR: -1.06 | LNC: -1.02 | LNR: -1.46
    MB_ADC_P1V8_STBY_VOLT_V (0x1A) : 1.81 Volts | (unr) | UCR: -0.26 | UNC: -0.28 | UNR: -0.12 | LCR: -0.54 | LNC: -0.52 | LNR: -0.77
    MB_ADC_P1V05_STBY_VOLT_V (0x1B) : 1.06 Volts | (ucr) | UCR: -0.17 | UNC: -0.18 | UNR: NA | LCR: -0.34 | LNC: -0.30 | LNR: NA
    MB_HSC_INPUT_VOLT_V (0x1C) : 12.59 Volts | (unr) | UCR: -1.77 | UNC: -1.89 | UNR: -0.77 | LCR: -4.43 | LNC: -4.31 | LNR: -5.01
    ...
    MB_VR_EHV_VOLT_V (0x22) : 0.02 Volts | (unr) | UCR: -0.61 | UNC: -0.63 | UNR: -0.22 | LCR: -0.81 | LNC: -0.79 | LNR: -1.12
    MB_ADC_VNN_VOLT_V (0x23) : 0.00 Volts | (lnr) | UCR: -0.91 | UNC: -0.92 | UNR: -0.84 | LCR: 0.89 | LNC: 0.90 | LNR: 0.80
    MB_ADC_P5V_STBY_VOLT_V (0x24) : 4.98 Volts | (unr) | UCR: -0.48 | UNC: -0.53 | UNR: -0.36 | LCR: -1.54 | LNC: -1.49 | LNR: -2.16
    MB_ADC_P1V2_STBY_VOLT_V (0x26) : 1.21 Volts | (ucr) | UCR: -0.21 | UNC: -0.22 | UNR: NA | LCR: -0.41 | LNC: -0.40 | LNR: NA
    ...

  • After root@bmc-oob:~# sensor-util slot1 --thre | grep MB
    MB_INLET_TEMP_C (0x1) : 29.00 C | (ok) | UCR: 60.00 | UNC: NA | UNR: 150.00 | LCR: NA | LNC: NA | LNR: NA
    MB_OUTLET_TEMP_C (0x2) : 28.00 C | (ok) | UCR: 80.00 | UNC: NA | UNR: 150.00 | LCR: NA | LNC: NA | LNR: NA
    ...
    MB_HSC_TEMP_C (0xE) : 25.00 C | (ok) | UCR: 80.00 | UNC: NA | UNR: 175.00 | LCR: NA | LNC: NA | LNR: NA
    ...
    MB_ADC_P12V_STBY_VOLT_V (0x17) : 12.86 Volts | (ok) | UCR: 13.33 | UNC: 13.22 | UNR: 14.34 | LCR: 10.68 | LNC: 10.80 | LNR: 10.09
    MB_ADC_P3V_BAT_VOLT_V (0x18) : 3.21 Volts | (ok) | UCR: 3.50 | UNC: 3.47 | UNR: NA | LCR: 2.76 | LNC: 2.80 | LNR: NA
    MB_ADC_P3V3_STBY_VOLT_V (0x19) : 3.34 Volts | (ok) | UCR: 3.57 | UNC: 3.54 | UNR: 3.82 | LCR: 3.04 | LNC: 3.07 | LNR: 2.64
    MB_ADC_P1V8_STBY_VOLT_V (0x1A) : 1.81 Volts | (ok) | UCR: 1.94 | UNC: 1.93 | UNR: 2.08 | LCR: 1.66 | LNC: 1.68 | LNR: 1.44
    MB_ADC_P1V05_STBY_VOLT_V (0x1B) : 1.06 Volts | (ok) | UCR: 1.14 | UNC: 1.13 | UNR: NA | LCR: 0.97 | LNC: 1.00 | LNR: NA
    MB_HSC_INPUT_VOLT_V (0x1C) : 12.59 Volts | (ok) | UCR: 13.33 | UNC: 13.22 | UNR: 14.34 | LCR: 10.68 | LNC: 10.80 | LNR: 10.09
    ...
    MB_VR_EHV_VOLT_V (0x22) : 0.03 Volts | (lnr) | UCR: 1.90 | UNC: 1.88 | UNR: 2.29 | LCR: 1.70 | LNC: 1.72 | LNR: 1.39
    MB_ADC_VNN_VOLT_V (0x23) : 0.00 Volts | (lnr) | UCR: 1.08 | UNC: 1.08 | UNR: 1.15 | LCR: 0.89 | LNC: 0.90 | LNR: 0.80
    MB_ADC_P5V_STBY_VOLT_V (0x24) : 4.98 Volts | (ok) | UCR: 5.66 | UNC: 5.62 | UNR: 5.78 | LCR: 4.61 | LNC: 4.66 | LNR: 3.98
    MB_ADC_P1V2_STBY_VOLT_V (0x26) : 1.21 Volts | (ok) | UCR: 1.30 | UNC: 1.29 | UNR: NA | LCR: 1.10 | LNC: 1.12 | LNR: NA
    ...

Description
- Correct the sensor unit of SDR table.
0x00 is unsigned, 0x40 is 1's complements, and 0x80 is 2's complements.

Motivation
- BMC using sensor unit to decide method to convert threshold.

Test plan
- Build Code: Pass
- Check threshold: Pass

Log
1. Get sensor threshold.
- Before
root@bmc-oob:~# sensor-util slot1 --thre | grep MB
MB_INLET_TEMP_C              (0x1) :   29.00 C     | (unr) | UCR: 60.00 | UNC: NA | UNR: -106.00 | LCR: NA | LNC: NA | LNR: NA
MB_OUTLET_TEMP_C             (0x2) :   28.00 C     | (unr) | UCR: 80.00 | UNC: NA | UNR: -106.00 | LCR: NA | LNC: NA | LNR: NA
...
MB_HSC_TEMP_C                (0xE) :   25.00 C     | (unr) | UCR: 80.00 | UNC: NA | UNR: -81.00 | LCR: NA | LNC: NA | LNR: NA
...
MB_ADC_P12V_STBY_VOLT_V      (0x17) :   12.85 Volts | (unr) | UCR: -1.77 | UNC: -1.89 | UNR: -0.77 | LCR: -4.43 | LNC: -4.31 | LNR: -5.01
MB_ADC_P3V_BAT_VOLT_V        (0x18) :    3.21 Volts | (ucr) | UCR: -0.08 | UNC: -0.11 | UNR: NA | LCR: -0.83 | LNC: -0.78 | LNR: NA
MB_ADC_P3V3_STBY_VOLT_V      (0x19) :    3.35 Volts | (unr) | UCR: -0.53 | UNC: -0.56 | UNR: -0.27 | LCR: -1.06 | LNC: -1.02 | LNR: -1.46
MB_ADC_P1V8_STBY_VOLT_V      (0x1A) :    1.81 Volts | (unr) | UCR: -0.26 | UNC: -0.28 | UNR: -0.12 | LCR: -0.54 | LNC: -0.52 | LNR: -0.77
MB_ADC_P1V05_STBY_VOLT_V     (0x1B) :    1.06 Volts | (ucr) | UCR: -0.17 | UNC: -0.18 | UNR: NA | LCR: -0.34 | LNC: -0.30 | LNR: NA
MB_HSC_INPUT_VOLT_V          (0x1C) :   12.59 Volts | (unr) | UCR: -1.77 | UNC: -1.89 | UNR: -0.77 | LCR: -4.43 | LNC: -4.31 | LNR: -5.01
...
MB_VR_EHV_VOLT_V             (0x22) :    0.02 Volts | (unr) | UCR: -0.61 | UNC: -0.63 | UNR: -0.22 | LCR: -0.81 | LNC: -0.79 | LNR: -1.12
MB_ADC_VNN_VOLT_V            (0x23) :    0.00 Volts | (lnr) | UCR: -0.91 | UNC: -0.92 | UNR: -0.84 | LCR: 0.89 | LNC: 0.90 | LNR: 0.80
MB_ADC_P5V_STBY_VOLT_V       (0x24) :    4.98 Volts | (unr) | UCR: -0.48 | UNC: -0.53 | UNR: -0.36 | LCR: -1.54 | LNC: -1.49 | LNR: -2.16
MB_ADC_P1V2_STBY_VOLT_V      (0x26) :    1.21 Volts | (ucr) | UCR: -0.21 | UNC: -0.22 | UNR: NA | LCR: -0.41 | LNC: -0.40 | LNR: NA
...

- After
root@bmc-oob:~# sensor-util slot1 --thre | grep MB
MB_INLET_TEMP_C              (0x1) :   29.00 C     | (ok) | UCR: 60.00 | UNC: NA | UNR: 150.00 | LCR: NA | LNC: NA | LNR: NA
MB_OUTLET_TEMP_C             (0x2) :   28.00 C     | (ok) | UCR: 80.00 | UNC: NA | UNR: 150.00 | LCR: NA | LNC: NA | LNR: NA
...
MB_HSC_TEMP_C                (0xE) :   25.00 C     | (ok) | UCR: 80.00 | UNC: NA | UNR: 175.00 | LCR: NA | LNC: NA | LNR: NA
...
MB_ADC_P12V_STBY_VOLT_V      (0x17) :   12.86 Volts | (ok) | UCR: 13.33 | UNC: 13.22 | UNR: 14.34 | LCR: 10.68 | LNC: 10.80 | LNR: 10.09
MB_ADC_P3V_BAT_VOLT_V        (0x18) :    3.21 Volts | (ok) | UCR: 3.50 | UNC: 3.47 | UNR: NA | LCR: 2.76 | LNC: 2.80 | LNR: NA
MB_ADC_P3V3_STBY_VOLT_V      (0x19) :    3.34 Volts | (ok) | UCR: 3.57 | UNC: 3.54 | UNR: 3.82 | LCR: 3.04 | LNC: 3.07 | LNR: 2.64
MB_ADC_P1V8_STBY_VOLT_V      (0x1A) :    1.81 Volts | (ok) | UCR: 1.94 | UNC: 1.93 | UNR: 2.08 | LCR: 1.66 | LNC: 1.68 | LNR: 1.44
MB_ADC_P1V05_STBY_VOLT_V     (0x1B) :    1.06 Volts | (ok) | UCR: 1.14 | UNC: 1.13 | UNR: NA | LCR: 0.97 | LNC: 1.00 | LNR: NA
MB_HSC_INPUT_VOLT_V          (0x1C) :   12.59 Volts | (ok) | UCR: 13.33 | UNC: 13.22 | UNR: 14.34 | LCR: 10.68 | LNC: 10.80 | LNR: 10.09
...
MB_VR_EHV_VOLT_V             (0x22) :    0.03 Volts | (lnr) | UCR: 1.90 | UNC: 1.88 | UNR: 2.29 | LCR: 1.70 | LNC: 1.72 | LNR: 1.39
MB_ADC_VNN_VOLT_V            (0x23) :    0.00 Volts | (lnr) | UCR: 1.08 | UNC: 1.08 | UNR: 1.15 | LCR: 0.89 | LNC: 0.90 | LNR: 0.80
MB_ADC_P5V_STBY_VOLT_V       (0x24) :    4.98 Volts | (ok) | UCR: 5.66 | UNC: 5.62 | UNR: 5.78 | LCR: 4.61 | LNC: 4.66 | LNR: 3.98
MB_ADC_P1V2_STBY_VOLT_V      (0x26) :    1.21 Volts | (ok) | UCR: 1.30 | UNC: 1.29 | UNR: NA | LCR: 1.10 | LNC: 1.12 | LNR: NA
...
@facebook-github-bot facebook-github-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 Sep 20, 2023
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ce9d3ff.

@SaraLin-wiwynn SaraLin-wiwynn deleted the Sara/fby35-gl-Correct_sdr_unit branch October 24, 2023 02:33
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.

2 participants