From: Sander Speetjens <sander.speetjens@gmail.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Guenter Roeck <linux@roeck-us.net>, Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
Peter Robinson <pbrobinson@gmail.com>,
Sander Speetjens <sander.speetjens@gmail.com>
Subject: [PATCH v4 0/2] hwmon: add Raspberry Pi 5 PMIC driver
Date: Thu, 19 Nov 2026 20:55:29 +0100 [thread overview]
Message-ID: <20261119-hwmon-da9091-v4-0-0d6e345c3666@gmail.com> (raw)
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@gmail.com>
---
Changes in v4:
- Fix sashiko reported bug
- Link to v3: https://lore.kernel.org/r/20261119-hwmon-da9091-v3-0-15956035d7b5@gmail.com
Changes in v3:
- Fix sashiko reported bugs
- Link to v2: https://lore.kernel.org/r/20261119-hwmon-da9091-v2-0-d6c624272a9e@gmail.com
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@gmail.com
---
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@gmail.com>
next reply other threads:[~2026-11-19 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 19:55 Sander Speetjens [this message]
2026-11-19 19:55 ` [PATCH v4 1/2] hwmon: add Raspberry Pi " Sander Speetjens
2026-11-19 19:55 ` [PATCH v4 2/2] firmware: raspberrypi: Register PMIC hwmon driver on Pi 5 Sander Speetjens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119-hwmon-da9091-v4-0-0d6e345c3666@gmail.com \
--to=sander.speetjens@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=corbet@lwn.net \
--cc=florian.fainelli@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=pbrobinson@gmail.com \
--cc=rdunlap@infradead.org \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®