* [PATCH v2 1/2] dt-bindings: power: supply: ab8500: Add AB8505 charger
2026-09-18 16:56 [PATCH v2 0/2] power: supply: Correct AB8505 charger device tree Linus Walleij
@ 2026-09-18 16:56 ` Linus Walleij
2026-09-20 18:14 ` Krzysztof Kozlowski
2026-09-18 16:56 ` [PATCH v2 2/2] ARM: dts: ux500: Use AB8505 charger compatible Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2026-09-18 16:56 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-pm, devicetree, Linus Walleij
AB8500 and AB8505 expose different charger interrupt sets. Add a unique
AB8505 charger compatible with the AB8500 compatible as its fallback.
Use the variant-specific string to require the fourteen main and USB
charger interrupts on AB8500 and the nine USB charger interrupts on
AB8505.
Also clarify that autopower_cfg describes the AB8500 facility, since the
corresponding AB8505 register bit is reserved.
Fixes: eb917497734c ("dt-bindings: power: supply: ab8500: Convert to DT schema format")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
.../power/supply/stericsson,ab8500-charger.yaml | 70 ++++++++++++++++------
1 file changed, 53 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml
index 4f19744844e9..73f5df2d7a36 100644
--- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml
+++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml
@@ -12,10 +12,58 @@ maintainers:
allOf:
- $ref: power-supply.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: stericsson,ab8505-charger
+ then:
+ properties:
+ interrupts:
+ minItems: 9
+ maxItems: 9
+
+ interrupt-names:
+ items:
+ - const: VBUS_DET_F
+ - const: VBUS_DET_R
+ - const: USB_LINK_STATUS
+ - const: USB_CH_TH_PROT_R
+ - const: USB_CH_TH_PROT_F
+ - const: USB_CHARGER_NOT_OKR
+ - const: VBUS_OVV
+ - const: CH_WD_EXP
+ - const: VBUS_CH_DROP_END
+ else:
+ properties:
+ interrupts:
+ minItems: 14
+ maxItems: 14
+
+ interrupt-names:
+ items:
+ - const: MAIN_CH_UNPLUG_DET
+ - const: MAIN_CHARGE_PLUG_DET
+ - const: MAIN_EXT_CH_NOT_OK
+ - const: MAIN_CH_TH_PROT_R
+ - const: MAIN_CH_TH_PROT_F
+ - const: VBUS_DET_F
+ - const: VBUS_DET_R
+ - const: USB_LINK_STATUS
+ - const: USB_CH_TH_PROT_R
+ - const: USB_CH_TH_PROT_F
+ - const: USB_CHARGER_NOT_OKR
+ - const: VBUS_OVV
+ - const: CH_WD_EXP
+ - const: VBUS_CH_DROP_END
properties:
compatible:
- const: stericsson,ab8500-charger
+ oneOf:
+ - const: stericsson,ab8500-charger
+ - items:
+ - const: stericsson,ab8505-charger
+ - const: stericsson,ab8500-charger
monitored-battery: true
@@ -28,27 +76,15 @@ properties:
autopower_cfg:
type: boolean
- description: automatic poweron after powerloss
+ description: AB8500 automatic poweron after powerloss
interrupts:
+ minItems: 9
maxItems: 14
interrupt-names:
- items:
- - const: MAIN_CH_UNPLUG_DET
- - const: MAIN_CHARGE_PLUG_DET
- - const: MAIN_EXT_CH_NOT_OK
- - const: MAIN_CH_TH_PROT_R
- - const: MAIN_CH_TH_PROT_F
- - const: VBUS_DET_F
- - const: VBUS_DET_R
- - const: USB_LINK_STATUS
- - const: USB_CH_TH_PROT_R
- - const: USB_CH_TH_PROT_F
- - const: USB_CHARGER_NOT_OKR
- - const: VBUS_OVV
- - const: CH_WD_EXP
- - const: VBUS_CH_DROP_END
+ minItems: 9
+ maxItems: 14
io-channels:
minItems: 2
--
2.55.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v2 2/2] ARM: dts: ux500: Use AB8505 charger compatible
2026-09-18 16:56 [PATCH v2 0/2] power: supply: Correct AB8505 charger device tree Linus Walleij
2026-09-18 16:56 ` [PATCH v2 1/2] dt-bindings: power: supply: ab8500: Add AB8505 charger Linus Walleij
@ 2026-09-18 16:56 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2026-09-18 16:56 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-pm, devicetree, Linus Walleij
Identify the AB8505 charger using its variant-specific compatible and
retain the AB8500 compatible as a fallback for the existing driver. This
selects the AB8505 interrupt constraints from the binding.
The AB8505 interrupt table explicitly omits the five interrupt sources
belonging to the AB8500 main charger. Remove these nonexistent interrupts
from the AB8505 charger node, leaving its nine USB charger interrupts.
Fixes: bc324d447fba ("ARM: dts: ux500: Add interrupts to charger")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
arch/arm/boot/dts/st/ste-ab8505.dtsi | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boot/dts/st/ste-ab8505.dtsi b/arch/arm/boot/dts/st/ste-ab8505.dtsi
index 131c82508e82..4c9a8418f225 100644
--- a/arch/arm/boot/dts/st/ste-ab8505.dtsi
+++ b/arch/arm/boot/dts/st/ste-ab8505.dtsi
@@ -137,13 +137,9 @@ ab8500_btemp {
};
ab8500_charger {
- compatible = "stericsson,ab8500-charger";
- interrupts = <10 IRQ_TYPE_LEVEL_HIGH>,
- <11 IRQ_TYPE_LEVEL_HIGH>,
- <0 IRQ_TYPE_LEVEL_HIGH>,
- <107 IRQ_TYPE_LEVEL_HIGH>,
- <106 IRQ_TYPE_LEVEL_HIGH>,
- <14 IRQ_TYPE_LEVEL_HIGH>,
+ compatible = "stericsson,ab8505-charger",
+ "stericsson,ab8500-charger";
+ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
<15 IRQ_TYPE_LEVEL_HIGH>,
<79 IRQ_TYPE_LEVEL_HIGH>,
<105 IRQ_TYPE_LEVEL_HIGH>,
@@ -152,12 +148,7 @@ ab8500_charger {
<22 IRQ_TYPE_LEVEL_HIGH>,
<21 IRQ_TYPE_LEVEL_HIGH>,
<16 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "MAIN_CH_UNPLUG_DET",
- "MAIN_CHARGE_PLUG_DET",
- "MAIN_EXT_CH_NOT_OK",
- "MAIN_CH_TH_PROT_R",
- "MAIN_CH_TH_PROT_F",
- "VBUS_DET_F",
+ interrupt-names = "VBUS_DET_F",
"VBUS_DET_R",
"USB_LINK_STATUS",
"USB_CH_TH_PROT_R",
--
2.55.0
^ permalink raw reply related [flat|nested] 4+ messages in thread