diff mbox

[1/2] ARM: dts: tegra: fix the activate polarity of cd-gpio in mmc host

Message ID 1361343902-15223-2-git-send-email-josephl@nvidia.com
State Superseded, archived
Headers show

Commit Message

Joseph Lo Feb. 20, 2013, 7:05 a.m. UTC
The GPIO pin of SD slot card detection should active low.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
---
 arch/arm/boot/dts/tegra20-harmony.dts   | 4 ++--
 arch/arm/boot/dts/tegra20-paz00.dts     | 2 +-
 arch/arm/boot/dts/tegra20-seaboard.dts  | 2 +-
 arch/arm/boot/dts/tegra20-trimslice.dts | 2 +-
 arch/arm/boot/dts/tegra20-ventana.dts   | 2 +-
 arch/arm/boot/dts/tegra20-whistler.dts  | 1 +
 arch/arm/boot/dts/tegra30-beaver.dts    | 2 +-
 arch/arm/boot/dts/tegra30-cardhu.dtsi   | 2 +-
 8 files changed, 9 insertions(+), 8 deletions(-)

Comments

Stephen Warren Feb. 20, 2013, 4:59 p.m. UTC | #1
On 02/20/2013 12:05 AM, Joseph Lo wrote:
> The GPIO pin of SD slot card detection should active low.

Thierry, Lucas, can you please check if the same change should be made
to all the Avionic Design and Toradex boards? I assume MMC CD should be
active low on all of them. Once you've confirmed this, Joseph can respin
this first patch, and perhaps we can get it into 3.9/stable as a
bug-fix. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thierry Reding Feb. 21, 2013, 8:18 a.m. UTC | #2
On Wed, Feb 20, 2013 at 09:59:23AM -0700, Stephen Warren wrote:
> On 02/20/2013 12:05 AM, Joseph Lo wrote:
> > The GPIO pin of SD slot card detection should active low.
> 
> Thierry, Lucas, can you please check if the same change should be made
> to all the Avionic Design and Toradex boards? I assume MMC CD should be
> active low on all of them. Once you've confirmed this, Joseph can respin
> this first patch, and perhaps we can get it into 3.9/stable as a
> bug-fix. Thanks.

The card-detect GPIO is certainly low-active on Tamonten. I'm not quite
sure why things worked before, but I guess it was due to the MMC core
assuming the CD GPIO to be low-active unless otherwise specified and the
Tegra DT code didn't pass the GPIO flags to the core.

Anyway, I've verified that on Tamonten the same change doesn't break
anything, card detect still works as expected with this patch series
applied, so if Joseph could carry the Tamonten change as part of this
patch it'd be great.

Thierry
Joseph Lo Feb. 21, 2013, 8:30 a.m. UTC | #3
Hi Thierry,

Thanks for your verification.

On Thu, 2013-02-21 at 16:18 +0800, Thierry Reding wrote:
> * PGP Signed by an unknown key
> 
> On Wed, Feb 20, 2013 at 09:59:23AM -0700, Stephen Warren wrote:
> > On 02/20/2013 12:05 AM, Joseph Lo wrote:
> > > The GPIO pin of SD slot card detection should active low.
> > 
> > Thierry, Lucas, can you please check if the same change should be made
> > to all the Avionic Design and Toradex boards? I assume MMC CD should be
> > active low on all of them. Once you've confirmed this, Joseph can respin
> > this first patch, and perhaps we can get it into 3.9/stable as a
> > bug-fix. Thanks.
> 
> The card-detect GPIO is certainly low-active on Tamonten. I'm not quite
> sure why things worked before, but I guess it was due to the MMC core
> assuming the CD GPIO to be low-active unless otherwise specified and the
> Tegra DT code didn't pass the GPIO flags to the core.
> 
Yes. And the original sdhci-tegra driver didn't use the GPIO flag to
config anything. After we use mmc_of_parse, it will be taken care in the
core. So both of the cp-gpio and wp-gpio should be config right in DT.

> Anyway, I've verified that on Tamonten the same change doesn't break
> anything, card detect still works as expected with this patch series
> applied, so if Joseph could carry the Tamonten change as part of this
> patch it'd be great.

Thanks. Will do.


