* [PATCH v3 0/2] Add driver for TI BQ25630 charger
@ 2026-06-28 22:01 Waqar Hameed
2026-06-28 22:01 ` [PATCH v3 1/2] dt-bindings: power: supply: Add " Waqar Hameed
0 siblings, 1 reply; 3+ messages in thread
From: Waqar Hameed @ 2026-06-28 22:01 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: kernel, linux-kernel, linux-pm, devicetree
This patch series contains a fully working driver for the basic
functionality for the new TI BQ25630 charger (see datasheet [1]). The
other "advanced" functionalities such as USB OTG, BATFET control and
liquid detection, will be handled in separate patches (after necessary
framework changes) according to the design discussions in the first RFC
version.
[1] https://www.ti.com/lit/gpn/bq25630
Changes in v3:
[power]
* Sort variable declarations in reverse x-mas tree order in read/write
property functions.
[dt-bindings]
* Drop `description` for property `reg`.
* Remove `|` in `description` for property `interrupts`.
* Remove `monitored-battery` from `properties`.
* Use `unevaluatedProperties: false` instead of
`additionalProperties: false`.
Link to v2: https://lore.kernel.org/lkml/cover.1781789320.git.waqarh@axis.com/
Changes in v2:
[power]
* Fix return value check for `data->regmap16be` initialization in probe
(check was wrongly for `data->regmap16le`).
* Remove TODO-comment about BATFET `sysfs` ABI (we will add a new sysfs
ABI entry in the framework for this).
* Check registers `BQ25630_REG_CHARGER_STATUS_X` as well in IRQ handler.
Because there might be changes that is not necessarily *only*
triggered from hardware faults. For example, manually
enabling/disabling with `echo 0 > /online`.
[dt-bindings]
* Rename file with `ti,` prefix.
* Remove battery-node in example.
Link to v1: https://lore.kernel.org/lkml/cover.1772201049.git.waqar.hameed@axis.com/
Waqar Hameed (2):
dt-bindings: power: supply: Add TI BQ25630 charger
power: supply: Add driver for TI BQ25630 charger
.../bindings/power/supply/ti,bq25630.yaml | 55 +
drivers/power/supply/Kconfig | 7 +
drivers/power/supply/Makefile | 1 +
drivers/power/supply/bq25630_charger.c | 1073 +++++++++++++++++
4 files changed, 1136 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml
create mode 100644 drivers/power/supply/bq25630_charger.c
base-commit: ab9de95c9cf952332ab79453b4b5d1bfca8e514f
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3 1/2] dt-bindings: power: supply: Add TI BQ25630 charger
2026-06-28 22:01 [PATCH v3 0/2] Add driver for TI BQ25630 charger Waqar Hameed
@ 2026-06-28 22:01 ` Waqar Hameed
2026-06-28 22:07 ` sashiko-bot
0 siblings, 1 reply; 3+ messages in thread
From: Waqar Hameed @ 2026-06-28 22:01 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: kernel, linux-pm, devicetree, linux-kernel
Add devicetree bindings for the TI BQ25630 battery charger. It's I2C
controlled and sends interrupts.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
---
.../bindings/power/supply/ti,bq25630.yaml | 55 +++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml
diff --git a/Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml b/Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml
new file mode 100644
index 0000000000000..3f2904731c5a4
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/ti,bq25630.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI BQ25630 battery charger
+
+maintainers:
+ - Waqar Hameed <waqar.hameed@axis.com>
+
+description: |
+ I2C controlled single cell Li-ion and Li-polymer 5A buck charger.
+ Datasheet: https://www.ti.com/lit/gpn/bq25630
+
+allOf:
+ - $ref: power-supply.yaml#
+
+properties:
+ compatible:
+ const: ti,bq25630
+
+ reg:
+ const: 0x6b
+
+ interrupts:
+ maxItems: 1
+ description:
+ Device sends active low 256 µs pulse. Type should therefore be
+ IRQ_TYPE_EDGE_FALLING.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - monitored-battery
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ charger@6b {
+ compatible = "ti,bq25630";
+ reg = <0x6b>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+ monitored-battery = <&bat>;
+ };
+ };
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: power: supply: Add TI BQ25630 charger
2026-06-28 22:01 ` [PATCH v3 1/2] dt-bindings: power: supply: Add " Waqar Hameed
@ 2026-06-28 22:07 ` sashiko-bot
0 siblings, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-06-28 22:07 UTC (permalink / raw)
To: Waqar Hameed; +Cc: devicetree, conor+dt, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The devicetree binding example references an undefined phandle label `&bat`, which will cause `dtc` compilation to fail during `make dt_binding_check`.
--
commit 4d0f17bc3ce487f6e8027b9ef945b17aba3d6bee
Author: Waqar Hameed <waqar.hameed@axis.com>
dt-bindings: power: supply: Add TI BQ25630 charger
This commit adds devicetree bindings for the TI BQ25630 battery charger.
It defines standard properties for I2C and interrupts, and sets up
requirements for a monitored battery reference.
> diff --git a/Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml b/Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml
> new file mode 100644
> index 0000000000000..3f2904731c5a4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/ti,bq25630.yaml
[ ... ]
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + charger@6b {
> + compatible = "ti,bq25630";
> + reg = <0x6b>;
> + interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
> + monitored-battery = <&bat>;
[Severity: Low]
Does this example reference an undefined phandle label?
Looking at the example scope, the node with the bat label is not defined
anywhere. Could this cause dtc compilation to fail with a 'Reference to
non-existent node or label' error during make dt_binding_check?
> + };
> + };
> +...
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1782683551.git.waqar.hameed@axis.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-28 22:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-28 22:01 [PATCH v3 0/2] Add driver for TI BQ25630 charger Waqar Hameed
2026-06-28 22:01 ` [PATCH v3 1/2] dt-bindings: power: supply: Add " Waqar Hameed
2026-06-28 22:07 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox