[PATCH 0/2] Add support to read RPMH regulator settings
From: Kamal Wadhwa
Date: Mon Jun 23 2025 - 12:44:12 EST
This patch series adds a new `rpmh_read()` API to allow reading RPMH
addresses. Also, using this new API, enhances the RPMH regulator driver
get_regulator* APIs like `get_regulator_sel()`, `get_mode()` and
`is_enabled()` to allow reading voltage/mode/enable setting from H/W.
This is needed because current design has a limitation - regulator
framework can only get the cached values from the last voltage set
operation. Because of this right after bootup a `get_voltage_sel()`
from regulator framework will return -ENOTRECOVERABLE error, causing
regulator framework to trigger an unnecessary `set_voltage_sel()` call
with the `min_uV` value specified in the regulator's device tree
settings, which can cause issues for consumers like the display and
UFS that require a consistent voltage setting from the bootloader
state until their drivers are probed.
With this change regulator framework will get the regulator voltage
and other settings, as configured during bootloader stage, avoiding
unnecessary voltage adjustments and maintaining consistent power
settings across the transition from bootloader to kernel.
Signed-off-by: Kamal Wadhwa <kamal.wadhwa@xxxxxxxxxxxxxxxx>
---
Kamal Wadhwa (1):
regulator: qcom-rpmh: Add support to read regulator settings
Maulik Shah (1):
soc: qcom: rpmh: Add support to read back resource settings
drivers/regulator/qcom-rpmh-regulator.c | 71 +++++++++++++++++++++++++++++++++
drivers/soc/qcom/rpmh-rsc.c | 12 +++++-
drivers/soc/qcom/rpmh.c | 54 +++++++++++++++++++++++--
include/soc/qcom/rpmh.h | 7 ++++
include/soc/qcom/tcs.h | 2 +
5 files changed, 140 insertions(+), 6 deletions(-)
---
base-commit: 393d0c54cae31317deaa9043320c5fd9454deabc
change-id: 20250623-add-rpmh-read-support-3288f83cc20a
Best regards,
--
Kamal Wadhwa <kamal.wadhwa@xxxxxxxxxxxxxxxx>