devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Iskren Chernev <iskren.chernev@gmail.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	Iskren Chernev <iskren.chernev@gmail.com>,
	Andy Gross <agross@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 07/14] arm64: dts: qcom: sm6115: Add sdhci nodes and related pinctrl
Date: Thu,  1 Sep 2022 10:24:06 +0300	[thread overview]
Message-ID: <20220901072414.1923075-8-iskren.chernev@gmail.com> (raw)
In-Reply-To: <20220901072414.1923075-1-iskren.chernev@gmail.com>

Add support for the two sdhci's present on the SM6115 and the related
pinctrl.

Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 171 +++++++++++++++++++++++++++
 1 file changed, 171 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index 00fd185c87aa..cde963c56ac9 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -399,6 +399,110 @@ tlmm: pinctrl@500000 {
 			gpio-ranges = <&tlmm 0 0 121>;
 			#gpio-cells = <2>;
 			interrupt-controller;
+
+			sdc1_state_on: sdc1-on {
+				clk {
+					pins = "sdc1_clk";
+					bias-disable;
+					drive-strength = <16>;
+				};
+
+				cmd {
+					pins = "sdc1_cmd";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
+
+				data {
+					pins = "sdc1_data";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
+
+				rclk {
+					pins = "sdc1_rclk";
+					bias-pull-down;
+				};
+			};
+
+			sdc1_state_off: sdc1-off {
+				clk {
+					pins = "sdc1_clk";
+					bias-disable;
+					drive-strength = <2>;
+				};
+
+				cmd {
+					pins = "sdc1_cmd";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				data {
+					pins = "sdc1_data";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				rclk {
+					pins = "sdc1_rclk";
+					bias-pull-down;
+				};
+			};
+
+			sdc2_state_on: sdc2-on {
+				clk {
+					pins = "sdc2_clk";
+					bias-disable;
+					drive-strength = <16>;
+				};
+
+				cmd {
+					pins = "sdc2_cmd";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
+
+				data {
+					pins = "sdc2_data";
+					bias-pull-up;
+					drive-strength = <10>;
+				};
+
+				sd-cd {
+					pins = "gpio88";
+					function = "gpio";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+			};
+
+			sdc2_state_off: sdc2-off {
+				clk {
+					pins = "sdc2_clk";
+					bias-disable;
+					drive-strength = <2>;
+				};
+
+				cmd {
+					pins = "sdc2_cmd";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				data {
+					pins = "sdc2_data";
+					bias-pull-up;
+					drive-strength = <2>;
+				};
+
+				sd-cd {
+					pins = "gpio88";
+					function = "gpio";
+					bias-disable;
+					drive-strength = <2>;
+				};
+			};
 		};
 
 		gcc: clock-controller@1400000 {
@@ -449,6 +553,73 @@ rpm_msg_ram: memory@45f0000 {
 			reg = <0x45f0000 0x7000>;
 		};
 
+		sdhc_1: sdhci@4744000 {
+			compatible = "qcom,sm6115-sdhci", "qcom,sdhci-msm-v5";
+			reg = <0x4744000 0x1000>, <0x4745000 0x1000>, <0x4748000 0x8000>;
+			reg-names = "hc", "cqhci", "ice";
+
+			interrupts = <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hc_irq", "pwr_irq";
+
+			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
+				 <&gcc GCC_SDCC1_APPS_CLK>,
+				 <&xo_board>,
+				 <&gcc GCC_SDCC1_ICE_CORE_CLK>;
+			clock-names = "iface", "core", "xo", "ice_core_clk";
+
+			pinctrl-0 = <&sdc1_state_on>;
+			pinctrl-1 = <&sdc1_state_off>;
+			pinctrl-names = "default", "sleep";
+
+			bus-width = <8>;
+			non-removable;
+			status = "disabled";
+		};
+
+		sdhc_2: sdhci@4784000 {
+			compatible = "qcom,sm6115-sdhci", "qcom,sdhci-msm-v5";
+			reg = <0x04784000 0x1000>;
+			reg-names = "hc";
+
+			interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hc_irq", "pwr_irq";
+
+			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
+				 <&gcc GCC_SDCC2_APPS_CLK>,
+				 <&xo_board>;
+			clock-names = "iface", "core", "xo";
+
+			pinctrl-0 = <&sdc2_state_on>;
+			pinctrl-1 = <&sdc2_state_off>;
+			pinctrl-names = "default", "sleep";
+
+			power-domains = <&rpmpd SM6115_VDDCX>;
+			operating-points-v2 = <&sdhc2_opp_table>;
+			iommus = <&apps_smmu 0x00a0 0x0>;
+			resets = <&gcc GCC_SDCC2_BCR>;
+
+			bus-width = <4>;
+			qcom,dll-config = <0x0007642c>;
+			qcom,ddr-config = <0x80040868>;
+			status = "disabled";
+
+			sdhc2_opp_table: sdhc2-opp-table {
+				compatible = "operating-points-v2";
+
+				opp-100000000 {
+					opp-hz = /bits/ 64 <100000000>;
+					required-opps = <&rpmpd_opp_low_svs>;
+				};
+
+				opp-202000000 {
+					opp-hz = /bits/ 64 <202000000>;
+					required-opps = <&rpmpd_opp_nom>;
+				};
+			};
+		};
+
 		usb3: usb@4ef8800 {
 			compatible = "qcom,sm6115-dwc3", "qcom,dwc3";
 			reg = <0x04ef8800 0x400>;
-- 
2.37.2


  parent reply	other threads:[~2022-09-01  7:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01  7:23 [PATCH 00/14] Add support for sm6115,4250 and OnePlus Nord N100 Iskren Chernev
2022-09-01  7:24 ` [PATCH 01/14] arm64: dts: qcom: sm6115: Add basic soc dtsi Iskren Chernev
2022-09-01 16:03   ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 02/14] arm64: dts: qcom: sm6115: Add rpmcc and rpmpd nodes Iskren Chernev
2022-09-01  7:24 ` [PATCH 03/14] arm64: dts: qcom: sm6115: Add GCC node Iskren Chernev
2022-09-01 16:05   ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 04/14] arm64: dts: qcom: sm6115: Add pinctrl node Iskren Chernev
2022-09-01  7:24 ` [PATCH 05/14] arm64: dts: qcom: sm6115: Add apps smmu node Iskren Chernev
2022-09-01 16:05   ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 06/14] arm64: dts: qcom: sm6115: Add usb and related phy nodes Iskren Chernev
2022-09-01 16:06   ` Krzysztof Kozlowski
2022-09-01  7:24 ` Iskren Chernev [this message]
2022-09-01 16:08   ` [PATCH 07/14] arm64: dts: qcom: sm6115: Add sdhci nodes and related pinctrl Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 08/14] dt-bindings: ufs: qcom: Add sm6115 binding Iskren Chernev
2022-09-01 16:11   ` Krzysztof Kozlowski
2022-09-03 16:54     ` Iskren Chernev
2022-09-04 19:10       ` Krzysztof Kozlowski
2022-09-05  7:29         ` Iskren Chernev
2022-09-05 10:03           ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 09/14] arm64: dts: qcom: sm6115: Add UFS nodes Iskren Chernev
2022-09-01 16:13   ` Krzysztof Kozlowski
2022-09-03 17:04     ` Iskren Chernev
2022-09-05 10:02       ` Krzysztof Kozlowski
2022-09-05 10:45         ` Iskren Chernev
2022-09-05 10:54           ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 10/14] arm64: dts: qcom: sm6115: Add SPMI bus node Iskren Chernev
2022-09-01 16:14   ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 11/14] dt-bindings: arm: cpus: Add kryo240 compatible Iskren Chernev
2022-09-01 15:29   ` Vinod Koul
2022-09-01 16:14   ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 12/14] arm64: dts: qcom: sm4250: Add soc dtsi Iskren Chernev
2022-09-01  7:24 ` [PATCH 13/14] dt-bindings: arm: qcom: Add compatible for oneplus,billie2 phone Iskren Chernev
2022-09-01 16:17   ` Krzysztof Kozlowski
2022-09-01  7:24 ` [PATCH 14/14] arm64: dts: qcom: sm4250: Add support for oneplus-billie2 Iskren Chernev
2022-09-01 16:20   ` Krzysztof Kozlowski
2022-09-03 12:32     ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220901072414.1923075-8-iskren.chernev@gmail.com \
    --to=iskren.chernev@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).