Skip to contentSkip to conversation

Update sd card pinconf for sc7180 DT

PATCH Superseded Sujit Kautkar 2 participants 5 messages May 21, 2021

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Update sd card pinconf for sc7180 DT

This patch series contains change to move sdc pinconf from SoC specific DT file to board specific DT file. It also contain change to set sdc GPIO pin to bias-pull up

Tested sd card working on sc7180 based board

Sujit Kautkar (2):
arm64: dts: qcom: sc7180: Move sdc pinconf to board specific DT files
arm64: dts: qcom: sc7180: trogdor: SD-card GPIO pin set bias-pull up

 arch/arm64/boot/dts/qcom/sc7180-idp.dts      | 102 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 102 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7180.dtsi         | 102 -------------------
 3 files changed, 204 insertions(+), 102 deletions(-)
Signature · 1 line
2.31.1.818.g46aad6cb9e-goog
#1 lore raw

PATCH 1/2 arm64: dts: qcom: sc7180: Move sdc pinconf to board specific DT files

Move sdc1/sdc2 pinconf from SoC specific DT file to board specific DT files

---

 arch/arm64/boot/dts/qcom/sc7180-idp.dts      | 102 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 102 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7180.dtsi         | 102 -------------------
 3 files changed, 204 insertions(+), 102 deletions(-)
arch/arm64/boot/dts/qcom/sc7180-idp.dts +102 -0
index e77a7926034a7..07133e0af581a 100644
@@ -598,4 +598,106 @@ pinconf-rx {
 			bias-pull-up;
 		};
 	};
+
+	sdc1_on: sdc1-on {
+		pinconf-clk {
+			pins = "sdc1_clk";
+			bias-disable;
+			drive-strength = <16>;
+		};
+
+		pinconf-cmd {
+			pins = "sdc1_cmd";
+			bias-pull-up;
+			drive-strength = <10>;
+		};
+
+		pinconf-data {
+			pins = "sdc1_data";
+			bias-pull-up;
+			drive-strength = <10>;
+		};
+
+		pinconf-rclk {
+			pins = "sdc1_rclk";
+			bias-pull-down;
+		};
+	};
+
+	sdc1_off: sdc1-off {
+		pinconf-clk {
+			pins = "sdc1_clk";
+			bias-disable;
+			drive-strength = <2>;
+		};
+
+		pinconf-cmd {
+			pins = "sdc1_cmd";
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+
+		pinconf-data {
+			pins = "sdc1_data";
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+
+		pinconf-rclk {
+			pins = "sdc1_rclk";
+			bias-pull-down;
+		};
+	};
+
+	sdc2_on: sdc2-on {
+		pinconf-clk {
+			pins = "sdc2_clk";
+			bias-disable;
+			drive-strength = <16>;
+		};
+
+		pinconf-cmd {
+			pins = "sdc2_cmd";
+			bias-pull-up;
+			drive-strength = <10>;
+		};
+
+		pinconf-data {
+			pins = "sdc2_data";
+			bias-pull-up;
+			drive-strength = <10>;
+		};
+
+		pinconf-sd-cd {
+			pins = "gpio69";
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+	};
+
+	sdc2_off: sdc2-off {
+		pinconf-clk {
+			pins = "sdc2_clk";
+			bias-disable;
+			drive-strength = <2>;
+		};
+
+		pinconf-cmd {
+			pins = "sdc2_cmd";
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+
+		pinconf-data {
+			pins = "sdc2_data";
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+
+		pinconf-sd-cd {
+			pins = "gpio69";
+			bias-disable;
+			drive-strength = <2>;
+		};
+	};
 };
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +102 -0

106 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sc7180.dtsi +0 -102

108 lines not on this page · raw message

Signature · 1 line
2.31.1.818.g46aad6cb9e-goog
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH v1 1/2] arm64: dts: qcom: sc7180: Move sdc pinconf to board specific DT files

Hi,

Quoted 11 lines · Sujit Kautkar

Move sdc1/sdc2 pinconf from SoC specific DT file to board specific DT files

---

 arch/arm64/boot/dts/qcom/sc7180-idp.dts      | 102 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 102 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7180.dtsi         | 102 -------------------
 3 files changed, 204 insertions(+), 102 deletions(-)

Yup, this looks good to me. Basically a no-op change moving this to the two boards.

#3 lore raw

PATCH 2/2 arm64: dts: qcom: sc7180: trogdor: SD-card GPIO pin set bias-pull up

In reply to Sujit Kautkar

Trogdor board does not have external pull-up for cd-gpio. Set this pin to internal pull-up for sleep config to avoid frequent regulator toggle events.

This change is aligned with Qualcomm's DT change posted at:
https://patchwork.kernel.org/patch/11675347/

---

 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +1 -1
index d128a0ed6ad3a..330deb4967ca2 100644
@@ -1638,7 +1638,7 @@ pinconf-data {
 
 		pinconf-sd-cd {
 			pins = "gpio69";
-			bias-disable;
+			bias-pull-up;
 			drive-strength = <2>;
 		};
 	};
Signature · 1 line
2.31.1.818.g46aad6cb9e-goog
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH v1 2/2] arm64: dts: qcom: sc7180: trogdor: SD-card GPIO pin set bias-pull up

Hi,

Quoted 19 lines · Sujit Kautkar

Trogdor board does not have external pull-up for cd-gpio. Set this pin to internal pull-up for sleep config to avoid frequent regulator toggle events.

This change is aligned with Qualcomm's DT change posted at:
https://patchwork.kernel.org/patch/11675347/

---

 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +0 -0
index d128a0ed6ad3a..330deb4967ca2 100644

arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi pinconf-data { · line 1641

Quoted 5 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +1 -1
@@ -1638,7 +1638,7 @@ pinconf-data {
 
                pinconf-sd-cd {
                        pins = "gpio69";
-                       bias-disable;
+                       bias-pull-up;

This looks fine to me. Honestly, I would have done it for IDP too. It really doesn't make any sense that the pull-up would be enabled for the "on" state but disabled for the "off" state. Either you have an external pull (in which case you never need the internal one) or you don't have an external pull (in which case you always need the internal one).

In any case, this change is correct and improves things. I'll add:

If you do respin the patch to fix IDP too then you can feel free to keep my Reviewed-by tag.

-Doug