Skip to contentSkip to conversation

mmc: Add OMAP SDHCI driver

PATCH Superseded Kishon Vijay Abraham I 3 participants 14 messages Aug 31, 2017 – Sep 4, 2017

Subsystems (7)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover mmc: Add OMAP SDHCI driver

This is the first step in deprecating omap_hsmmc driver completely and moving to sdhci-omap driver which uses the sdhci library.

This patch that adds a new SDHCI quirk "MMC_RSP_136" has already been merged and hence removed it in this revision.

Apart from the quirk, sdhci-omap has it's own callbacks
to set_clock (clock divider programming is different from generic sdhci) , set_power, set_bus_width, set_bus_mode and platform_send_init_74_clocks. These callback functions are implemented based on omap_hsmmc driver. Since sdhci-omap driver requires pbias regulator fixes to be present, I've sent them as part of this series.

The sdhci-omap driver supports only the high speed mode and UHS/HS200 mode will be added in a later series.

It has been tested only in boards having DRA7 SoCs like dra7-evm, dra72-evm, am571x-idk, am572x-idk, am57xx-evm. (Tested only eMMC and SD. SDIO support will be added later). The plan is to fully convert DRA7 SoC to use SDHCI driver and then convert other legacy platforms to use SDHCI.

The first 3 patches have also been verified not to cause any regression.

Next Steps:
*) Add UHS support to sdhci-omap
*) Add SDIO support
*) Add support for older TI platforms

Changes from v2:
*) Rebased on git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next *) Included a couple of patches from Ravikumar to fix pbias-regulator driver
to support max-voltage of 3.3V. This is required for sdhci-omap driver.
*) Create sdhci-omap as a new driver with MMC generic bindings and hence doesn't
have bindings like ti,dual-volt added for omap-hsmmc. (Instead of ti,dual-volt, sdhci-omap driver uses the supported regulator voltage to set controller IO voltage capabilities).
When omap-hsmmc driver is deprecated, support for these properties will be added to sdhci-omap.
*) Fixed minor comments from Adrian).

Changes from v1:
*) Remove the quirks and instead use sdhci_omap specific callbacks for
set_power, set_busmode etc.
*) Add a patch from Adrian to tidy reading 136-bit responses

I've also pushed the entire series along with dependent dt patches @
https://github.com/kishon/linux-wip.git ulf_next (in case someone wants to test)

Kishon Vijay Abraham I (4):
mmc: host: omap_hsmmc: Remove setting PBIAS voltage
dt-bindings: sdhci-omap: Add bindings for the sdhci-omap controller
mmc: sdhci-omap: Add OMAP SDHCI driver
MAINTAINERS: Add TI OMAP SDHCI Maintainer

Ravikumar Kattekola (2):
regulator: pbias: Select voltage table based on max-voltage
ARM: dts: dra7: Increase max-voltage of pbias regulator

 .../devicetree/bindings/mmc/sdhci-omap.txt         |  16 +
 MAINTAINERS                                        |   6 +
 arch/arm/boot/dts/dra7.dtsi                        |   2 +-
 drivers/mmc/host/Kconfig                           |  12 +
 drivers/mmc/host/Makefile                          |   1 +
 drivers/mmc/host/omap_hsmmc.c                      |  33 +-
 drivers/mmc/host/sdhci-omap.c                      | 604 +++++++++++++++++++++
 drivers/regulator/pbias-regulator.c                |  21 +-
 8 files changed, 666 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-omap.txt
 create mode 100644 drivers/mmc/host/sdhci-omap.c
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/6 mmc: host: omap_hsmmc: Remove setting PBIAS voltage

