arm64: dts: qcom: sc7180: Disable the charger thermal zone on more trogdor boards
Subsystems (4)
v4 cover arm64: dts: qcom: sc7180: Disable the charger thermal zone on more trogdor boards
We already disabled the charger thermal zone for lazor to avoid bogus temperature readings from an unsupported thermistor. Some revisions of other trogdor boards that are added by Doug's 'arm64: dts: qcom: Update sc7180-trogdor variants from downstream' series have the same problem. Disable the charger thermal zone for them too.
This series is based on v2 of the 'arm64: dts: qcom: Update sc7180-trogdor variants from downstream' series
(https://patchwork.kernel.org/project/linux-arm-msm/list/?series=440315)
(no changes since v1)
Matthias Kaehlcke (3):
arm64: dts: qcom: sc7180: lazor: Simplify disabling of charger thermal
zone
arm64: dts: qcom: sc7180: Add pompom rev3
arm64: dts: qcom: sc7180: Add CoachZ rev3
arch/arm64/boot/dts/qcom/Makefile | 6 ++-
.../dts/qcom/sc7180-trogdor-coachz-r1-lte.dts | 4 +-
.../dts/qcom/sc7180-trogdor-coachz-r1.dts | 13 ++++++-
...e.dts => sc7180-trogdor-coachz-r3-lte.dts} | 6 +--
...hz-r2.dts => sc7180-trogdor-coachz-r3.dts} | 4 +-
.../boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 9 -----
.../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 9 -----
.../boot/dts/qcom/sc7180-trogdor-lazor-r3.dts | 9 -----
.../boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 9 +++++
.../dts/qcom/sc7180-trogdor-pompom-r1.dts | 12 ++++++
.../dts/qcom/sc7180-trogdor-pompom-r2-lte.dts | 4 +-
.../dts/qcom/sc7180-trogdor-pompom-r2.dts | 38 +++++--------------
.../dts/qcom/sc7180-trogdor-pompom-r3-lte.dts | 14 +++++++
.../dts/qcom/sc7180-trogdor-pompom-r3.dts | 15 ++++++++
.../boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 29 ++++++++++++++
15 files changed, 112 insertions(+), 69 deletions(-)
rename arch/arm64/boot/dts/qcom/{sc7180-trogdor-coachz-r2-lte.dts => sc7180-trogdor-coachz-r3-lte.dts} (69%)
rename arch/arm64/boot/dts/qcom/{sc7180-trogdor-coachz-r2.dts => sc7180-trogdor-coachz-r3.dts} (75%)
create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3-lte.dts
create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3.dtsSignature · 1 line
2.31.0.rc2.261.g7f71774620-goog
PATCH v4 1/3 arm64: dts: qcom: sc7180: lazor: Simplify disabling of charger thermal zone
Commit f73558cc83d1 ("arm64: dts: qcom: sc7180: Disable charger thermal zone for lazor") disables the charger thermal zone for specific lazor revisions due to an unsupported thermistor type. The initial idea was to disable the thermal zone for older revisions and leave it enabled for newer ones that use a supported thermistor. Finally the thermistor won't be changed on newer revisions, hence the thermal zone should be disabled for all lazor (and limozeen) revisions. Instead of disabling it per revision do it once in the shared .dtsi for lazor.
---
Changes in v4:
- none
Changes in v3:
- fixed order of nodes in sc7180-trogdor-lazor.dtsi
Changes in v2:
- none
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 9 --------- arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 9 --------- arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts | 9 --------- arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi | 9 +++++++++ 4 files changed, 9 insertions(+), 27 deletions(-)
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts +0 -9
@@ -14,15 +14,6 @@ / { compatible = "google,lazor-rev0", "qcom,sc7180"; }; -/* - * Lazor 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"; -}; - &pp3300_hub { /* pp3300_l7c is used to power the USB hub */ /delete-property/regulator-always-on;
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts +0 -9
@@ -14,15 +14,6 @@ / { compatible = "google,lazor-rev1", "google,lazor-rev2", "qcom,sc7180"; }; -/* - * Lazor 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"; -}; - &pp3300_hub { /* pp3300_l7c is used to power the USB hub */ /delete-property/regulator-always-on;
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts +0 -9
@@ -14,12 +14,3 @@ / { model = "Google Lazor (rev3+)"; compatible = "google,lazor", "qcom,sc7180"; }; - -/* - * Lazor 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"; -};
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi +9 -0
@@ -21,6 +21,15 @@ &ap_sar_sensor { semtech,avg-pos-strength = <64>; }; +/* + * Lazor 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"; +}; + ap_ts_pen_1v8: &i2c4 { status = "okay"; clock-frequency = <400000>;
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog
PATCH v4 2/3 arm64: dts: qcom: sc7180: Add pompom rev3
In reply to Matthias KaehlckeThe only kernel visible change with respect to rev2 is that pompom rev3 changed the charger thermistor from a 47k to a 100k NTC to use a thermistor which is supported by the PM6150 ADC driver.
Disable the charger thermal zone for pompom rev1 and rev2 to avoid the use of bogus temperature values from the unsupported thermistor.
---
Changes in v4:
- added missing '&' to phandle in rev1
- added Reviewed-by tag from Doug
Changes in v3:
- don't add LOCK key
Changes in v2:
- moved keyboard definition to sc7180-trogdor-pompom.dtsi instead of duplicating it, use cros-ec keyboard for rev1
- squashed with 'arm64: dts: qcom: sc7180: pompom: Disable charger thermal zone for rev1 and rev2'
arch/arm64/boot/dts/qcom/Makefile | 2 + .../dts/qcom/sc7180-trogdor-pompom-r1.dts | 12 ++++++ .../dts/qcom/sc7180-trogdor-pompom-r2-lte.dts | 4 +- .../dts/qcom/sc7180-trogdor-pompom-r2.dts | 38 +++++-------------- .../dts/qcom/sc7180-trogdor-pompom-r3-lte.dts | 14 +++++++ .../dts/qcom/sc7180-trogdor-pompom-r3.dts | 15 ++++++++ .../boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 29 ++++++++++++++ 7 files changed, 83 insertions(+), 31 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3-lte.dts create mode 100644 arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3.dts
arch/arm64/boot/dts/qcom/Makefile +2 -0
@@ -49,6 +49,8 @@ dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-pompom-r1.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-pompom-r1-lte.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-pompom-r2.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-pompom-r2-lte.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-pompom-r3.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-pompom-r3-lte.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-r1.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-trogdor-r1-lte.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-ganges-kirin.dtb
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts +12 -0
@@ -9,11 +9,23 @@ #include "sc7180-trogdor-pompom.dtsi" +/delete-node/ &keyboard_controller; +#include <arm/cros-ec-keyboard.dtsi> + / { model = "Google Pompom (rev1)"; compatible = "google,pompom-rev1", "qcom,sc7180"; }; +/* + * Pompom 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"; +}; + &pp3300_hub { /* pp3300_l7c is used to power the USB hub */ /delete-property/regulator-always-on;
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2-lte.dts +2 -2
@@ -9,6 +9,6 @@ #include "sc7180-trogdor-lte-sku.dtsi" / { - model = "Google Pompom (rev2+) with LTE"; - compatible = "google,pompom-sku0", "qcom,sc7180"; + model = "Google Pompom (rev2) with LTE"; + compatible = "google,pompom-rev2-sku0", "qcom,sc7180"; };
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2.dts +9 -29
@@ -10,35 +10,15 @@ #include "sc7180-trogdor-pompom.dtsi" / { - model = "Google Pompom (rev2+)"; - compatible = "google,pompom", "qcom,sc7180"; + model = "Google Pompom (rev2)"; + compatible = "google,pompom-rev2", "qcom,sc7180"; }; -&keyboard_controller { - function-row-physmap = < - MATRIX_KEY(0x00, 0x02, 0) /* T1 */ - MATRIX_KEY(0x03, 0x02, 0) /* T2 */ - MATRIX_KEY(0x02, 0x02, 0) /* T3 */ - MATRIX_KEY(0x01, 0x02, 0) /* T4 */ - MATRIX_KEY(0x03, 0x04, 0) /* T5 */ - MATRIX_KEY(0x02, 0x04, 0) /* T6 */ - MATRIX_KEY(0x01, 0x04, 0) /* T7 */ - MATRIX_KEY(0x02, 0x09, 0) /* T8 */ - MATRIX_KEY(0x01, 0x09, 0) /* T9 */ - MATRIX_KEY(0x00, 0x04, 0) /* T10 */ - >; - linux,keymap = < - MATRIX_KEY(0x00, 0x02, KEY_BACK) - MATRIX_KEY(0x03, 0x02, KEY_REFRESH) - MATRIX_KEY(0x02, 0x02, KEY_ZOOM) - MATRIX_KEY(0x01, 0x02, KEY_SCALE) - MATRIX_KEY(0x03, 0x04, KEY_SYSRQ) - MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN) - MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP) - MATRIX_KEY(0x02, 0x09, KEY_MUTE) - MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN) - MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP) - - CROS_STD_MAIN_KEYMAP - >; +/* + * Pompom 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"; };
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3-lte.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Pompom board device tree source + * + * Copyright 2021 Google LLC. + */ + +#include "sc7180-trogdor-pompom-r3.dts" +#include "sc7180-trogdor-lte-sku.dtsi" + +/ { + model = "Google Pompom (rev3+) with LTE"; + compatible = "google,pompom-sku0", "qcom,sc7180"; +};
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3.dts new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Google Pompom board device tree source + * + * Copyright 2021 Google LLC. + */ + +/dts-v1/; + +#include "sc7180-trogdor-pompom.dtsi" + +/ { + model = "Google Pompom (rev3+)"; + compatible = "google,pompom", "qcom,sc7180"; +};
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi +29 -0
@@ -107,6 +107,35 @@ ap_ts: touchscreen@10 { }; }; +&keyboard_controller { + function-row-physmap = < + MATRIX_KEY(0x00, 0x02, 0) /* T1 */ + MATRIX_KEY(0x03, 0x02, 0) /* T2 */ + MATRIX_KEY(0x02, 0x02, 0) /* T3 */ + MATRIX_KEY(0x01, 0x02, 0) /* T4 */ + MATRIX_KEY(0x03, 0x04, 0) /* T5 */ + MATRIX_KEY(0x02, 0x04, 0) /* T6 */ + MATRIX_KEY(0x01, 0x04, 0) /* T7 */ + MATRIX_KEY(0x02, 0x09, 0) /* T8 */ + MATRIX_KEY(0x01, 0x09, 0) /* T9 */ + MATRIX_KEY(0x00, 0x04, 0) /* T10 */ + >; + linux,keymap = < + MATRIX_KEY(0x00, 0x02, KEY_BACK) + MATRIX_KEY(0x03, 0x02, KEY_REFRESH) + MATRIX_KEY(0x02, 0x02, KEY_ZOOM) + MATRIX_KEY(0x01, 0x02, KEY_SCALE) + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ) + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN) + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP) + MATRIX_KEY(0x02, 0x09, KEY_MUTE) + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN) + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP) + + CROS_STD_MAIN_KEYMAP + >; +}; + &panel { compatible = "kingdisplay,kd116n21-30nv-a010"; };
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog
PATCH v4 3/3 arm64: dts: qcom: sc7180: Add CoachZ rev3
In reply to Matthias KaehlckeCoachZ 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.
This also gets rid of the explicit DT files for rev2 and handles rev2 in the rev1 .dts instead. There was some back and forth downstream involving the 'dmic_clk_en' pin, after that was sorted out the DT for rev1 and rev2 is the same.
---
Changes in v4:
- added Reviewed-by tag from Doug
Changes in v3:
- get rid of separate .dts for rev2
Changes in v2:
- added CoachZ rev3
- updated subject and commit message
arch/arm64/boot/dts/qcom/Makefile | 4 ++--
.../boot/dts/qcom/sc7180-trogdor-coachz-r1-lte.dts | 4 ++--
.../boot/dts/qcom/sc7180-trogdor-coachz-r1.dts | 13 +++++++++++--
...-r2-lte.dts => sc7180-trogdor-coachz-r3-lte.dts} | 6 +++---
...r-coachz-r2.dts => sc7180-trogdor-coachz-r3.dts} | 4 ++--
5 files changed, 20 insertions(+), 11 deletions(-)
rename arch/arm64/boot/dts/qcom/{sc7180-trogdor-coachz-r2-lte.dts => sc7180-trogdor-coachz-r3-lte.dts} (69%)
rename arch/arm64/boot/dts/qcom/{sc7180-trogdor-coachz-r2.dts => sc7180-trogdor-coachz-r3.dts} (75%)arch/arm64/boot/dts/qcom/Makefile +2 -2
@@ -33,8 +33,8 @@ dtb-$(CONFIG_ARCH_QCOM) += qrb5165-rb5.dtb dtb-$(CONFIG_ARCH_QCOM) += sc7180-idp.dtb 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
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1-lte.dts +2 -2
@@ -9,8 +9,8 @@ #include "sc7180-trogdor-lte-sku.dtsi" / { - model = "Google CoachZ (rev1) with LTE"; - compatible = "google,coachz-rev1-sku0", "qcom,sc7180"; + model = "Google CoachZ (rev1 - 2) with LTE"; + compatible = "google,coachz-rev1-sku0", "google,coachz-rev2-sku0", "qcom,sc7180"; }; &cros_ec_proximity {
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r1.dts +11 -2
@@ -10,8 +10,17 @@ #include "sc7180-trogdor-coachz.dtsi" / { - model = "Google CoachZ (rev1)"; - compatible = "google,coachz-rev1", "qcom,sc7180"; + model = "Google CoachZ (rev1 - 2)"; + compatible = "google,coachz-rev1", "google,coachz-rev2", "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 {
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3-lte.dts renamed from arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2-lte.dts +3 -3
@@ -2,14 +2,14 @@ /* * Google CoachZ board device tree source * - * Copyright 2020 Google LLC. + * Copyright 2021 Google LLC. */ -#include "sc7180-trogdor-coachz-r2.dts" +#include "sc7180-trogdor-coachz-r3.dts" #include "sc7180-trogdor-lte-sku.dtsi" / { - model = "Google CoachZ (rev2+) with LTE"; + model = "Google CoachZ (rev3+) with LTE"; compatible = "google,coachz-sku0", "qcom,sc7180"; };
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r3.dts renamed from arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz-r2.dts +2 -2
@@ -2,7 +2,7 @@ /* * Google CoachZ board device tree source * - * Copyright 2020 Google LLC. + * Copyright 2021 Google LLC. */ /dts-v1/;
@@ -10,6 +10,6 @@ #include "sc7180-trogdor-coachz.dtsi" / { - model = "Google CoachZ (rev2+)"; + model = "Google CoachZ (rev3+)"; compatible = "google,coachz", "qcom,sc7180"; };
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog