From patchwork Thu Jul 21 23:54:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 592212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57B7BC433EF for ; Thu, 21 Jul 2022 23:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233446AbiGUXyw (ORCPT ); Thu, 21 Jul 2022 19:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbiGUXyw (ORCPT ); Thu, 21 Jul 2022 19:54:52 -0400 Received: from mail-40135.protonmail.ch (mail-40135.protonmail.ch [185.70.40.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E9A995B14; Thu, 21 Jul 2022 16:54:51 -0700 (PDT) Date: Thu, 21 Jul 2022 23:54:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658447689; x=1658706889; bh=NCWX0M1EQqRSqE77IDq6L8KQaDGfuFH1PmykdNxM+hE=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=FWyJqfTo5eHGl3Gm8pouOS3oYc8Ko5wCFypc9IPDypMAYlmvbLjsKeRH3BTFuVC+6 k4ZpwCGO6dGdeUxBxRk2q+XawC1Ly5gOW3X90IRKMoiPaAtRLPeQXJngNHWr6RPg0h Z57H/N7gXyq8dQq8N0eNGjs+ekW/ywjSMJScizsv1spdt9ilymU7CFEHoCV4tv36lp 1kRzf2lI9/IpnfJZLX9CTvGFzk9ajGABEDqb1kEQHfUz7xMVn2IwTQNIc3SXrhksP2 FQ7AbMA+c32tb4ULeBVP3D90Icn15HK/F4g1FDYTeMVSATg2x9fQ4zr1TqWSYJj4cW QswX4Drk9vQ0Q== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Stephan Gerhold , Nikita Travkin , ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v4 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Message-ID: <20220721235323.75227-1-linmengbo0689@protonmail.com> In-Reply-To: <20220721235205.74741-1-linmengbo0689@protonmail.com> References: <20220721235205.74741-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document the new samsung,e5/e7/grandmax device tree bindings used in their device trees. Signed-off-by: Lin, Meng-Bo --- Documentation/devicetree/bindings/arm/qcom.yaml | 3 +++ 1 file changed, 3 insertions(+) -- 2.30.2 diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 5c06d1bfc046..b004f42bc277 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -164,6 +164,9 @@ properties: - longcheer,l8150 - samsung,a3u-eur - samsung,a5u-eur + - samsung,e5 + - samsung,e7 + - samsung,grandmax - const: qcom,msm8916 - items: From patchwork Thu Jul 21 23:54:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 593033 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A20ABCCA488 for ; Thu, 21 Jul 2022 23:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233629AbiGUXyz (ORCPT ); Thu, 21 Jul 2022 19:54:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233417AbiGUXyw (ORCPT ); Thu, 21 Jul 2022 19:54:52 -0400 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7369795B22 for ; Thu, 21 Jul 2022 16:54:51 -0700 (PDT) Date: Thu, 21 Jul 2022 23:54:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658447689; x=1658706889; bh=Lxf+fbWxySWTf0HOiNbg6eIzdzjnoglffpgj8qbzzPg=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=nv9JTWhzeUK2PwHl438me9ICh4R+6gOZ1HwDQoiM03zM/sG0fboxa/42E8oCEOmWY VOuQqHRHoAWfWkT7itSTPaHNlyep/IrzV5NFX0GHTnrHpWh+ie3kBf9aXguuE+YkHq R3OE9iPiNdCVM+9fR32m8BHTQ4E4pUIrRvf+h93ttf7Z6niq1AB9R+T8q1ua2IX84z 7Q1GIUv+9C453QkDva+rRGkplDkUYdOnwae7f1D5c0zEHgDsL6ZlBYM1bRMPJuYpfY hX3e5PQvThkYi7BH55O615nw5e1GMctHE2mLhiFKzADi7a4tArkJAoA5PUmzAWHEyO 0SKSnC8A07Wcw== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Stephan Gerhold , Nikita Travkin , ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v4 2/4] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Message-ID: <20220721235333.75282-1-linmengbo0689@protonmail.com> In-Reply-To: <20220721235205.74741-1-linmengbo0689@protonmail.com> References: <20220721235205.74741-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Samsung Galaxy E5, E7 and Grand Max are smartphones using the MSM8916 SoC released in 2015. e2015 and a2015 are similar, with some differences in accelerometer, MUIC and Vibrator. The common parts are shared in msm8916-samsung-a2015-common.dtsi to reduce duplication. Add a common device tree for with initial support for: - GPIO keys and vibrator - GPIO LEDs for Grand Max - Hall sensor (except Grand Max) - SDHCI (internal and external storage) - USB Device Mode - UART (on USB connector via the SM5504 MUIC) - WCNSS (WiFi/BT) - Regulators - S3FWRN5 NFC (except Grand Max) The three devices (and all other variants of E5/E7/Grand Max released in 2015) are very similar, with some differences in display, touchscreen, sensors and NFC. The common parts are shared in msm8916-samsung-e2015-common.dtsi to reduce duplication. Unfortunately, some E5/E7/Grand Max were released with outdated 32-bit only firmware and never received any update from Samsung. Since the 32-bit TrustZone firmware is signed there seems to be no way currently to actually boot this device tree on arm64 Linux on those variants at the moment. However, it is possible to use this device tree by compiling an ARM32 kernel instead. The device tree can be easily built on ARM32 with an #include and it works really well there. To avoid confusion for others it is still better to add this device tree on arm64. Otherwise it's easy to forget to update this one when making some changes that affect all MSM8916 devices. Maybe someone finds a way to boot ARM64 Linux on those device at some point. In this case I expect that this device tree can be simply used as-is. Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold Signed-off-by: Lin, Meng-Bo --- arch/arm64/boot/dts/qcom/Makefile | 3 + .../qcom/msm8916-samsung-e2015-common.dtsi | 47 ++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-e5.dts | 24 ++++++++ .../boot/dts/qcom/msm8916-samsung-e7.dts | 29 ++++++++++ .../dts/qcom/msm8916-samsung-grandmax.dts | 56 +++++++++++++++++++ 5 files changed, 159 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts -- 2.30.2 diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 2f8aec2cc6db..941494553b9e 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -15,6 +15,9 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-longcheer-l8910.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a3u-eur.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a5u-eur.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e5.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e7.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi new file mode 100644 index 000000000000..93a14bfcf8f8 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "msm8916-samsung-a2015-common.dtsi" + +/ { + i2c-muic { + /* SM5504 MUIC instead of SM5502 */ + /delete-node/ extcon@25; + + muic: extcon@14 { + compatible = "siliconmitus,sm5504-muic"; + reg = <0x14>; + + interrupt-parent = <&msmgpio>; + interrupts = <12 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&muic_int_default>; + }; + }; + + vibrator: vibrator { + compatible = "gpio-vibrator"; + enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&motor_en_default>; + }; +}; + +&blsp_i2c2 { + /* lis2hh12 accelerometer instead of BMC150 */ + /delete-node/ accelerometer@10; + /delete-node/ magnetometer@12; + + status = "disabled"; +}; + +&msmgpio { + motor_en_default: motor-en-default { + pins = "gpio76"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts new file mode 100644 index 000000000000..777eb934eb4b --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e5.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-e2015-common.dtsi" + +/* + * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some + * variants. + * Unfortunately, the firmware is signed and cannot be replaced easily. + * There seems to be no way to boot ARM64 kernels on 32-bit devices at the + * moment, even though the hardware would support it. + * + * However, it is possible to use this device tree by compiling an ARM32 kernel + * instead. For clarity and build testing this device tree is maintained next + * to the other MSM8916 device trees. However, it is actually used through + * arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts + */ + +/ { + model = "Samsung Galaxy E5"; + compatible = "samsung,e5", "qcom,msm8916"; + chassis-type = "handset"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts new file mode 100644 index 000000000000..b412b61ca258 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e7.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-e2015-common.dtsi" + +/* + * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some + * variants. + * Unfortunately, the firmware is signed and cannot be replaced easily. + * There seems to be no way to boot ARM64 kernels on 32-bit devices at the + * moment, even though the hardware would support it. + * + * However, it is possible to use this device tree by compiling an ARM32 kernel + * instead. For clarity and build testing this device tree is maintained next + * to the other MSM8916 device trees. However, it is actually used through + * arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts + */ + +/ { + model = "Samsung Galaxy E7"; + compatible = "samsung,e7", "qcom,msm8916"; + chassis-type = "handset"; +}; + +&pm8916_l17 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts new file mode 100644 index 000000000000..74c07a970317 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-e2015-common.dtsi" +#include + +/* + * NOTE: The original firmware from Samsung can only boot ARM32 kernels on some + * variants. + * Unfortunately, the firmware is signed and cannot be replaced easily. + * There seems to be no way to boot ARM64 kernels on 32-bit devices at the + * moment, even though the hardware would support it. + * + * However, it is possible to use this device tree by compiling an ARM32 kernel + * instead. For clarity and build testing this device tree is maintained next + * to the other MSM8916 device trees. However, it is actually used through + * arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts + */ + +/ { + model = "Samsung Galaxy Grand Max"; + compatible = "samsung,grandmax", "qcom,msm8916"; + chassis-type = "handset"; + + /delete-node/ gpio-hall-sensor; + /delete-node/ i2c-nfc; + /delete-node/ i2c-tkey; + + gpio-leds { + compatible = "gpio-leds"; + keyled { + gpios = <&msmgpio 60 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_leds_default>; + }; + }; +}; + +&vibrator { + enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; +}; + +&msmgpio { + gpio_leds_default: gpio-led-default { + pins = "gpio60"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; +}; + +&motor_en_default { + pins = "gpio72"; +}; From patchwork Thu Jul 21 23:54:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 592211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6901DC43334 for ; Thu, 21 Jul 2022 23:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233727AbiGUXzJ (ORCPT ); Thu, 21 Jul 2022 19:55:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233724AbiGUXzG (ORCPT ); Thu, 21 Jul 2022 19:55:06 -0400 Received: from mail-40137.protonmail.ch (mail-40137.protonmail.ch [185.70.40.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0868695C24; Thu, 21 Jul 2022 16:55:02 -0700 (PDT) Date: Thu, 21 Jul 2022 23:54:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658447701; x=1658706901; bh=bSIVb35VNgsRupgexWfXqDR6bz6XZ6vs9aSsZ2kOLkM=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=gBGycjAUobOLdMd9D9Nu+Os4MeEFZT9oyflBoNga4CPXd5lgqjvLOCrC69UHW1AC2 DqDfemFenClSE84wES+JykpPWKk5pe47scyF4SiNIWkZtlDexWIRvFObofI4KYlcq/ FrO51crtWHqo4FrJ+F8lWXY8Jk6oVQIDQetOIwH+F5pwK5lnH5WoRYKm5VANqXj8UP f2k8kim3/NzPIdFKfJE8Tmx48prrHKjOc6Lamz1HOFrr0VjlfIAF0Aj+TWXNKhHC7I RKZQ4cUrHboPPsBfRZ2vHaioZO3pR3kksoZBMEdi3QQtF1BwYNBpIHRQaHPXPOqroI R1PcYgC6z85DQ== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Stephan Gerhold , Nikita Travkin , ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v4 3/4] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Message-ID: <20220721235344.75368-1-linmengbo0689@protonmail.com> In-Reply-To: <20220721235205.74741-1-linmengbo0689@protonmail.com> References: <20220721235205.74741-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org After adding all necessary support for MSM8916 SMP/cpuidle without PSCI on ARM32, build the Samsung Galaxy E5/E7/Grand Max device trees from the arm64 tree together with the ARM32 include to allow booting this device on ARM32. The approach to include device tree files from other architectures is inspired from e.g. the Raspberry Pi (bcm2711-rpi-4-b.dts) where this is used to build the device tree for both ARM32 and ARM64. Signed-off-by: Lin, Meng-Bo --- arch/arm/boot/dts/Makefile | 3 +++ arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts | 3 +++ arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts | 3 +++ arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts create mode 100644 arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts -- 2.30.2 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5112f493f494..b7a6983ee6fa 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1030,6 +1030,9 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq8064-rb3011.dtb \ qcom-msm8226-samsung-s3ve3g.dtb \ qcom-msm8660-surf.dtb \ + qcom-msm8916-samsung-e5.dtb \ + qcom-msm8916-samsung-e7.dtb \ + qcom-msm8916-samsung-grandmax.dtb \ qcom-msm8916-samsung-serranove.dtb \ qcom-msm8960-cdp.dtb \ qcom-msm8974-lge-nexus5-hammerhead.dtb \ diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts new file mode 100644 index 000000000000..c8d34de8a71e --- /dev/null +++ b/arch/arm/boot/dts/qcom-msm8916-samsung-e5.dts @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "arm64/qcom/msm8916-samsung-e5.dts" +#include "qcom-msm8916-smp.dtsi" diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts new file mode 100644 index 000000000000..85be286c8608 --- /dev/null +++ b/arch/arm/boot/dts/qcom-msm8916-samsung-e7.dts @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "arm64/qcom/msm8916-samsung-e7.dts" +#include "qcom-msm8916-smp.dtsi" diff --git a/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts b/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts new file mode 100644 index 000000000000..d3abe0536238 --- /dev/null +++ b/arch/arm/boot/dts/qcom-msm8916-samsung-grandmax.dts @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "arm64/qcom/msm8916-samsung-grandmax.dts" +#include "qcom-msm8916-smp.dtsi" From patchwork Thu Jul 21 23:54:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 593032 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F027C433EF for ; Thu, 21 Jul 2022 23:55:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233637AbiGUXzP (ORCPT ); Thu, 21 Jul 2022 19:55:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233729AbiGUXzK (ORCPT ); Thu, 21 Jul 2022 19:55:10 -0400 Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 737A413EB5 for ; Thu, 21 Jul 2022 16:55:07 -0700 (PDT) Date: Thu, 21 Jul 2022 23:54:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658447705; x=1658706905; bh=f7S0wFYVa94uuYvy/CA+AbuAXJ6TWBZwRlc6ONo3zXs=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=boNTiMLNpCM8YWqVx7D1wRp8FsMvGWxCuFG/oOsBELSC3wrLE/lq73XwT9UA/wErm n/EdrS6YO+0GzN8uxlFyfd4ZfA7JRv9DHAljWwB1yz79tSXq2DvJqsslaSLqXItkk2 ae9A/sfTq8IzdUQ+SnhUDT1s3KbTurdrDqbfWRenOKloBfUzQLOJ3494o2dAXM6rRy dhlBmAMTdE8Q8kVpgeE1zaNCOO0RWmz8X9huclWITfRAFOzK4EqiTDDEGX3KefAFod CDIKsyOlLmfxJrq6LWOxOjPyVkWmAdLMxVmW6nKBfONM9daqYqnzIkTcXeVLyKE9hX 3XExs5GbaZSEw== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Stephan Gerhold , Nikita Travkin , ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v4 4/4] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Message-ID: <20220721235353.75440-1-linmengbo0689@protonmail.com> In-Reply-To: <20220721235205.74741-1-linmengbo0689@protonmail.com> References: <20220721235205.74741-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On the Samsung Galaxy E5 and E7 the touch key is supplied by a single fixed regulator (enabled via GPIO 97) that supplies both MCU and LED. Add it to the device tree. Signed-off-by: Lin, Meng-Bo --- .../qcom/msm8916-samsung-e2015-common.dtsi | 26 +++++++++++++++++++ .../dts/qcom/msm8916-samsung-grandmax.dts | 4 +++ 2 files changed, 30 insertions(+) -- 2.30.2 diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi index 93a14bfcf8f8..4a6cc575c451 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -19,6 +19,19 @@ muic: extcon@14 { }; }; + reg_touch_key: regulator-touch-key { + compatible = "regulator-fixed"; + regulator-name = "touch_key"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 97 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&tkey_en_default>; + }; + vibrator: vibrator { compatible = "gpio-vibrator"; enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; @@ -36,6 +49,11 @@ &blsp_i2c2 { status = "disabled"; }; +&touchkey { + vcc-supply = <®_touch_key>; + vdd-supply = <®_touch_key>; +}; + &msmgpio { motor_en_default: motor-en-default { pins = "gpio76"; @@ -44,4 +62,12 @@ motor_en_default: motor-en-default { drive-strength = <2>; bias-disable; }; + + tkey_en_default: tkey-en-default { + pins = "gpio97"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts index 74c07a970317..87e990f4f9fc 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -37,6 +37,10 @@ keyled { }; }; +®_touch_key { + status = "disabled"; +}; + &vibrator { enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; };