On nbxv3 the VID handoff compared READ_VOUT with the fused core
voltage and raised VOUT_COMMAND by the difference. READ_VOUT sits
below the setpoint by the load line (droop) the MPQ8646 applies from
its NVM, so a module fused 0x14 (850 mV) got 875.8 mV: the core ran
above its fused voltage.

The handoff has to compare and verify the setpoint instead. PMBus
exposes it as VOUT_COMMAND, which regulator_get_value() does not
return:

- patch 1 makes the exported PMBus regulator helpers check that the
  device is a PMBus regulator
- patch 2 adds pmbus_regulator_read_vout_command()
- patch 3 tests it on sandbox, the patch 1 check included
- patch 4 makes the nbxv3 handoff write the fused table value as is
  and verify it through VOUT_COMMAND.


Vincent Jardin (4):
  power: regulator: pmbus: check the device in the exported helpers
  power: regulator: pmbus: read back the VOUT_COMMAND setpoint
  test: dm: pmbus: test pmbus_regulator_read_vout_command()
  board: nbxv3: VID handoff writes table value, no droop compensation

 board/nxp/lx2160a/nbxv3/vid_handoff.c  | 77 ++++++++++----------------
 drivers/power/regulator/pmbus_helper.c | 64 +++++++++++++++++----
 include/pmbus.h                        | 14 +++++
 test/dm/pmbus.c                        | 41 ++++++++++++++
 4 files changed, 137 insertions(+), 59 deletions(-)

---
base-commit: 2b8902913c19eb581fb0d567201c09b8fa46ac74
branch: for-upstream/pmbus-vout-command-v1

-- 
2.43.0

Reply via email to