Skip to content

Commit 25dd59f

Browse files
quic-manafmdmantre
authored andcommitted
FROMLIST: dt-bindings: hwmon: Add qcom,bcl-hwmon yaml bindings
Add devicetree binding documentation for Qualcomm PMIC Battery Current Limiting (BCL) hardware monitor. The BCL hardware provides monitoring and alarm functionality for battery overcurrent and battery/system under voltage conditions. Signed-off-by: Manaf Meethalavalappu Pallikunhi <manaf.pallikunhi@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260206-qcom-bcl-hwmon-v1-1-7b426f0b77a1@oss.qualcomm.com
1 parent 883da00 commit 25dd59f

2 files changed

Lines changed: 132 additions & 0 deletions

File tree

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/hwmon/qcom,bcl-hwmon.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm SPMI PMIC Battery Current Limiting (BCL) Hardware Monitor
8+
9+
maintainers:
10+
- Manaf Meethalavalappu Pallikunhi <manaf.pallikunhi@oss.qualcomm.com>
11+
12+
description: |
13+
SPMI PMIC Battery Current Limiting (BCL) hardware provides monitoring and
14+
alarm functionality for battery overcurrent and battery or system under
15+
voltage conditions. It monitors battery voltage and current, and
16+
can trigger interrupts when configurable thresholds are exceeded.
17+
18+
properties:
19+
compatible:
20+
oneOf:
21+
- description: v1 based BCL
22+
items:
23+
- enum:
24+
- qcom,pm7250b-bcl
25+
- qcom,pm8250b-bcl
26+
- const: qcom,bcl-v1
27+
28+
- description: v2 based BCL
29+
items:
30+
- enum:
31+
- qcom,pm8350b-bcl
32+
- qcom,pm8350c-bcl
33+
- const: qcom,bcl-v2
34+
35+
- description: v3 bmx based BCL
36+
items:
37+
- enum:
38+
- qcom,pm8550b-bcl
39+
- qcom,pm7550ba-bcl
40+
- const: qcom,bcl-v3-bmx
41+
42+
- description: v3 core based BCL
43+
items:
44+
- enum:
45+
- qcom,pm8550-bc0l
46+
- qcom,pm7550-bcl
47+
- const: qcom,bcl-v3-core
48+
49+
- description: v3 wb based BCL
50+
items:
51+
- enum:
52+
- qcom,pmw5100-bcl
53+
- const: qcom,bcl-v3-wb
54+
55+
- description: v4 bmx based BCL
56+
items:
57+
- enum:
58+
- qcom,pmih010-bcl
59+
- const: qcom,bcl-v4-bmx
60+
61+
- description: v4 bmx with different scale based BCL
62+
items:
63+
- enum:
64+
- qcom,pmv010-bcl
65+
- const: qcom,bcl-v4-pmv010
66+
67+
- description: v4 core based BCL
68+
items:
69+
- enum:
70+
- qcom,pmh010-bcl
71+
- const: qcom,bcl-v4-core
72+
73+
- description: v4 wb based BCL
74+
items:
75+
- enum:
76+
- qcom,pmw6100-bcl
77+
- const: qcom,bcl-v4-wb
78+
79+
reg:
80+
maxItems: 1
81+
description: BCL base address in the SPMI PMIC register map
82+
83+
interrupts:
84+
minItems: 2
85+
maxItems: 2
86+
description:
87+
BCL alarm interrupts for different threshold levels
88+
89+
interrupt-names:
90+
items:
91+
- const: bcl-max-min
92+
- const: bcl-critical
93+
94+
overcurrent-thresholds-milliamp:
95+
description:
96+
Current thresholds in milliamperes for the two configurable current
97+
alarm levels (max and critical). These values are used to override
98+
default thresholds if a platform has different battery ocp specification.
99+
$ref: /schemas/types.yaml#/definitions/uint32-array
100+
minItems: 2
101+
maxItems: 2
102+
103+
required:
104+
- compatible
105+
- reg
106+
- interrupts
107+
- interrupt-names
108+
109+
unevaluatedProperties: false
110+
111+
examples:
112+
- |
113+
#include <dt-bindings/interrupt-controller/irq.h>
114+
115+
pmic {
116+
#address-cells = <1>;
117+
#size-cells = <0>;
118+
119+
sensor@1d00 {
120+
compatible = "qcom,pm7250b-bcl", "qcom,bcl-v1";
121+
reg = <0x1d00>;
122+
interrupts = <0x2 0x1d 0x0 IRQ_TYPE_EDGE_RISING>,
123+
<0x2 0x1d 0x1 IRQ_TYPE_EDGE_RISING>;
124+
interrupt-names = "bcl-max-min",
125+
"bcl-critical";
126+
overcurrent-thresholds-milliamp = <5500 6000>;
127+
};
128+
};

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ patternProperties:
184184
type: object
185185
$ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#
186186

187+
"^sensor@[0-9a-f]+$":
188+
type: object
189+
$ref: /schemas/hwmon/qcom,bcl-hwmon.yaml#
190+
187191
"^temp-alarm@[0-9a-f]+$":
188192
type: object
189193
$ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml#

0 commit comments

Comments
 (0)