Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Iskren Chernev <iskren.chernev@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	linux-arm-msm@vger.kernel.org,
	Iskren Chernev <iskren.chernev@gmail.com>
Subject: [PATCH RESEND 7/7] ARM: dts: qcom: msm8974-klte: Add support for SD card
Date: Sun, 20 Sep 2020 17:48:59 +0300	[thread overview]
Message-ID: <20200920144859.813032-8-iskren.chernev@gmail.com> (raw)
In-Reply-To: <20200920144859.813032-1-iskren.chernev@gmail.com>

The Samsung Galaxy S5 (klte), has 3 SDHCI nodes used for internal
storage, WiFi, external SD card slot. The external SD card slot is
similar to the internal storage.

Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
---
 .../boot/dts/qcom-msm8974-samsung-klte.dts    | 44 ++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
index 989447beb4319..b0899107f3ced 100644
--- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
@@ -12,6 +12,8 @@ / {
 
 	aliases {
 		serial0 = &blsp1_uart1;
+		sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
+		sdhc2 = &sdhc_2; /* SDC2 SD card slot */
 	};
 
 	chosen {
@@ -161,6 +163,9 @@ pma8084_l20: l20 {
 					pma8084_l21: l21 {
 						regulator-min-microvolt = <2950000>;
 						regulator-max-microvolt = <2950000>;
+
+						regulator-allow-set-load;
+						regulator-system-load = <200000>;
 					};
 
 					pma8084_l22: l22 {
@@ -349,6 +354,24 @@ cmd-data {
 			};
 		};
 
+		sdhc2_pin_a: sdhc2-pin-active {
+			clk-cmd-data {
+				pins = "gpio35", "gpio36", "gpio37", "gpio38",
+					"gpio39", "gpio40";
+				function = "sdc3";
+				drive-strength = <8>;
+				bias-disable;
+			};
+		};
+
+		sdhc2_cd_pin: sdhc2-cd {
+			pins = "gpio62";
+			function = "gpio";
+
+			drive-strength = <2>;
+			bias-disable;
+		};
+
 		sdhc3_pin_a: sdhc3-pin-active {
 			clk {
 				pins = "sdc2_clk";
@@ -422,7 +445,7 @@ int {
 		};
 	};
 
-	sdhci@f9824900 {
+	sdhc_1: sdhci@f9824900 {
 		status = "ok";
 
 		vmmc-supply = <&pma8084_l20>;
@@ -435,6 +458,25 @@ sdhci@f9824900 {
 		pinctrl-0 = <&sdhc1_pin_a>;
 	};
 
+	sdhc_2: sdhci@f9864900 {
+		status = "ok";
+
+		max-frequency = <100000000>;
+
+		vmmc-supply = <&pma8084_l21>;
+		vqmmc-supply = <&pma8084_l13>;
+
+		bus-width = <4>;
+
+		/* cd-gpio is intentionally disabled. If enabled, an SD card
+		 * present during boot is not initialized correctly. Without
+		 * cd-gpios the driver resorts to polling, so hotplug works.
+		 */
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhc2_pin_a /* &sdhc2_cd_pin */>;
+		// cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>;
+	};
+
 	sdhci@f98a4900 {
 		status = "okay";
 
-- 
2.28.0


      parent reply	other threads:[~2020-09-20 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20 14:48 [PATCH RESEND 0/7] ARM: dts: qcom: msm8974: klte: Enable some hardware Iskren Chernev
2020-09-20 14:48 ` [PATCH RESEND 1/7] ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes Iskren Chernev
2020-09-20 14:48 ` [PATCH RESEND 2/7] ARM: dts: qcom: msm8974-klte: Add support for touchkey Iskren Chernev
2020-09-20 14:48 ` [PATCH RESEND 3/7] ARM: dts: qcom: msm8974-klte: Add support for touchscreen Iskren Chernev
2020-09-20 14:48 ` [PATCH RESEND 4/7] ARM: dts: qcom: msm8974-klte: Add support for led Iskren Chernev
2020-09-20 14:48 ` [PATCH RESEND 5/7] ARM: dts: qcom: msm8974-klte: Add gpio expander chip Iskren Chernev
2020-09-20 14:48 ` [PATCH RESEND 6/7] ARM: dts: qcom: msm8974-klte: Add support for wifi Iskren Chernev
2020-09-20 14:48 ` Iskren Chernev [this message]

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=20200920144859.813032-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=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@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