Skip to content

fby3.5: bb: Fix build code fail issue and correct LTC4282 sensor reading#475

Closed
DelphineChiu wants to merge 1 commit into
facebook:mainfrom
Wiwynn:fby3.5-bb-Fix_build_code_fail_issue
Closed

fby3.5: bb: Fix build code fail issue and correct LTC4282 sensor reading#475
DelphineChiu wants to merge 1 commit into
facebook:mainfrom
Wiwynn:fby3.5-bb-Fix_build_code_fail_issue

Conversation

@DelphineChiu

Copy link
Copy Markdown

Summary:

  • Fix build code fail issue.
    • Modify LTC4282 initial argument structure member name from r_sense to r_sense_mohm.
  • Correct BB BIC LTC4282 sensor reading.
    • Modify LTC4282 sensor initial flag from true to false, making LTC4282 sensor to get adjust parameter of sensor reading from register.

Test Plan:

  • Build code: Pass
  • LTC4282 sensor reading is correct: Pass

Log:

  • Before modifying LTC4282 sensor initial flag from true to false
    LTC4282 sensor doesn't do initial function (Doesn't get adjust parameter of sensor reading from register)

[BMC console]
root@bmc-oob:~# sensor-util slot1 --thre | grep BB_MEDUSA
BB_MEDUSA_VIN (0xDB) : 4.13 Volts | (lnr) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_VOUT (0xD7) : 4.13 Volts | (lnr) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_CUR (0xDF) : 17.77 Amps | (ok) | UCR: 144.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
BB_MEDUSA_PWR (0xD8) : 73.33 Watts | (ok) | UCR: 1800.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA

  • After modifying LTC4282 sensor initial flag from true to false

[BMC console]
root@bmc-oob:~# sensor-util slot1 --thre | grep BB_MEDUSA
BB_MEDUSA_VIN (0xDB) : 12.39 Volts | (ok) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_VOUT (0xD7) : 12.39 Volts | (ok) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_CUR (0xDF) : 17.58 Amps | (ok) | UCR: 144.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
BB_MEDUSA_PWR (0xD8) : 217.65 Watts | (ok) | UCR: 1800.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | 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 Aug 10, 2022
@LoraLin1 LoraLin1 force-pushed the fby3.5-bb-Fix_build_code_fail_issue branch 2 times, most recently from b360e39 to a8684fd Compare August 10, 2022 01:04
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@GoldenBug

GoldenBug commented Aug 11, 2022

Copy link
Copy Markdown
Contributor

Is line 87 in meta-facebook/yv35-bb/src/platform/plat_hook.c supposed to be & instead of | ?

    if (val | ADC_16BIT_MODE_BIT) {

If so we probably just want to fix it in this PR.

Summary:
- Correct BB BIC LTC4282 sensor reading.
  - Modify LTC4282 sensor initial flag from true to false, making LTC4282 sensor to get adjust parameter of sensor reading from register.

Test Plan:
- Build code: Pass
- LTC4282 sensor reading is correct: Pass

Log:
- Before modifying LTC4282 sensor initial flag from true to false
  LTC4282 sensor doesn't do initial function (Doesn't get adjust parameter of sensor reading from register)

[BMC console]
root@bmc-oob:~# sensor-util slot1 --thre | grep BB_MEDUSA
BB_MEDUSA_VIN                (0xDB) :    4.13 Volts | (lnr) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_VOUT               (0xD7) :    4.13 Volts | (lnr) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_CUR                (0xDF) :   17.77 Amps  | (ok) | UCR: 144.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
BB_MEDUSA_PWR                (0xD8) :   73.33 Watts | (ok) | UCR: 1800.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA

- After modifying LTC4282 sensor initial flag from true to false

[BMC console]
root@bmc-oob:~# sensor-util slot1 --thre | grep BB_MEDUSA
BB_MEDUSA_VIN                (0xDB) :   12.39 Volts | (ok) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_VOUT               (0xD7) :   12.39 Volts | (ok) | UCR: 13.88 | UNC: 13.75 | UNR: 14.00 | LCR: 11.12 | LNC: 11.25 | LNR: 9.25
BB_MEDUSA_CUR                (0xDF) :   17.58 Amps  | (ok) | UCR: 144.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
BB_MEDUSA_PWR                (0xD8) :  217.65 Watts | (ok) | UCR: 1800.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
@LoraLin1 LoraLin1 force-pushed the fby3.5-bb-Fix_build_code_fail_issue branch from a8684fd to 23e5976 Compare August 12, 2022 00:42
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@DelphineChiu has updated the pull request. You must reimport the pull request before landing.

@LoraLin1

Copy link
Copy Markdown
Collaborator

Hi @GoldenBug ,
Thanks for your comments.
Based on your suggestions to modify the code, rebase main and force update this branch.
Please help review it again, thank you.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@LoraLin1 LoraLin1 deleted the fby3.5-bb-Fix_build_code_fail_issue branch October 11, 2022 06:41
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.

4 participants