Add support for Qualcomm PMIC Battery Current Limiting (BCL) hardware
monitor driver. The BCL peripheral is present in Qualcomm PMICs and
provides real-time monitoring battery overcurrent and under voltage
conditions.
Hardware Overview:
The BCL hardware monitors battery voltage and current through dedicated
channels with configurable thresholds. It supports different alarm
levels with independent interrupt lines:
- Level 0 (LVL0): Maximum/Minimum threshold - mapped to hwmon min/max
- Level 1 (LVL1): Critical threshold - mapped to hwmon lcrit/crit
There are 3 modes of BCL hardware
- BMX - Both under voltage and over current monitor support
- CORE - Only under voltage monitor support
- WB - Both under voltage and over current monitor support. It also
supports current comparator for current monitor
The hardware uses different threshold representation schemes:
- Raw ADC values for Level 0 voltage thresholds
- Indexed values for Level 1 voltage thresholds
- Raw ADC values with variant-specific scaling for current thresholds
- Indexed value for current threshold for BCL WB modes.
Voltage and current monitoring can be independently enabled/disabled
by firmware, and the driver automatically detects the enabled features
at probe time.
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manaf.pallikunhi@oss.qualcomm.com>
---
Manaf Meethalavalappu Pallikunhi (4):
dt-bindings: hwmon: Add qcom,bcl-hwmon yaml bindings
hwmon: Add Qualcomm PMIC BCL hardware monitor driver
arm64: dts: qcom: pm7250b: Enable Qualcomm BCL device
arm64: dts: qcom: pm8350c: Enable Qualcomm BCL device
.../devicetree/bindings/hwmon/qcom,bcl-hwmon.yaml | 128 +++
MAINTAINERS | 9 +
arch/arm64/boot/dts/qcom/pm7250b.dtsi | 10 +
arch/arm64/boot/dts/qcom/pm8350c.dtsi | 9 +
drivers/hwmon/Kconfig | 9 +
drivers/hwmon/Makefile | 1 +
drivers/hwmon/qcom-bcl-hwmon.c | 982 +++++++++++++++++++++
drivers/hwmon/qcom-bcl-hwmon.h | 311 +++++++
8 files changed, 1459 insertions(+)
---
base-commit: 0f8a890c4524d6e4013ff225e70de2aed7e6d726
change-id: 20260206-qcom-bcl-hwmon-149ce73d9440
Best regards,
--
Manaf Meethalavalappu Pallikunhi <manaf.pallikunhi@oss.qualcomm.com>