From patchwork Fri Aug 2 08:07:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 816386 Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3B7B15CD4D; Fri, 2 Aug 2024 08:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722586055; cv=none; b=eT8JIF0mWz/DYLZ6UCR/HSlUSn7UjvoZtDRqNwR545S3SWzyvlA3SPtAfkW7oidjGD7oc7yOU+o1beOjrAaqKKDAK315u3CuP1VgzjRuOfC3xx6aYHsP+ZCi1QfprT0vkxUCnq0iCPqDa3cNPNUcdV7trne1VpN0IfzOWa76C44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722586055; c=relaxed/simple; bh=ZmQwW/wDeR90OUcShfj1AaExlHjUr7arz/oq1GU52zU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DpsFinNxhbLCr47cICFaBiLOCb1L+EjsbzcC8dU4Ba5MbbDsuQRIPHAj0kttuMjy8WIRCb5xUEDpCRzFSHosIfoc1kk6MMEOip/ja57bfIandl/hlOn//44AE7We6OYd4eR0km0cuXx85ikTHseHkXUwdi0AsDu6C0fWiVBPnpg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=GLbaG3Pz; arc=none smtp.client-ip=185.70.43.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="GLbaG3Pz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1722586051; x=1722845251; bh=iemyoq2lYHkRLjl5ZVLhpqkXKCDblZObCfWltrVdYyk=; 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=GLbaG3Pzs7YEM1ig3c/3IJyH77Nifrs8IWrnM2i76xNEyXtQD72MNVd2ijpvP20Ev eckkc/H93v5KNXcBdU3ePBFYNOlWGF2GIf6JWZDXuK/mbu723+D6L1IkAtIRfACIn/ 1IwVe+SMuTWK8CVgX8Lylk51QPHhIX6JDigmdF0BDhY6LVTtQ9Jokpoqzjt4jlc/Ig Omo9HJHha9S0qSx6NU3LPiTnva4pPCNjFIqRJ8JFy3aMMALXq9arlIXMlN+hMwkcMe bNmhkDrXKM5PbyL+brJBy8DNFl+ZqjkTJoHOQBCkFdelycArs62tlFRUQmZNVaPAgT fE2VOd5t7rM3w== Date: Fri, 02 Aug 2024 08:07:27 +0000 To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 1/2] dt-bindings: qcom: Document samsung,j3ltetw Message-ID: <20240802080701.3643-2-linmengbo06890@proton.me> In-Reply-To: <20240802080701.3643-1-linmengbo06890@proton.me> References: <20240802080701.3643-1-linmengbo06890@proton.me> Feedback-ID: 112742687:user:proton X-Pm-Message-ID: 1862562a16d6a63aaafa332366fe9d2e56232e76 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document samsung,j3ltetw bindings used in its device tree. Signed-off-by: "Lin, Meng-Bo" --- 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 4ef456cefd6c..c0529486810f 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -235,6 +235,7 @@ properties: - samsung,grandprimelte - samsung,gt510 - samsung,gt58 + - samsung,j3ltetw - samsung,j5 - samsung,j5x - samsung,rossa From patchwork Fri Aug 2 08:07:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 816652 Received: from mail-40130.protonmail.ch (mail-40130.protonmail.ch [185.70.40.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 931471C0DF2 for ; Fri, 2 Aug 2024 08:07:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722586076; cv=none; b=eDh6+oWFnE8o/UACe7QZ3x/2iElv+Fx0N/gbhhimS6xYEXe29K7JtLwRLgBsK6WHSf9Gfxv/RypgJ58iUczQmZkh5PDNEMfV00Zy+MwGSIMJjACYw0SsUxIYQlVzBYXYN0rj6N3CQTtWvQMnS9c1bBmAnLr+KIJ0mXllC+0XxyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722586076; c=relaxed/simple; bh=41pfhpflsg7DV1+KUJw1txSwyG5YdldhU2NtRf9DNb8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WVvp4D+n9EppUviYgBifnqwLf07GHztDuYzj8iifxxnGBfhYqG4FpULBHFXM8hlV+wL7G8atoEQEDZu8pqaE369W2c2TQ0rk6+F0Vde2P5wGeUs1g+33v0E7Blk9/L7Gg/Du6U4GvbwV2R3TGchp2umDi91lR/BZ83tSa1N48SE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=Ar5Y7CgL; arc=none smtp.client-ip=185.70.40.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="Ar5Y7CgL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1722586064; x=1722845264; bh=NxfY5VIYEw47GQ6HQQDXvjOHUAitAdjIAcHz6X21/e4=; 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=Ar5Y7CgLNThf/Z8fc+5ZrLEoOV4shfMG2ScuO2Ruh9BJnvKPjzKIgSOwhIWGFGkeZ H2wiEsHE/jhCp5IinDwjC8Hgdbq7d080Psf2icb/p426DxNFE8HJ2wV4VXFgL3DyeK 2+1c6x+X+79n2oxR9Sz0PwV9cZRTptpNUTZTMnAp5kF+21CjNvBQcOlrVE7KVqJHBL u6v17fY6V77oWImJuCYuqXw4mTzUQAFe+3oiVJx+Y1tINh4u9v4nLxTD/4RqjLMhQ7 wv0+1a6hkw9wwwHIJqgVGha82q9a/WBynCqWtdGXiZRlq0SynJa8jNTici5ishRShh +xFMF8JO+yv4Q== Date: Fri, 02 Aug 2024 08:07:39 +0000 To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 2/2] arm64: dts: qcom: msm8916-samsung-j3ltetw: Add initial device tree Message-ID: <20240802080701.3643-3-linmengbo06890@proton.me> In-Reply-To: <20240802080701.3643-1-linmengbo06890@proton.me> References: <20240802080701.3643-1-linmengbo06890@proton.me> Feedback-ID: 112742687:user:proton X-Pm-Message-ID: 17725581a6c2c34a83eb2b6c798b2202465d0f00 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The dts and dtsi add support for msm8916 variant of Samsung Galaxy J3 SM-J320YZ smartphone released in 2016. Add a device tree for SM-J320YZ 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 - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX - Touchscreen There are different variants of J3, with some differences in MUIC, sensor, NFC and touch key I2C buses. The common parts are shared in msm8916-samsung-j3-common.dtsi to reduce duplication. Signed-off-by: "Lin, Meng-Bo" --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/msm8916-samsung-j3-common.dtsi | 53 +++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-j3ltetw.dts | 20 +++++++ 3 files changed, 74 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index e534442620a1..197ab325c0b9 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -48,6 +48,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandprimelte.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt58.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j3ltetw.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5x.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-rossa.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi new file mode 100644 index 000000000000..ce5c1ee450f1 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3-common.dtsi @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "msm8916-samsung-j5-common.dtsi" + +/ { + reserved-memory { + /delete-node/ tz-apps@85500000; + + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85800000 { + reg = <0x0 0x85800000 0x0 0x800000>; + no-map; + }; + }; + + reg_vdd_tsp_a: regulator-vdd-tsp-a { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp_a"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 16 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&tsp_ldo_en_default>; + pinctrl-names = "default"; + }; +}; + +&gpio_hall_sensor { + status = "disabled"; +}; + +&i2c_muic { + /* GPIO pins vary depending on model variant */ +}; + +&i2c_sensors { + /* GPIO pins vary depending on model variant */ +}; + +&touchscreen { + vdd-supply = <®_vdd_tsp_a>; +}; + +&tlmm { + tsp_ldo_en_default: tsp-ldo-en-default-state { + pins = "gpio16"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts new file mode 100644 index 000000000000..344e63588531 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j3ltetw.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-j3-common.dtsi" + +/ { + model = "Samsung Galaxy J3 (2016) (SM-J320YZ)"; + compatible = "samsung,j3ltetw", "qcom,msm8916"; + chassis-type = "handset"; +}; + +&i2c_muic { + sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; +}; + +&muic_i2c_default { + pins = "gpio0", "gpio1"; +};