]> www.infradead.org Git - linux.git/commitdiff
ARM: dts: ux500: Add battery thermal zones and NTCs
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 15 Dec 2021 17:39:52 +0000 (18:39 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 5 Feb 2022 00:25:30 +0000 (01:25 +0100)
Add the thermal zones and thermistors used by the battery
charging code to the device tree so the charger code can look
up and poll the thermal zone for battery temperature.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
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 718752a0248e1b72e713cb719ebd2719c3c99bbb..848fdcaad07418b471b532ba0daecf161073b331 100644 (file)
        battery: battery {
                compatible = "simple-battery";
                battery-type = "lithium-ion-polymer";
-               thermistor-on-batctrl;
+       };
+
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "murata,ncp18wb473";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
        };
 
        soc {
index fb719c8a8eb2e8d0606b6922d754be971bde23fc..a24e45e06eece9d0cf6dda1d385c4bbe4b168966 100644 (file)
        battery: battery {
                compatible = "simple-battery";
                battery-type = "lithium-ion-polymer";
-               thermistor-on-batctrl;
+       };
+
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "murata,ncp18wb473";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
        };
 
        en_3v3_reg: en_3v3 {
index fbd60065542df1bab5012f6a4168b0be4a913dce..69741b2c6b96fc47128f73c8326f2cad450b4ef4 100644 (file)
                compatible = "samsung,eb425161lu";
        };
 
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "samsung,1404-001221";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";
index 1c0e5cfeddacba08914116a3dcb7f196ac5a5ddd..7a0b73450d951ffb486bcd4f117f141b9136bf2a 100644 (file)
                compatible = "samsung,eb585157lu";
        };
 
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "samsung,1404-001221";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";
index fc4c5166d85bcfb695d383202bd044dd56bce960..7c2a68eb490056a00db643b2e54f4db9c32799ea 100644 (file)
                compatible = "samsung,eb-l1m7flu";
        };
 
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "samsung,1404-001221";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
        i2c-gpio-0 {
                compatible = "i2c-gpio";
                sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
index 5ddcbc1a855da0b2c7eded5eaf93767e7c7ae02a..7688bc900cd10a7c72a0ae282507d36bf61062c1 100644 (file)
                compatible = "samsung,eb535151vu";
        };
 
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "samsung,1404-001221";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
        /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */
        ldo_3v3_reg: regulator-gpio-ldo-3v3 {
                compatible = "regulator-fixed";
index 9ec3f85b1a18cf3345adee0e1234be7cab010d1b..78410570f4480478e267ab7730babec6a47acdb3 100644 (file)
                compatible = "samsung,eb425161la";
        };
 
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "samsung,1404-001221";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";
index 580ca497f3121f8eb9fe980dbc349600eaf11cee..4ce1103ccd6fa7bde449a973f7b4d991a4fdd6d4 100644 (file)
                compatible = "samsung,eb485159lu";
        };
 
+       thermal-zones {
+               battery-thermal {
+                       /* This zone will be polled by the battery temperature code */
+                       polling-delay = <0>;
+                       polling-delay-passive = <0>;
+                       thermal-sensors = <&bat_therm>;
+               };
+       };
+
+       bat_therm: thermistor {
+               compatible = "samsung,1404-001221";
+               io-channels = <&gpadc 0x02>; /* BatTemp */
+               pullup-uv = <1800000>;
+               pullup-ohm = <230000>;
+               pulldown-ohm = <0>;
+               #thermal-sensor-cells = <0>;
+       };
+
        /* TI TXS0206 level translator for 2.9 V */
        sd_level_translator: regulator-gpio {
                compatible = "regulator-fixed";