From patchwork Sat Jan 20 09:57:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raymond Hackley X-Patchwork-Id: 764342 Received: from mail-4324.protonmail.ch (mail-4324.protonmail.ch [185.70.43.24]) (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 9C520CA64; Sat, 20 Jan 2024 09:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705744680; cv=none; b=uV5cdM/vneltvJZTrMKHOLK5wz6gTJagWYgO46yP4u0Vp9bpOlfJGqZ6+pQsoBD5/iKyBARUQiKV8FZeFBBaijiXV3i0GCU0lyNFV8fz2G6lpTwUnrBOpy5D7D3TEXokTsbuVFLRs/zV0k3wq1RzHJaOzNw9UbGooyFGGKDTato= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705744680; c=relaxed/simple; bh=pOaMVycWprd8m7qPwTf/dsfp7D7iXcZQxoNLXR9zW1U=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FZcXZu+aBCpH2vjthJ3FEsZPGQbt8E4IMFIgKZJjc6+wAgQjrWcdF8glraISwGGBAgxkmw2sA5+ZFoZMc1L43iGTOn+hzH+FpyQJ9oYStW9NEgSHYNZ+AOjEjk33WqGZytrCCNH/7jDd3wF/BLmJegVn7ozz4OhmhjAwrNHlI44= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=GslpJwm4; arc=none smtp.client-ip=185.70.43.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="GslpJwm4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1705744669; x=1706003869; bh=2P2J+4Ct6tO2K+f9R9vJudtj9daoD8wfAXFUKvMfyMU=; 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=GslpJwm4zU249Y5eX8drurKFeVOorah9HH+Qvmp1cFKk5KC3Xn5rfMpYzj+r37Wqu AkMyaUtgo2xQDM6cOIEQCYn46SZFLscGzaIETjWr/KQs+7Gy2ouWyIzICYueUvum8E 2NTnWwHVeHGV4IXY41oPt/oyF3GRkLxNtkn6gLFUSJyZViz7JSfwCuYaxkalsYsLUZ 1CovjRrMqLfM37L3qxuMOlibgxM5GequZDksogMsjKPmKtGQHLk3hmAZUySbThWFh5 +6he945aLwD2ikV9LHbdMRUlh3fhDOCvtNi7xcuPaCzfChlv9l+82G1onikKhkNeLi ErHKdzYzTXyfw== Date: Sat, 20 Jan 2024 09:57:38 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley 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, ~postmarketos/upstreaming@lists.sr.ht, Rob Herring Subject: [PATCH v3 1/2] dt-bindings: qcom: Document new msm8916-samsung devices Message-ID: <20240120095715.13689-2-raymondhackley@protonmail.com> In-Reply-To: <20240120095715.13689-1-raymondhackley@protonmail.com> References: <20240120095715.13689-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document the new following device tree bindings used in their device trees: - samsung,fortuna3g - samsung,gprimeltecan - samsung,grandprimelte - samsung,rossa Signed-off-by: Raymond Hackley Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/qcom.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 1a5fb889a444..337053ca700b 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -244,11 +244,15 @@ properties: - samsung,a5u-eur - samsung,e5 - samsung,e7 + - samsung,fortuna3g + - samsung,gprimeltecan - samsung,grandmax + - samsung,grandprimelte - samsung,gt510 - samsung,gt58 - samsung,j5 - samsung,j5x + - samsung,rossa - samsung,serranove - thwc,uf896 - thwc,ufi001c From patchwork Sat Jan 20 09:57:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raymond Hackley X-Patchwork-Id: 764855 Received: from mail-40138.protonmail.ch (mail-40138.protonmail.ch [185.70.40.138]) (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 1D5A253AA for ; Sat, 20 Jan 2024 09:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.138 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705744694; cv=none; b=iAtI3pI3oGntR9SJUXcWwHFsSPDK4eXrdAws0fvQ9xhHfpuN12JxzsOU1he0ZU5G8Wylah1JAzFoEkyP5TscPo0x/KiI04As93ezD2ti7kCLIYwsor1bOIQTAwTaGTxSlwYGsaBgTfxKCMP45q3tTVVEo4MY7SFkrUZ9XV/pWhw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705744694; c=relaxed/simple; bh=GW59+7w6xbQwjvEBuTxxLd8SZr8Cjfz0g7LgdokQ5b8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WAk0+QpfbsmK8klQal61hMSziHoU54BW3oWY/+6eXnfwYabYdpwjbSh+vbzcAJvJcWNyJBLmr5zxfOkacYCLbFwIIgME23ThGsdED7lMe9GBCMYBfhmLweh9lKAgW0JIa240jBiLIIsns+dACsiAcHawdDMaEQxXAJ+tJyoD9iM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=d9ScQipi; arc=none smtp.client-ip=185.70.40.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="d9ScQipi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1705744690; x=1706003890; bh=Ak7frxbBW5AjJ8kdCW41MyuvGagI9nF0nd532uJDVaM=; 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=d9ScQipi2X5rfbZoFAtCMznlgcAgGYTvh4fIvPVPMpn4nrsC4LDvLTqrQJKcEVLdn uG4DgZPssqS2joUTdljcY4OXVjnHvCj88US21xAoxlAbnZhgk26Mtzu2VNHMK5pPTD ZL0VCzziTOgNyujt4z2e1KlhUGi4miexE/XurDiazq6uuWJ5PZ0mjgdHV4az8+/1bG O9sB2oR+jfmZIYR1VnZGc2c1zpbmFv3DaoiI/BwgjahSLMmgqosmcZWRH6sy+UBacj k40KqMOeUgUPeEFe9JpIzISi4LW8MPSlOQLX95OJhEb0byLS2hSQvhwBulQ2lTOFeU QPH8nM53RAeog== Date: Sat, 20 Jan 2024 09:57:50 +0000 To: linux-kernel@vger.kernel.org From: Raymond Hackley 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, ~postmarketos/upstreaming@lists.sr.ht, Walter Broemeling , Joe Mason , Siddharth Manthan Subject: [PATCH v3 2/2] arm64: dts: qcom: msm8916-samsung-fortuna: Add initial device trees Message-ID: <20240120095715.13689-3-raymondhackley@protonmail.com> In-Reply-To: <20240120095715.13689-1-raymondhackley@protonmail.com> References: <20240120095715.13689-1-raymondhackley@protonmail.com> Feedback-ID: 49437091:user:proton Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Walter Broemeling Samsung Galaxy Core Prime and Grand Prime are phones based on MSM8916. They are similar to the other Samsung devices based on MSM8916 with only a few minor differences. This initial commit adds support for: - fortuna3g (SM-G530H) - gprimeltecan (SM-G530W) - grandprimelte (SM-G530FZ) - rossa (SM-G360G) The device trees contain initial support with: - GPIO keys - Regulator haptic - SDHCI (internal and external storage) - USB Device Mode - UART (on USB connector via the SM5502/SM5504 MUIC) - WCNSS (WiFi/BT) - Regulators - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX There are different variants of Core Prime and Grand Prime, with some differences in accelerometer, NFC and panel. Core Prime and Grand Prime are similar, with some differences in MUIC, panel and touchscreen. The common parts are shared in msm8916-samsung-fortuna-common.dtsi and msm8916-samsung-rossa-common.dtsi to reduce duplication. Signed-off-by: Walter Broemeling Signed-off-by: Stephan Gerhold [Joe: Add audio, buttons and WiFi] Signed-off-by: Joe Mason [Siddharth: Add fortuna3g] Signed-off-by: Siddharth Manthan [Raymond: Add modem, fortuna-common.dtsi, grandprimelte and rossa] Signed-off-by: Raymond Hackley --- arch/arm64/boot/dts/qcom/Makefile | 4 + .../qcom/msm8916-samsung-fortuna-common.dtsi | 170 ++++++++++++++++++ .../dts/qcom/msm8916-samsung-gprimeltecan.dts | 26 +++ .../qcom/msm8916-samsung-grandprimelte.dts | 15 ++ .../qcom/msm8916-samsung-rossa-common.dtsi | 16 ++ .../boot/dts/qcom/msm8916-samsung-rossa.dts | 15 ++ 6 files changed, 246 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 39889d5f8e12..1abd25e19a1f 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -23,6 +23,7 @@ dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp433.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp449.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp453.dtb dtb-$(CONFIG_ARCH_QCOM) += ipq9574-rdp454.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8216-samsung-fortuna3g.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-acer-a1-724.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-alcatel-idol347.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-asus-z00l.dtb @@ -35,11 +36,14 @@ 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-gprimeltecan.dtb 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-j5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5x.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-rossa.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-uf896.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-ufi001c.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi new file mode 100644 index 000000000000..f7b2586f3679 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + +#include +#include +#include + +/ { + aliases { + mmc0 = &sdhc_1; /* eMMC */ + mmc1 = &sdhc_2; /* SD card */ + serial0 = &blsp_uart2; + }; + + chosen { + stdout-path = "serial0"; + }; + + reserved-memory { + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85a00000 { + reg = <0x0 0x85a00000 0x0 0x600000>; + no-map; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpio_keys_default>; + pinctrl-names = "default"; + + label = "GPIO Buttons"; + + button-volume-up { + label = "Volume Up"; + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + button-home { + label = "Home"; + gpios = <&tlmm 109 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + haptic { + compatible = "regulator-haptic"; + haptic-supply = <®_motor_vdd>; + min-microvolt = <3300000>; + max-microvolt = <3300000>; + }; + + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&tlmm 72 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&motor_en_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_i2c1 { + status = "okay"; + + muic: extcon@25 { + compatible = "siliconmitus,sm5502-muic"; + reg = <0x25>; + interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>; + pinctrl-0 = <&muic_int_default>; + pinctrl-names = "default"; + }; +}; + +&blsp_uart2 { + status = "okay"; +}; + +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5000000>; +}; + +&pm8916_resin { + linux,code = ; + status = "okay"; +}; + +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + +&sdhc_1 { + status = "okay"; +}; + +&sdhc_2 { + pinctrl-0 = <&sdc2_default &sdc2_cd_default>; + pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; + pinctrl-names = "default", "sleep"; + + cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&sound { + model = "msm8916-1mic"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; +}; + +&usb { + extcon = <&muic>, <&muic>; + status = "okay"; +}; + +&usb_hs_phy { + extcon = <&muic>; +}; + +&wcnss { + status = "okay"; +}; + +&wcnss_iris { + compatible = "qcom,wcn3620"; +}; + +&tlmm { + gpio_keys_default: gpio-keys-default-state { + pins = "gpio107", "gpio109"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + motor_en_default: motor-en-default-state { + pins = "gpio72"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + muic_int_default: muic-int-default-state { + pins = "gpio12"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + sdc2_cd_default: sdc2-cd-default-state { + pins = "gpio38"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts new file mode 100644 index 000000000000..022f250ea21d --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gprimeltecan.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-fortuna-common.dtsi" + +/ { + model = "Samsung Galaxy Grand Prime (SM-G530W)"; + compatible = "samsung,gprimeltecan", "qcom,msm8916"; + chassis-type = "handset"; + + reserved-memory { + /* Firmware for gprimeltecan needs more space */ + /delete-node/ tz-apps@85a00000; + + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85500000 { + reg = <0x0 0x85500000 0x0 0xb00000>; + no-map; + }; + }; +}; + +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5400000>; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts new file mode 100644 index 000000000000..62b8359a5a85 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandprimelte.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-fortuna-common.dtsi" + +/ { + model = "Samsung Galaxy Grand Prime (SM-G530FZ)"; + compatible = "samsung,grandprimelte", "qcom,msm8916"; + chassis-type = "handset"; +}; + +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5400000>; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi new file mode 100644 index 000000000000..42843771ae2a --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa-common.dtsi @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "msm8916-samsung-fortuna-common.dtsi" + +/* SM5504 MUIC instead of SM5502 */ +/delete-node/ &muic; + +&blsp_i2c1 { + muic: extcon@14 { + compatible = "siliconmitus,sm5504-muic"; + reg = <0x14>; + interrupts-extended = <&tlmm 12 IRQ_TYPE_EDGE_FALLING>; + pinctrl-0 = <&muic_int_default>; + pinctrl-names = "default"; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts new file mode 100644 index 000000000000..93e795fcee97 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-rossa.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-rossa-common.dtsi" + +/ { + model = "Samsung Galaxy Core Prime LTE"; + compatible = "samsung,rossa", "qcom,msm8916"; + chassis-type = "handset"; +}; + +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5800000>; +};