]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ARM: OMAP2+: Add pdata-quirks for MMC/SD on DRA74x EVM
authorSekhar Nori <nsekhar@ti.com>
Thu, 10 Aug 2017 16:02:37 +0000 (09:02 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 10 Aug 2017 16:02:37 +0000 (09:02 -0700)
DRA74x EVM Rev H EVM comes with revision 2.0 silicon.
However, earlier versions of EVM can come with either
revision 1.1 or revision 1.0 of silicon.

The device-tree file is written to support rev 2.0 of
silicon. pdata quirks are used to then override the
settings needed for PG 1.1 silicon.

PG 1.1 silicon has limitations w.r.t frequencies at
which MMC1/2/3 can operate as well as different IOdelay
numbers.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/pdata-quirks.c
include/linux/platform_data/hsmmc-omap.h

index 9700a8ef0f1676bafe1405bddbc25b2076df4e05..6b433fce65a5beaaab3b3cd0e1d23853ac0d26d0 100644 (file)
@@ -434,6 +434,26 @@ static void __init omap5_uevm_legacy_init(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_DRA7XX
+static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1;
+static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2;
+static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3;
+
+static void __init dra7x_evm_mmc_quirk(void)
+{
+       if (omap_rev() == DRA752_REV_ES1_1 || omap_rev() == DRA752_REV_ES1_0) {
+               dra7_hsmmc_data_mmc1.version = "rev11";
+               dra7_hsmmc_data_mmc1.max_freq = 96000000;
+
+               dra7_hsmmc_data_mmc2.version = "rev11";
+               dra7_hsmmc_data_mmc2.max_freq = 48000000;
+
+               dra7_hsmmc_data_mmc3.version = "rev11";
+               dra7_hsmmc_data_mmc3.max_freq = 48000000;
+       }
+}
+#endif
+
 static struct pcs_pdata pcs_pdata;
 
 void omap_pcs_legacy_init(int irq, void (*rearm)(void))
@@ -560,6 +580,14 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
                       &omap4_iommu_pdata),
        OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
                       &omap4_iommu_pdata),
+#endif
+#ifdef CONFIG_SOC_DRA7XX
+       OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x4809c000, "4809c000.mmc",
+                      &dra7_hsmmc_data_mmc1),
+       OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480b4000, "480b4000.mmc",
+                      &dra7_hsmmc_data_mmc2),
+       OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc",
+                      &dra7_hsmmc_data_mmc3),
 #endif
        /* Common auxdata */
        OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
@@ -589,6 +617,9 @@ static struct pdata_init pdata_quirks[] __initdata = {
 #endif
 #ifdef CONFIG_SOC_OMAP5
        { "ti,omap5-uevm", omap5_uevm_legacy_init, },
+#endif
+#ifdef CONFIG_SOC_DRA7XX
+       { "ti,dra7-evm", dra7x_evm_mmc_quirk, },
 #endif
        { /* sentinel */ },
 };
index 8e981be2e2c2ee8c0472e7824300a6178b474640..67bded22eae43c2481f1ccb191ae204feb57cbf0 100644 (file)
@@ -70,6 +70,9 @@ struct omap_hsmmc_platform_data {
 #define HSMMC_HAS_HSPE_SUPPORT (1 << 2)
        unsigned features;
 
+       /* string specifying a particular variant of hardware */
+       char *version;
+
        int gpio_cd;                    /* gpio (card detect) */
        int gpio_cod;                   /* gpio (cover detect) */
        int gpio_wp;                    /* gpio (write protect) */