Skip to contentSkip to conversation

ARM: dts: exynos: Remove double SD card detect pin inversion

RFT Krzysztof Kozlowski 2 participants 2 messages Sep 5, 2018 – Sep 6, 2018

Subsystems (2)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

The SDHCI standard, MMC host controller bindings and MMC core defines card detect pin as active low. Therefore there is no point to invert it twice.

---

Tested only on Odroid U3. Tests on other platforms would be appreciated.

---
 arch/arm/boot/dts/exynos4210-universal_c210.dts | 3 +--
 arch/arm/boot/dts/exynos4412-midas.dtsi         | 3 +--
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/dts/exynos4210-universal_c210.dts +1 -2
index 4e6ff97e1ec4..249bfbff1e20 100644
@@ -537,8 +537,7 @@
 	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
 	pinctrl-names = "default";
 	vmmc-supply = <&ldo5_reg>;
-	cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
-	cd-inverted;
+	cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
 
arch/arm/boot/dts/exynos4412-midas.dtsi +1 -2
index c0476c290977..aed2f2e2b0d1 100644
@@ -1269,8 +1269,7 @@
 
 &sdhci_2 {
 	bus-width = <4>;
-	cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
-	cd-inverted;
+	cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
 	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>;
 	pinctrl-names = "default";
 	vmmc-supply = <&ldo21_reg>;
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +1 -2
index a09e46c9dbc0..2caa3132f34e 100644
@@ -539,8 +539,7 @@
 	pinctrl-names = "default";
 	vmmc-supply = <&ldo21_reg>;
 	vqmmc-supply = <&ldo4_reg>;
-	cd-gpios = <&gpk2 2 GPIO_ACTIVE_HIGH>;
-	cd-inverted;
+	cd-gpios = <&gpk2 2 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
 
Signature · 1 line
2.14.1
#1 lore raw

Hi Krzysztof,

Quoted 9 lines · Krzysztof Kozlowski

The SDHCI standard, MMC host controller bindings and MMC core defines card detect pin as active low. Therefore there is no point to invert it twice.

---

Tested only on Odroid U3. Tests on other platforms would be appreciated.

SD card detection still works fine on UniversalC210, Trats2 and OdroidU3 with this patch.

Quoted 39 lines
---
  arch/arm/boot/dts/exynos4210-universal_c210.dts | 3 +--
  arch/arm/boot/dts/exynos4412-midas.dtsi         | 3 +--
  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 3 +--
  3 files changed, 3 insertions(+), 6 deletions(-)
arch/arm/boot/dts/exynos4210-universal_c210.dts +1 -2
index 4e6ff97e1ec4..249bfbff1e20 100644
@@ -537,8 +537,7 @@
  	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
  	pinctrl-names = "default";
  	vmmc-supply = <&ldo5_reg>;
-	cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
-	cd-inverted;
+	cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
  	status = "okay";
  };
 
arch/arm/boot/dts/exynos4412-midas.dtsi +1 -2
index c0476c290977..aed2f2e2b0d1 100644
@@ -1269,8 +1269,7 @@
 
  &sdhci_2 {
  	bus-width = <4>;
-	cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
-	cd-inverted;
+	cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
  	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>;
  	pinctrl-names = "default";
  	vmmc-supply = <&ldo21_reg>;
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a09e46c9dbc0..2caa3132f34e 100644

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 545

Quoted 9 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +1 -2
@@ -539,8 +539,7 @@
  	pinctrl-names = "default";
  	vmmc-supply = <&ldo21_reg>;
  	vqmmc-supply = <&ldo4_reg>;
-	cd-gpios = <&gpk2 2 GPIO_ACTIVE_HIGH>;
-	cd-inverted;
+	cd-gpios = <&gpk2 2 GPIO_ACTIVE_LOW>;
  	status = "okay";
  };
 

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland