* [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery @ 2021-10-06 22:40 Linus Walleij 2021-10-06 22:40 ` [PATCH 2/3] power: supply: ab8500_bmdata: Use standard phandle Linus Walleij ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Linus Walleij @ 2021-10-06 22:40 UTC (permalink / raw) To: Sebastian Reichel, Marcus Cooper; +Cc: linux-pm, Linus Walleij, devicetree Make monitored-battery the standard phandle to the battery we monitor for the AB8500 charger components. We make the old "battery" phandle deprecated, and the new one required so we detect and fix all users to use the standard phandle name. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- .../bindings/power/supply/stericsson,ab8500-btemp.yaml | 10 +++++++--- .../power/supply/stericsson,ab8500-chargalg.yaml | 10 +++++++--- .../power/supply/stericsson,ab8500-charger.yaml | 10 +++++++--- .../bindings/power/supply/stericsson,ab8500-fg.yaml | 10 +++++++--- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml index 2f57aa5a5f4e..4b8a00cec39c 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-btemp.yaml @@ -17,10 +17,14 @@ properties: compatible: const: stericsson,ab8500-btemp - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + interrupts: maxItems: 5 @@ -42,7 +46,7 @@ properties: required: - compatible - - battery + - monitored-battery - interrupts - interrupt-names - io-channels @@ -56,7 +60,7 @@ examples: pmic { battery-temperature { compatible = "stericsson,ab8500-btemp"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; interrupts = <20 IRQ_TYPE_LEVEL_HIGH>, <80 IRQ_TYPE_LEVEL_HIGH>, <83 IRQ_TYPE_LEVEL_HIGH>, diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml index 0897231c2f6e..6799224f7fb4 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-chargalg.yaml @@ -17,13 +17,17 @@ properties: compatible: const: stericsson,ab8500-chargalg - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + required: - compatible - - battery + - monitored-battery additionalProperties: false @@ -32,6 +36,6 @@ examples: pmic { charging-algorithm { compatible = "stericsson,ab8500-chargalg"; - battery = <&ab8500_battery>; + monitored-battery = <&ab8500_battery>; }; }; diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml index e13305afea69..9518eb7289d0 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml @@ -17,10 +17,14 @@ properties: compatible: const: stericsson,ab8500-charger - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + vddadc-supply: description: Supply for USB and Main charger @@ -66,7 +70,7 @@ properties: required: - compatible - - battery + - monitored-battery - vddadc-supply - interrupts - interrupt-names @@ -81,7 +85,7 @@ examples: pmic { charger { compatible = "stericsson,ab8500-charger"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; vddadc-supply = <&ab8500_ldo_tvout_reg>; interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, <11 IRQ_TYPE_LEVEL_HIGH>, diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml index db342e5ac0d1..54ac42a9d354 100644 --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-fg.yaml @@ -17,10 +17,14 @@ properties: compatible: const: stericsson,ab8500-fg - battery: + monitored-battery: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to battery node + battery: + $ref: /schemas/types.yaml#/definitions/phandle + deprecated: true + interrupts: maxItems: 5 @@ -41,7 +45,7 @@ properties: required: - compatible - - battery + - monitored-battery - interrupts - interrupt-names - io-channels @@ -55,7 +59,7 @@ examples: pmic { fuel-gauge { compatible = "stericsson,ab8500-fg"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, <8 IRQ_TYPE_LEVEL_HIGH>, <28 IRQ_TYPE_LEVEL_HIGH>, -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] power: supply: ab8500_bmdata: Use standard phandle 2021-10-06 22:40 [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Linus Walleij @ 2021-10-06 22:40 ` Linus Walleij 2021-10-06 22:40 ` [PATCH 3/3] ARM: dts: ux500: Switch battery nodes to standard Linus Walleij 2021-10-07 12:05 ` [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Rob Herring 2 siblings, 0 replies; 6+ messages in thread From: Linus Walleij @ 2021-10-06 22:40 UTC (permalink / raw) To: Sebastian Reichel, Marcus Cooper; +Cc: linux-pm, Linus Walleij Look up the battery using the "monitored-battery" phandle as is nowadays a standard DT binding. The actual bindings for these charger elements are not upstream so let's sort out this mess by conforming to the standard. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- ChangeLog v1->v2: - Rebase on v5.13-rc1 --- drivers/power/supply/ab8500_bmdata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/power/supply/ab8500_bmdata.c b/drivers/power/supply/ab8500_bmdata.c index 6f5fb794042c..bfc1245d7912 100644 --- a/drivers/power/supply/ab8500_bmdata.c +++ b/drivers/power/supply/ab8500_bmdata.c @@ -497,8 +497,7 @@ int ab8500_bm_of_probe(struct device *dev, const char *btech; int i; - /* get phandle to 'battery-info' node */ - battery_node = of_parse_phandle(np, "battery", 0); + battery_node = of_parse_phandle(np, "monitored-battery", 0); if (!battery_node) { dev_err(dev, "battery node or reference missing\n"); return -EINVAL; -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] ARM: dts: ux500: Switch battery nodes to standard 2021-10-06 22:40 [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Linus Walleij 2021-10-06 22:40 ` [PATCH 2/3] power: supply: ab8500_bmdata: Use standard phandle Linus Walleij @ 2021-10-06 22:40 ` Linus Walleij 2021-10-13 16:18 ` Sebastian Reichel 2021-10-07 12:05 ` [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Rob Herring 2 siblings, 1 reply; 6+ messages in thread From: Linus Walleij @ 2021-10-06 22:40 UTC (permalink / raw) To: Sebastian Reichel, Marcus Cooper; +Cc: linux-pm, Linus Walleij This force-converts the per-device battery node into the standard properties using "simple-battery" for the HREF machines and the corresponding Samsung battery for the mobile phones. This is fine to do since the battery data in the DTS files has never been deployed or used. In commit a1149ae97554 "ARM: ux500: Disable Power Supply and Battery Management by default" it was turned off and has not been switched back on since. In the meantime standardized bindings for batteries have appeared making the old AB8500 battery bindings obsolete. The battery node which is now in the middle of an included file is obviously a per-device piece of information so push this down to each board. The HREF machines all have the same battery and can share a single node in the HREF dtsi file. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- Sebastian: I will merge this patch to the Ux500 tree when/if you merge the two other patches, so all is fixed up in linux-next and in the merge window. --- arch/arm/boot/dts/ste-ab8500.dtsi | 13 ++++--------- arch/arm/boot/dts/ste-ab8505.dtsi | 13 ++++--------- arch/arm/boot/dts/ste-href.dtsi | 6 ++++++ arch/arm/boot/dts/ste-snowball.dts | 6 ++++++ arch/arm/boot/dts/ste-ux500-samsung-codina.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-gavini.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-golden.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-janice.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-kyle.dts | 4 ++++ arch/arm/boot/dts/ste-ux500-samsung-skomer.dts | 4 ++++ 10 files changed, 44 insertions(+), 18 deletions(-) diff --git a/arch/arm/boot/dts/ste-ab8500.dtsi b/arch/arm/boot/dts/ste-ab8500.dtsi index 9baf927f9b95..2cf19386a525 100644 --- a/arch/arm/boot/dts/ste-ab8500.dtsi +++ b/arch/arm/boot/dts/ste-ab8500.dtsi @@ -129,11 +129,6 @@ ab8500_temp { io-channel-names = "aux1", "aux2"; }; - ab8500_battery: ab8500_battery { - stericsson,battery-type = "LIPO"; - thermistor-on-batctrl; - }; - ab8500_fg { compatible = "stericsson,ab8500-fg"; interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, @@ -146,7 +141,7 @@ ab8500_fg { "LOW_BAT_F", "CC_INT_CALIB", "CCEOC"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x08>; io-channel-names = "main_bat_v"; }; @@ -163,7 +158,7 @@ ab8500_btemp { "BTEMP_HIGH", "BTEMP_LOW_MEDIUM", "BTEMP_MEDIUM_HIGH"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x02>, <&gpadc 0x01>; io-channel-names = "btemp_ball", @@ -200,7 +195,7 @@ ab8500_charger { "VBUS_OVV", "CH_WD_EXP", "VBUS_CH_DROP_END"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; vddadc-supply = <&ab8500_ldo_tvout_reg>; io-channels = <&gpadc 0x03>, <&gpadc 0x0a>, @@ -214,7 +209,7 @@ ab8500_charger { ab8500_chargalg { compatible = "stericsson,ab8500-chargalg"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; }; ab8500_usb: ab8500_usb { diff --git a/arch/arm/boot/dts/ste-ab8505.dtsi b/arch/arm/boot/dts/ste-ab8505.dtsi index 8d018701a680..e98335e9d1cb 100644 --- a/arch/arm/boot/dts/ste-ab8505.dtsi +++ b/arch/arm/boot/dts/ste-ab8505.dtsi @@ -92,11 +92,6 @@ usb_id: channel@e { }; }; - ab8500_battery: ab8500_battery { - stericsson,battery-type = "LIPO"; - thermistor-on-batctrl; - }; - ab8500_fg { status = "disabled"; compatible = "stericsson,ab8500-fg"; @@ -110,7 +105,7 @@ ab8500_fg { "LOW_BAT_F", "CC_INT_CALIB", "CCEOC"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x08>; io-channel-names = "main_bat_v"; }; @@ -128,7 +123,7 @@ ab8500_btemp { "BTEMP_HIGH", "BTEMP_LOW_MEDIUM", "BTEMP_MEDIUM_HIGH"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; io-channels = <&gpadc 0x02>, <&gpadc 0x01>; io-channel-names = "btemp_ball", @@ -166,7 +161,7 @@ ab8500_charger { "VBUS_OVV", "CH_WD_EXP", "VBUS_CH_DROP_END"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; vddadc-supply = <&ab8500_ldo_adc_reg>; io-channels = <&gpadc 0x09>, <&gpadc 0x0b>; @@ -177,7 +172,7 @@ ab8500_charger { ab8500_chargalg { status = "disabled"; compatible = "stericsson,ab8500-chargalg"; - battery = <&ab8500_battery>; + monitored-battery = <&battery>; }; ab8500_usb: ab8500_usb { diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi index 961f2c7274ce..718752a0248e 100644 --- a/arch/arm/boot/dts/ste-href.dtsi +++ b/arch/arm/boot/dts/ste-href.dtsi @@ -13,6 +13,12 @@ memory { reg = <0x00000000 0x20000000>; }; + battery: battery { + compatible = "simple-battery"; + battery-type = "lithium-ion-polymer"; + thermistor-on-batctrl; + }; + soc { uart@80120000 { pinctrl-names = "default", "sleep"; diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index 934fc788fe1d..fb719c8a8eb2 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts @@ -17,6 +17,12 @@ memory { reg = <0x00000000 0x20000000>; }; + battery: battery { + compatible = "simple-battery"; + battery-type = "lithium-ion-polymer"; + thermistor-on-batctrl; + }; + en_3v3_reg: en_3v3 { compatible = "regulator-fixed"; regulator-name = "en-3v3-fixed-supply"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-codina.dts b/arch/arm/boot/dts/ste-ux500-samsung-codina.dts index 952606e607ed..fbd60065542d 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-codina.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-codina.dts @@ -43,6 +43,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb425161lu"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts b/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts index fabc390ccb0c..47bbf5ab267f 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts @@ -20,6 +20,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb585157lu"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts index ee6379ab688c..fc4c5166d85b 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts @@ -25,6 +25,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb-l1m7flu"; + }; + i2c-gpio-0 { compatible = "i2c-gpio"; sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts index f14cf316a70a..2c914c58f8ba 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts @@ -20,6 +20,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb535151vu"; + }; + /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */ ldo_3v3_reg: regulator-gpio-ldo-3v3 { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts b/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts index 3b825666d302..9ec3f85b1a18 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts @@ -24,6 +24,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb425161la"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts index 264f3e9b5fce..37020127f6e7 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts @@ -20,6 +20,10 @@ chosen { stdout-path = &serial2; }; + battery: battery { + compatible = "samsung,eb485159lu"; + }; + /* TI TXS0206 level translator for 2.9 V */ sd_level_translator: regulator-gpio { compatible = "regulator-fixed"; -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] ARM: dts: ux500: Switch battery nodes to standard 2021-10-06 22:40 ` [PATCH 3/3] ARM: dts: ux500: Switch battery nodes to standard Linus Walleij @ 2021-10-13 16:18 ` Sebastian Reichel 0 siblings, 0 replies; 6+ messages in thread From: Sebastian Reichel @ 2021-10-13 16:18 UTC (permalink / raw) To: Linus Walleij; +Cc: Marcus Cooper, linux-pm [-- Attachment #1: Type: text/plain, Size: 9718 bytes --] Hi Linus, On Thu, Oct 07, 2021 at 12:40:08AM +0200, Linus Walleij wrote: > This force-converts the per-device battery node into the standard > properties using "simple-battery" for the HREF machines and the > corresponding Samsung battery for the mobile phones. > > This is fine to do since the battery data in the DTS files has never > been deployed or used. In commit a1149ae97554 > "ARM: ux500: Disable Power Supply and Battery Management by default" > it was turned off and has not been switched back on since. In > the meantime standardized bindings for batteries have appeared > making the old AB8500 battery bindings obsolete. > > The battery node which is now in the middle of an included file > is obviously a per-device piece of information so push this down > to each board. The HREF machines all have the same battery and can > share a single node in the HREF dtsi file. > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > Sebastian: I will merge this patch to the Ux500 tree when/if you > merge the two other patches, so all is fixed up in linux-next and > in the merge window. Thanks, I just merged patch 1 & 2. -- Sebastian > --- > arch/arm/boot/dts/ste-ab8500.dtsi | 13 ++++--------- > arch/arm/boot/dts/ste-ab8505.dtsi | 13 ++++--------- > arch/arm/boot/dts/ste-href.dtsi | 6 ++++++ > arch/arm/boot/dts/ste-snowball.dts | 6 ++++++ > arch/arm/boot/dts/ste-ux500-samsung-codina.dts | 4 ++++ > arch/arm/boot/dts/ste-ux500-samsung-gavini.dts | 4 ++++ > arch/arm/boot/dts/ste-ux500-samsung-golden.dts | 4 ++++ > arch/arm/boot/dts/ste-ux500-samsung-janice.dts | 4 ++++ > arch/arm/boot/dts/ste-ux500-samsung-kyle.dts | 4 ++++ > arch/arm/boot/dts/ste-ux500-samsung-skomer.dts | 4 ++++ > 10 files changed, 44 insertions(+), 18 deletions(-) > > diff --git a/arch/arm/boot/dts/ste-ab8500.dtsi b/arch/arm/boot/dts/ste-ab8500.dtsi > index 9baf927f9b95..2cf19386a525 100644 > --- a/arch/arm/boot/dts/ste-ab8500.dtsi > +++ b/arch/arm/boot/dts/ste-ab8500.dtsi > @@ -129,11 +129,6 @@ ab8500_temp { > io-channel-names = "aux1", "aux2"; > }; > > - ab8500_battery: ab8500_battery { > - stericsson,battery-type = "LIPO"; > - thermistor-on-batctrl; > - }; > - > ab8500_fg { > compatible = "stericsson,ab8500-fg"; > interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, > @@ -146,7 +141,7 @@ ab8500_fg { > "LOW_BAT_F", > "CC_INT_CALIB", > "CCEOC"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > io-channels = <&gpadc 0x08>; > io-channel-names = "main_bat_v"; > }; > @@ -163,7 +158,7 @@ ab8500_btemp { > "BTEMP_HIGH", > "BTEMP_LOW_MEDIUM", > "BTEMP_MEDIUM_HIGH"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > io-channels = <&gpadc 0x02>, > <&gpadc 0x01>; > io-channel-names = "btemp_ball", > @@ -200,7 +195,7 @@ ab8500_charger { > "VBUS_OVV", > "CH_WD_EXP", > "VBUS_CH_DROP_END"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > vddadc-supply = <&ab8500_ldo_tvout_reg>; > io-channels = <&gpadc 0x03>, > <&gpadc 0x0a>, > @@ -214,7 +209,7 @@ ab8500_charger { > > ab8500_chargalg { > compatible = "stericsson,ab8500-chargalg"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > }; > > ab8500_usb: ab8500_usb { > diff --git a/arch/arm/boot/dts/ste-ab8505.dtsi b/arch/arm/boot/dts/ste-ab8505.dtsi > index 8d018701a680..e98335e9d1cb 100644 > --- a/arch/arm/boot/dts/ste-ab8505.dtsi > +++ b/arch/arm/boot/dts/ste-ab8505.dtsi > @@ -92,11 +92,6 @@ usb_id: channel@e { > }; > }; > > - ab8500_battery: ab8500_battery { > - stericsson,battery-type = "LIPO"; > - thermistor-on-batctrl; > - }; > - > ab8500_fg { > status = "disabled"; > compatible = "stericsson,ab8500-fg"; > @@ -110,7 +105,7 @@ ab8500_fg { > "LOW_BAT_F", > "CC_INT_CALIB", > "CCEOC"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > io-channels = <&gpadc 0x08>; > io-channel-names = "main_bat_v"; > }; > @@ -128,7 +123,7 @@ ab8500_btemp { > "BTEMP_HIGH", > "BTEMP_LOW_MEDIUM", > "BTEMP_MEDIUM_HIGH"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > io-channels = <&gpadc 0x02>, > <&gpadc 0x01>; > io-channel-names = "btemp_ball", > @@ -166,7 +161,7 @@ ab8500_charger { > "VBUS_OVV", > "CH_WD_EXP", > "VBUS_CH_DROP_END"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > vddadc-supply = <&ab8500_ldo_adc_reg>; > io-channels = <&gpadc 0x09>, > <&gpadc 0x0b>; > @@ -177,7 +172,7 @@ ab8500_charger { > ab8500_chargalg { > status = "disabled"; > compatible = "stericsson,ab8500-chargalg"; > - battery = <&ab8500_battery>; > + monitored-battery = <&battery>; > }; > > ab8500_usb: ab8500_usb { > diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi > index 961f2c7274ce..718752a0248e 100644 > --- a/arch/arm/boot/dts/ste-href.dtsi > +++ b/arch/arm/boot/dts/ste-href.dtsi > @@ -13,6 +13,12 @@ memory { > reg = <0x00000000 0x20000000>; > }; > > + battery: battery { > + compatible = "simple-battery"; > + battery-type = "lithium-ion-polymer"; > + thermistor-on-batctrl; > + }; > + > soc { > uart@80120000 { > pinctrl-names = "default", "sleep"; > diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts > index 934fc788fe1d..fb719c8a8eb2 100644 > --- a/arch/arm/boot/dts/ste-snowball.dts > +++ b/arch/arm/boot/dts/ste-snowball.dts > @@ -17,6 +17,12 @@ memory { > reg = <0x00000000 0x20000000>; > }; > > + battery: battery { > + compatible = "simple-battery"; > + battery-type = "lithium-ion-polymer"; > + thermistor-on-batctrl; > + }; > + > en_3v3_reg: en_3v3 { > compatible = "regulator-fixed"; > regulator-name = "en-3v3-fixed-supply"; > diff --git a/arch/arm/boot/dts/ste-ux500-samsung-codina.dts b/arch/arm/boot/dts/ste-ux500-samsung-codina.dts > index 952606e607ed..fbd60065542d 100644 > --- a/arch/arm/boot/dts/ste-ux500-samsung-codina.dts > +++ b/arch/arm/boot/dts/ste-ux500-samsung-codina.dts > @@ -43,6 +43,10 @@ chosen { > stdout-path = &serial2; > }; > > + battery: battery { > + compatible = "samsung,eb425161lu"; > + }; > + > /* TI TXS0206 level translator for 2.9 V */ > sd_level_translator: regulator-gpio { > compatible = "regulator-fixed"; > diff --git a/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts b/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts > index fabc390ccb0c..47bbf5ab267f 100644 > --- a/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts > +++ b/arch/arm/boot/dts/ste-ux500-samsung-gavini.dts > @@ -20,6 +20,10 @@ chosen { > stdout-path = &serial2; > }; > > + battery: battery { > + compatible = "samsung,eb585157lu"; > + }; > + > /* TI TXS0206 level translator for 2.9 V */ > sd_level_translator: regulator-gpio { > compatible = "regulator-fixed"; > diff --git a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts > index ee6379ab688c..fc4c5166d85b 100644 > --- a/arch/arm/boot/dts/ste-ux500-samsung-golden.dts > +++ b/arch/arm/boot/dts/ste-ux500-samsung-golden.dts > @@ -25,6 +25,10 @@ chosen { > stdout-path = &serial2; > }; > > + battery: battery { > + compatible = "samsung,eb-l1m7flu"; > + }; > + > i2c-gpio-0 { > compatible = "i2c-gpio"; > sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; > diff --git a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts > index f14cf316a70a..2c914c58f8ba 100644 > --- a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts > +++ b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts > @@ -20,6 +20,10 @@ chosen { > stdout-path = &serial2; > }; > > + battery: battery { > + compatible = "samsung,eb535151vu"; > + }; > + > /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */ > ldo_3v3_reg: regulator-gpio-ldo-3v3 { > compatible = "regulator-fixed"; > diff --git a/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts b/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts > index 3b825666d302..9ec3f85b1a18 100644 > --- a/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts > +++ b/arch/arm/boot/dts/ste-ux500-samsung-kyle.dts > @@ -24,6 +24,10 @@ chosen { > stdout-path = &serial2; > }; > > + battery: battery { > + compatible = "samsung,eb425161la"; > + }; > + > /* TI TXS0206 level translator for 2.9 V */ > sd_level_translator: regulator-gpio { > compatible = "regulator-fixed"; > diff --git a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts > index 264f3e9b5fce..37020127f6e7 100644 > --- a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts > +++ b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts > @@ -20,6 +20,10 @@ chosen { > stdout-path = &serial2; > }; > > + battery: battery { > + compatible = "samsung,eb485159lu"; > + }; > + > /* TI TXS0206 level translator for 2.9 V */ > sd_level_translator: regulator-gpio { > compatible = "regulator-fixed"; > -- > 2.31.1 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery 2021-10-06 22:40 [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Linus Walleij 2021-10-06 22:40 ` [PATCH 2/3] power: supply: ab8500_bmdata: Use standard phandle Linus Walleij 2021-10-06 22:40 ` [PATCH 3/3] ARM: dts: ux500: Switch battery nodes to standard Linus Walleij @ 2021-10-07 12:05 ` Rob Herring 2021-10-07 15:12 ` Linus Walleij 2 siblings, 1 reply; 6+ messages in thread From: Rob Herring @ 2021-10-07 12:05 UTC (permalink / raw) To: Linus Walleij; +Cc: Marcus Cooper, devicetree, Sebastian Reichel, linux-pm On Thu, 07 Oct 2021 00:40:06 +0200, Linus Walleij wrote: > Make monitored-battery the standard phandle to the battery we monitor > for the AB8500 charger components. We make the old "battery" phandle > deprecated, and the new one required so we detect and fix all users to > use the standard phandle name. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > .../bindings/power/supply/stericsson,ab8500-btemp.yaml | 10 +++++++--- > .../power/supply/stericsson,ab8500-chargalg.yaml | 10 +++++++--- > .../power/supply/stericsson,ab8500-charger.yaml | 10 +++++++--- > .../bindings/power/supply/stericsson,ab8500-fg.yaml | 10 +++++++--- > 4 files changed, 28 insertions(+), 12 deletions(-) > Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings. Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future. Full log is available here: https://patchwork.ozlabs.org/patch/1537450 ab8500_btemp: 'monitored-battery' is a required property arch/arm/boot/dts/ste-href520-tvk.dt.yaml arch/arm/boot/dts/ste-hrefprev60-stuib.dt.yaml arch/arm/boot/dts/ste-hrefprev60-tvk.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-stuib.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-tvk.dt.yaml arch/arm/boot/dts/ste-snowball.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-codina.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-gavini.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml ab8500_chargalg: 'monitored-battery' is a required property arch/arm/boot/dts/ste-href520-tvk.dt.yaml arch/arm/boot/dts/ste-hrefprev60-stuib.dt.yaml arch/arm/boot/dts/ste-hrefprev60-tvk.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-stuib.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-tvk.dt.yaml arch/arm/boot/dts/ste-snowball.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-codina.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-gavini.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml ab8500_charger: 'monitored-battery' is a required property arch/arm/boot/dts/ste-href520-tvk.dt.yaml arch/arm/boot/dts/ste-hrefprev60-stuib.dt.yaml arch/arm/boot/dts/ste-hrefprev60-tvk.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-stuib.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-tvk.dt.yaml arch/arm/boot/dts/ste-snowball.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-codina.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-gavini.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml ab8500_fg: 'monitored-battery' is a required property arch/arm/boot/dts/ste-href520-tvk.dt.yaml arch/arm/boot/dts/ste-hrefprev60-stuib.dt.yaml arch/arm/boot/dts/ste-hrefprev60-tvk.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-stuib.dt.yaml arch/arm/boot/dts/ste-hrefv60plus-tvk.dt.yaml arch/arm/boot/dts/ste-snowball.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-codina.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-gavini.dt.yaml arch/arm/boot/dts/ste-ux500-samsung-janice.dt.yaml ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery 2021-10-07 12:05 ` [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Rob Herring @ 2021-10-07 15:12 ` Linus Walleij 0 siblings, 0 replies; 6+ messages in thread From: Linus Walleij @ 2021-10-07 15:12 UTC (permalink / raw) To: Rob Herring Cc: Marcus Cooper, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Sebastian Reichel, Linux PM list On Thu, Oct 7, 2021 at 2:05 PM Rob Herring <robh@kernel.org> wrote: > On Thu, 07 Oct 2021 00:40:06 +0200, Linus Walleij wrote: > > Make monitored-battery the standard phandle to the battery we monitor > > for the AB8500 charger components. We make the old "battery" phandle > > deprecated, and the new one required so we detect and fix all users to > > use the standard phandle name. > > > > Cc: devicetree@vger.kernel.org > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > > --- > > .../bindings/power/supply/stericsson,ab8500-btemp.yaml | 10 +++++++--- > > .../power/supply/stericsson,ab8500-chargalg.yaml | 10 +++++++--- > > .../power/supply/stericsson,ab8500-charger.yaml | 10 +++++++--- > > .../bindings/power/supply/stericsson,ab8500-fg.yaml | 10 +++++++--- > > 4 files changed, 28 insertions(+), 12 deletions(-) > > > > Running 'make dtbs_check' with the schema in this patch gives the > following warnings. Consider if they are expected or the schema is > incorrect. These may not be new warnings. All of these are fixed in patch 3/3. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-13 16:18 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-10-06 22:40 [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Linus Walleij 2021-10-06 22:40 ` [PATCH 2/3] power: supply: ab8500_bmdata: Use standard phandle Linus Walleij 2021-10-06 22:40 ` [PATCH 3/3] ARM: dts: ux500: Switch battery nodes to standard Linus Walleij 2021-10-13 16:18 ` Sebastian Reichel 2021-10-07 12:05 ` [PATCH 1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery Rob Herring 2021-10-07 15:12 ` Linus Walleij
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.