From patchwork Fri Mar 12 18:32:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 12135837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E554C43332 for ; Fri, 12 Mar 2021 18:33:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A1A464F42 for ; Fri, 12 Mar 2021 18:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233096AbhCLScx (ORCPT ); Fri, 12 Mar 2021 13:32:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233206AbhCLScj (ORCPT ); Fri, 12 Mar 2021 13:32:39 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EFC4C061761 for ; Fri, 12 Mar 2021 10:32:39 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id x29so16415609pgk.6 for ; Fri, 12 Mar 2021 10:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M1L7uCIaHKpOR8g0x+D9iDBpuyypi12xQoENydadcyA=; b=ZTGIwZuVf0u0CLqd0IxlUZkJ7jB92yCD/9d3l7Jtw9rJHY0BWG2oU1Bc8/1vbx13o8 MDpRuqwKhpRF+pcBPNU+TwXz47+mdC12eKzirypba+KediCKVklkGJnPbw4pxZCK13PV MSzAfghka5PhtDmKtQGWxrAS5oPS6FNRxLkiM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M1L7uCIaHKpOR8g0x+D9iDBpuyypi12xQoENydadcyA=; b=prX8JUTYivzOMPtbuePI2rlzF8SuN5FSVW5/mOgK0sFCztcfn4AoVbrG4ZAMKgVWcR zcgncauE+OXxhT682xC6iuw1EaA8/Q04BIVBLbB7EpVvR2+MYGAbhfwRh0augjBEPWWz VjMc2rXA8WH0pw7VgPex/ArRSwrndwFaK41xw+7j6Vk2qOUxBsKbRHUgNZh2zpZ5cWdv 4yDUp8o5HY/7X+sprPOxVb5PzaaBTGTkLqSH1cQjXesIarpbORRJq1GC9BX/fTY11GKF P9goa03gjlF0QQW0wOpv08x8NFChNPF6syxMQ8Kj2uhQq8hYOMSNU3eZ5Ec5IZyAQbBn 5z/Q== X-Gm-Message-State: AOAM532oGDWS6b2CspkTx1FeAeoDwLiS6VYz+EOuYq0M+dveIktRVrOM cUnrpLHGx3iPvQqpUa/jhkZ51w== X-Google-Smtp-Source: ABdhPJxOeqx4M3GWQPJYNAEv2HrjTniAQzKcEz2nIUiv12AFytKW4o+gIko9Jv0ut/Ke1tcV9xNbMQ== X-Received: by 2002:a65:5a0a:: with SMTP id y10mr12753689pgs.122.1615573958623; Fri, 12 Mar 2021 10:32:38 -0800 (PST) Received: from localhost ([2620:15c:202:1:914f:6483:1dc:1bba]) by smtp.gmail.com with UTF8SMTPSA id v126sm6029654pfv.163.2021.03.12.10.32.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Mar 2021 10:32:38 -0800 (PST) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Matthias Kaehlcke Subject: [PATCH v2 1/3] arm64: dts: qcom: sc7180: lazor: Simplify disabling of charger thermal zone Date: Fri, 12 Mar 2021 10:32:26 -0800 Message-Id: <20210312103211.v2.1.I6d587e7ae72a5a47253bb95dfdc3158f8cc8a157@changeid> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210312183228.550779-1-mka@chromium.org> References: <20210312183228.550779-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- 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(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts index 5c997cd90069..30e3e769d2b4 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts @@ -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; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts index d9fbcc7bc5bd..c2ef06367baf 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts @@ -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; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts index ea8c2ee09741..b474df47cd70 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts @@ -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"; -}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi index 6b10b96173e8..6d540321b4a5 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi @@ -41,6 +41,15 @@ ap_ts: touchscreen@10 { }; }; +/* + * 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"; +}; + &panel { compatible = "boe,nv133fhm-n62"; }; From patchwork Fri Mar 12 18:32:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 12135839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48FC0C4332D for ; Fri, 12 Mar 2021 18:33:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27BE864F73 for ; Fri, 12 Mar 2021 18:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233206AbhCLScy (ORCPT ); Fri, 12 Mar 2021 13:32:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233332AbhCLScl (ORCPT ); Fri, 12 Mar 2021 13:32:41 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89B7AC061762 for ; Fri, 12 Mar 2021 10:32:41 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id 16so2443824pfn.5 for ; Fri, 12 Mar 2021 10:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z2TTCoOhZzFdstrm7VNhW1YKvUWRLgRQRz4VAEJQzBw=; b=bVZnEJ6G9IW9OjusVy3YU5V0eruhaSbCs1jAhafSoyawT1TPddl5w46bZ6EDVBBqXh DgpXGBbAtwbsTatuHRH4iwQgorVxKdvsbcsIXm/9qXKY2F249psn9ug2vU7Q4KyH3zgX jkHO4v9KqYl52xVx8NqaK9LZB9gku9A5/79iY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z2TTCoOhZzFdstrm7VNhW1YKvUWRLgRQRz4VAEJQzBw=; b=nl6pMs6v3NU0aGAu63znnpbtBttTx9EeZa3QKaktosDbdOuW1z+j26jrKPHyuVcYoL 6E4rV6pNJoMw/V/wcRaofYWZm/N92a2dHKspI2RYcVStlk7f24cCNxvuy6l6ScxZXX7d mcCLKx/5XT31gt2dBmxdugQXQr29VakkzrNEClUNJ+j/lBe1PNr7Nl1BujId9onHXPgs b1BA6Y6EHZL+2pB1S2nV39rI/Q/PrwGzGuCKRRyJhDCIhtNTbqtk4dnzWM0Aw7eNWTbn CvbXW4tyOV9EZ7MVVgPwBDF1B1Ol5idtTHiZ9rp0ze5dHNOvifayN9XuzLL1Xcj48XdP /srg== X-Gm-Message-State: AOAM532ZXs3hf72SyiA7AoorRKqHA9Q6+kW+yQ3S9GYr0XXVZzPXgUdk 0lEvCSHCVti1eJjysFxEf+izDQ== X-Google-Smtp-Source: ABdhPJw34BfMs+5BruK0ScfiRqtdfgMIFitx83z8fk/1cj2x9DkWqbJlbDJkxLPx5DInEwDsRacusw== X-Received: by 2002:a63:904b:: with SMTP id a72mr12812786pge.77.1615573961098; Fri, 12 Mar 2021 10:32:41 -0800 (PST) Received: from localhost ([2620:15c:202:1:914f:6483:1dc:1bba]) by smtp.gmail.com with UTF8SMTPSA id b23sm5750326pfo.164.2021.03.12.10.32.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Mar 2021 10:32:40 -0800 (PST) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Matthias Kaehlcke Subject: [PATCH v2 2/3] arm64: dts: qcom: sc7180: Add pompom rev3 Date: Fri, 12 Mar 2021 10:32:27 -0800 Message-Id: <20210312103211.v2.2.I4138c3edee23d1efa637eef51e841d9d2e266659@changeid> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210312183228.550779-1-mka@chromium.org> References: <20210312183228.550779-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The 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. Signed-off-by: Matthias Kaehlcke --- 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 | 31 +++++++++++++++ 7 files changed, 85 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 diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index a81966d59cf7..11aa83ca798f 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -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 diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts index e720e7bd0d70..7f87877408c5 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts @@ -9,11 +9,23 @@ #include "sc7180-trogdor-pompom.dtsi" +/delete-node/ keyboard_controller; +#include + / { 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; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2-lte.dts index 791d496ad046..00e187c08eb9 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2-lte.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2-lte.dts @@ -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"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2.dts index 984d7337da78..4f32e6733f4c 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r2.dts @@ -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"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3-lte.dts new file mode 100644 index 000000000000..e90b73c353bb --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3-lte.dts @@ -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"; +}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3.dts new file mode 100644 index 000000000000..f8aac63a53ef --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r3.dts @@ -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"; +}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi index d253a08f6fc8..1a51ebfe8fb4 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi @@ -107,6 +107,37 @@ 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) + + MATRIX_KEY(0x03, 0x09, KEY_SLEEP) /* LOCK key */ + + CROS_STD_MAIN_KEYMAP + >; +}; + &panel { compatible = "kingdisplay,kd116n21-30nv-a010"; }; From patchwork Fri Mar 12 18:32:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 12135835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FA30C4332E for ; Fri, 12 Mar 2021 18:33:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDC9164F71 for ; Fri, 12 Mar 2021 18:33:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233507AbhCLScy (ORCPT ); Fri, 12 Mar 2021 13:32:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233439AbhCLScn (ORCPT ); Fri, 12 Mar 2021 13:32:43 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B3C4C061761 for ; Fri, 12 Mar 2021 10:32:43 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id t18so5556874pjs.3 for ; Fri, 12 Mar 2021 10:32:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0I3DtXSbVjxMHtTFTJIXAlEnDZYc1xykz6UdSiaQCOw=; b=oNkKYyG/QsuZKArEA8O8Z5QEThmmXalEZVsYheMKKAgn1e0LJUZbEGmxIaKMfVWrVG Jsu3I8hA2gZZF+ZU8RNpnfbqVDwkPYSYkIZQ9jtl7C0WnP61Cc4gA4GD11uXQliAPBNK aj+yFTqPBK2q0B2y1OufV0lK7HbZGFRo7aTtM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0I3DtXSbVjxMHtTFTJIXAlEnDZYc1xykz6UdSiaQCOw=; b=bJLfWU/d7pPx8IOEiouQv4jWH8P7LVZ9QJ3qzE+dK81msBz2nfkX4MdeGS7gQqvm3v 12dvWyhjHEI+ntmxqfK++Eee5f1caKxHKsxj7ibO3wbN6SEV8ObmG6yw2Z91LyJnteIa BmFWhTLHX1eKibXv5kMHpl4k0V7EjAPBJ3Xt+mtGEdMGIBStkxq8SnMmyyB3rZLdQHGx UV4ddJYu75g3Fz70e4Vm7RKil5veDK7W1ZlbSkLZOqr+feDgFFdh+MKFlggGzxbpaw8D AdHNNWh9lZ20jk0aXMuh+Zlx31nizOKyxj3rmUHGKgzYj1UYqD4OiWOM/YZyDutklfUF HXGA== X-Gm-Message-State: AOAM533SaUDBtW5gJkpUJW+MSNtIU2l4gCslCEGnIbaXYF22qKOji8+X lnFRUIp/p3YHZmnDkOoKM8M8bWOfBYdMCw== X-Google-Smtp-Source: ABdhPJx7jw6HjWIzh3kR22Y3MbkO+ihO0jNSScjXTYDAzjkkCOL1wqPjzWoYiOJY7bLdnG+hqr+lJg== X-Received: by 2002:a17:90a:e50c:: with SMTP id t12mr15106321pjy.138.1615573963179; Fri, 12 Mar 2021 10:32:43 -0800 (PST) Received: from localhost ([2620:15c:202:1:914f:6483:1dc:1bba]) by smtp.gmail.com with UTF8SMTPSA id ge16sm2851947pjb.43.2021.03.12.10.32.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Mar 2021 10:32:42 -0800 (PST) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Matthias Kaehlcke Subject: [PATCH v2 3/3] arm64: dts: qcom: sc7180: Add CoachZ rev3 Date: Fri, 12 Mar 2021 10:32:28 -0800 Message-Id: <20210312103211.v2.3.I95b8a63103b77cab6a7cf9c150f0541db57fda98@changeid> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210312183228.550779-1-mka@chromium.org> References: <20210312183228.550779-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- 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 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"; +};