Skip to content

Commit

Permalink
ARM: OMAP2+: Add pdata-quirks for MMC/SD on DRA74x EVM
Browse files Browse the repository at this point in the history
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.

Tested-by: Vishal Mahaveer <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
  • Loading branch information
nsekhar committed Jun 9, 2016
1 parent 9e2f322 commit 2c9626a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions arch/arm/mach-omap2/pdata-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <linux/platform_data/hsmmc-omap.h>
#include <linux/platform_data/pinctrl-single.h>
#include <linux/platform_data/iommu-omap.h>
#include <linux/platform_data/remoteproc-omap.h>
Expand Down Expand Up @@ -472,6 +473,24 @@ static struct iommu_platform_data dra7_dsp_mmu_edma_pdata = {
.device_enable = omap_device_enable,
.device_idle = omap_device_idle,
};

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;
Expand Down Expand Up @@ -574,6 +593,12 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
&omap4_ipu_dsp_pdata),
OF_DEV_AUXDATA("ti,dra7-dsp", 0x41000000, "41000000.dsp",
&omap4_ipu_dsp_pdata),
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
#ifdef CONFIG_SOC_AM43XX
OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata),
Expand Down Expand Up @@ -616,6 +641,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 */ },
};
Expand Down

0 comments on commit 2c9626a

Please sign in to comment.