--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index 61d027f..1f79c0d 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -437,7 +437,7 @@ 
 
 	sdhci@c8000200 {
 		status = "okay";
-		cd-gpios = <&gpio 69 0>; /* gpio PI5 */
+		cd-gpios = <&gpio 69 1>; /* gpio PI5 */
 		wp-gpios = <&gpio 57 0>; /* gpio PH1 */
 		power-gpios = <&gpio 155 0>; /* gpio PT3 */
 		bus-width = <4>;
@@ -445,7 +445,7 @@ 
 
 	sdhci@c8000600 {
 		status = "okay";
-		cd-gpios = <&gpio 58 0>; /* gpio PH2 */
+		cd-gpios = <&gpio 58 1>; /* gpio PH2 */
 		wp-gpios = <&gpio 59 0>; /* gpio PH3 */
 		power-gpios = <&gpio 70 0>; /* gpio PI6 */
 		bus-width = <8>;
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index 54d6fce..9db36da 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -436,7 +436,7 @@ 
 
 	sdhci@c8000000 {
 		status = "okay";
-		cd-gpios = <&gpio 173 0>; /* gpio PV5 */
+		cd-gpios = <&gpio 173 1>; /* gpio PV5 */
 		wp-gpios = <&gpio 57 0>;  /* gpio PH1 */
 		power-gpios = <&gpio 169 0>; /* gpio PV1 */
 		bus-width = <4>;
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts
index 37b3a57..715a8b8 100644
--- a/arch/arm/boot/dts/tegra20-seaboard.dts
+++ b/arch/arm/boot/dts/tegra20-seaboard.dts
@@ -584,7 +584,7 @@ 
 
 	sdhci@c8000400 {
 		status = "okay";
-		cd-gpios = <&gpio 69 0>; /* gpio PI5 */
+		cd-gpios = <&gpio 69 1>; /* gpio PI5 */
 		wp-gpios = <&gpio 57 0>; /* gpio PH1 */
 		power-gpios = <&gpio 70 0>; /* gpio PI6 */
 		bus-width = <4>;
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
index 5d79e4f..98f3e44 100644
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
@@ -325,7 +325,7 @@ 
 
 	sdhci@c8000600 {
 		status = "okay";
-		cd-gpios = <&gpio 121 0>; /* gpio PP1 */
+		cd-gpios = <&gpio 121 1>; /* gpio PP1 */
 		wp-gpios = <&gpio 122 0>; /* gpio PP2 */
 		bus-width = <4>;
 	};
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts
index 425c890..4aef56f 100644
--- a/arch/arm/boot/dts/tegra20-ventana.dts
+++ b/arch/arm/boot/dts/tegra20-ventana.dts
@@ -520,7 +520,7 @@ 
 
 	sdhci@c8000400 {
 		status = "okay";
-		cd-gpios = <&gpio 69 0>; /* gpio PI5 */
+		cd-gpios = <&gpio 69 1>; /* gpio PI5 */
 		wp-gpios = <&gpio 57 0>; /* gpio PH1 */
 		power-gpios = <&gpio 70 0>; /* gpio PI6 */
 		bus-width = <4>;
diff --git a/arch/arm/boot/dts/tegra20-whistler.dts b/arch/arm/boot/dts/tegra20-whistler.dts
index ea57c0f..5762188 100644
--- a/arch/arm/boot/dts/tegra20-whistler.dts
+++ b/arch/arm/boot/dts/tegra20-whistler.dts
@@ -510,6 +510,7 @@ 
 
 	sdhci@c8000400 {
 		status = "okay";
+		cd-gpios = <&gpio 69 1>; /* gpio PI5 */
 		wp-gpios = <&gpio 173 0>; /* gpio PV5 */
 		bus-width = <8>;
 	};
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index 8ff2ff2..0a2cd24 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -257,7 +257,7 @@ 
 
 	sdhci@78000000 {
 		status = "okay";
-		cd-gpios = <&gpio 69 0>; /* gpio PI5 */
+		cd-gpios = <&gpio 69 1>; /* gpio PI5 */
 		wp-gpios = <&gpio 155 0>; /* gpio PT3 */
 		power-gpios = <&gpio 31 0>; /* gpio PD7 */
 		bus-width = <4>;
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index 1749927..3e2d210 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -311,7 +311,7 @@ 
 
 	sdhci@78000000 {
 		status = "okay";
-		cd-gpios = <&gpio 69 0>; /* gpio PI5 */
+		cd-gpios = <&gpio 69 1>; /* gpio PI5 */
 		wp-gpios = <&gpio 155 0>; /* gpio PT3 */
 		power-gpios = <&gpio 31 0>; /* gpio PD7 */
 		bus-width = <4>;