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 9baf927f9b95806acdd42bf6188da9f457361971..2cf19386a5253a8ac0db9124dea6ec4365be92e9 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 8d018701a680c259bdfc97d41284ba89985848b3..e98335e9d1cb5552847f98fc2c7aa89d72b9a0ae 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 961f2c7274ce5e0a47f6c9d870f3a498976a4827..718752a0248e1b72e713cb719ebd2719c3c99bbb 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 934fc788fe1dee144a51b69e0e37ab36a77e101d..fb719c8a8eb2e8d0606b6922d754be971bde23fc 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 952606e607ed65052c7dcb7ad787475a06e4fdec..fbd60065542df1bab5012f6a4168b0be4a913dce 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 fabc390ccb0cf13779cdb834efd34d83224f4cd8..47bbf5ab267febbc17a3a3d0fe294b96124a985a 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 ee6379ab688c1934cdfd270e49b86fdda041790a..fc4c5166d85bcfb695d383202bd044dd56bce960 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 825b62146134bbd136e7f671257a1918cf6f1b23..5ddcbc1a855da0b2c7eded5eaf93767e7c7ae02a 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 3b825666d302914f7d6aba441cb5a3cbcd28658c..9ec3f85b1a18cf3345adee0e1234be7cab010d1b 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 5a3ac1c657a1b30d682bf7ddfab078c7c37fa110..580ca497f3121f8eb9fe980dbc349600eaf11cee 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";