From patchwork Wed Sep 28 11:06:18 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: 610665 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 526EDC32771 for ; Wed, 28 Sep 2022 11:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232333AbiI1LI6 (ORCPT ); Wed, 28 Sep 2022 07:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233686AbiI1LIR (ORCPT ); Wed, 28 Sep 2022 07:08:17 -0400 Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5F6140BCF; Wed, 28 Sep 2022 04:06:32 -0700 (PDT) Date: Wed, 28 Sep 2022 11:06:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664363188; x=1664622388; bh=C3iqLHXQoOQP4qiEtNxd0qDkh96OEIhJ+aK6ly1xU10=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=JgoJkm4fvgZ6P5KjNBvI2DyrZjn9Yjdr/8IEFEpxxPsCzl84hPakQ5Qbw8a/ijqPy FYYGZz01drOzhAtAzEIFsLbJauVWkiG9mrB1cTUFRapv5QEcVRM76Cgx6ImKuriQnm QgrqcgnbY60K02uNIPaaQ+BcFNMsO3q5HjEufoJFixljp+L3aMQl3s8yn9OmlBCh/r hO0KjRknTT5yXMO+3YfI9fomPxW8cC+mAHmFIuYkYh4JjmFzQiAznPCrYUb/CbjG9m dJ5f/UuMOXb6gv8YoURzzm1sjVB8pKXGmNzNuS5f0I6eljvmp75BWDGxyuj68p1KrX y803LxmHPCaSA== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Subject: [PATCH 1/3] dt-bindings: qcom: Document bindings for new msm8916-samsung-j5 devices Message-ID: <20220928110502.96262-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928110049.96047-1-linmengbo0689@protonmail.com> References: <20220928110049.96047-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 --- 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: 610207 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 11:06:30 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: 611871 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 EB352C6FA92 for ; Wed, 28 Sep 2022 11:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbiI1LI7 (ORCPT ); Wed, 28 Sep 2022 07:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234133AbiI1LIU (ORCPT ); Wed, 28 Sep 2022 07:08:20 -0400 Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA3DE4DAF; Wed, 28 Sep 2022 04:06:42 -0700 (PDT) Date: Wed, 28 Sep 2022 11:06:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1664363199; x=1664622399; bh=/92kCfS+GRH3XqMQ3bWJNxBIL7UNiMfLCQcS7CPJ5ng=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=ug4dh8P+fEjbf1yUvdjS9tWhjxFKVKrS76WgGRIokdqHsA4kiDrsjOwP4DpuiLqUq EBb9Kfb9ysKvOj1vOxj7bIvhhbdqzW46kqZBfgVIL2Ap27AZAg8QC+MCumSOvWQy0q Us3+filJfEDHXn0yCayQsZfCH/sAODM4ZZEx7+qT5KdhR+NKyEsySpvx3eB9T9C5pn tRdzD0HobwsegevS1f3KNNLfGHWJ6ns2LhArNphNwCaK/A4yFzESG7y6toHEbAtKNt nDWYIuwfsLcVpNoVaiDEtapcdGSVUGDxY17Y2D5/E7JxsPQAEtH03jpV4Lj6knOCJO g9VERuMpr9rrQ== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Subject: [PATCH 3/3] arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Message-ID: <20220928110529.96373-1-linmengbo0689@protonmail.com> In-Reply-To: <20220928110049.96047-1-linmengbo0689@protonmail.com> References: <20220928110049.96047-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 24e77c61ca9b..6d4e53295c30 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 ea2e165c2aa4..2c498d3b2c83 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 { + pins = "gpio52"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default { pins = "gpio107", "gpio109"; function = "gpio"; 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: 610206 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";