* [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs
@ 2026-08-11 11:47 Henrik Grimler
2026-08-11 11:47 ` [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746 Henrik Grimler
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Henrik Grimler @ 2026-08-11 11:47 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy
Cc: linux-pm, devicetree, linux-kernel, Sebastian Reichel, kernel,
Henrik Grimler
bq27z746 is similar to bq27z561 but with additional protection
functionality. The standard register set is identical, but the
extended registers accessed through AltManufacturerAccess has
differences.
While working with bq27z746 I looked at some of the technical
reference manuals for the other bq27xxx devices, and noticed some
discrepancies with the driver. Fix these issues while we are at it.
For reference the TRMs for the affected bq chips can be found at these
direct links:
- bq27z746: https://ti.com/lit/ug/sluuca6/sluuca6.pdf
- bq27520g4: https://ti.com/lit/ug/sluua35/sluua35.pdf
- bq28z610: https://ti.com/lit/ug/sluua65e/sluua65e.pdf
- bq27z561: https://ti.com/lit/ug/sluubo7/sluubo7.pdf
Signed-off-by: Henrik Grimler <henrik.grimler@axis.com>
---
Henrik Grimler (5):
dt-bindings: power: bq27xxx: document bq27z746
power: supply: bq27xxx: add support for bq27z746
power: supply: bq27xxx: bq27520g4: fix REG_TTES address
power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address
power: supply: bq27xxx: bq27z561: fix invalid AverageEnergy address
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 1 +
drivers/power/supply/bq27xxx_battery.c | 12 +++++++++---
drivers/power/supply/bq27xxx_battery_i2c.c | 2 ++
include/linux/power/bq27xxx_battery.h | 1 +
4 files changed, 13 insertions(+), 3 deletions(-)
---
base-commit: 99b38cda3f4c486cfbc40f3c8ede1703594e9f13
change-id: 20260709-bq27z746-8dc4c2ec0948
Best regards,
--
Henrik Grimler <henrik.grimler@axis.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746
2026-08-11 11:47 [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Henrik Grimler
@ 2026-08-11 11:47 ` Henrik Grimler
2026-08-17 7:50 ` Krzysztof Kozlowski
2026-08-11 11:47 ` [PATCH 2/5] power: supply: bq27xxx: add support for bq27z746 Henrik Grimler
` (4 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Henrik Grimler @ 2026-08-11 11:47 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy
Cc: linux-pm, devicetree, linux-kernel, Sebastian Reichel, kernel,
Henrik Grimler
Add compatible for Texas Instruments bq27z746 fuel gauge, which is
similar to its sibling bqz27561, but with more protection
functionality.
Signed-off-by: Henrik Grimler <henrik.grimler@axis.com>
---
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
index bc05400186cf..4e09e1df0914 100644
--- a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
+++ b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
@@ -47,6 +47,7 @@ properties:
- ti,bq27441
- ti,bq27621
- ti,bq27z561
+ - ti,bq27z746
- ti,bq28z610
- ti,bq34z100
- ti,bq78z100
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/5] power: supply: bq27xxx: add support for bq27z746
2026-08-11 11:47 [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Henrik Grimler
2026-08-11 11:47 ` [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746 Henrik Grimler
@ 2026-08-11 11:47 ` Henrik Grimler
2026-08-11 11:47 ` [PATCH 3/5] power: supply: bq27xxx: bq27520g4: fix REG_TTES address Henrik Grimler
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Henrik Grimler @ 2026-08-11 11:47 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy
Cc: linux-pm, devicetree, linux-kernel, Sebastian Reichel, kernel,
Henrik Grimler
bq27z746 is similar to bq27z561, but has additional battery protection
functionality. The register map is largely the same, with deviations
only among the AltManufacturerAccess() registers.
Signed-off-by: Henrik Grimler <henrik.grimler@axis.com>
---
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 45f0e39b8c2d..be3ca4b76c80 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -37,6 +37,7 @@
* https://www.ti.com/product/bq27441-g1
* https://www.ti.com/product/bq27621-g1
* https://www.ti.com/product/bq27z561
+ * https://www.ti.com/product/bq27z746
* https://www.ti.com/product/bq28z610
* https://www.ti.com/product/bq34z100-g1
* https://www.ti.com/product/bq78z100
@@ -501,6 +502,7 @@ static u8
[BQ27XXX_REG_AP] = 0x22,
BQ27XXX_DM_REG_ROWS,
},
+#define bq27z746_regs bq27z561_regs
bq28z610_regs[BQ27XXX_REG_MAX] = {
[BQ27XXX_REG_CTRL] = 0x00,
[BQ27XXX_REG_TEMP] = 0x06,
@@ -836,6 +838,8 @@ static enum power_supply_property bq27z561_props[] = {
POWER_SUPPLY_PROP_MANUFACTURER,
};
+#define bq27z746_props bq27z561_props
+
static enum power_supply_property bq28z610_props[] = {
POWER_SUPPLY_PROP_STATUS,
POWER_SUPPLY_PROP_PRESENT,
@@ -994,6 +998,7 @@ static struct bq27xxx_dm_reg bq27621_dm_regs[] = {
#endif
#define bq27z561_dm_regs NULL
+#define bq27z746_dm_regs NULL
#define bq28z610_dm_regs NULL
#define bq34z100_dm_regs NULL
#define bq78z100_dm_regs NULL
@@ -1052,6 +1057,7 @@ static struct {
[BQ27441] = BQ27XXX_DATA(bq27441, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
[BQ27621] = BQ27XXX_DATA(bq27621, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
[BQ27Z561] = BQ27XXX_DATA(bq27z561, 0 , BQ27Z561_O_BITS),
+ [BQ27Z746] = BQ27XXX_DATA(bq27z746, 0 , BQ27Z561_O_BITS),
[BQ28Z610] = BQ27XXX_DATA(bq28z610, 0 , BQ27Z561_O_BITS),
[BQ34Z100] = BQ27XXX_DATA(bq34z100, 0 , BQ27XXX_O_OTDC | BQ27XXX_O_SOC_SI | \
BQ27XXX_O_HAS_CI | BQ27XXX_O_MUL_CHEM),
diff --git a/drivers/power/supply/bq27xxx_battery_i2c.c b/drivers/power/supply/bq27xxx_battery_i2c.c
index c4e7a9521d08..2a6b4534cb28 100644
--- a/drivers/power/supply/bq27xxx_battery_i2c.c
+++ b/drivers/power/supply/bq27xxx_battery_i2c.c
@@ -253,6 +253,7 @@ static const struct i2c_device_id bq27xxx_i2c_id_table[] = {
{ .name = "bq27441", .driver_data = BQ27441 },
{ .name = "bq27621", .driver_data = BQ27621 },
{ .name = "bq27z561", .driver_data = BQ27Z561 },
+ { .name = "bq27z746", .driver_data = BQ27Z746 },
{ .name = "bq28z610", .driver_data = BQ28Z610 },
{ .name = "bq34z100", .driver_data = BQ34Z100 },
{ .name = "bq78z100", .driver_data = BQ78Z100 },
@@ -290,6 +291,7 @@ static const struct of_device_id bq27xxx_battery_i2c_of_match_table[] = {
{ .compatible = "ti,bq27441" },
{ .compatible = "ti,bq27621" },
{ .compatible = "ti,bq27z561" },
+ { .compatible = "ti,bq27z746" },
{ .compatible = "ti,bq28z610" },
{ .compatible = "ti,bq34z100" },
{ .compatible = "ti,bq78z100" },
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
index d56e1276aafe..0b833c4bb583 100644
--- a/include/linux/power/bq27xxx_battery.h
+++ b/include/linux/power/bq27xxx_battery.h
@@ -33,6 +33,7 @@ enum bq27xxx_chip {
BQ27441,
BQ27621,
BQ27Z561,
+ BQ27Z746,
BQ28Z610,
BQ34Z100,
BQ78Z100,
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5] power: supply: bq27xxx: bq27520g4: fix REG_TTES address
2026-08-11 11:47 [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Henrik Grimler
2026-08-11 11:47 ` [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746 Henrik Grimler
2026-08-11 11:47 ` [PATCH 2/5] power: supply: bq27xxx: add support for bq27z746 Henrik Grimler
@ 2026-08-11 11:47 ` Henrik Grimler
2026-08-11 11:47 ` [PATCH 4/5] power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address Henrik Grimler
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Henrik Grimler @ 2026-08-11 11:47 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy
Cc: linux-pm, devicetree, linux-kernel, Sebastian Reichel, kernel,
Henrik Grimler
According to the technical reference manual the StandbyTimeToEmpty
(TTES) register is at 0x1a, not 0x1c. At 0x1c StateOfHealth instead
resides.
Fixes: 8835cae5f2ab ("power: supply: bq27xxx: adds specific support for bq27520-g4 revision.")
Signed-off-by: Henrik Grimler <henrik.grimler@axis.com>
---
drivers/power/supply/bq27xxx_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index be3ca4b76c80..e28eca53c7ee 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -331,7 +331,7 @@ static u8
[BQ27XXX_REG_FLAGS] = 0x0a,
[BQ27XXX_REG_TTE] = 0x16,
[BQ27XXX_REG_TTF] = INVALID_REG_ADDR,
- [BQ27XXX_REG_TTES] = 0x1c,
+ [BQ27XXX_REG_TTES] = 0x1a,
[BQ27XXX_REG_TTECP] = INVALID_REG_ADDR,
[BQ27XXX_REG_NAC] = 0x0c,
[BQ27XXX_REG_RC] = 0x10,
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/5] power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address
2026-08-11 11:47 [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Henrik Grimler
` (2 preceding siblings ...)
2026-08-11 11:47 ` [PATCH 3/5] power: supply: bq27xxx: bq27520g4: fix REG_TTES address Henrik Grimler
@ 2026-08-11 11:47 ` Henrik Grimler
2026-08-11 11:47 ` [PATCH 5/5] power: supply: bq27xxx: bq27z561: " Henrik Grimler
2026-08-12 22:23 ` (subset) [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Sebastian Reichel
5 siblings, 0 replies; 10+ messages in thread
From: Henrik Grimler @ 2026-08-11 11:47 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy
Cc: linux-pm, devicetree, linux-kernel, Sebastian Reichel, kernel,
Henrik Grimler
bq28z610 currently uses the AveragePower reg, 0x22, for reading both
AveragePower and AvailableEnergy. The technical reference manual does
not mention AvailableEnergy, and it does not make sense to read a
cumulative, always positive, property like AvailableEnergy from a rate
property like AveragePower. Set REG_AE as invalid to fix it.
Fixes: 707d678a5c7c ("power: supply: bq27xxx_battery: Add the BQ28z610 Battery monitor")
Signed-off-by: Henrik Grimler <henrik.grimler@axis.com>
---
drivers/power/supply/bq27xxx_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index e28eca53c7ee..4985eb54090e 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -518,7 +518,7 @@ static u8
[BQ27XXX_REG_RC] = 0x10,
[BQ27XXX_REG_FCC] = 0x12,
[BQ27XXX_REG_CYCT] = 0x2a,
- [BQ27XXX_REG_AE] = 0x22,
+ [BQ27XXX_REG_AE] = INVALID_REG_ADDR,
[BQ27XXX_REG_SOC] = 0x2c,
[BQ27XXX_REG_DCAP] = 0x3c,
[BQ27XXX_REG_AP] = 0x22,
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/5] power: supply: bq27xxx: bq27z561: fix invalid AverageEnergy address
2026-08-11 11:47 [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Henrik Grimler
` (3 preceding siblings ...)
2026-08-11 11:47 ` [PATCH 4/5] power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address Henrik Grimler
@ 2026-08-11 11:47 ` Henrik Grimler
2026-08-12 22:23 ` (subset) [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Sebastian Reichel
5 siblings, 0 replies; 10+ messages in thread
From: Henrik Grimler @ 2026-08-11 11:47 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy
Cc: linux-pm, devicetree, linux-kernel, Sebastian Reichel, kernel,
Henrik Grimler
bq27z561 currently uses the AveragePower reg, 0x22, for reading both
AveragePower and AvailableEnergy. The technical reference manual does
not mention AvailableEnergy, and it does not make sense to read a
cumulative, always positive, property like AvailableEnergy from a rate
property like AveragePower. Set REG_AE as invalid to fix it.
Fixes: 6f24ff97e323 ("power: supply: bq27xxx_battery: Add the BQ27Z561 Battery monitor")
Signed-off-by: Henrik Grimler <henrik.grimler@axis.com>
---
drivers/power/supply/bq27xxx_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 4985eb54090e..5aed8b24119b 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -496,7 +496,7 @@ static u8
[BQ27XXX_REG_RC] = 0x10,
[BQ27XXX_REG_FCC] = 0x12,
[BQ27XXX_REG_CYCT] = 0x2a,
- [BQ27XXX_REG_AE] = 0x22,
+ [BQ27XXX_REG_AE] = INVALID_REG_ADDR,
[BQ27XXX_REG_SOC] = 0x2c,
[BQ27XXX_REG_DCAP] = 0x3c,
[BQ27XXX_REG_AP] = 0x22,
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: (subset) [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs
2026-08-11 11:47 [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Henrik Grimler
` (4 preceding siblings ...)
2026-08-11 11:47 ` [PATCH 5/5] power: supply: bq27xxx: bq27z561: " Henrik Grimler
@ 2026-08-12 22:23 ` Sebastian Reichel
5 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2026-08-12 22:23 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy,
Henrik Grimler
Cc: linux-pm, devicetree, linux-kernel, kernel
On Tue, 11 Aug 2026 13:47:42 +0200, Henrik Grimler wrote:
> bq27z746 is similar to bq27z561 but with additional protection
> functionality. The standard register set is identical, but the
> extended registers accessed through AltManufacturerAccess has
> differences.
>
> While working with bq27z746 I looked at some of the technical
> reference manuals for the other bq27xxx devices, and noticed some
> discrepancies with the driver. Fix these issues while we are at it.
>
> [...]
Applied, thanks!
[3/5] power: supply: bq27xxx: bq27520g4: fix REG_TTES address
commit: c774a623c821a173c950e1297f8e8c85a89455be
[4/5] power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address
commit: e9387e9ab5121f330d313afb90430c02200f9782
[5/5] power: supply: bq27xxx: bq27z561: fix invalid AverageEnergy address
(no commit info)
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746
2026-08-11 11:47 ` [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746 Henrik Grimler
@ 2026-08-17 7:50 ` Krzysztof Kozlowski
2026-08-17 15:00 ` Henrik Grimler
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-17 7:50 UTC (permalink / raw)
To: Henrik Grimler
Cc: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pali Rohár, Andrew F. Davis, Chris Lapa, Dan Murphy,
linux-pm, devicetree, linux-kernel, Sebastian Reichel, kernel
On Tue, Aug 11, 2026 at 01:47:43PM +0200, Henrik Grimler wrote:
> Add compatible for Texas Instruments bq27z746 fuel gauge, which is
> similar to its sibling bqz27561, but with more protection
> functionality.
"More" means superset? Driver code says it is compatible, so this has to
be explained (explicitly requested in writing bindings btw).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746
2026-08-17 7:50 ` Krzysztof Kozlowski
@ 2026-08-17 15:00 ` Henrik Grimler
2026-08-17 15:14 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Henrik Grimler @ 2026-08-17 15:00 UTC (permalink / raw)
To: krzk@kernel.org
Cc: Kernel, Alexander Svarvare, sebastian.reichel@collabora.com,
afd@ti.com, dmurphy@ti.com, devicetree@vger.kernel.org,
robh@kernel.org, pali@kernel.org, krzk+dt@kernel.org,
chris@lapa.com.au, sre@kernel.org, conor+dt@kernel.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Hi Krzysztof,
Thanks for the comment!
On Mon, 2026-08-17 at 09:50 +0200, Krzysztof Kozlowski wrote:
> On Tue, Aug 11, 2026 at 01:47:43PM +0200, Henrik Grimler wrote:
> > Add compatible for Texas Instruments bq27z746 fuel gauge, which is
> > similar to its sibling bqz27561, but with more protection
> > functionality.
>
> "More" means superset? Driver code says it is compatible, so this has to
> be explained
I will update the commit message to explain the differences. Main
difference is that bq27z746 has integrated protection logic, and can
control external MOSFETs to stop charging/discharging if an issue is
detected (like overcurrent or overvoltage), or to keep the rest of the
system fully powered off in shipping mode. bq27z561 does not have such
protection circuitry, so best it can do if it detects issues is to send
an interrupt to some other component.
The standard register map is almost identical between the devices.
bq27z561 has 6 extra registers at the end that bq27z746 lacks though,
which I missed when comparing the TRMs the first time (so bq27z561 map
is a superset of bq27z746's). Neither of these extra registers are
supported/handled by the Linux driver through. I will update all the
commit messages for v2 to clarify.
There are also additional "ManufacturerAccess" registers where there
are some more differences between bq27z561 and bq27z746 mostly related
to the above mentioned MOSFET control, but the current Linux driver
does not read or handle any "ManufacturerAccess" register. One of my
colleagues has sent a patch to add support for reading PROP_MODEL_NAME
from these additional registers for bq27z561 though [1]. This model
name register is the same for bq27z561 and bq27z746.
In summary the chips have differences, but I expect it will be fine for
the driver to use same regs and props for bq27z746 and bq27z561.
> (explicitly requested in writing bindings btw).
I will read writing-bindings and writing-schema more carefully.
> Best regards,
> Krzysztof
[1]
https://lore.kernel.org/linux-pm/20260814-alexander-laddchip-patch-v1-1-1624d6725108@axis.com/
Best regards,
Henrik Grimler
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746
2026-08-17 15:00 ` Henrik Grimler
@ 2026-08-17 15:14 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-17 15:14 UTC (permalink / raw)
To: Henrik Grimler
Cc: Kernel, Alexander Svarvare, sebastian.reichel@collabora.com,
afd@ti.com, dmurphy@ti.com, devicetree@vger.kernel.org,
robh@kernel.org, pali@kernel.org, krzk+dt@kernel.org,
chris@lapa.com.au, sre@kernel.org, conor+dt@kernel.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
On 17/08/2026 17:00, Henrik Grimler wrote:
> Hi Krzysztof,
>
> Thanks for the comment!
>
> On Mon, 2026-08-17 at 09:50 +0200, Krzysztof Kozlowski wrote:
>> On Tue, Aug 11, 2026 at 01:47:43PM +0200, Henrik Grimler wrote:
>>> Add compatible for Texas Instruments bq27z746 fuel gauge, which is
>>> similar to its sibling bqz27561, but with more protection
>>> functionality.
>>
>> "More" means superset? Driver code says it is compatible, so this has to
>> be explained
>
> I will update the commit message to explain the differences. Main
> difference is that bq27z746 has integrated protection logic, and can
> control external MOSFETs to stop charging/discharging if an issue is
> detected (like overcurrent or overvoltage), or to keep the rest of the
> system fully powered off in shipping mode. bq27z561 does not have such
> protection circuitry, so best it can do if it detects issues is to send
> an interrupt to some other component.
>
> The standard register map is almost identical between the devices.
> bq27z561 has 6 extra registers at the end that bq27z746 lacks though,
> which I missed when comparing the TRMs the first time (so bq27z561 map
> is a superset of bq27z746's). Neither of these extra registers are
> supported/handled by the Linux driver through. I will update all the
> commit messages for v2 to clarify.
>
> There are also additional "ManufacturerAccess" registers where there
> are some more differences between bq27z561 and bq27z746 mostly related
> to the above mentioned MOSFET control, but the current Linux driver
> does not read or handle any "ManufacturerAccess" register. One of my
> colleagues has sent a patch to add support for reading PROP_MODEL_NAME
> from these additional registers for bq27z561 though [1]. This model
> name register is the same for bq27z561 and bq27z746.
>
> In summary the chips have differences, but I expect it will be fine for
> the driver to use same regs and props for bq27z746 and bq27z561.
Well, superset is exactly what compatibility is about.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-08-17 15:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 11:47 [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Henrik Grimler
2026-08-11 11:47 ` [PATCH 1/5] dt-bindings: power: bq27xxx: document bq27z746 Henrik Grimler
2026-08-17 7:50 ` Krzysztof Kozlowski
2026-08-17 15:00 ` Henrik Grimler
2026-08-17 15:14 ` Krzysztof Kozlowski
2026-08-11 11:47 ` [PATCH 2/5] power: supply: bq27xxx: add support for bq27z746 Henrik Grimler
2026-08-11 11:47 ` [PATCH 3/5] power: supply: bq27xxx: bq27520g4: fix REG_TTES address Henrik Grimler
2026-08-11 11:47 ` [PATCH 4/5] power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address Henrik Grimler
2026-08-11 11:47 ` [PATCH 5/5] power: supply: bq27xxx: bq27z561: " Henrik Grimler
2026-08-12 22:23 ` (subset) [PATCH 0/5] power: supply: bq27xxx: add bq27z746, and fix some regs Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox