Re: [PATCH v2 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Add battery temperature node

Konrad Dybcio
2026-02-20T10:00:50Z

On 2/20/26 10:19 AM, Luca Weiss wrote:
> Add a generic-adc-thermal node to convert the voltage read by the
> battery temperature ADC into degree Celsius using the provided lookup
> table.
>
> This will later be used as input for the fuel gauge node (QGauge on the
> PM7250B).
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 83 +++++++++++++++++++++++
> 1 file changed, 83 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> index b697051a0aaa..7857003099a6 100644
> --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> @@ -108,6 +108,89 @@ rear_cam_sensor: thermal-sensor-rear-cam {
> io-channel-names = "sensor-channel";
> };
>
> + bat_therm_sensor: thermal-sensor-bat-therm {

nit: this should be a little higher

> + compatible = "generic-adc-thermal";
> + #thermal-sensor-cells = <0>;
> + #io-channel-cells = <0>;
> + io-channels = <&pm7250b_adc ADC5_BAT_THERM_30K_PU>;
> + io-channel-names = "sensor-channel";
> + /*
> + * Voltage to temperature table for 10kΩ (B=3435K) NTC with a
> + * 1.875V reference and 30kΩ pull-up.
> + */

I think this looks good. Is this data going to be correct for all/most
devices (i.e. is there a single battery sku)?

Konrad