Skip to content

Conversation

@ec-michael-shih
Copy link
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running
    pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run
clang-format.........................................(no files to check)Skipped
black................................................(no files to check)Skipped
shellcheck...........................................(no files to check)Skipped
shfmt................................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check json...............................................................Passed
check for merge conflicts................................................Passed
ruff check...........................................(no files to check)Skipped

Summary

In the sensor_service.json of Wedge800BACT, the compute value methods for voltage, current and power monitoring within the pmUnitScoped sections, which interface with the kernel drivers, need to be adjusted.

  • Calibrate XP3R3V telemetry in sensor_service.json by adjusting ADC128D818 compute formula.
  • Calibrate HSC scaling factor in sensor_service.json for 0.25mΩ ($R_{sense}$).
  1. ADC128D818 Kernel Driver
    The conversion formula for the XP3R3V voltage input under pmUnitScopedName needs to be modified for the adc128d818 driver.
    --
    Original: "compute": "(8/5)@/1000"
    Updated: "compute": "(5/3)
    @/1000"
    --

  2. LTC4287 Kernel Driver
    The conversion formulas for the HSC (Hot Swap Controller) current and power values under pmUnitScopedName need to be adjusted for the ltc4287 driver.
    --
    Original: "compute": "(3/5)@/1000"
    Updated: "compute": "(6/5)
    @/1000"
    --

Modification Rationale:
The default $R_{sense}$ value used in the kernel driver's internal calculation formula is $0.3\text{ m}\Omega$.
(Reference: drivers/hwmon/pmbus/ltc4286.c)
However, based on our hardware specifications, the actual sensing circuit utilizes two $0.5\text{ m}\Omega$ resistors in parallel, resulting in an effective total resistance ($R_{total}$) of $0.25\text{ m}\Omega$.
To compensate for this hardware difference, the scaling factor must be adjusted as follows:
current
power
.
$$\text{Correction Factor} = \frac{\text{Driver Default } R_{sense}}{\text{Actual Hardware } R_{sense}} = \frac{0.3\text{ m}\Omega}{0.25\text{ m}\Omega} = 1.2 \text{ (which is } 6/5)$$
.
Therefore, the compute value is updated to $(6/5)$ to ensure accurate data reporting.

Test Plan

  1. Start sensor_service and ensure all sensor values can be read without errors.
    w800b_20260112_sensor_service.txt
  2. Execute sensor_service_hw_test and confirm that all test items pass.
    w800b_20260112_sensor_service_hw_test.txt
  3. Execute sensor_service_client command and confirmed that all test items passed.
    w800b_20260112_sensor_service_client.txt

Furthermore, by observing the data from the sensor_service_client command,
I verified that the values for the modified items mentioned above are consistent with our expected results.

|name | before | after |
| MCB_U33_XP3R3V_MCB | 3.19 | 3.33 |
| MCB_U33_XP3R3V_FCB | 3.19 | 3.32 |
| MCB_U33_XP3R3V_IOB | 3.19 | 3.32 |
| SMB_U42_XP3R3V | 3.20 | 3.33 |
| MCB_U41_HSC_PIN |288.40 |578.80 |
| MCB_U41_HSC_IOUT | 5.32 | 10.68 |

…_service.json

Signed-off-by: michael_shih <michael_shih@accton.com>
@meta-cla meta-cla bot added the CLA Signed label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant