Add U-Boot's PMBus 1.x layer: the decoder/transport library, the
pmbus CLI command and a generic DT binding.
The subsequent commits provide the UCLASS_REGULATOR adapter and per-chip
drivers.
U-Boot's PMBus support is not a hwmon clone of Linux's
drivers/hwmon/pmbus/. Linux owns the runtime side (polling, sysfs,
alert IRQs, fan loops). U-Boot owns the boot-time side in order to,
- identify the PMBus regulators a board carries: MFR_ID/
MFR_MODEL/MFR_REVISION + sanity checks.
- print telemetry (VIN/VOUT/IIN/IOUT/POUT/TEMP) so an
operator can confirm rail voltages and faults before the kernel
- decode any chip alerts (STATUS_VOUT/STATUS_IOUT/STATUS_INPUT/
STATUS_TEMPERATURE/STATUS_CML) so a boot log shows why the
previous boot failed or the board had been power cycled because
of an outage (typically over temperature or under current).
Out of scope by design: no periodic polling, no sysfs, no fan-speed
control loop, no PMBUS_VIRT_* sensor virtualisation, no caching.
If a use case needs any of those, the answer should be "wait until
Linux comes up". It shall remain a thin layer.
The constants and structural shape (command codes, status bit names,
sensor-class enum, format enum, struct pmbus_driver_info) are
mirrored from Linux drivers/hwmon/pmbus/pmbus.h verbatim. The
decoders/encoders are reimplemented from the PMBus 1.3
specification because the surrounding hwmon context (struct
pmbus_data, sysfs caching, hwmon publication) does not apply.
The main benefits:
- One framework + CLI for any board carrying PMBus regulators:
no per-board PMBus implementation required anymore.
- Boards call pmbus_print_telemetry() / pmbus_print_status_word()
directly from boot init for a snapshot, sharing all decode +
format-dispatch with the CLI.
- Linux-compatible constants and DT binding so porting an existing
drivers/hwmon/pmbus/ chip is mechanical.
- Boot-time AVS/VID rail trim reuses the same decoders and
encoders as the CLI and the regulator path: no duplicate math.
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
116 lines
1.2 KiB
ReStructuredText
116 lines
1.2 KiB
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0+
|
|
|
|
Develop U-Boot
|
|
==============
|
|
|
|
General
|
|
-------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
bitbangmii
|
|
board_best_practices
|
|
codingstyle
|
|
designprinciples
|
|
docstyle
|
|
kconfig
|
|
memory
|
|
process
|
|
release_cycle
|
|
security
|
|
sending_patches
|
|
system_configuration
|
|
ide_integration
|
|
|
|
Implementation
|
|
--------------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
directories
|
|
bloblist
|
|
bootstd/index
|
|
ci_testing
|
|
commands
|
|
config_binding
|
|
cyclic
|
|
devicetree/index
|
|
distro
|
|
driver-model/index
|
|
environment
|
|
init
|
|
expo
|
|
cedit
|
|
event
|
|
global_data
|
|
lmb
|
|
logging
|
|
makefiles
|
|
menus
|
|
pmbus
|
|
printf
|
|
smbios
|
|
spl
|
|
falcon
|
|
uefi/index
|
|
vbe
|
|
version
|
|
|
|
Debugging
|
|
---------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
crash_dumps
|
|
gdb
|
|
trace
|
|
|
|
Packaging
|
|
---------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
package/index
|
|
|
|
Testing
|
|
-------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
testing
|
|
pytest/index
|
|
tests_writing
|
|
tests_sandbox
|
|
binman_tests
|
|
|
|
Refactoring
|
|
-----------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
checkpatch
|
|
coccinelle
|
|
qconfig
|
|
|
|
Code quality
|
|
------------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
python_cq
|
|
|
|
Historical documentation
|
|
------------------------
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
historical/index
|