From patchwork Wed Sep 28 12:39:39 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: 12992234 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 1A23EC32771 for ; Wed, 28 Sep 2022 12:39:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233502AbiI1Mj5 (ORCPT ); Wed, 28 Sep 2022 08:39:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbiI1Mj4 (ORCPT ); Wed, 28 Sep 2022 08:39:56 -0400 X-Greylist: delayed 1220 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 28 Sep 2022 05:39:53 PDT Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 913361A3B3; Wed, 28 Sep 2022 05:39:49 -0700 (PDT) Date: Wed, 28 Sep 2022 12:39:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664368787; x=1664627987; bh=C3iqLHXQoOQP4qiEtNxd0qDkh96OEIhJ+aK6ly1xU10=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=cZvPd9h3+gdOubV7jvlVano/5tpA3zHShXMt+SJbTYUrOPtRcXtTAjurI35Z4M0Qq Y2tnp0ATtH9L9X5VAgAOKRM6aeduVWyqW0s//EGoP44ro+m3lHE97XOYpfG67Ay89J 9AOB9qx6YONFahwBqp6SFhX79+0oJ5W8YYPa1QxnchIfi9sWaiNUTHtW29HXeU2T65 qq5lz6WVj3eLnzkOJKzsDvqoyHCLnIgZc516M74TOUj7F90qiTU85VJ3ptzMGWGyeg 7Ei2OeWSqQwEgtQotxvbs/hUZxHdRtiyhnygThqqic3YV3Fhxma7I1/hABzm2farYO PtZ2LuAX3geIw== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Stephan Gerhold , Nikita Travkin , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, "Lin, Meng-Bo" , "Lin, Andy Gross" , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v2 1/4] dt-bindings: qcom: Document bindings for new msm8916-samsung-j5 devices Message-ID: <20220928123759.104582-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928121717.102402-1-linmengbo0689@protonmail.com> References: <20220928110049.96047-1-linmengbo0689@protonmail.com> <20220928121717.102402-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,j3/j5/j5x device tree bindings used in their device trees. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index fb1d00bcc847..b1c69d4d9a9a 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -176,7 +176,9 @@ properties: - longcheer,l8910 - samsung,a3u-eur - samsung,a5u-eur + - samsung,j3 - samsung,j5 + - samsung,j5x - samsung,serranove - wingtech,wt88047 - const: qcom,msm8916 From patchwork Wed Sep 28 12:39:46 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: 12992235 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 450FBC04A95 for ; Wed, 28 Sep 2022 12:40:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233644AbiI1MkA (ORCPT ); Wed, 28 Sep 2022 08:40:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233549AbiI1Mj7 (ORCPT ); Wed, 28 Sep 2022 08:39:59 -0400 Received: from mail-40135.protonmail.ch (mail-40135.protonmail.ch [185.70.40.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28C172BE01 for ; Wed, 28 Sep 2022 05:39:57 -0700 (PDT) Date: Wed, 28 Sep 2022 12:39:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664368795; x=1664627995; bh=HMfLWuTCBimoQHszrNwwVDH2NqizvlSNDkSybhyZMak=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=km0i1e/X0rg5kc+7bfYSu44YgzN8/c5x9NJ4novA/xvvJB6XAYa1vgVOI7MNz6hXy JZeNTcEsr0j2kk0QPRfRis87F5soY0vDVGckZcNmv670OwGHNpywHwoEErdvZj2YHX YUjUCUqQnGJVsY8E1abqU6MXI8oSH9e50c+DilY6KXFsLspEqAU0ygcMyFn7k4HPjK gKoSp+AzNe9d0OB6+iZHsSooa7N+DTUtXa+yhveZpf49bHXcSom+uK3xSKrTc2SBC+ mYbumC3ZUXZNKUcQ+NRqDnYiDTrvNpwoZ4pJOwh1N4fyTr97ngXLT1DX2IA8WSxaOG jlg9vpSvCLJ4Q== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Stephan Gerhold , Nikita Travkin , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, "Lin, Meng-Bo" , "Lin, Andy Gross" , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v2 2/4] arm64: dts: qcom: msm8916-samsung-j5-common: Add initial common device tree Message-ID: <20220928123816.104641-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928121717.102402-1-linmengbo0689@protonmail.com> References: <20220928110049.96047-1-linmengbo0689@protonmail.com> <20220928121717.102402-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 The smartphones below are using the MSM8916 SoC, which are released in 2015-2016: Samsung Galaxy J5 2015 (SM-J500*) Samsung Galaxy J5 2016 (SM-J510*) Samsung Galaxy J3 2016 - SM-J3109/SM-J320Y/SM-J320YZ - SM-J320N0/SM-J320ZN - SM-J320P/SM-J320R4/SM-J320V/SM-S320VL Add a common device tree for with initial support for: - GPIO keys - SDHCI (internal and external storage) - USB Device Mode - UART (on USB connector via the SM5703 MUIC) - WCNSS (WiFi/BT) - Regulators The three devices (some varints of J3, all other variants of J5 released in 2015 and J5X released in 2016) are very similar, with some differences in display and GPIO pins. The common parts are shared in msm8916-samsung-j5-common.dtsi to reduce duplication. Signed-off-by: Lin, Meng-Bo --- ...6-samsung-j5.dts => msm8916-samsung-j5-common.dtsi} | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) rename arch/arm64/boot/dts/qcom/{msm8916-samsung-j5.dts => msm8916-samsung-j5-common.dtsi} (94%) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi similarity index 94% rename from arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts rename to arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index eabeed18cfaa..4f71609bf6f8 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -1,15 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-only -/dts-v1/; - #include "msm8916-pm8916.dtsi" + #include / { - model = "Samsung Galaxy J5 (2015)"; - compatible = "samsung,j5", "qcom,msm8916"; - chassis-type = "handset"; - aliases { serial0 = &blsp1_uart2; }; @@ -92,7 +87,6 @@ &usb { &usb_hs_phy { extcon = <&pm8916_usbin>; - qcom,init-seq = /bits/ 8 <0x1 0x19 0x2 0x0b>; }; &smd_rpm_regulators { @@ -199,7 +193,7 @@ l18 { }; &msmgpio { - gpio_keys_default: gpio-keys-default { + gpio_keys_default: gpio-keys-default-state { pins = "gpio107", "gpio109"; function = "gpio"; From patchwork Wed Sep 28 12:39:50 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: 12992236 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 812DEC32771 for ; Wed, 28 Sep 2022 12:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233398AbiI1MkP (ORCPT ); Wed, 28 Sep 2022 08:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233733AbiI1MkL (ORCPT ); Wed, 28 Sep 2022 08:40:11 -0400 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1C362ED69; Wed, 28 Sep 2022 05:40:07 -0700 (PDT) Date: Wed, 28 Sep 2022 12:39:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664368798; x=1664627998; bh=d+blWYb4ULJVGCJee2V9wdzS63cumSK3O0mGsQ29MLo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=f4e7RW/ynjs+kA73emJ9OV4+Cdxcctw4U7X7FuBkLnBKbIdMNX0OOmFHSFCQhXhmU xP4QmKJ8zTtN7FHMAUx2hYNsGSsxjORQY6HPlx0ESrQKFbjy/tXcqPAv3nvTpaxdre 3N6vAAz16i8oSZzTzGqwpUjERLKA7wBfeXASmn1aJvW5FCC2HXIKnR9o+PhzUa1ayR 58zDHHAfz6Z+IDFSrP6/0N94t27EnuVAIEClAvdF5/LjVPUQVlH752syYpA3i0qwme YO6oOu4KhKnNgkOypl+vkTKuv4titchGICvvbXgEP4Pb2j+30B1MQtBeJyyvWOWAKh KWr2wRHyqGoAQ== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Stephan Gerhold , Nikita Travkin , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, "Lin, Meng-Bo" , "Lin, Andy Gross" , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v2 3/4] arm64: dts: qcom: msm8916-samsung-j5: Use common device tree Message-ID: <20220928123839.104700-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928121717.102402-1-linmengbo0689@protonmail.com> References: <20220928110049.96047-1-linmengbo0689@protonmail.com> <20220928121717.102402-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 The smartphones below are using the MSM8916 SoC, which are released in 2015-2016: Samsung Galaxy J5 2015 (SM-J500*) Samsung Galaxy J5 2016 (SM-J510*) Samsung Galaxy J3 2016 - SM-J3109/SM-J320Y/SM-J320YZ - SM-J320N0/SM-J320ZN - SM-J320P/SM-J320R4/SM-J320V/SM-S320VL The three devices (some varints of J3, all other variants of J5 released in 2015 and J5X released in 2016) are very similar, with some differences in display and GPIO pins. The common parts are shared in msm8916-samsung-j5-common.dtsi to reduce duplication. Signed-off-by: Lin, Meng-Bo [Add j5x device tree] Co-developed-by: Josef W Menad Signed-off-by: Josef W Menad [Use &pm8916_usbin as USB extcon and add chassis-type for j5x] Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold [Use common init device tree and add j3 device tree] Signed-off-by: Lin, Meng-Bo --- arch/arm64/boot/dts/qcom/Makefile | 2 ++ .../boot/dts/qcom/msm8916-samsung-j3.dts | 21 +++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-j5.dts | 15 +++++++++++++ .../boot/dts/qcom/msm8916-samsung-j5x.dts | 11 ++++++++++ 4 files changed, 49 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 1d86a33de528..357a2529fe74 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -15,7 +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-j3.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5x.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8992-lg-bullhead-rev-10.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts new file mode 100644 index 000000000000..bf8672ebedcd --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-j5-common.dtsi" + +/ { + model = "Samsung Galaxy J3 (2016)"; + compatible = "samsung,j3", "qcom,msm8916"; + chassis-type = "handset"; + + reserved-memory { + /delete-node/ tz-apps@85500000; + + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85a00000 { + reg = <0x0 0x85800000 0x0 0x800000>; + no-map; + }; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts new file mode 100644 index 000000000000..0a32d33e9778 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-j5-common.dtsi" + +/ { + model = "Samsung Galaxy J5 (2015)"; + compatible = "samsung,j5", "qcom,msm8916"; + chassis-type = "handset"; +}; + +&usb_hs_phy { + qcom,init-seq = /bits/ 8 <0x1 0x19 0x2 0x0b>; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts new file mode 100644 index 000000000000..7656ac4508cf --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-j5-common.dtsi" + +/ { + model = "Samsung Galaxy J5 (2016)"; + compatible = "samsung,j5x", "qcom,msm8916"; + chassis-type = "handset"; +}; From patchwork Wed Sep 28 12:40:01 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: 12992237 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 6AD2BC04A95 for ; Wed, 28 Sep 2022 12:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233733AbiI1Mkw (ORCPT ); Wed, 28 Sep 2022 08:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234089AbiI1Mki (ORCPT ); Wed, 28 Sep 2022 08:40:38 -0400 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FEAE4B0D6 for ; Wed, 28 Sep 2022 05:40:24 -0700 (PDT) Date: Wed, 28 Sep 2022 12:40:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664368815; x=1664628015; bh=gUhqstaRapz/dEFPQohg3Styf6DL29cIpA3fSfsODL0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=uKBl0duHxBU6/3DfUmYyFojQeFiDvH357JUuEaqkUNCQasEkSULs5UyM3MJhF+ZU3 kERKMcAta7fX7gD1vUibykJ2OY59v8LxBynlLjtQ76x6Y2nlWNRTC2kQz4m4ryuFhg 7JS49SLypKLK182MRKiC9Wde2xj33htrUGbIEqSjbNlxWWvPSKF8ZlU9VUv/hf2Jpk zPiiGQAGibOuYze/BxGcRxRnTtu5c+glzko/2ZHEHoIBpQpowwVBkFSZQ75qQypGQ8 FaR8ffQ+8uiCBpOYoWI/B21YYEaF9w/m4ok7etQwAtcgXV7AaSrOUBRlNyUaV8ODoe 0D7cfAjKYZCBw== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Stephan Gerhold , Nikita Travkin , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, "Lin, Meng-Bo" , "Lin, Andy Gross" , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Subject: [PATCH v2 4/4] arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Message-ID: <20220928123851.104761-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928121717.102402-1-linmengbo0689@protonmail.com> References: <20220928110049.96047-1-linmengbo0689@protonmail.com> <20220928121717.102402-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 J5 2015 and 2016 have a Hall sensor on GPIO pin 52. Add GPIO Hall sensor for them. Signed-off-by: Lin, Meng-Bo --- .../boot/dts/qcom/msm8916-samsung-j3.dts | 4 +++ .../dts/qcom/msm8916-samsung-j5-common.dtsi | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts index bf8672ebedcd..7fd357b7f728 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3.dts @@ -19,3 +19,7 @@ tz-apps@85a00000 { }; }; }; + +&gpio_hall_sensor { + status = "disabled"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index 4f71609bf6f8..54190144f823 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -3,6 +3,7 @@ #include "msm8916-pm8916.dtsi" #include +#include / { aliases { @@ -21,6 +22,23 @@ tz-apps@85500000 { }; }; + gpio_hall_sensor: gpio-hall-sensor { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_hall_sensor_default>; + + label = "GPIO Hall Effect Sensor"; + + event-hall-sensor { + label = "Hall Effect Sensor"; + gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + linux,can-disable; + }; + }; + gpio-keys { compatible = "gpio-keys"; @@ -193,6 +211,14 @@ l18 { }; &msmgpio { + gpio_hall_sensor_default: gpio-hall-sensor-default-state { + pins = "gpio52"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default-state { pins = "gpio107", "gpio109"; function = "gpio";