From patchwork Fri Jan 6 14:30:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 13091412 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 72582C3DA7A for ; Fri, 6 Jan 2023 14:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232636AbjAFObY (ORCPT ); Fri, 6 Jan 2023 09:31:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232742AbjAFOa7 (ORCPT ); Fri, 6 Jan 2023 09:30:59 -0500 Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 602777F45A; Fri, 6 Jan 2023 06:30:54 -0800 (PST) Date: Fri, 06 Jan 2023 14:30:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673015453; x=1673274653; bh=P1pUlDEf54XnvQPNPHucDSEiGkzXeOdNr6dL3gGyvxg=; 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:BIMI-Selector; b=nm+sWHkC9GpyBy8eAYyMuKCg4KDF17VMg3GD1rj5IhvwpWyD83U0IDbZOVRljpp63 alepKSj18hdGaiZMPBM2MY7b6Bu4/av1Vzy8nP65MrfSaXjf0RswYcGq6Q35HOndd/ bCgvTj/LOiQV+gJg9dMYaVSzIu8/bMwWdrAkjjryPE63tF6C3mSoFqIEGBo4eYuDen FqqYbFDsluwfy4dGWYcJyV3IK/P2GH0Sgni6JyNFYg00iHohGHvWUsRZW3uix6WTd/ AftqDyc46HBR0fHyFTFaMECZ5uI2kq9MhD7dRrL+WmgpcIz1La1CWDgit4N6yd5qnn bD+b+TSAOr7TA== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Stephan Gerhold , Nikita Travkin , Julian Ribbeck , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski Subject: [PATCH v6 1/5] dt-bindings: qcom: Document bindings for msm8916-samsung-j5x Message-ID: <20230106142956.547081-1-linmengbo0689@protonmail.com> In-Reply-To: <20230106142748.546975-1-linmengbo0689@protonmail.com> References: <20230106142748.546975-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-j5x device tree bindings used in its device tree. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 27063a045bd0..23a38bd9c7cf 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -204,6 +204,7 @@ properties: - samsung,e7 - samsung,grandmax - samsung,j5 + - samsung,j5x - samsung,serranove - wingtech,wt88047 - const: qcom,msm8916 From patchwork Fri Jan 6 14:31:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 13091415 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 6593CC54EF0 for ; Fri, 6 Jan 2023 14:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234002AbjAFOcA (ORCPT ); Fri, 6 Jan 2023 09:32:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234134AbjAFOb3 (ORCPT ); Fri, 6 Jan 2023 09:31:29 -0500 Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7119680AC3; Fri, 6 Jan 2023 06:31:20 -0800 (PST) Date: Fri, 06 Jan 2023 14:31:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673015478; x=1673274678; bh=zwgxDtrvvsnKx3WwIiMDTQ8qwPQosXJZ2V7U0l4c1eg=; 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:BIMI-Selector; b=kR4wRpqtPRneXInVTW1WRLYAwKN3zaJ8PjaTKTTL6DUL4lToK8fHTZ7oUHqMobIfw aO2D6qvOGUiz1YMm7MNWdXP7MrsaNWx8cLC9cWWocG20JpKAfqUhCo+bh8ChUtl32l hkiwW2JszoAATrIth6JSTeDzl8dPBYVwQTV+VspeZzHq/FavrKVwqC9oTXAYYwmaGc HIqeawU051Z+Ib5EnRWf+WEwWKJPBTIz9rk/cLbauksrhwnplOeVEg26n6kQ0T9Y2K RSkNf4fos+IcrX270MZciNChFrj6rVwo5rCqVuW1aoPU3i172UX0R/lnTAlK8lltf4 jI7tQj9kBxYpA== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Stephan Gerhold , Nikita Travkin , Julian Ribbeck , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski Subject: [PATCH v6 2/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add initial common device tree Message-ID: <20230106143010.547140-1-linmengbo0689@protonmail.com> In-Reply-To: <20230106142748.546975-1-linmengbo0689@protonmail.com> References: <20230106142748.546975-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*) Move msm8916-samsung-j5.dts to msm8916-samsung-j5-common.dtsi, and 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 two devices (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. This patch rewrites J5 2015 devices, later patches will add support for other models. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski --- ...-j5.dts => msm8916-samsung-j5-common.dtsi} | 7 - .../boot/dts/qcom/msm8916-samsung-j5.dts | 224 ++---------------- 2 files changed, 15 insertions(+), 216 deletions(-) copy arch/arm64/boot/dts/qcom/{msm8916-samsung-j5.dts => msm8916-samsung-j5-common.dtsi} (95%) rewrite arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts (93%) +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts @@ -?,? +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-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi similarity index 95% copy from arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts copy to arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index 7ac49a021563..502b38d4a61e 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,9 @@ // 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 +86,6 @@ &usb { &usb_hs_phy { extcon = <&pm8916_usbin>; - qcom,init-seq = /bits/ 8 <0x1 0x19 0x2 0x0b>; }; &smd_rpm_regulators { diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts dissimilarity index 93% index 7ac49a021563..0a32d33e9778 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts From patchwork Fri Jan 6 14:31:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 13091413 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 F3BFEC4708D for ; Fri, 6 Jan 2023 14:32:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229703AbjAFOb5 (ORCPT ); Fri, 6 Jan 2023 09:31:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234993AbjAFObg (ORCPT ); Fri, 6 Jan 2023 09:31:36 -0500 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B9D48099B for ; Fri, 6 Jan 2023 06:31:30 -0800 (PST) Date: Fri, 06 Jan 2023 14:31:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673015488; x=1673274688; bh=DtWV4ywnzbPv/3t4iWW53UDI2kgtD4vFbsJ8JLoPO6A=; 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:BIMI-Selector; b=gv+ZO6GhXJCsor3tezbhHErNjyeymOKbXpLlxmUyAYTOfuNsHsevUAvRFeq9FMv0w AZjj1v7aeeRbtwAuQx/eCs4OQOy/dKUw8hjUuK94Ro/FssjtW6ZtlDNUv8xYh2GZ30 4ds6z8HlaaHCuiCyqR9dL7m6ZovCIRPz0rbm95FzQLLgaH7lSqTj5Z2Rc9QIzkljNf 9Pxj9PbGQVbF4G67DsNHAA3H1RFRSO8LNM1huiFNq7jD1nzUsZ3TWwRbnrZkebUWuK PtA258/LwBycSF6QXZSCxBzKsbT9vznzofuGvgPz8j3JpwVixX6AiCvcj/oVjOuag+ ckiCi2x894Vew== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Stephan Gerhold , Nikita Travkin , Julian Ribbeck , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski Subject: [PATCH v6 3/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add new device trees Message-ID: <20230106143024.547194-1-linmengbo0689@protonmail.com> In-Reply-To: <20230106142748.546975-1-linmengbo0689@protonmail.com> References: <20230106142748.546975-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 moving msm8916-samsung-j5.dts to msm8916-samsung-j5-common.dtsi, Add new J5 2016 device tree. [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] Signed-off-by: Lin, Meng-Bo Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts | 11 +++++++++++ 2 files changed, 12 insertions(+) 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 3f1d79388df7..a25973a8218d 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -39,6 +39,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt58.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-heatqlte.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5x.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-on7.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt86518.dtb 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 Fri Jan 6 14:31:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 13091414 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 36C97C54EBF for ; Fri, 6 Jan 2023 14:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233398AbjAFOb6 (ORCPT ); Fri, 6 Jan 2023 09:31:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235058AbjAFObh (ORCPT ); Fri, 6 Jan 2023 09:31:37 -0500 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C75D4809A1 for ; Fri, 6 Jan 2023 06:31:32 -0800 (PST) Date: Fri, 06 Jan 2023 14:31:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673015491; x=1673274691; bh=Jtx9DakIpfF+Lwd5xBjPwVFe6Af//ReFvJ0WW/ILW0E=; 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:BIMI-Selector; b=vO7cCe8GRW47dZWSjBKgSZqyrZU8WIt3CoWzj1wJv4oO1I4bQvSUDPujKG+zp+d3p SdZCRs1ayj/w0j+I/G5HkzJ1H2Fp8Pdamws6YbgxJNeO6SRs7X5UQnAYMsVYTTVQvx 3j3RDTkrlaAeTNCERjfxC0fJ/U91VTs9yNLDXHwRnhB+ZT+W1jalYl46P3PijlM0n7 ZHZ4/lIX+9PnfHG7dUpXD3ivH/CzIPndVIFMINJubyKoG5+Afw+8E4Fw/VP16MvlpR fadwf5aaQlA3UArYagHIvCgXZEJKaiLCZUuyMNi3p7L5iiKMLmSJyWP1zwCqBVdADN Bd90qUEIgxzGg== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Stephan Gerhold , Nikita Travkin , Julian Ribbeck , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski Subject: [PATCH v6 4/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Message-ID: <20230106143037.547248-1-linmengbo0689@protonmail.com> In-Reply-To: <20230106142748.546975-1-linmengbo0689@protonmail.com> References: <20230106142748.546975-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 Reviewed-by: Krzysztof Kozlowski --- .../dts/qcom/msm8916-samsung-j5-common.dtsi | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) 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 502b38d4a61e..5755b360c6ed 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -2,6 +2,7 @@ #include "msm8916-pm8916.dtsi" #include +#include / { aliases { @@ -20,6 +21,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"; @@ -192,6 +210,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"; From patchwork Fri Jan 6 14:31:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 13091416 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 B8172C4708D for ; Fri, 6 Jan 2023 14:33:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233616AbjAFOca (ORCPT ); Fri, 6 Jan 2023 09:32:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235231AbjAFOcK (ORCPT ); Fri, 6 Jan 2023 09:32:10 -0500 Received: from mail-40130.protonmail.ch (mail-40130.protonmail.ch [185.70.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6601F7F46F; Fri, 6 Jan 2023 06:32:05 -0800 (PST) Date: Fri, 06 Jan 2023 14:31:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1673015523; x=1673274723; bh=ocUQAxaviL0qvTTTeOczw/hurbzdqCtMbAPWkB864dI=; 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:BIMI-Selector; b=kkgN17pr031wlpop0EiBxWQhDhpsetS1Q2dRztdmaT/SwioQXIglGBv8UkLZlT7MI kESv6LvlUBVVhZp4cuWkSeK0eHfkEyNX7L8v0trZo5+/3S68Mg2569NMPR9fTBx1cG 5iW4RKkugVZ7qQVnGEKkO+7hPHpBoC2ttGSjo7pSYeCOQmDu0ek9DuLYvmt6E5/BqI cxBnqsFjQP6KI0hvw/isqmresyqID9Q0LbNlWLs+7Q7vn7EGV0cYn9FXye3yrivRck ezUmr6euM4z71ugLqN16+NLv0G2R/dDr2NOyecy8igLpeCI9r+fbagJDMt8FEe0K7u 3BmArqp3Rkb7g== To: devicetree@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Stephan Gerhold , Nikita Travkin , Julian Ribbeck , Josef W Menad , Markuss Broks , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH v6 5/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add MUIC support Message-ID: <20230106143051.547302-1-linmengbo0689@protonmail.com> In-Reply-To: <20230106142748.546975-1-linmengbo0689@protonmail.com> References: <20230106142748.546975-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 From: Markuss Broks The MUIC installed is a part of SM5703 MFD, and it seems to work the same as the SM5502 MUIC unit. Signed-off-by: Markuss Broks [Apply for msm8916-samsung-j5x] Signed-off-by: Lin, Meng-Bo --- .../dts/qcom/msm8916-samsung-j5-common.dtsi | 50 ++++++++++++++++--- .../boot/dts/qcom/msm8916-samsung-j5x.dts | 8 +++ 2 files changed, 50 insertions(+), 8 deletions(-) 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 5755b360c6ed..f3b81b6f0a2f 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 +#include / { aliases { @@ -58,6 +59,29 @@ button-home { linux,code = ; }; }; + + i2c_muic: i2c-muic { + compatible = "i2c-gpio"; + sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&msmgpio 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + + pinctrl-names = "default"; + pinctrl-0 = <&muic_i2c_default>; + + #address-cells = <1>; + #size-cells = <0>; + + muic: extcon@25 { + compatible = "siliconmitus,sm5703-muic"; + reg = <0x25>; + + interrupt-parent = <&msmgpio>; + interrupts = <12 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&muic_int_default>; + }; + }; }; &blsp1_uart2 { @@ -69,11 +93,6 @@ &pm8916_resin { linux,code = ; }; -/* FIXME: Replace with SM5703 MUIC when driver is available */ -&pm8916_usbin { - status = "okay"; -}; - &pronto { status = "okay"; }; @@ -97,13 +116,12 @@ &sdhc_2 { }; &usb { + extcon = <&muic>, <&muic>; status = "okay"; - dr_mode = "peripheral"; - extcon = <&pm8916_usbin>; }; &usb_hs_phy { - extcon = <&pm8916_usbin>; + extcon = <&muic>; }; &smd_rpm_regulators { @@ -225,4 +243,20 @@ gpio_keys_default: gpio-keys-default-state { drive-strength = <2>; bias-pull-up; }; + + muic_i2c_default: muic-i2c-default-state { + pins = "gpio105", "gpio106"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + muic_int_default: muic-int-default-state { + pins = "gpio12"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts index 7656ac4508cf..7e1326cc13c5 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5x.dts @@ -9,3 +9,11 @@ / { compatible = "samsung,j5x", "qcom,msm8916"; chassis-type = "handset"; }; + +&muic { + interrupts = <121 IRQ_TYPE_EDGE_FALLING>; +}; + +&muic_int_default { + pins = "gpio121"; +};