diff mbox

[v3,3/4] dt-bindings: power: tps65217_charger: add NTC type for battery temperature measurement.

Message ID 20170526110413.24836-3-enric.balletbo@collabora.com
State Changes Requested, archived
Headers show

Commit Message

Enric Balletbo i Serra May 26, 2017, 11:04 a.m. UTC
The TS pin of the TPS56217 connects to the NTC resistor in the battery
pack. By default the device is setup to support a 10-kohm but can also
be configured to support a 100-kohm. Add a propietry to configure the
connected NTC resistor. Therefore, the charger would get the wrong
temperature information.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes since v2:
 - Requested by Sebastian Reichel
   - Get rid of common properties and only maintain ntc-type.
Changes since v1:
 - None

 .../devicetree/bindings/power/supply/tps65217_charger.txt          | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Liam Breck May 26, 2017, 9:26 p.m. UTC | #1
Hi Enric,

On Fri, May 26, 2017 at 4:04 AM, Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
> The TS pin of the TPS56217 connects to the NTC resistor in the battery
> pack. By default the device is setup to support a 10-kohm but can also
> be configured to support a 100-kohm. Add a propietry to configure the
> connected NTC resistor. Therefore, the charger would get the wrong
> temperature information.

This also needs a monitored-battery property, and a battery node in
the example. See https://patchwork.kernel.org/patch/9710803/


> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> Changes since v2:
>  - Requested by Sebastian Reichel
>    - Get rid of common properties and only maintain ntc-type.
> Changes since v1:
>  - None
>
>  .../devicetree/bindings/power/supply/tps65217_charger.txt          | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
> index a11072c..851f5c7 100644
> --- a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
> +++ b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
> @@ -6,6 +6,12 @@ Required Properties:
>               Should be <0> for the USB charger and <1> for the AC adapter.
>  -interrupt-names: Should be "USB" and "AC"
>
> +Optional properties:
> +-ti,ntc-type: set the NTC type for battery temperature measurement. The value
> +       must be 0 or 1, where:
> +         0 – 100k (curve 1, B = 3960)
> +         1 – 10k  (curve 2, B = 3480) (default)
> +
>  This node is a subnode of the tps65217 PMIC.
>
>  Example:
> @@ -14,4 +20,5 @@ Example:
>                 compatible = "ti,tps65217-charger";
>                 interrupts = <0>, <1>;
>                 interrupt-names = "USB", "AC";
> +               ti,ntc-type = <1>;
>         };
> --
> 2.9.3
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Enric Balletbo Serra May 27, 2017, 8:14 p.m. UTC | #2
2017-05-26 23:26 GMT+02:00 Liam Breck <liam@networkimprov.net>:
> Hi Enric,
>
> On Fri, May 26, 2017 at 4:04 AM, Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
>> The TS pin of the TPS56217 connects to the NTC resistor in the battery
>> pack. By default the device is setup to support a 10-kohm but can also
>> be configured to support a 100-kohm. Add a propietry to configure the
>> connected NTC resistor. Therefore, the charger would get the wrong
>> temperature information.
>
> This also needs a monitored-battery property, and a battery node in
> the example. See https://patchwork.kernel.org/patch/9710803/
>

Right I'll add the property in v4.

>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> ---
>> Changes since v2:
>>  - Requested by Sebastian Reichel
>>    - Get rid of common properties and only maintain ntc-type.
>> Changes since v1:
>>  - None
>>
>>  .../devicetree/bindings/power/supply/tps65217_charger.txt          | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
>> index a11072c..851f5c7 100644
>> --- a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
>> +++ b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
>> @@ -6,6 +6,12 @@ Required Properties:
>>               Should be <0> for the USB charger and <1> for the AC adapter.
>>  -interrupt-names: Should be "USB" and "AC"
>>
>> +Optional properties:
>> +-ti,ntc-type: set the NTC type for battery temperature measurement. The value
>> +       must be 0 or 1, where:
>> +         0 – 100k (curve 1, B = 3960)
>> +         1 – 10k  (curve 2, B = 3480) (default)
>> +
>>  This node is a subnode of the tps65217 PMIC.
>>
>>  Example:
>> @@ -14,4 +20,5 @@ Example:
>>                 compatible = "ti,tps65217-charger";
>>                 interrupts = <0>, <1>;
>>                 interrupt-names = "USB", "AC";
>> +               ti,ntc-type = <1>;
>>         };
>> --
>> 2.9.3
>>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
index a11072c..851f5c7 100644
--- a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
+++ b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
@@ -6,6 +6,12 @@  Required Properties:
              Should be <0> for the USB charger and <1> for the AC adapter.
 -interrupt-names: Should be "USB" and "AC"
 
+Optional properties:
+-ti,ntc-type: set the NTC type for battery temperature measurement. The value
+	must be 0 or 1, where:
+	  0 – 100k (curve 1, B = 3960)
+	  1 – 10k  (curve 2, B = 3480) (default)
+
 This node is a subnode of the tps65217 PMIC.
 
 Example:
@@ -14,4 +20,5 @@  Example:
 		compatible = "ti,tps65217-charger";
 		interrupts = <0>, <1>;
 		interrupt-names = "USB", "AC";
+		ti,ntc-type = <1>;
 	};