Skip to content

Tegra: MMC: Add DT support for MMC to T20 boards

Thierry Reding u-boot 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest0 of 4 patches 0 repliesNew
  2. v3 posting 2/20 of 3 patches 0 repliesSuperseded
  3. v3 posting 1/21 of 3 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v10 of 2 patches0 repliesSuperseded

Patches in v5 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [U-Boot] [PATCH v5 0/4] Tegra: MMC: Add DT support for MMC to T20 boards
Quoted 25 lines · Thierry Reding
Quoted 11 lines · Tom Warren

This patchset adds device-tree support to the Tegra MMC driver. All device config is done via properties in the DT files instead of hard-coded config options/function arguments.

I've tested this on my Seaboard and everything works fine, including card detect. For the other T20 boards, I've used the Linux kernel DTS files for the sdhci nodes where there wasn't one already, or expanded the info that was already there. Everything builds fine, but I haven't tested anything but Seaboard.

Quoted 4 lines

v2: Changes as per Stephen's & Simon's review
v3: Changes as per Stephen/Lucas/Thierry/Simon's feedback
v4: Additional changes as per Stephen/Lucas/Thierry/Simon
v5: Additional changes as per Stephen/Lucas/Andy

Hi Tom,

Joseph Lo posted some patches recently which make changes to the Linux driver to use common MMC code. This results in the third cell of the GPIO specifier to actually become meaningful. That is, boards now need to define the CD GPIO as low-active in order for card-detection to work properly.

Quoted 5 lines

I wonder if we should be integrating similar changes into this patch series. fdtdec_get_gpio() seems to already support that functionality, so I think the only changes necessary would be to change the third cell in the specifier and make tegra_mmc_getcd() return fdtdec_get_gpio() instead of !fdtdec_get_gpio().

The below patch is what I used on top of your v5 series and verified that card-detection continues to work as expected.

Thierry

board/avionic-design/dts/tegra20-tamonten.dtsi +1 -1
index 6296f77..d4c3293 100644
@@ -476,7 +476,7 @@
 	};
 
 	sdhci at c8000600 {
-		cd-gpios = <&gpio 58 0>; /* gpio PH2 */
+		cd-gpios = <&gpio 58 1>; /* gpio PH2 */
 		wp-gpios = <&gpio 59 0>; /* gpio PH3 */
 		bus-width = <4>;
 		status = "okay";
drivers/mmc/tegra_mmc.c +1 -1
index 7e8f0b8..6063d08 100644
@@ -490,7 +490,7 @@ int tegra_mmc_getcd(struct mmc *mmc)
 	debug("tegra_mmc_getcd called\n");
 
 	if (fdt_gpio_isvalid(&host->cd_gpio))
-		return !fdtdec_get_gpio(&host->cd_gpio);
+		return fdtdec_get_gpio(&host->cd_gpio);
 
 	return 1;
 }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130221/05267202/attachment.pgp>