Skip to content

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

Stephen Warren u-boot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v22 patches 0 repliesSuperseded
  3. v12 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Tegra: fdt: Add/enhance sdhci (mmc) nodes for all T20 DT files+0 -01 reply
1/3Tegra: fdt: Add/enhance sdhci (mmc) nodes for all T20 DT files+0 -02 replies
2/3Tegra: fdt: tamonten: Add common tamonten.dtsi file from linux+0 -00 replies
3/3Tegra: MMC: Add DT support to MMC driver for all T20 boards+0 -02 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchStephen Warren
SeriesT-b
1/3
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [U-Boot] [PATCH v3 0/3] Tegra: MMC: Add DT support for MMC to T20 boards
Quoted 10 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.

With the incremental patch below applied,

On: Harmony, Seaboard(really Springbank), Ventana, Whistler, Paz00/AC100, TrimSlice.

Quoted 37 lines

commit a5be5907d77eb4ca18dd9a11dd09183148c9d1b2

Author: Stephen Warren <[email protected]>
Date:   Thu Feb 14 16:02:24 2013 -0700

Fix MMC DT rework

drivers/mmc/tegra_mmc.c +2 -4
index e8e8512..630f6bd 100644
@@ -497,7 +497,6 @@ static int do_mmc_init(int dev_index)
        struct mmc_host *host;
        char gpusage[12]; /* "SD/MMCn PWR" or "SD/MMCn CD" */
        struct mmc *mmc;
-       int card_det = 0;
 
        /* DT should have been read & host config filled in */
        host = &mmc_host[dev_index];
@@ -514,16 +513,15 @@ static int do_mmc_init(int dev_index)
        if (fdt_gpio_isvalid(&host->pwr_gpio)) {
                sprintf(gpusage, "SD/MMC%d PWR", dev_index);
                gpio_request(host->pwr_gpio.gpio, gpusage);
-               fdtdec_set_gpio(&host->pwr_gpio, 1);
+               gpio_direction_output(host->pwr_gpio.gpio, 1);
                debug(" Power GPIO name = %s\n", host->pwr_gpio.name);
        }
 
        if (fdt_gpio_isvalid(&host->cd_gpio)) {
                sprintf(gpusage, "SD/MMC%d CD", dev_index);
                gpio_request(host->cd_gpio.gpio, gpusage);
-               card_det = fdtdec_get_gpio(&host->cd_gpio);
+               gpio_direction_input(host->cd_gpio.gpio);
                debug(" CD GPIO name = %s\n", host->cd_gpio.name);
-               debug("%s: CD state = %d\n", __func__, card_det);
        }
 
        mmc = &mmc_dev[dev_index];