Files
linux/Documentation/hwmon/raspberrypi-hwmon.rst
Shubham Chakraborty 78a3e36eec hwmon: (raspberrypi) Add voltage input support
Extend the raspberrypi-hwmon driver to expose firmware-provided
voltage measurements through the hwmon subsystem.

The driver now exports the following voltage inputs:

  - in0_input (core)
  - in1_input (sdram_c)
  - in2_input (sdram_i)
  - in3_input (sdram_p)

Voltage values returned by firmware are converted from microvolts
to millivolts as expected by the hwmon subsystem.

Update the documentation related to it.

The existing undervoltage sticky alarm handling is preserved and
associated with the first voltage channel.

Tested in -
- Raspberry Pi 3b+ (Linux raspberrypi 6.12.75+rpt-rpi-v8 #1 SMP PREEMPT
  Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64 GNU/Linux)

Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20260517080445.103962-3-chakrabortyshubham66@gmail.com
[groeck: Added missing empty line after declaration]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09 08:23:00 -07:00

37 lines
1.0 KiB
ReStructuredText

Kernel driver raspberrypi-hwmon
===============================
Supported boards:
* Raspberry Pi A+ (via GPIO on SoC)
* Raspberry Pi B+ (via GPIO on SoC)
* Raspberry Pi 2 B (via GPIO on SoC)
* Raspberry Pi 3 B (via GPIO on port expander)
* Raspberry Pi 3 B+ (via PMIC)
Author: Stefan Wahren <stefan.wahren@i2se.com>
Description
-----------
This driver periodically polls a mailbox property of the VC4 firmware to detect
undervoltage conditions.
Sysfs entries
-------------
======================= ======================================================
in0_input Core voltage in millivolts
in1_input SDRAM controller voltage in millivolts
in2_input SDRAM I/O voltage in millivolts
in3_input SDRAM PHY voltage in millivolts
in0_label "core"
in1_label "sdram_c"
in2_label "sdram_i"
in3_label "sdram_p"
in0_lcrit_alarm Undervoltage alarm
======================= ======================================================
The voltage inputs and labels are only exposed if the firmware reports support
for the corresponding voltage ID.