Re: [PATCH 2/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PM7250B thermals

2023-10-18 Thread Konrad Dybcio




On 10/13/23 10:09, Luca Weiss wrote:

Configure the thermals for the CHARGER_SKIN_THERM and USB_CONN_THERM
thermistors connected to PM7250B.

Signed-off-by: Luca Weiss 
---
  arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 66 ++
  1 file changed, 66 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts 
b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 2de0b8c26c35..7fe19b556e6a 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -134,6 +134,36 @@ afvdd_2p8: regulator-afvdd-2p8 {
enable-active-high;
vin-supply = <_bob>;
};
+
+   thermal-zones {
+   chg-skin-thermal {
+   polling-delay-passive = <0>;
+   polling-delay = <0>;
+   thermal-sensors = <_adc_tm 0>;
+
+   trips {
+   active-config0 {
+   temperature = <125000>;

I guess looking at skin-temp-thermal in x13s dts for starters
is a good idea.. we should probably then adjust it to something
more pocketable..

Konrad


Re: [PATCH 2/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PM7250B thermals

2023-10-13 Thread Konrad Dybcio
On 13.10.2023 10:09, Luca Weiss wrote:
> Configure the thermals for the CHARGER_SKIN_THERM and USB_CONN_THERM
> thermistors connected to PM7250B.
> 
> Signed-off-by: Luca Weiss 
> ---
>  arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 66 
> ++
>  1 file changed, 66 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts 
> b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> index 2de0b8c26c35..7fe19b556e6a 100644
> --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> @@ -134,6 +134,36 @@ afvdd_2p8: regulator-afvdd-2p8 {
>   enable-active-high;
>   vin-supply = <_bob>;
>   };
> +
> + thermal-zones {
> + chg-skin-thermal {
skin

> + polling-delay-passive = <0>;
> + polling-delay = <0>;
> + thermal-sensors = <_adc_tm 0>;
> +
> + trips {
> + active-config0 {
> + temperature = <125000>;
125

hmm..

Konrad


[PATCH 2/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PM7250B thermals

2023-10-13 Thread Luca Weiss
Configure the thermals for the CHARGER_SKIN_THERM and USB_CONN_THERM
thermistors connected to PM7250B.

Signed-off-by: Luca Weiss 
---
 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 66 ++
 1 file changed, 66 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts 
b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 2de0b8c26c35..7fe19b556e6a 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -134,6 +134,36 @@ afvdd_2p8: regulator-afvdd-2p8 {
enable-active-high;
vin-supply = <_bob>;
};
+
+   thermal-zones {
+   chg-skin-thermal {
+   polling-delay-passive = <0>;
+   polling-delay = <0>;
+   thermal-sensors = <_adc_tm 0>;
+
+   trips {
+   active-config0 {
+   temperature = <125000>;
+   hysteresis = <1000>;
+   type = "passive";
+   };
+   };
+   };
+
+   conn-thermal {
+   polling-delay-passive = <0>;
+   polling-delay = <0>;
+   thermal-sensors = <_adc_tm 1>;
+
+   trips {
+   active-config0 {
+   temperature = <125000>;
+   hysteresis = <1000>;
+   type = "passive";
+   };
+   };
+   };
+   };
 };
 
 _rsc {
@@ -425,6 +455,42 @@  {
status = "okay";
 };
 
+_adc {
+   channel@4d {
+   reg = ;
+   qcom,ratiometric;
+   qcom,hw-settle-time = <200>;
+   qcom,pre-scaling = <1 1>;
+   label = "charger_skin_therm";
+   };
+
+   channel@4f {
+   reg = ;
+   qcom,ratiometric;
+   qcom,hw-settle-time = <200>;
+   qcom,pre-scaling = <1 1>;
+   label = "conn_therm";
+   };
+};
+
+_adc_tm {
+   status = "okay";
+
+   charger-skin-therm@0 {
+   reg = <0>;
+   io-channels = <_adc ADC5_AMUX_THM1_100K_PU>;
+   qcom,ratiometric;
+   qcom,hw-settle-time-us = <200>;
+   };
+
+   conn-therm@1 {
+   reg = <1>;
+   io-channels = <_adc ADC5_AMUX_THM3_100K_PU>;
+   qcom,ratiometric;
+   qcom,hw-settle-time-us = <200>;
+   };
+};
+
 _gpios {
volume_down_default: volume-down-default-state {
pins = "gpio6";

-- 
2.42.0