Linux-ARM-MSM Archive mirror
 help / color / mirror / Atom feed
From: Naina Mehta <quic_nainmeht@quicinc.com>
To: <ulf.hansson@linaro.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <andersson@kernel.org>,
	<konrad.dybcio@linaro.org>, <bhupesh.sharma@linaro.org>
Cc: <linux-mmc@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	Naina Mehta <quic_nainmeht@quicinc.com>
Subject: [PATCH 3/3] arm64: dts: qcom: sdx75-idp: add SDHCI for SD Card
Date: Wed, 15 May 2024 17:39:58 +0530	[thread overview]
Message-ID: <20240515120958.32032-4-quic_nainmeht@quicinc.com> (raw)
In-Reply-To: <20240515120958.32032-1-quic_nainmeht@quicinc.com>

Enable SDHCI on sdx75-idp to support SD card.
Also add the required regulators.

Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sdx75-idp.dts | 45 ++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
index f76e72fb2072..6f94278cf837 100644
--- a/arch/arm64/boot/dts/qcom/sdx75-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
@@ -41,6 +41,29 @@

 		vin-supply = <&vph_ext>;
 	};
+
+	vreg_sd_vccb: sd-vccb {
+		compatible = "regulator-gpio";
+		regulator-name = "vreg_sd_vccb";
+		regulator-min-microvolt = <1650000>;
+		regulator-max-microvolt = <3600000>;
+		enable-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
+		gpios = <&tlmm 84 GPIO_ACTIVE_HIGH>;
+		states = <1650000 0>, <3600000 1>;
+		startup-delay-us = <5000>;
+		enable-active-high;
+		regulator-boot-on;
+
+		vin-supply = <&vph_ext>;
+	};
+
+	vreg_sd_vdd: sd-vdd {
+		compatible = "regulator-fixed";
+		regulator-name = "vreg_sd_vdd";
+		regulator-min-microvolt = <2950000>;
+		regulator-max-microvolt = <2950000>;
+		vin-supply = <&vreg_sd_vccb>;
+	};
 };

 &apps_rsc {
@@ -259,8 +282,30 @@
 	status = "okay";
 };

+&sdhc {
+	cd-gpios = <&tlmm 103 GPIO_ACTIVE_LOW>;
+	vmmc-supply = <&vreg_sd_vdd>;
+	vqmmc-supply = <&vreg_sd_vccb>;
+	bus-width = <4>;
+	no-sdio;
+	no-mmc;
+
+	pinctrl-0 = <&sdc1_default &sd_cd>;
+	pinctrl-1 = <&sdc1_sleep &sd_cd>;
+	pinctrl-names = "default", "sleep";
+
+	status = "okay";
+};
+
 &tlmm {
 	gpio-reserved-ranges = <110 6>;
+
+	sd_cd: sd-cd-state {
+		pins = "gpio103";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
 };

 &uart1 {
--
2.17.1


  parent reply	other threads:[~2024-05-15 12:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 12:09 [PATCH 0/3] Add SDHCI support for SDX75 SoC Naina Mehta
2024-05-15 12:09 ` [PATCH 1/3] dt-bindings: mmc: sdhci-msm: Document the SDX75 compatible Naina Mehta
2024-05-15 14:22   ` Krzysztof Kozlowski
2024-05-15 12:09 ` [PATCH 2/3] arm64: dts: qcom: sdx75: Add SDHCI node Naina Mehta
2024-05-15 12:09 ` Naina Mehta [this message]
2024-05-15 14:23   ` [PATCH 3/3] arm64: dts: qcom: sdx75-idp: add SDHCI for SD Card Krzysztof Kozlowski
2024-05-16  5:21     ` Naina Mehta
2024-05-17  8:52       ` Krzysztof Kozlowski
2024-05-17 11:09         ` Naina Mehta

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=20240515120958.32032-4-quic_nainmeht@quicinc.com \
    --to=quic_nainmeht@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=bhupesh.sharma@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).