From patchwork Sat Jul 23 19:00:13 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: 592872 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 12174C433EF for ; Sat, 23 Jul 2022 19:00:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238585AbiGWTAe (ORCPT ); Sat, 23 Jul 2022 15:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232490AbiGWTAd (ORCPT ); Sat, 23 Jul 2022 15:00:33 -0400 Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47DAC14004; Sat, 23 Jul 2022 12:00:26 -0700 (PDT) Date: Sat, 23 Jul 2022 19:00:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658602825; x=1658862025; bh=Qd8Vn3xIJoBHXVYSlX6tuPCxnvx2GtvwzIJMcrzHXF8=; 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=VSZ3NfcEHq8hRF5W++vHTjdjIOO+OLE99U8dSAjYm6rAbLUG9Uz0b4CclXKv29mPT svVQunS4yvvqTMjgAhnm/TqbZ3lGBe9kUrUSumEtUWkJO/yhMh56w9Q/J+wO1kxTdG eR2CPHMINPfqX6vf9loZ26DxAdGTXFHl+c1umJEnsiDwICJcbpQweTJ4kD4EBDwcuZ ni4BrX+o7yyvJvpNrX+ch9al7hHYcNtW+q32As+vlOGaQDMQW1ZAFcGs4ULICMCcJz fCT0jsjf4/ey6BmjkNORiPQbUkT8zJzj4feTkm2byDmw21pPU2PAVkNv/0ke7JmeTO U9aveiiqgCS+A== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Olof Johansson , Stephen Boyd , Stephan Gerhold , Nikita Travkin , soc@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v6 1/5] dt-bindings: qcom: Document bindings for new msm8916-samsung-e2015 devices Message-ID: <20220723185845.203622-1-linmengbo0689@protonmail.com> In-Reply-To: <20220723185424.203340-1-linmengbo0689@protonmail.com> References: <20220723185424.203340-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the new samsung,e5/e7/grandmax device tree bindings used in their device trees. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski --- 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 Sat Jul 23 19:00:20 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: 592871 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 DDD74CCA48C for ; Sat, 23 Jul 2022 19:00:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238677AbiGWTAi (ORCPT ); Sat, 23 Jul 2022 15:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238655AbiGWTAh (ORCPT ); Sat, 23 Jul 2022 15:00:37 -0400 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B47361573E for ; Sat, 23 Jul 2022 12:00:35 -0700 (PDT) Date: Sat, 23 Jul 2022 19:00:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658602833; x=1658862033; bh=9Mg93JHhqoIgJqkfUdPBuVFfMWu2Rmt6WIclSQemsR0=; 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=W/lsUL8GtfNw3h0vsNOk52nos6Mp1eSLHgKzULnn6a4AC2l40JTRHmtotFJedub8L gTqz32ngyAZKfaX4Rp/RLN1WG/7cDUjB77y+qoCQ7M3Bs6HeY5IHx2QZHcYBnh5RK7 awGfMG6pjvJX0RzQiNSQssKoLqTNpQgPQOEzCXt/Hqu68HhslJP4Wvv6KpFq53TalG FFCW0cYWZMX/BV7iuQMTTMgIG2qz1dwQvRXXUDVGShrVHzSk/P3u8dlvKUc4a+n13l 2FICeQPNd9XUYVpXN7E5/NYPqD7Nq/1PPtzAYCkru4aQTa8uU2W2i50ET9PnXcWBmL wEbWoBV2/O1Sg== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Olof Johansson , Stephen Boyd , Stephan Gerhold , Nikita Travkin , soc@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v6 2/5] arm64: dts: qcom: msm8916-samsung-e2015: Add initial common dtsi Message-ID: <20220723185859.203693-1-linmengbo0689@protonmail.com> In-Reply-To: <20220723185424.203340-1-linmengbo0689@protonmail.com> References: <20220723185424.203340-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 - GPIO LEDs for Grand Max - Regulator haptic - 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 | 59 +++++++++++++++++++ .../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, 171 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..9caa8a161d31 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "msm8916-samsung-a2015-common.dtsi" + +/ { + haptic { + compatible = "regulator-haptic"; + haptic-supply = <®_motor_vdd>; + min-microvolt = <3300000>; + max-microvolt = <3300000>; + }; + + 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>; + }; + }; + + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&motor_en_default>; + }; +}; + +&blsp_i2c2 { + /* lis2hh12 accelerometer instead of BMC150 */ + status = "disabled"; + + /delete-node/ accelerometer@10; + /delete-node/ magnetometer@12; +}; + +&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..4c1becdb9428 --- /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>; + }; + }; +}; + +®_motor_vdd { + gpio = <&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 Sat Jul 23 19:00:27 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: 593182 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 730D8CCA48C for ; Sat, 23 Jul 2022 19:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238615AbiGWTAe (ORCPT ); Sat, 23 Jul 2022 15:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235190AbiGWTAe (ORCPT ); Sat, 23 Jul 2022 15:00:34 -0400 Received: from mail-40141.protonmail.ch (mail-40141.protonmail.ch [185.70.40.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E401815805; Sat, 23 Jul 2022 12:00:31 -0700 (PDT) Date: Sat, 23 Jul 2022 19:00:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658602829; x=1658862029; bh=Sj0ZR0HohsjOPmgButsXa1atxWK2a6J45yAwavd2ntA=; 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=kmWp7YUYsZ/y627bGA37yXGSqDgPyhfDkggDRN4h36WXAGKxjJVVV87Tq5OBd5DHk R3opUTLtk6uWZOGR+vtX8P+xjkXv6ly1W7UFbNzcAeY2JTZXeiI+R3p1It9JR6xUnS RbxepFNGFDA8bLO/xnD8QdO1GbA3Fz7sSkgG4Sn0AiBrYG3Zfh8dXq+mXeX3ax83uV Kz6jzbjpPdErVXdGa+vlcfUBo/AkRzdhZiImO4yumFqHt9AKpdYue6bJVIpgjRvYyn btI1s5P3aV7b36QPvaPLBAIofuCVnS+qTFSdhJO8uhPrLDkMzkkzycBVtB0Sz2B9rr +5JWlc9tBLOIA== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Olof Johansson , Stephen Boyd , Stephan Gerhold , Nikita Travkin , soc@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v6 3/5] ARM: dts: qcom-msm8916-samsung-e2015: Include dts from arm64 Message-ID: <20220723185913.203747-1-linmengbo0689@protonmail.com> In-Reply-To: <20220723185424.203340-1-linmengbo0689@protonmail.com> References: <20220723185424.203340-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 arm64: dts: qcom: msm8916-samsung-e2015: Add regulator haptic --- 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 +++ .../boot/dts/qcom-msm8916-samsung-grandmax.dts | 3 +++ .../dts/qcom/msm8916-samsung-e2015-common.dtsi | 18 +++--------------- .../boot/dts/qcom/msm8916-samsung-grandmax.dts | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) 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" 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 9caa8a161d31..3677fd81b6c1 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -3,13 +3,6 @@ #include "msm8916-samsung-a2015-common.dtsi" / { - haptic { - compatible = "regulator-haptic"; - haptic-supply = <®_motor_vdd>; - min-microvolt = <3300000>; - max-microvolt = <3300000>; - }; - i2c-muic { /* SM5504 MUIC instead of SM5502 */ /delete-node/ extcon@25; @@ -26,14 +19,9 @@ muic: extcon@14 { }; }; - reg_motor_vdd: regulator-motor-vdd { - compatible = "regulator-fixed"; - regulator-name = "motor_vdd"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - - gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>; - enable-active-high; + vibrator: vibrator { + compatible = "gpio-vibrator"; + enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&motor_en_default>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts index 4c1becdb9428..74c07a970317 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -37,8 +37,8 @@ keyled { }; }; -®_motor_vdd { - gpio = <&msmgpio 72 GPIO_ACTIVE_HIGH>; +&vibrator { + enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; }; &msmgpio { From patchwork Sat Jul 23 19:00: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: 592870 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 D860FC433EF for ; Sat, 23 Jul 2022 19:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230005AbiGWTBF (ORCPT ); Sat, 23 Jul 2022 15:01:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238891AbiGWTA6 (ORCPT ); Sat, 23 Jul 2022 15:00:58 -0400 Received: from mail-4325.protonmail.ch (mail-4325.protonmail.ch [185.70.43.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 273D019287; Sat, 23 Jul 2022 12:00:53 -0700 (PDT) Date: Sat, 23 Jul 2022 19:00:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658602851; x=1658862051; bh=mfjREIH6eIyAt2qN+nS56MGp6DqRaaVCCioAstVF3bw=; 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=vGeNcS5ofTGG4xB1kIGIkugi+4IOiDzTw7Tc2Qa+I9BzscTYGKx73uO4+EFstNe2J /UCdYOGb8twCJaCLZ2WxrnhyA0IpyAKsmgXini4X91k+O17cI+UiXNBV6ZbGyw/T3N WI2OwkJmRA9JJ1mQ6X14KAhoQSM4vHgrtqkD6FsNTu8VAIYXbilRzRzIky0PfqstNZ ahuoc86l7hM7iH5zLGiAkNpXs5TE4gAwkYubLS4iVs9OYFTwYKTPj9tgzPQcK6CIQR bmdmrmXCHhMthMzKL3BNltYVQRETqaDK45utKeOTbQcj8NRdzWu2SYV7D4HwXF30zC loGYiEeslFsVQ== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Olof Johansson , Stephen Boyd , Stephan Gerhold , Nikita Travkin , soc@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v6 4/5] arm64: dts: qcom: msm8916-samsung-e2015: Add touchkey Message-ID: <20220723185927.203801-1-linmengbo0689@protonmail.com> In-Reply-To: <20220723185424.203340-1-linmengbo0689@protonmail.com> References: <20220723185424.203340-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 3677fd81b6c1..3b56892a05d2 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -26,6 +26,19 @@ vibrator: vibrator { pinctrl-names = "default"; pinctrl-0 = <&motor_en_default>; }; + + 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>; + }; }; &blsp_i2c2 { @@ -36,6 +49,11 @@ &blsp_i2c2 { /delete-node/ magnetometer@12; }; +&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..cbb012d02a35 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -41,6 +41,10 @@ &vibrator { enable-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; }; +®_touch_key { + status = "disabled"; +}; + &msmgpio { gpio_leds_default: gpio-led-default { pins = "gpio60"; From patchwork Sat Jul 23 19:00:34 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: 593181 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 0CCB7C433EF for ; Sat, 23 Jul 2022 19:01:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238725AbiGWTBB (ORCPT ); Sat, 23 Jul 2022 15:01:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238834AbiGWTA4 (ORCPT ); Sat, 23 Jul 2022 15:00:56 -0400 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 398FE1EC72; Sat, 23 Jul 2022 12:00:49 -0700 (PDT) Date: Sat, 23 Jul 2022 19:00:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658602847; x=1658862047; bh=JRcaGadoJSWUp388kLH0FateOfociPuBOP6jmYHh0XE=; 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=W8BdREuwzS+rEQk3iyvXiDEEL483CCukH1gB0B/Tc7HZ/xEd2hxauBcLoP8sz0msi +U1+TNrUE3r8d/txGABoMcpP3+/aQciNFnTJI/xGmjvTa/44YVTM1bPdXTVLHRe6q+ UBEWuvJk+FJbFbd7v9ATUEFlIvEL06LdP4H3MJi/ZHSZNGUEzb4BC4yHNwLpkcqwV7 J2+EYWQWZkAKdadUNj8pjLz0E1KDQ8D6VGNUdZJJ4NeZVi4WK3I8Z3j7D34j1uj/Ch chCZQzA6m2umkiZn1seEZ8ei2NvDhWHacas6/AZ5HI9QRm7vetgoA+zp506R0vDz7i ZSLSg/wBIH21A== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Olof Johansson , Stephen Boyd , Stephan Gerhold , Nikita Travkin , soc@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: "Lin, Meng-Bo" Subject: [PATCH v6 5/5] arm64: dts: qcom: msm8916-samsung-a2015: Rename touchscreen analog regulator Message-ID: <20220723185939.203859-1-linmengbo0689@protonmail.com> In-Reply-To: <20220723185424.203340-1-linmengbo0689@protonmail.com> References: <20220723185424.203340-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org reg_vdd_tsp: regulator-vdd-tsp is actually used as an analog regulator for touchscreen on all of a2015 and e2015 devices. Rename it into reg_vdd_tsp_a: regulator-vdd-tsp-a to reduce confusion. Signed-off-by: Lin, Meng-Bo --- arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts | 4 ++-- arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) -- 2.30.2 diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 9b4b7de7cec2..2ac7ee3dd7c2 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -61,9 +61,9 @@ hall-sensor { }; }; - reg_vdd_tsp: regulator-vdd-tsp { + reg_vdd_tsp_a: regulator-vdd-tsp-a { compatible = "regulator-fixed"; - regulator-name = "vdd_tsp"; + regulator-name = "vdd_tsp_a"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts index 4ba11b020f9b..d86d20f28d23 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts @@ -73,8 +73,8 @@ touchscreen@20 { touchscreen-size-x = <540>; touchscreen-size-y = <960>; - vdd-supply = <®_vdd_tsp>; - vddo-supply = <&pm8916_l6>; + vcca-supply = <®_vdd_tsp_a>; + vdd-supply = <&pm8916_l6>; pinctrl-names = "default"; pinctrl-0 = <&ts_int_default>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts index d978c9ac179d..76b6e8550121 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts @@ -42,7 +42,7 @@ touchscreen@48 { touchscreen-size-x = <720>; touchscreen-size-y = <1280>; - avdd-supply = <®_vdd_tsp>; + avdd-supply = <®_vdd_tsp_a>; vdd-supply = <&pm8916_l6>; pinctrl-names = "default";