* [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM
@ 2024-10-02 13:01 Luca Weiss
2024-10-06 20:26 ` Dmitry Baryshkov
2024-10-07 14:26 ` Bjorn Andersson
0 siblings, 2 replies; 6+ messages in thread
From: Luca Weiss @ 2024-10-02 13:01 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
devicetree, linux-kernel, Luca Weiss
Configure the ADC and thermal zone for the thermistor next to the
UFS+RAM chip which is connected to GPIO_12 of PM7250B. It is used to
measure the temperature of that area of the PCB.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 8ab30c01712e0b7c0cc1b403e0fe01650315b9e2..fdc62f1b1c5a398abaa71818fdf2858fdc445d28 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -207,6 +207,20 @@ active-config0 {
};
};
+ mem-thermal {
+ polling-delay-passive = <0>;
+
+ thermal-sensors = <&pm7250b_adc_tm 2>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
pm8008-thermal {
polling-delay-passive = <100>;
thermal-sensors = <&pm8008>;
@@ -679,6 +693,9 @@ &ipa {
};
&pm7250b_adc {
+ pinctrl-0 = <&pm7250b_adc_default>;
+ pinctrl-names = "default";
+
channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
@@ -694,6 +711,14 @@ channel@4f {
qcom,pre-scaling = <1 1>;
label = "conn_therm";
};
+
+ channel@53 {
+ reg = <ADC5_GPIO2_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "mem_therm";
+ };
};
&pm7250b_adc_tm {
@@ -712,6 +737,21 @@ conn-therm@1 {
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
+
+ mem-therm@2 {
+ reg = <2>;
+ io-channels = <&pm7250b_adc ADC5_GPIO2_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+};
+
+&pm7250b_gpios {
+ pm7250b_adc_default: adc-default-state {
+ pins = "gpio12";
+ function = PMIC_GPIO_FUNC_NORMAL;
+ bias-high-impedance;
+ };
};
&pm7325_gpios {
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241002-fp5-ufs-therm-0f1649d5d212
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM
2024-10-02 13:01 [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM Luca Weiss
@ 2024-10-06 20:26 ` Dmitry Baryshkov
2024-10-07 7:22 ` Luca Weiss
2024-10-07 14:26 ` Bjorn Andersson
1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2024-10-06 20:26 UTC (permalink / raw)
To: Luca Weiss
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, ~postmarketos/upstreaming, phone-devel,
linux-arm-msm, devicetree, linux-kernel
On Wed, Oct 02, 2024 at 03:01:08PM GMT, Luca Weiss wrote:
> Configure the ADC and thermal zone for the thermistor next to the
> UFS+RAM chip which is connected to GPIO_12 of PM7250B. It is used to
> measure the temperature of that area of the PCB.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 40 ++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> index 8ab30c01712e0b7c0cc1b403e0fe01650315b9e2..fdc62f1b1c5a398abaa71818fdf2858fdc445d28 100644
> --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> @@ -207,6 +207,20 @@ active-config0 {
> };
> };
>
> + mem-thermal {
> + polling-delay-passive = <0>;
> +
> + thermal-sensors = <&pm7250b_adc_tm 2>;
> +
> + trips {
> + active-config0 {
> + temperature = <125000>;
> + hysteresis = <1000>;
> + type = "passive";
Is it really just "passive"? Especially with no cooling devices it
sounds more like "critical". LGTM otherwise.
> + };
> + };
> + };
> +
> pm8008-thermal {
> polling-delay-passive = <100>;
> thermal-sensors = <&pm8008>;
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM
2024-10-06 20:26 ` Dmitry Baryshkov
@ 2024-10-07 7:22 ` Luca Weiss
2024-10-07 12:46 ` Dmitry Baryshkov
0 siblings, 1 reply; 6+ messages in thread
From: Luca Weiss @ 2024-10-07 7:22 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, ~postmarketos/upstreaming, phone-devel,
linux-arm-msm, devicetree, linux-kernel
On Sun Oct 6, 2024 at 10:26 PM CEST, Dmitry Baryshkov wrote:
> On Wed, Oct 02, 2024 at 03:01:08PM GMT, Luca Weiss wrote:
> > Configure the ADC and thermal zone for the thermistor next to the
> > UFS+RAM chip which is connected to GPIO_12 of PM7250B. It is used to
> > measure the temperature of that area of the PCB.
> >
> > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > ---
> > arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 40 ++++++++++++++++++++++
> > 1 file changed, 40 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> > index 8ab30c01712e0b7c0cc1b403e0fe01650315b9e2..fdc62f1b1c5a398abaa71818fdf2858fdc445d28 100644
> > --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> > +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> > @@ -207,6 +207,20 @@ active-config0 {
> > };
> > };
> >
> > + mem-thermal {
> > + polling-delay-passive = <0>;
> > +
> > + thermal-sensors = <&pm7250b_adc_tm 2>;
> > +
> > + trips {
> > + active-config0 {
> > + temperature = <125000>;
> > + hysteresis = <1000>;
> > + type = "passive";
>
> Is it really just "passive"? Especially with no cooling devices it
> sounds more like "critical". LGTM otherwise.
Hi Dmitry,
To be clear, I'm adding the thermal zones now as a first step so that
that they are declared and that they show up in /sys.
This is for sure not the complete thermal configuration. Most other
thermal zones in this dts also currently have 125 degC "passive" trip
point, which I'd hope the device would never ever reach.
Regards
Luca
>
> > + };
> > + };
> > + };
> > +
> > pm8008-thermal {
> > polling-delay-passive = <100>;
> > thermal-sensors = <&pm8008>;
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM
2024-10-07 7:22 ` Luca Weiss
@ 2024-10-07 12:46 ` Dmitry Baryshkov
2024-10-07 13:11 ` Konrad Dybcio
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2024-10-07 12:46 UTC (permalink / raw)
To: Luca Weiss
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, ~postmarketos/upstreaming, phone-devel,
linux-arm-msm, devicetree, linux-kernel
On Mon, 7 Oct 2024 at 09:22, Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> On Sun Oct 6, 2024 at 10:26 PM CEST, Dmitry Baryshkov wrote:
> > On Wed, Oct 02, 2024 at 03:01:08PM GMT, Luca Weiss wrote:
> > > Configure the ADC and thermal zone for the thermistor next to the
> > > UFS+RAM chip which is connected to GPIO_12 of PM7250B. It is used to
> > > measure the temperature of that area of the PCB.
> > >
> > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > > ---
> > > arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 40 ++++++++++++++++++++++
> > > 1 file changed, 40 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> > > index 8ab30c01712e0b7c0cc1b403e0fe01650315b9e2..fdc62f1b1c5a398abaa71818fdf2858fdc445d28 100644
> > > --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> > > +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
> > > @@ -207,6 +207,20 @@ active-config0 {
> > > };
> > > };
> > >
> > > + mem-thermal {
> > > + polling-delay-passive = <0>;
> > > +
> > > + thermal-sensors = <&pm7250b_adc_tm 2>;
> > > +
> > > + trips {
> > > + active-config0 {
> > > + temperature = <125000>;
> > > + hysteresis = <1000>;
> > > + type = "passive";
> >
> > Is it really just "passive"? Especially with no cooling devices it
> > sounds more like "critical". LGTM otherwise.
>
> Hi Dmitry,
>
> To be clear, I'm adding the thermal zones now as a first step so that
> that they are declared and that they show up in /sys.
>
> This is for sure not the complete thermal configuration. Most other
> thermal zones in this dts also currently have 125 degC "passive" trip
> point, which I'd hope the device would never ever reach.
Sounds sane.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM
2024-10-07 12:46 ` Dmitry Baryshkov
@ 2024-10-07 13:11 ` Konrad Dybcio
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2024-10-07 13:11 UTC (permalink / raw)
To: Dmitry Baryshkov, Luca Weiss
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, ~postmarketos/upstreaming, phone-devel,
linux-arm-msm, devicetree, linux-kernel
On 7.10.2024 2:46 PM, Dmitry Baryshkov wrote:
> On Mon, 7 Oct 2024 at 09:22, Luca Weiss <luca.weiss@fairphone.com> wrote:
>>
>> On Sun Oct 6, 2024 at 10:26 PM CEST, Dmitry Baryshkov wrote:
>>> On Wed, Oct 02, 2024 at 03:01:08PM GMT, Luca Weiss wrote:
>>>> Configure the ADC and thermal zone for the thermistor next to the
>>>> UFS+RAM chip which is connected to GPIO_12 of PM7250B. It is used to
>>>> measure the temperature of that area of the PCB.
>>>>
>>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>>> ---
>>>> arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 40 ++++++++++++++++++++++
>>>> 1 file changed, 40 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
>>>> index 8ab30c01712e0b7c0cc1b403e0fe01650315b9e2..fdc62f1b1c5a398abaa71818fdf2858fdc445d28 100644
>>>> --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
>>>> @@ -207,6 +207,20 @@ active-config0 {
>>>> };
>>>> };
>>>>
>>>> + mem-thermal {
>>>> + polling-delay-passive = <0>;
This is now redundant - see Commit 488164006a28 ("thermal/of: Assume
polling-delay(-passive) 0 when absent")
with it removed
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM
2024-10-02 13:01 [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM Luca Weiss
2024-10-06 20:26 ` Dmitry Baryshkov
@ 2024-10-07 14:26 ` Bjorn Andersson
1 sibling, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2024-10-07 14:26 UTC (permalink / raw)
To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
devicetree, linux-kernel
On Wed, 02 Oct 2024 15:01:08 +0200, Luca Weiss wrote:
> Configure the ADC and thermal zone for the thermistor next to the
> UFS+RAM chip which is connected to GPIO_12 of PM7250B. It is used to
> measure the temperature of that area of the PCB.
>
>
Applied, thanks!
[1/1] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM
commit: 73f9c18c341cdab3b5dfcad143787bdc2a003c2a
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-07 14:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-02 13:01 [PATCH] arm64: dts: qcom: qcm6490-fairphone-fp5: Add thermistor for UFS/RAM Luca Weiss
2024-10-06 20:26 ` Dmitry Baryshkov
2024-10-07 7:22 ` Luca Weiss
2024-10-07 12:46 ` Dmitry Baryshkov
2024-10-07 13:11 ` Konrad Dybcio
2024-10-07 14:26 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®