diff mbox

[2/3] ARM: dts: socfpga: Add SD card detect

Message ID 1408031491-15609-3-git-send-email-dinguyen@opensource.altera.com (mailing list archive)
State New, archived
Headers show

Commit Message

dinguyen@opensource.altera.com Aug. 14, 2014, 3:51 p.m. UTC
From: Dinh Nguyen <dinguyen@opensource.altera.com>

Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC card detect.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
---
 arch/arm/boot/dts/socfpga_cyclone5.dtsi      | 2 +-
 arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Pavel Machek Aug. 14, 2014, 6:51 p.m. UTC | #1
On Thu 2014-08-14 10:51:30, dinguyen@opensource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> 
> Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC
> card detect.

Are there previous revisions outside Altera?

									Pavel
dinguyen@opensource.altera.com Aug. 14, 2014, 8:57 p.m. UTC | #2
On 8/14/14, 1:51 PM, Pavel Machek wrote:
> On Thu 2014-08-14 10:51:30, dinguyen@opensource.altera.com wrote:
>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>
>> Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC
>> card detect.
> 
> Are there previous revisions outside Altera?
> 

Not with SD card detect.

dinh
Pavel Machek Aug. 14, 2014, 8:59 p.m. UTC | #3
On Thu 2014-08-14 15:57:52, Dinh Nguyen wrote:
> 
> 
> On 8/14/14, 1:51 PM, Pavel Machek wrote:
> > On Thu 2014-08-14 10:51:30, dinguyen@opensource.altera.com wrote:
> >> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> >>
> >> Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC
> >> card detect.
> > 
> > Are there previous revisions outside Altera?
> > 
> 
> Not with SD card detect.

So this patch will break those revision C (and below) boards, by
adding gpio for card detect that does not exists there, no?

Confused,
									Pavel
Dinh Nguyen Aug. 14, 2014, 9:01 p.m. UTC | #4
On 8/14/14, 3:59 PM, Pavel Machek wrote:
> On Thu 2014-08-14 15:57:52, Dinh Nguyen wrote:
>>
>>
>> On 8/14/14, 1:51 PM, Pavel Machek wrote:
>>> On Thu 2014-08-14 10:51:30, dinguyen@opensource.altera.com wrote:
>>>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>>>
>>>> Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC
>>>> card detect.
>>>
>>> Are there previous revisions outside Altera?
>>>
>>
>> Not with SD card detect.
> 
> So this patch will break those revision C (and below) boards, by
> adding gpio for card detect that does not exists there, no?
> 

No, the card detect line is muxed with DAT3, so it'll work fine on
previous boards that does have card detect.
> Confused,

Tested on all board revisions.

Dinh
dinguyen@opensource.altera.com Aug. 14, 2014, 9:01 p.m. UTC | #5
On 8/14/14, 4:01 PM, Dinh Nguyen wrote:
> 
> 
> On 8/14/14, 3:59 PM, Pavel Machek wrote:
>> On Thu 2014-08-14 15:57:52, Dinh Nguyen wrote:
>>>
>>>
>>> On 8/14/14, 1:51 PM, Pavel Machek wrote:
>>>> On Thu 2014-08-14 10:51:30, dinguyen@opensource.altera.com wrote:
>>>>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>>>>
>>>>> Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC
>>>>> card detect.
>>>>
>>>> Are there previous revisions outside Altera?
>>>>
>>>
>>> Not with SD card detect.
>>
>> So this patch will break those revision C (and below) boards, by
>> adding gpio for card detect that does not exists there, no?
>>
> 
> No, the card detect line is muxed with DAT3, so it'll work fine on
> previous boards that does have card detect.

Sorry...i'll work fine on previous boards that does NOT have card detect.

>> Confused,
> 
> Tested on all board revisions.
> 
> Dinh
>
Pavel Machek Aug. 14, 2014, 9:04 p.m. UTC | #6
On Thu 2014-08-14 16:01:56, Dinh Nguyen wrote:
> 
> 
> On 8/14/14, 4:01 PM, Dinh Nguyen wrote:
> > 
> > 
> > On 8/14/14, 3:59 PM, Pavel Machek wrote:
> >> On Thu 2014-08-14 15:57:52, Dinh Nguyen wrote:
> >>>
> >>>
> >>> On 8/14/14, 1:51 PM, Pavel Machek wrote:
> >>>> On Thu 2014-08-14 10:51:30, dinguyen@opensource.altera.com wrote:
> >>>>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> >>>>>
> >>>>> Revision D of the SOCFGPA devkit has a GPIO line used for SD/MMC
> >>>>> card detect.
> >>>>
> >>>> Are there previous revisions outside Altera?
> >>>>
> >>>
> >>> Not with SD card detect.
> >>
> >> So this patch will break those revision C (and below) boards, by
> >> adding gpio for card detect that does not exists there, no?
> >>
> > 
> > No, the card detect line is muxed with DAT3, so it'll work fine on
> > previous boards that does have card detect.
> 
> Sorry...i'll work fine on previous boards that does NOT have card detect.

Thanks for clarifications and sorry for the noise.

Acked-by: Pavel Machek <pavel@denx.de>
									Pavel
diff mbox

Patch

diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dtsi b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
index 1ee03c4..33cad8b 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5.dtsi
+++ b/arch/arm/boot/dts/socfpga_cyclone5.dtsi
@@ -28,7 +28,7 @@ 
 			};
 		};
 
-		dwmmc0@ff704000 {
+		mmc0: dwmmc0@ff704000 {
 			num-slots = <1>;
 			broken-cd;
 			bus-width = <4>;
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
index 45de151..d7296a5 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
@@ -68,6 +68,10 @@ 
 	};
 };
 
+&mmc0 {
+	cd-gpios = <&gpio1 18 0>;
+};
+
 &usb1 {
 	status = "okay";
 };