PBIAS voltage should be set along with setting vqmmc voltage and these voltages should be set as part of start_signal_voltage_switch callback. However since omap_hsmmc is about to be deprecated, remove setting of PBIAS voltage leaving the PBIAS voltage to be at the reset value of 3.3V (we'll never have to change this to 1.8V since UHS mode support will not be added to omap_hsmmc). This will let pbias regulator driver to be fixed to support a maximum voltage of 3.3V.

---
 drivers/mmc/host/omap_hsmmc.c | 33 ++++++++-------------------------
 1 file changed, 8 insertions(+), 25 deletions(-)
drivers/mmc/host/omap_hsmmc.c +8 -25
index 3b5e6d11069b..f2a1137be8bc 100644
@@ -147,10 +147,6 @@
 #define OMAP_MMC_MAX_CLOCK	52000000
 #define DRIVER_NAME		"omap_hsmmc"
 
-#define VDD_1V8			1800000		/* 180000 uV */
-#define VDD_3V0			3000000		/* 300000 uV */
-#define VDD_165_195		(ffs(MMC_VDD_165_195) - 1)
-
 /*
  * One controller can have multiple slots, like on some omap boards using
  * omap.c controller driver. Luckily this is not currently done on any known
@@ -308,8 +304,7 @@ static int omap_hsmmc_disable_supply(struct mmc_host *mmc)
 	return ret;
 }
 
-static int omap_hsmmc_set_pbias(struct omap_hsmmc_host *host, bool power_on,
-				int vdd)
+static int omap_hsmmc_set_pbias(struct omap_hsmmc_host *host, bool power_on)
 {
 	int ret;
 
@@ -317,17 +312,6 @@ static int omap_hsmmc_set_pbias(struct omap_hsmmc_host *host, bool power_on,
 		return 0;
 
 	if (power_on) {
-		if (vdd <= VDD_165_195)
-			ret = regulator_set_voltage(host->pbias, VDD_1V8,
-						    VDD_1V8);
-		else
-			ret = regulator_set_voltage(host->pbias, VDD_3V0,
-						    VDD_3V0);
-		if (ret < 0) {
-			dev_err(host->dev, "pbias set voltage fail\n");
-			return ret;
-		}
-
 		if (host->pbias_enabled == 0) {
 			ret = regulator_enable(host->pbias);
 			if (ret) {
@@ -350,8 +334,7 @@ static int omap_hsmmc_set_pbias(struct omap_hsmmc_host *host, bool power_on,
 	return 0;
 }
 
-static int omap_hsmmc_set_power(struct omap_hsmmc_host *host, int power_on,
-				int vdd)
+static int omap_hsmmc_set_power(struct omap_hsmmc_host *host, int power_on)
 {
 	struct mmc_host *mmc = host->mmc;
 	int ret = 0;
@@ -363,7 +346,7 @@ static int omap_hsmmc_set_power(struct omap_hsmmc_host *host, int power_on,
 	if (IS_ERR(mmc->supply.vmmc))
 		return 0;
 
-	ret = omap_hsmmc_set_pbias(host, false, 0);
+	ret = omap_hsmmc_set_pbias(host, false);
 	if (ret)
 		return ret;
 
@@ -385,7 +368,7 @@ static int omap_hsmmc_set_power(struct omap_hsmmc_host *host, int power_on,
 		if (ret)
 			return ret;
 
-		ret = omap_hsmmc_set_pbias(host, true, vdd);
+		ret = omap_hsmmc_set_pbias(host, true);
 		if (ret)
 			goto err_set_voltage;
 	} else {
@@ -1220,11 +1203,11 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd)
 		clk_disable_unprepare(host->dbclk);
 
 	/* Turn the power off */
-	ret = omap_hsmmc_set_power(host, 0, 0);
+	ret = omap_hsmmc_set_power(host, 0);
 
 	/* Turn the power ON with given VDD 1.8 or 3.0v */
 	if (!ret)
-		ret = omap_hsmmc_set_power(host, 1, vdd);
+		ret = omap_hsmmc_set_power(host, 1);
 	if (host->dbclk)
 		clk_prepare_enable(host->dbclk);
 
@@ -1621,10 +1604,10 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	if (ios->power_mode != host->power_mode) {
 		switch (ios->power_mode) {
 		case MMC_POWER_OFF:
-			omap_hsmmc_set_power(host, 0, 0);
+			omap_hsmmc_set_power(host, 0);
 			break;
 		case MMC_POWER_UP:
-			omap_hsmmc_set_power(host, 1, ios->vdd);
+			omap_hsmmc_set_power(host, 1);
 			break;
 		case MMC_POWER_ON:
 			do_send_init_stream = 1;
Signature · 1 line
2.11.0
#2 lore raw

PATCH v2 2/6 regulator: pbias: Select voltage table based on max-voltage

In reply to Kishon Vijay Abraham I

From: Ravikumar Kattekola <[email protected]>

Reference manuals of OMAP5x and DRA7x have been updated to reflect the PBIAS regulator max-voltage as 3.3V instead of 3.0V, while OMAP3x and OMAP4x are still quoting 3.0V. So, as of now, the pbias driver needs to support both 3.0V and 3.3V IO voltage based on the max-voltage supported by the PBIAS regulator.

Document reference:
SWPU249AF - OMAP543x Technical reference manual - August 2016 SPRUI30C ? DRA75x, DRA74x Technical reference manual November 2016

Tested on:
DRA75x PG 2.0 REV H EVM

---
 drivers/regulator/pbias-regulator.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
drivers/regulator/pbias-regulator.c +18 -3
index 0cb76ba29e84..8f782d22fdbe 100644
@@ -34,6 +34,8 @@ struct pbias_reg_info {
 	u32 vmode;
 	unsigned int enable_time;
 	char *name;
+	const unsigned int *pbias_volt_table;
+	int n_voltages;
 };
 
 struct pbias_regulator_data {
@@ -49,11 +51,16 @@ struct pbias_of_data {
 	unsigned int offset;
 };
 
-static const unsigned int pbias_volt_table[] = {
+static const unsigned int pbias_volt_table_3_0V[] = {
 	1800000,
 	3000000
 };
 
+static const unsigned int pbias_volt_table_3_3V[] = {
+	1800000,
+	3300000
+};
+
 static const struct regulator_ops pbias_regulator_voltage_ops = {
 	.list_voltage = regulator_list_voltage_table,
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
@@ -69,6 +76,8 @@ static const struct pbias_reg_info pbias_mmc_omap2430 = {
 	.vmode = BIT(0),
 	.disable_val = 0,
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_0V,
+	.n_voltages = 2,
 	.name = "pbias_mmc_omap2430"
 };
 
@@ -77,6 +86,8 @@ static const struct pbias_reg_info pbias_sim_omap3 = {
 	.enable_mask = BIT(9),
 	.vmode = BIT(8),
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_0V,
+	.n_voltages = 2,
 	.name = "pbias_sim_omap3"
 };
 
@@ -86,6 +97,8 @@ static const struct pbias_reg_info pbias_mmc_omap4 = {
 	.disable_val = BIT(25),
 	.vmode = BIT(21),
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_0V,
+	.n_voltages = 2,
 	.name = "pbias_mmc_omap4"
 };
 
@@ -95,6 +108,8 @@ static const struct pbias_reg_info pbias_mmc_omap5 = {
 	.disable_val = BIT(25),
 	.vmode = BIT(21),
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_3V,
+	.n_voltages = 2,
 	.name = "pbias_mmc_omap5"
 };
 
@@ -199,8 +214,8 @@ static int pbias_regulator_probe(struct platform_device *pdev)
 		drvdata[data_idx].desc.owner = THIS_MODULE;
 		drvdata[data_idx].desc.type = REGULATOR_VOLTAGE;
 		drvdata[data_idx].desc.ops = &pbias_regulator_voltage_ops;
-		drvdata[data_idx].desc.volt_table = pbias_volt_table;
-		drvdata[data_idx].desc.n_voltages = 2;
+		drvdata[data_idx].desc.volt_table = info->pbias_volt_table;
+		drvdata[data_idx].desc.n_voltages = info->n_voltages;
 		drvdata[data_idx].desc.enable_time = info->enable_time;
 		drvdata[data_idx].desc.vsel_reg = offset;
 		drvdata[data_idx].desc.vsel_mask = info->vmode;
Signature · 1 line
2.11.0
maintainer
#3 lore raw

Applied "regulator: pbias: Select voltage table based on max-voltage" to the regulator tree

The patch

regulator: pbias: Select voltage table based on max-voltage

has been applied to the regulator tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 27eae9d4b9d4cd9c204ef81f46078d91362ed41c Mon Sep 17 00:00:00 2001

From: Ravikumar Kattekola <[email protected]>
Date: Thu, 31 Aug 2017 15:48:45 +0530
Subject: [PATCH] regulator: pbias: Select voltage table based on max-voltage
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reference manuals of OMAP5x and DRA7x have been updated to reflect the PBIAS regulator max-voltage as 3.3V instead of 3.0V, while OMAP3x and OMAP4x are still quoting 3.0V. So, as of now, the pbias driver needs to support both 3.0V and 3.3V IO voltage based on the max-voltage supported by the PBIAS regulator.

Document reference:
SWPU249AF - OMAP543x Technical reference manual - August 2016 SPRUI30C ??? DRA75x, DRA74x Technical reference manual November 2016

Tested on:
DRA75x PG 2.0 REV H EVM

---
 drivers/regulator/pbias-regulator.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
drivers/regulator/pbias-regulator.c +18 -3
index 0cb76ba29e84..8f782d22fdbe 100644
@@ -34,6 +34,8 @@ struct pbias_reg_info {
 	u32 vmode;
 	unsigned int enable_time;
 	char *name;
+	const unsigned int *pbias_volt_table;
+	int n_voltages;
 };
 
 struct pbias_regulator_data {
@@ -49,11 +51,16 @@ struct pbias_of_data {
 	unsigned int offset;
 };
 
-static const unsigned int pbias_volt_table[] = {
+static const unsigned int pbias_volt_table_3_0V[] = {
 	1800000,
 	3000000
 };
 
+static const unsigned int pbias_volt_table_3_3V[] = {
+	1800000,
+	3300000
+};
+
 static const struct regulator_ops pbias_regulator_voltage_ops = {
 	.list_voltage = regulator_list_voltage_table,
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
@@ -69,6 +76,8 @@ static const struct pbias_reg_info pbias_mmc_omap2430 = {
 	.vmode = BIT(0),
 	.disable_val = 0,
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_0V,
+	.n_voltages = 2,
 	.name = "pbias_mmc_omap2430"
 };
 
@@ -77,6 +86,8 @@ static const struct pbias_reg_info pbias_sim_omap3 = {
 	.enable_mask = BIT(9),
 	.vmode = BIT(8),
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_0V,
+	.n_voltages = 2,
 	.name = "pbias_sim_omap3"
 };
 
@@ -86,6 +97,8 @@ static const struct pbias_reg_info pbias_mmc_omap4 = {
 	.disable_val = BIT(25),
 	.vmode = BIT(21),
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_0V,
+	.n_voltages = 2,
 	.name = "pbias_mmc_omap4"
 };
 
@@ -95,6 +108,8 @@ static const struct pbias_reg_info pbias_mmc_omap5 = {
 	.disable_val = BIT(25),
 	.vmode = BIT(21),
 	.enable_time = 100,
+	.pbias_volt_table = pbias_volt_table_3_3V,
+	.n_voltages = 2,
 	.name = "pbias_mmc_omap5"
 };
 
@@ -199,8 +214,8 @@ static int pbias_regulator_probe(struct platform_device *pdev)
 		drvdata[data_idx].desc.owner = THIS_MODULE;
 		drvdata[data_idx].desc.type = REGULATOR_VOLTAGE;
 		drvdata[data_idx].desc.ops = &pbias_regulator_voltage_ops;
-		drvdata[data_idx].desc.volt_table = pbias_volt_table;
-		drvdata[data_idx].desc.n_voltages = 2;
+		drvdata[data_idx].desc.volt_table = info->pbias_volt_table;
+		drvdata[data_idx].desc.n_voltages = info->n_voltages;
 		drvdata[data_idx].desc.enable_time = info->enable_time;
 		drvdata[data_idx].desc.vsel_reg = offset;
 		drvdata[data_idx].desc.vsel_mask = info->vmode;
Signature · 1 line
2.14.1
#4 lore raw

Re: Applied "regulator: pbias: Select voltage table based on max-voltage" to the regulator tree

Hi Mark,

Quoted 17 lines · Mark Brown

The patch

regulator: pbias: Select voltage table based on max-voltage

has been applied to the regulator tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

Quoted 6 lines

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

This patch should be merged along with the 1st patch of the series "mmc: host:
omap_hsmmc: Remove setting PBIAS voltage". Or else it'll break MMC with omap_hsmmc driver.

Thanks
Kishon

maintainer
#5 lore raw

Re: Applied "regulator: pbias: Select voltage table based on max-voltage" to the regulator tree

Quoted 3 lines · Kishon Vijay Abraham I

This patch should be merged along with the 1st patch of the series "mmc: host:
omap_hsmmc: Remove setting PBIAS voltage". Or else it'll break MMC with omap_hsmmc driver.

I can sign a tag if it's needed for a cross tree merge.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170831/64436f03/attachment.sig>

#6 lore raw

Re: Applied "regulator: pbias: Select voltage table based on max-voltage" to the regulator tree

Quoted 7 lines · Mark Brown
Quoted 3 lines · Kishon Vijay Abraham I

This patch should be merged along with the 1st patch of the series "mmc: host:
omap_hsmmc: Remove setting PBIAS voltage". Or else it'll break MMC with omap_hsmmc driver.

I can sign a tag if it's needed for a cross tree merge.

Easier if you could drop it and instead just provide an ack.

Unless you believes there may conflict in your regulator tree?

Kind regards
Uffe

maintainer
#7 lore raw

Re: Applied "regulator: pbias: Select voltage table based on max-voltage" to the regulator tree

Quoted 6 lines · Ulf Hansson
Quoted 5 lines · Mark Brown
Quoted 3 lines · Kishon Vijay Abraham I

This patch should be merged along with the 1st patch of the series "mmc: host:
omap_hsmmc: Remove setting PBIAS voltage". Or else it'll break MMC with omap_hsmmc driver.

Hang on, how can this break anything? If it breaks things shouldn't there be bugfixes for incorrect constraints somewhere?

Quoted 5 lines
Quoted 1 line

I can sign a tag if it's needed for a cross tree merge.

Easier if you could drop it and instead just provide an ack.

Unless you believes there may conflict in your regulator tree?

My main goal is to get it in during this merge window, this way either it goes in via my tree and the rest of the series can go in the next release or the whole thing makes this merge window.

The following changes since commit 5771a8c08880cdca3bfb4a3fc6d309d6bba20877:

Linux v4.13-rc1 (2017-07-15 15:22:10 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git tags/regulator-pbias-variants

for you to fetch changes up to 27eae9d4b9d4cd9c204ef81f46078d91362ed41c:

regulator: pbias: Select voltage table based on max-voltage (2017-08-31 11:55:40 +0100)

----------------------------------------------------------------
regulator: Add support for different OMAP variants in the pbias regulator

----------------------------------------------------------------
Ravikumar Kattekola (1):
regulator: pbias: Select voltage table based on max-voltage

 drivers/regulator/pbias-regulator.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170901/e81509a3/attachment.sig>

#8 lore raw

Re: Applied "regulator: pbias: Select voltage table based on max-voltage" to the regulator tree

Hi Mark,

Quoted 10 lines · Mark Brown
Quoted 6 lines · Ulf Hansson
Quoted 5 lines · Mark Brown
Quoted 3 lines · Kishon Vijay Abraham I

This patch should be merged along with the 1st patch of the series "mmc: host:
omap_hsmmc: Remove setting PBIAS voltage". Or else it'll break MMC with omap_hsmmc driver.

Hang on, how can this break anything? If it breaks things shouldn't there be bugfixes for incorrect constraints somewhere?

omap_hsmmc sets the pbias voltage to 3V. But here we program the volt table to support either 1.8V or 3.3V (Initially the volt table was programmed to support 3V because of a bug in TRM). So set_voltage of pbias voltage in omap_hsmmc will fail.

Thanks
Kishon

maintainer
#9 lore raw

Re: Applied "regulator: pbias: Select voltage table based on max-voltage" to the regulator tree

Quoted 9 lines · Kishon Vijay Abraham I
Quoted 2 lines · Mark Brown

Hang on, how can this break anything? If it breaks things shouldn't there be bugfixes for incorrect constraints somewhere?

omap_hsmmc sets the pbias voltage to 3V. But here we program the volt table to support either 1.8V or 3.3V (Initially the volt table was programmed to support 3V because of a bug in TRM). So set_voltage of pbias voltage in omap_hsmmc will fail.

Oh, that's appauling. I guess this is some voltage that doesn't get
presented to cards because otherwise I'm surprised nobody noticed.
Anyway I've dropped the commit from my pull request for now, it'll not
go for v4.14, but the pull request is still there.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170904/c97db2b6/attachment.sig>

#10 lore raw

PATCH v2 3/6 ARM: dts: dra7: Increase max-voltage of pbias regulator

In reply to Kishon Vijay Abraham I

From: Ravikumar Kattekola <[email protected]>

As per recent TRM, PBIAS cell on dra7 devices supports 3.3V and not 3.0V as documented earlier.

Update PBIAS regulator max voltage to match this.

Document reference:
SPRUI30C ? DRA75x, DRA74x Technical reference manual- November 2016

Tested on:
DRA75x PG 2.0 REV H EVM

---
 arch/arm/boot/dts/dra7.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/dra7.dtsi +1 -1
index 0f0f6f58bd18..fc14e48b482e 100644
@@ -170,7 +170,7 @@
 						pbias_mmc_reg: pbias_mmc_omap5 {
 							regulator-name = "pbias_mmc_omap5";
 							regulator-min-microvolt = <1800000>;
-							regulator-max-microvolt = <3000000>;
+							regulator-max-microvolt = <3300000>;
 						};
 					};
 
Signature · 1 line
2.11.0
#11 lore raw

PATCH v2 4/6 dt-bindings: sdhci-omap: Add bindings for the sdhci-omap controller

In reply to Kishon Vijay Abraham I

Add binding for the TI's sdhci-omap controller.

---
 Documentation/devicetree/bindings/mmc/sdhci-omap.txt | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-omap.txt
Documentation/devicetree/bindings/mmc/sdhci-omap.txt new file +16 -0
new file mode 100644
index 000000000000..66b5517d79d7
@@ -0,0 +1,16 @@
+* TI OMAP SDHCI Controller
+
+Refer to mmc.txt for standard MMC bindings.
+
+Required properties:
+- compatible: Should be "ti,dra7-sdhci" for DRA7 and DRA72 controllers
+- ti,hwmods: Must be "mmc<n>", <n> is controller instance starting 1
+
+Example:
+	mmc1: mmc at 0x4809c000 {
+		compatible = "ti,dra7-sdhci";
+		reg = <0x4809c000 0x400>;
+		ti,hwmods = "mmc1";
+		bus-width = <4>;
+		vmmc-supply = <&vmmc>; /* phandle to regulator node */
+	};
Signature · 1 line
2.11.0
#12 lore raw

PATCH v2 5/6 mmc: sdhci-omap: Add OMAP SDHCI driver

In reply to Kishon Vijay Abraham I

Create a new sdhci-omap driver to configure the eMMC/SD/SDIO controller in TI's OMAP SoCs making use of the SDHCI core library. For OMAP specific configurations, populate sdhci_ops with OMAP specific callbacks and use SDHCI quirks.
Enable only high speed mode for both SD and eMMC here and add other UHS mode support later.

---
 drivers/mmc/host/Kconfig      |  12 +
 drivers/mmc/host/Makefile     |   1 +
 drivers/mmc/host/sdhci-omap.c | 604 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 617 insertions(+)
 create mode 100644 drivers/mmc/host/sdhci-omap.c
drivers/mmc/host/Kconfig +12 -0
index 02179ed2a40d..03178c42efbb 100644
@@ -899,3 +899,15 @@ config MMC_SDHCI_XENON
 	  This selects Marvell Xenon eMMC/SD/SDIO SDHCI.
 	  If you have a controller with this interface, say Y or M here.
 	  If unsure, say N.
+
+config MMC_SDHCI_OMAP
+	tristate "TI SDHCI Controller Support"
+	depends on MMC_SDHCI_PLTFM && OF
+	help
+	  This selects the Secure Digital Host Controller Interface (SDHCI)
+	  support present in TI's DRA7 SOCs. The controller supports
+	  SD/MMC/SDIO devices.
+
+	  If you have a controller with this interface, say Y or M here.
+
+	  If unsure, say N.
drivers/mmc/host/Makefile +1 -0
index 303f5cd46cd9..2b5a8133948d 100644
@@ -89,6 +89,7 @@ obj-$(CONFIG_MMC_SDHCI_MSM)		+= sdhci-msm.o
 obj-$(CONFIG_MMC_SDHCI_ST)		+= sdhci-st.o
 obj-$(CONFIG_MMC_SDHCI_MICROCHIP_PIC32)	+= sdhci-pic32.o
 obj-$(CONFIG_MMC_SDHCI_BRCMSTB)		+= sdhci-brcmstb.o
+obj-$(CONFIG_MMC_SDHCI_OMAP)		+= sdhci-omap.o
 
 ifeq ($(CONFIG_CB710_DEBUG),y)
 	CFLAGS-cb710-mmc	+= -DDEBUG
drivers/mmc/host/sdhci-omap.c new file +604 -0

604 lines not on this page · raw message

Signature · 1 line
2.11.0
#13 lore raw

PATCH v2 6/6 MAINTAINERS: Add TI OMAP SDHCI Maintainer

In reply to Kishon Vijay Abraham I

Add Maintainer for the TI OMAP SDHCI driver.

---
 MAINTAINERS | 6 ++++++
 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
index 1c3feffb1c1c..e52af3b87404 100644
@@ -11776,6 +11776,12 @@ L:	linux-mmc at vger.kernel.org
 S:	Maintained
 F:	drivers/mmc/host/sdhci-spear.c
 
+SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) TI OMAP DRIVER
+M:	Kishon Vijay Abraham I <[email protected]>
+L:	linux-mmc at vger.kernel.org
+S:	Maintained
+F:	drivers/mmc/host/sdhci-omap.c
+
 SECURE ENCRYPTING DEVICE (SED) OPAL DRIVER
 M:	Scott Bauer <[email protected]>
 M:	Jonathan Derrick <[email protected]>
Signature · 1 line
2.11.0