ARM: dts: ux500: Switch battery nodes to standard
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 6 Oct 2021 22:40:08 +0000 (00:40 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 14 Oct 2021 15:41:10 +0000 (17:41 +0200)
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>
arch/arm/boot/dts/ste-ab8500.dtsi
arch/arm/boot/dts/ste-ab8505.dtsi
arch/arm/boot/dts/ste-href.dtsi
arch/arm/boot/dts/ste-snowball.dts
arch/arm/boot/dts/ste-ux500-samsung-codina.dts
arch/arm/boot/dts/ste-ux500-samsung-gavini.dts
arch/arm/boot/dts/ste-ux500-samsung-golden.dts
arch/arm/boot/dts/ste-ux500-samsung-janice.dts
arch/arm/boot/dts/ste-ux500-samsung-kyle.dts
arch/arm/boot/dts/ste-ux500-samsung-skomer.dts

index 9baf927..2cf1938 100644 (file)
                                        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>,
                                                          "LOW_BAT_F",
                                                          "CC_INT_CALIB",
                                                          "CCEOC";
-                                       battery = <&ab8500_battery>;
+                                       monitored-battery = <&battery>;
                                        io-channels = <&gpadc 0x08>;
                                        io-channel-names = "main_bat_v";
                                };
                                                          "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",
                                                          "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>,
 
                                ab8500_chargalg {
                                        compatible      = "stericsson,ab8500-chargalg";
-                                       battery         = <&ab8500_battery>;
+                                       monitored-battery       = <&battery>;
                                };
 
                                ab8500_usb: ab8500_usb {
index 8d01870..e98335e 100644 (file)
                                        };
                                };
 
-                               ab8500_battery: ab8500_battery {
-                                       stericsson,battery-type = "LIPO";
-                                       thermistor-on-batctrl;
-                               };
-
                                ab8500_fg {
                                        status = "disabled";
                                        compatible = "stericsson,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";
                                };
                                                          "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",
                                                          "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>;
                                ab8500_chargalg {
                                        status = "disabled";
                                        compatible = "stericsson,ab8500-chargalg";
-                                       battery = <&ab8500_battery>;
+                                       monitored-battery = <&battery>;
                                };
 
                                ab8500_usb: ab8500_usb {
index 961f2c7..718752a 100644 (file)
                reg = <0x00000000 0x20000000>;
        };
 
+       battery: battery {
+               compatible = "simple-battery";
+               battery-type = "lithium-ion-polymer";
+               thermistor-on-batctrl;
+       };
+
        soc {
                uart@80120000 {
                        pinctrl-names = "default", "sleep";
index 934fc78..fb719c8 100644 (file)
                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";
index 952606e..fbd6006 100644 (file)
                stdout-path = &serial2;
        };
 
+       battery: battery {
+               compatible = "samsung,eb425161lu";
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";
index fabc390..47bbf5a 100644 (file)
                stdout-path = &serial2;
        };
 
+       battery: battery {
+               compatible = "samsung,eb585157lu";
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";
index ee6379a..fc4c516 100644 (file)
                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)>;
index 825b621..5ddcbc1 100644 (file)
                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";
index 3b82566..9ec3f85 100644 (file)
                stdout-path = &serial2;
        };
 
+       battery: battery {
+               compatible = "samsung,eb425161la";
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";
index 5a3ac1c..580ca49 100644 (file)
                stdout-path = &serial2;
        };
 
+       battery: battery {
+               compatible = "samsung,eb485159lu";
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";