diff mbox series

[4/4] arm64: dts: qcom: sc7180: Disable charger thermal zone for coachz rev1 and rev2

Message ID 20210304100341.4.I95b8a63103b77cab6a7cf9c150f0541db57fda98@changeid (mailing list archive)
State Superseded
Headers show
Series arm64: dts: qcom: sc7180: Disable the charger thermal zone on more trogdor boards | expand

Commit Message

Matthias Kaehlcke March 4, 2021, 6:04 p.m. UTC
CoachZ rev1 and rev2 are stuffed with a 47k NTC as thermistor for the
charger temperature which currently isn't supported by the PM6150 ADC
driver. Disable the charger thermal zone to avoid the use of bogus
temperature values.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---

 arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 9 +++++++++
 arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts | 9 +++++++++
 2 files changed, 18 insertions(+)

Comments

Douglas Anderson March 5, 2021, 6:50 p.m. UTC | #1
Hi,

On Thu, Mar 4, 2021 at 10:04 AM Matthias Kaehlcke <mka@chromium.org> wrote:
>
> CoachZ rev1 and rev2 are stuffed with a 47k NTC as thermistor for the
> charger temperature which currently isn't supported by the PM6150 ADC
> driver. Disable the charger thermal zone to avoid the use of bogus
> temperature values.
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 9 +++++++++
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts | 9 +++++++++
>  2 files changed, 18 insertions(+)

I guess this patch is written with the assumption that eventually
we'll create a "-r3" or "-r4" that has a proper thermistor stuffed but
maybe we're not sure which one?  Right now you're disabling it for
both -r1 and -r2+ which is all revisions, so this could go in the
coachz.dtsi file...

-Doug
Matthias Kaehlcke March 5, 2021, 8:28 p.m. UTC | #2
On Fri, Mar 05, 2021 at 10:50:12AM -0800, Doug Anderson wrote:
> Hi,
> 
> On Thu, Mar 4, 2021 at 10:04 AM Matthias Kaehlcke <mka@chromium.org> wrote:
> >
> > CoachZ rev1 and rev2 are stuffed with a 47k NTC as thermistor for the
> > charger temperature which currently isn't supported by the PM6150 ADC
> > driver. Disable the charger thermal zone to avoid the use of bogus
> > temperature values.
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> >
> >  arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 9 +++++++++
> >  arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts | 9 +++++++++
> >  2 files changed, 18 insertions(+)
> 
> I guess this patch is written with the assumption that eventually
> we'll create a "-r3" or "-r4" that has a proper thermistor stuffed but
> maybe we're not sure which one?  Right now you're disabling it for
> both -r1 and -r2+ which is all revisions, so this could go in the
> coachz.dtsi file...

The proper thermistor should be stuffed in rev3.

For some reason there was already a -r3 .dts in my mental model,
probably I created one when I started with a downstream version of
this series just before you posted your's to bring upstream (mostly)
in sync with downstream. I'll add it in v2.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts
index 86619f6c1134..c6b078e70d31 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts
@@ -14,6 +14,15 @@  / {
 	compatible = "google,coachz-rev1", "qcom,sc7180";
 };
 
+/*
+ * CoachZ rev1 is stuffed with a 47k NTC as charger thermistor which currently
+ * is not supported by the PM6150 ADC driver. Disable the charger thermal zone
+ * to avoid using bogus temperature values.
+ */
+&charger_thermal {
+	status = "disabled";
+};
+
 &tlmm {
 	gpio-line-names = "HUB_RST_L",
 			  "AP_RAM_ID0",
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts
index 4f69b6ba299f..67c31795a566 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts
@@ -13,3 +13,12 @@  / {
 	model = "Google CoachZ (rev2+)";
 	compatible = "google,coachz", "qcom,sc7180";
 };
+
+/*
+ * CoachZ rev2 is stuffed with a 47k NTC as charger thermistor which currently
+ * is not supported by the PM6150 ADC driver. Disable the charger thermal zone
+ * to avoid using bogus temperature values.
+ */
+&charger_thermal {
+	status = "disabled";
+};