[PATCH v4 0/2] hwmon: add Raspberry Pi 5 PMIC driver

From: Sander Speetjens

Date: Thu Nov 19 2026 - 14:55:43 EST


This patch adds an hwmon driver for the PMIC used on the
Raspberry Pi 5.

The PMIC exposes a set of voltage, current and temperature sensors.
Access is only available through the VideoCore firmware mailbox
interface; there is no direct register access from the ARM side.

A structured property tag (0x0003009f) was recently added to the
firmware. It returns the ADC values in binary form (index + length +
array of values), which is much cleaner for a kernel driver than
parsing the text output of the existing gencmd interface.

The driver follows the same instantiation pattern as the Raspberry Pi 5
RTC driver: the raspberrypi-firmware driver creates a platform device
at runtime, and this driver binds to it. All channels are read in a
single mailbox call and a short refresh-on-read cache is used.

The sensors are exposed through the standard hwmon sysfs interface so
tools such as `sensors`, collectd and node-exporter work without
modification.

Dependencies:
- Raspberry Pi firmware that implements property 0x0003009f
- CONFIG_RASPBERRYPI_FIRMWARE

Tested on a Raspberry Pi 5 with recent firmware.

Signed-off-by: Sander Speetjens <sander.speetjens@xxxxxxxxx>
---
Changes in v4:
- Fix sashiko reported bug
- Link to v3: https://lore.kernel.org/r/20261119-hwmon-da9091-v3-0-15956035d7b5@xxxxxxxxx

Changes in v3:
- Fix sashiko reported bugs
- Link to v2: https://lore.kernel.org/r/20261119-hwmon-da9091-v2-0-d6c624272a9e@xxxxxxxxx

Changes in v2:
- Add documenation
- Split firmware in a separate patch
- Remove DA9091 mention
- Remove extra lock
- Use 64-bit jiffies
- Remove lookup function
- Link to v1: https://lore.kernel.org/r/20261117-hwmon-da9091-v1-1-f55f0af9c6a3@xxxxxxxxx

---
Sander Speetjens (2):
hwmon: add Raspberry Pi PMIC driver
firmware: raspberrypi: Register PMIC hwmon driver on Pi 5

Documentation/hwmon/index.rst | 1 +
Documentation/hwmon/raspberrypi-pmic-hwmon.rst | 49 ++++
drivers/firmware/raspberrypi.c | 21 ++
drivers/hwmon/Kconfig | 11 +
drivers/hwmon/Makefile | 1 +
drivers/hwmon/raspberrypi-pmic-hwmon.c | 296 +++++++++++++++++++++++++
include/soc/bcm2835/raspberrypi-firmware.h | 1 +
7 files changed, 380 insertions(+)
---
base-commit: 7d51eba9dfa7d30abab0b75570e9f7605366e45b
change-id: 20261117-hwmon-da9091-7aeeac6d8ef8

Best regards,
--
Sander Speetjens <sander.speetjens@xxxxxxxxx>