[PATCH v4 0/7] pmbus: PMBus 1.x framework, CLI, regulator and thermal support
Vincent Jardin
vjardin at free.fr
Fri Jul 10 22:16:05 CEST 2026
This series adds U-Boot's PMBus 1.x support as a small boot-time
layer (not a hwmon clone):
- a decoder + transport library and the pmbus CLI command
- a shared UCLASS_REGULATOR adapter plus a catch-all driver for
compliant chips, add the MPS MPQ8785 per-chip driver
- a generic PMBus die-temperature UCLASS_THERMAL bridge
- migration of the shared NXP VID rail-trim code to this framework
- a sandbox PMBus chip emulator and "ut dm pmbus" unit tests that
exercise most subcommand of the CLI.
The goal is to identify PMBus regulators at boot, print telemetry and
decode chip alerts before the kernel takes over - no polling, no
sysfs, no fan loops. Linux owns the runtime side.
Changes in v4:
- CLI: <addr>, <reg> and <val> hexadecimal ("0x" optional)
à la i2c command convention
- sandbox_pmbus_read(): reject len < 1 (Simon Glass)
- reject block reads shorter than length + payload (except the
one-byte SMBus length probe) so the length byte never lies about
the data actually returned (Simon Glass)
- CAPABILITY: drop the PEC bit (0xb0 -> 0x30), the stub implements
no PEC (Simon Glass)
- configs/sandbox_defconfig: use savedefconfig (Simon Glass)
- drop console_record_reset() (Simon Glass)
- drop "0x" prefixes from hex command arguments. It
parses addr/reg/val as hex based on i2c convention (Simon Glass)
Changes in v3:
- pmbus_read_string(): fix 1 byte stack overflow
- pmbus dump: print MFR_ID/MODEL/REVISION with the proper byte order
- typo: Adaapted -> Adapted
- vid_read_vout_mode(): avoid confusions error vs mode.
Changes in v2:
- Apply Tom Rini's v1 review: drop the local DT binding YAML files
Vincent Jardin (7):
pmbus: add PMBus 1.x framework, CLI, and binding
power: regulator: add generic PMBus UCLASS_REGULATOR adapter
power: regulator: add MPS MPQ8785 PMBus regulator driver
board: nxp: vid: introduce PMBus framework support
thermal: pmbus: add PMBus die-temp driver
test: dm: pmbus: add a sandbox PMBus chip emulator
test: dm: pmbus: test pmbus command and framework
MAINTAINERS | 15 +
arch/Kconfig.nxp | 4 +
arch/sandbox/dts/test.dts | 10 +
board/nxp/common/vid.c | 110 +--
board/nxp/common/vid.h | 15 +-
cmd/Kconfig | 14 +
cmd/Makefile | 1 +
cmd/pmbus.c | 814 ++++++++++++++++++++++
configs/sandbox_defconfig | 6 +
doc/develop/index.rst | 1 +
doc/develop/pmbus.rst | 637 +++++++++++++++++
drivers/power/regulator/Kconfig | 43 ++
drivers/power/regulator/Makefile | 4 +
drivers/power/regulator/mpq8785.c | 494 +++++++++++++
drivers/power/regulator/pmbus_generic.c | 90 +++
drivers/power/regulator/pmbus_helper.c | 315 +++++++++
drivers/power/regulator/pmbus_helper.h | 90 +++
drivers/power/regulator/sandbox_pmbus.c | 171 +++++
drivers/thermal/Kconfig | 8 +
drivers/thermal/Makefile | 1 +
drivers/thermal/pmbus_thermal.c | 33 +
include/pmbus.h | 667 ++++++++++++++++++
lib/Kconfig | 16 +
lib/Makefile | 1 +
lib/pmbus.c | 877 ++++++++++++++++++++++++
test/dm/Makefile | 1 +
test/dm/pmbus.c | 242 +++++++
27 files changed, 4625 insertions(+), 55 deletions(-)
create mode 100644 cmd/pmbus.c
create mode 100644 doc/develop/pmbus.rst
create mode 100644 drivers/power/regulator/mpq8785.c
create mode 100644 drivers/power/regulator/pmbus_generic.c
create mode 100644 drivers/power/regulator/pmbus_helper.c
create mode 100644 drivers/power/regulator/pmbus_helper.h
create mode 100644 drivers/power/regulator/sandbox_pmbus.c
create mode 100644 drivers/thermal/pmbus_thermal.c
create mode 100644 include/pmbus.h
create mode 100644 lib/pmbus.c
create mode 100644 test/dm/pmbus.c
--
2.43.0
base-commit: f605dcee103c897b6f1a8873549a36949bd4e2a1
branch: for-upstream/pmbus-v7
More information about the U-Boot
mailing list