* [PATCH 1/2] dt-bindings: power: supply: bq27xxx: add BQ28Z620
2026-10-02 12:02 [PATCH 0/2] power: supply: bq27xxx: Add TI BQ28Z620 battery gauge Alexey Charkov
@ 2026-10-02 12:02 ` Alexey Charkov
2026-10-03 14:37 ` Krzysztof Kozlowski
2026-10-02 12:02 ` [PATCH 2/2] power: supply: bq27xxx: add support for BQ28Z620 Alexey Charkov
2026-10-04 17:46 ` [PATCH 0/2] power: supply: bq27xxx: Add TI BQ28Z620 battery gauge Sebastian Reichel
2 siblings, 1 reply; 5+ messages in thread
From: Alexey Charkov @ 2026-10-02 12:02 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis
Cc: linux-pm, devicetree, linux-kernel, Alexey Charkov
Add a compatible for the TI BQ28Z620, a firmware derivative of the
BQ28Z610 that keeps its standard command set but drops the Battery Trip
Point feature and relocates much of the data flash as a result.
Keep it standalone rather than falling back to ti,bq28z610, as software
programming the BQ28Z610 data flash layout would corrupt the
configuration of a BQ28Z620.
Link: https://www.ti.com/product/BQ28Z620
Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
index 79d1a3c8c685..be0f1f7292c8 100644
--- a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
+++ b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
@@ -49,6 +49,7 @@ properties:
- ti,bq27z561
- ti,bq27z746
- ti,bq28z610
+ - ti,bq28z620
- ti,bq34z100
- ti,bq78z100
@@ -93,6 +94,7 @@ allOf:
- ti,bq27545
- ti,bq27411
- ti,bq28z610
+ - ti,bq28z620
- ti,bq34z100
- ti,bq78z100
then:
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] power: supply: bq27xxx: add support for BQ28Z620
2026-10-02 12:02 [PATCH 0/2] power: supply: bq27xxx: Add TI BQ28Z620 battery gauge Alexey Charkov
2026-10-02 12:02 ` [PATCH 1/2] dt-bindings: power: supply: bq27xxx: add BQ28Z620 Alexey Charkov
@ 2026-10-02 12:02 ` Alexey Charkov
2026-10-04 17:46 ` [PATCH 0/2] power: supply: bq27xxx: Add TI BQ28Z620 battery gauge Sebastian Reichel
2 siblings, 0 replies; 5+ messages in thread
From: Alexey Charkov @ 2026-10-02 12:02 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis
Cc: linux-pm, devicetree, linux-kernel, Alexey Charkov
Match the BQ28Z620 under its own chip ID so that code touching its
relocated data flash can tell it apart from the BQ28Z610. Reuse the
BQ28Z610 register map and properties, as the standard commands the
driver reads are unchanged.
Keep the 10 mW scaling of AveragePower() even though the BQ28Z620 TRM
lists it in mW: readings on hardware match V * I only in 10 mW units.
Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
drivers/power/supply/bq27xxx_battery.c | 6 ++++++
drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++
include/linux/power/bq27xxx_battery.h | 1 +
3 files changed, 9 insertions(+)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 17f5b58609be..09272249b4f7 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -39,6 +39,7 @@
* https://www.ti.com/product/bq27z561
* https://www.ti.com/product/bq27z746
* https://www.ti.com/product/bq28z610
+ * https://www.ti.com/product/bq28z620
* https://www.ti.com/product/bq34z100-g1
* https://www.ti.com/product/bq78z100
*/
@@ -525,6 +526,7 @@ static u8
[BQ27XXX_REG_AP] = 0x22,
BQ27XXX_DM_REG_ROWS,
},
+#define bq28z620_regs bq28z610_regs
bq34z100_regs[BQ27XXX_REG_MAX] = {
[BQ27XXX_REG_CTRL] = 0x00,
[BQ27XXX_REG_TEMP] = 0x0c,
@@ -861,6 +863,8 @@ static enum power_supply_property bq28z610_props[] = {
POWER_SUPPLY_PROP_MANUFACTURER,
};
+#define bq28z620_props bq28z610_props
+
static enum power_supply_property bq34z100_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_PRESENT,
@@ -1001,6 +1005,7 @@ static struct bq27xxx_dm_reg bq27621_dm_regs[] = {
#define bq27z561_dm_regs NULL
#define bq27z746_dm_regs NULL
#define bq28z610_dm_regs NULL
+#define bq28z620_dm_regs NULL
#define bq34z100_dm_regs NULL
#define bq78z100_dm_regs NULL
@@ -1060,6 +1065,7 @@ static struct {
[BQ27Z561] = BQ27XXX_DATA(bq27z561, 0 , BQ27Z561_O_BITS),
[BQ27Z746] = BQ27XXX_DATA(bq27z746, 0 , BQ27Z561_O_BITS),
[BQ28Z610] = BQ27XXX_DATA(bq28z610, 0 , BQ27Z561_O_BITS),
+ [BQ28Z620] = BQ27XXX_DATA(bq28z620, 0 , BQ27Z561_O_BITS),
[BQ34Z100] = BQ27XXX_DATA(bq34z100, 0 , BQ27XXX_O_OTDC | BQ27XXX_O_SOC_SI | \
BQ27XXX_O_HAS_CI | BQ27XXX_O_MUL_CHEM),
[BQ78Z100] = BQ27XXX_DATA(bq78z100, 0 , BQ27Z561_O_BITS),
diff --git a/drivers/power/supply/bq27xxx_battery_i2c.c b/drivers/power/supply/bq27xxx_battery_i2c.c
index 2a6b4534cb28..715ce8b6e401 100644
--- a/drivers/power/supply/bq27xxx_battery_i2c.c
+++ b/drivers/power/supply/bq27xxx_battery_i2c.c
@@ -255,6 +255,7 @@ static const struct i2c_device_id bq27xxx_i2c_id_table[] = {
{ .name = "bq27z561", .driver_data = BQ27Z561 },
{ .name = "bq27z746", .driver_data = BQ27Z746 },
{ .name = "bq28z610", .driver_data = BQ28Z610 },
+ { .name = "bq28z620", .driver_data = BQ28Z620 },
{ .name = "bq34z100", .driver_data = BQ34Z100 },
{ .name = "bq78z100", .driver_data = BQ78Z100 },
{ }
@@ -293,6 +294,7 @@ static const struct of_device_id bq27xxx_battery_i2c_of_match_table[] = {
{ .compatible = "ti,bq27z561" },
{ .compatible = "ti,bq27z746" },
{ .compatible = "ti,bq28z610" },
+ { .compatible = "ti,bq28z620" },
{ .compatible = "ti,bq34z100" },
{ .compatible = "ti,bq78z100" },
{},
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index 0b833c4bb583..731ea837aac3 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -35,6 +35,7 @@ enum bq27xxx_chip {
BQ27Z561,
BQ27Z746,
BQ28Z610,
+ BQ28Z620,
BQ34Z100,
BQ78Z100,
};
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread