Message ID | 20210312103211.v2.3.I95b8a63103b77cab6a7cf9c150f0541db57fda98@changeid (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | arm64: dts: qcom: sc7180: Disable the charger thermal zone on more trogdor boards | expand |
Hi, On Fri, Mar 12, 2021 at 10:32 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > CoachZ rev3 uses a 100k NTC thermistor for the charger temperatures, > instead of the 47k NTC that is stuffed in earlier revisions. Add .dts > files for rev3. > > The 47k NTC currently isn't supported by the PM6150 ADC driver. > Disable the charger thermal zone for rev1 and rev2 to avoid the use > of bogus temperature values. > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > --- > > Changes in v2: > - added CoachZ rev3 > - updated subject and commit message > > arch/arm64/boot/dts/qcom/Makefile | 2 ++ > .../boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 9 +++++++++ > .../dts/qcom/sc7180-trogdor-coachz-r2-lte.dts | 4 ++-- > .../boot/dts/qcom/sc7180-trogdor-coachz-r2.dts | 13 +++++++++++-- > .../dts/qcom/sc7180-trogdor-coachz-r3-lte.dts | 18 ++++++++++++++++++ > .../boot/dts/qcom/sc7180-trogdor-coachz-r3.dts | 15 +++++++++++++++ > 6 files changed, 57 insertions(+), 4 deletions(-) So what you have here is good and we could land it. Feel free to add my Reviewed-by tag if you want. ...but I want to propose an alternative. It turns out that these days coachz-r1 and coachz-r2 are actually the same. The only reason both exist is because <https://crrev.com/c/2733863> ("CHROMIUM: arm64: dts: qcom: sc7180: add dmic_clk_en back") wasn't the proper inverse of <https://crrev.com/c/2596726> ("CHROMIUM: arm64: dts: qcom: sc7180: remove dmic_clk_en"). It sorta squashes two changes into one, but if you combined your change with one that folded "-r1" into "-r2" it would actually make a smaller / easier to understand change, essentially, it would be: - just a rename of the "-r2" file to be "-r3" - add "-rev2" into the list of compatibles in "-r1" file. - add the "disable" into the "-r1" file. Anyway, I'll leave it up to you. -Doug
On Mon, Mar 15, 2021 at 02:49:04PM -0700, Doug Anderson wrote: > Hi, > > On Fri, Mar 12, 2021 at 10:32 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > > > CoachZ rev3 uses a 100k NTC thermistor for the charger temperatures, > > instead of the 47k NTC that is stuffed in earlier revisions. Add .dts > > files for rev3. > > > > The 47k NTC currently isn't supported by the PM6150 ADC driver. > > Disable the charger thermal zone for rev1 and rev2 to avoid the use > > of bogus temperature values. > > > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > > --- > > > > Changes in v2: > > - added CoachZ rev3 > > - updated subject and commit message > > > > arch/arm64/boot/dts/qcom/Makefile | 2 ++ > > .../boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 9 +++++++++ > > .../dts/qcom/sc7180-trogdor-coachz-r2-lte.dts | 4 ++-- > > .../boot/dts/qcom/sc7180-trogdor-coachz-r2.dts | 13 +++++++++++-- > > .../dts/qcom/sc7180-trogdor-coachz-r3-lte.dts | 18 ++++++++++++++++++ > > .../boot/dts/qcom/sc7180-trogdor-coachz-r3.dts | 15 +++++++++++++++ > > 6 files changed, 57 insertions(+), 4 deletions(-) > > So what you have here is good and we could land it. Feel free to add > my Reviewed-by tag if you want. > > ...but I want to propose an alternative. It turns out that these days > coachz-r1 and coachz-r2 are actually the same. The only reason both > exist is because <https://crrev.com/c/2733863> ("CHROMIUM: arm64: dts: > qcom: sc7180: add dmic_clk_en back") wasn't the proper inverse of > <https://crrev.com/c/2596726> ("CHROMIUM: arm64: dts: qcom: sc7180: > remove dmic_clk_en"). > > It sorta squashes two changes into one, but if you combined your > change with one that folded "-r1" into "-r2" it would actually make a > smaller / easier to understand change, essentially, it would be: > - just a rename of the "-r2" file to be "-r3" > - add "-rev2" into the list of compatibles in "-r1" file. > - add the "disable" into the "-r1" file. I agree, if rev1 and rev2 are the same in terms of the DT they should use the same file(s).
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 11aa83ca798f..ffb6d662754a 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -35,6 +35,8 @@ dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-coachz-r1.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-coachz-r1-lte.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-coachz-r2.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-coachz-r2-lte.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-coachz-r3.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-coachz-r3-lte.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-lazor-r0.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-lazor-r1.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-lazor-r1-kb.dtb 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-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2-lte.dts index 6e7745801fae..5d92309af091 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2-lte.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2-lte.dts @@ -9,8 +9,8 @@ #include "sc7180-trogdor-lte-sku.dtsi" / { - model = "Google CoachZ (rev2+) with LTE"; - compatible = "google,coachz-sku0", "qcom,sc7180"; + model = "Google CoachZ (rev2) with LTE"; + compatible = "google,coachz-rev2-sku0", "qcom,sc7180"; }; &cros_ec_proximity { 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..6ce2b1534a68 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts @@ -10,6 +10,15 @@ #include "sc7180-trogdor-coachz.dtsi" / { - model = "Google CoachZ (rev2+)"; - compatible = "google,coachz", "qcom,sc7180"; + model = "Google CoachZ (rev2)"; + compatible = "google,coachz-rev2", "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"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3-lte.dts new file mode 100644 index 000000000000..d23409034e8c --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3-lte.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google CoachZ board device tree source + * + * Copyright 2021 Google LLC. + */ + +#include "sc7180-trogdor-coachz-r3.dts" +#include "sc7180-trogdor-lte-sku.dtsi" + +/ { + model = "Google CoachZ (rev3+) with LTE"; + compatible = "google,coachz-sku0", "qcom,sc7180"; +}; + +&cros_ec_proximity { + label = "proximity-wifi-lte"; +}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3.dts new file mode 100644 index 000000000000..a02d2d57c78c --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google CoachZ board device tree source + * + * Copyright 2021 Google LLC. + */ + +/dts-v1/; + +#include "sc7180-trogdor-coachz.dtsi" + +/ { + model = "Google CoachZ (rev3+)"; + compatible = "google,coachz", "qcom,sc7180"; +};
CoachZ rev3 uses a 100k NTC thermistor for the charger temperatures, instead of the 47k NTC that is stuffed in earlier revisions. Add .dts files for rev3. The 47k NTC currently isn't supported by the PM6150 ADC driver. Disable the charger thermal zone for rev1 and rev2 to avoid the use of bogus temperature values. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> --- Changes in v2: - added CoachZ rev3 - updated subject and commit message arch/arm64/boot/dts/qcom/Makefile | 2 ++ .../boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 9 +++++++++ .../dts/qcom/sc7180-trogdor-coachz-r2-lte.dts | 4 ++-- .../boot/dts/qcom/sc7180-trogdor-coachz-r2.dts | 13 +++++++++++-- .../dts/qcom/sc7180-trogdor-coachz-r3-lte.dts | 18 ++++++++++++++++++ .../boot/dts/qcom/sc7180-trogdor-coachz-r3.dts | 15 +++++++++++++++ 6 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3-lte.dts create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3.dts