All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] mmc: sdhci: pass signal voltage as an argument to ->voltage_switch()
@ 2015-09-01 19:32 ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-mmc; +Cc: ulf.hansson, linux-kernel, linux-arm-kernel, Vaibhav Hiremath

In order to do particular voltage specific configuration in
sdhci_ops->voltage_switch() callback function, we need to
pass respective voltage value as well.

So this patch series pass signal voltage to the controller
specific ->voltage_switch() callback.
Adds controller specific configuration for other voltages as well,
and add implementation for ->voltage_switch to pxav3 driver.


Note:
Currently ->voltage_switch() callback is only supported
in f_sdh30 driver. And I am not sure on the dependency of execution
sequence for that device. I could have moved ->voltage_switch() call
at one common place (above/below), but was not quite sure about it.
So, replicated/duplicated the call for other voltages.


Vaibhav Hiremath (3):
  mmc: sdhci: pass signal_voltage as an argument to voltage_switch
    callback
  mmc: sdhci: add host_ops->voltage_switch callback for all other
    voltages
  mmc: sdhci-pxav3: Add ->voltage_switch callback support

 drivers/mmc/host/sdhci-pxav3.c   | 59 ++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci.c         | 10 ++++++-
 drivers/mmc/host/sdhci.h         |  2 +-
 drivers/mmc/host/sdhci_f_sdh30.c |  3 +-
 4 files changed, 71 insertions(+), 3 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 0/3] mmc: sdhci: pass signal voltage as an argument to ->voltage_switch()
@ 2015-09-01 19:32 ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-arm-kernel

In order to do particular voltage specific configuration in
sdhci_ops->voltage_switch() callback function, we need to
pass respective voltage value as well.

So this patch series pass signal voltage to the controller
specific ->voltage_switch() callback.
Adds controller specific configuration for other voltages as well,
and add implementation for ->voltage_switch to pxav3 driver.


Note:
Currently ->voltage_switch() callback is only supported
in f_sdh30 driver. And I am not sure on the dependency of execution
sequence for that device. I could have moved ->voltage_switch() call
at one common place (above/below), but was not quite sure about it.
So, replicated/duplicated the call for other voltages.


Vaibhav Hiremath (3):
  mmc: sdhci: pass signal_voltage as an argument to voltage_switch
    callback
  mmc: sdhci: add host_ops->voltage_switch callback for all other
    voltages
  mmc: sdhci-pxav3: Add ->voltage_switch callback support

 drivers/mmc/host/sdhci-pxav3.c   | 59 ++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci.c         | 10 ++++++-
 drivers/mmc/host/sdhci.h         |  2 +-
 drivers/mmc/host/sdhci_f_sdh30.c |  3 +-
 4 files changed, 71 insertions(+), 3 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback
  2015-09-01 19:32 ` Vaibhav Hiremath
@ 2015-09-01 19:32   ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-mmc
  Cc: ulf.hansson, linux-kernel, linux-arm-kernel, Vaibhav Hiremath,
	Kevin Liu

In order to do particular voltage specific configuration in
sdhci_ops->voltage_switch() callback function, we need to
pass respective voltage value as well.
So this patch adds an extra argument for signal voltage to the
callback function.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c         | 2 +-
 drivers/mmc/host/sdhci.h         | 2 +-
 drivers/mmc/host/sdhci_f_sdh30.c | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 1dbe932..3dd295f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1782,7 +1782,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 
 		/* Some controller need to do more when switching */
 		if (host->ops->voltage_switch)
-			host->ops->voltage_switch(host);
+			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_180);
 
 		/* 1.8V regulator output should be stable within 5 ms */
 		ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 5521d29..9b0e2a8 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -537,7 +537,7 @@ struct sdhci_ops {
 	void    (*adma_workaround)(struct sdhci_host *host, u32 intmask);
 	void	(*platform_init)(struct sdhci_host *host);
 	void    (*card_event)(struct sdhci_host *host);
-	void	(*voltage_switch)(struct sdhci_host *host);
+	void	(*voltage_switch)(struct sdhci_host *host, u8 signal_voltage);
 	int	(*select_drive_strength)(struct sdhci_host *host,
 					 struct mmc_card *card,
 					 unsigned int max_dtr, int host_drv,
diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c
index 983b8b3..7ab1c20 100644
--- a/drivers/mmc/host/sdhci_f_sdh30.c
+++ b/drivers/mmc/host/sdhci_f_sdh30.c
@@ -49,7 +49,8 @@ struct f_sdhost_priv {
 	struct device *dev;
 };
 
-static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host)
+static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host,
+						u8 signal_voltage)
 {
 	struct f_sdhost_priv *priv = sdhci_priv(host);
 	u32 ctrl = 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback
@ 2015-09-01 19:32   ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-arm-kernel

In order to do particular voltage specific configuration in
sdhci_ops->voltage_switch() callback function, we need to
pass respective voltage value as well.
So this patch adds an extra argument for signal voltage to the
callback function.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c         | 2 +-
 drivers/mmc/host/sdhci.h         | 2 +-
 drivers/mmc/host/sdhci_f_sdh30.c | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 1dbe932..3dd295f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1782,7 +1782,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 
 		/* Some controller need to do more when switching */
 		if (host->ops->voltage_switch)
-			host->ops->voltage_switch(host);
+			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_180);
 
 		/* 1.8V regulator output should be stable within 5 ms */
 		ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 5521d29..9b0e2a8 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -537,7 +537,7 @@ struct sdhci_ops {
 	void    (*adma_workaround)(struct sdhci_host *host, u32 intmask);
 	void	(*platform_init)(struct sdhci_host *host);
 	void    (*card_event)(struct sdhci_host *host);
-	void	(*voltage_switch)(struct sdhci_host *host);
+	void	(*voltage_switch)(struct sdhci_host *host, u8 signal_voltage);
 	int	(*select_drive_strength)(struct sdhci_host *host,
 					 struct mmc_card *card,
 					 unsigned int max_dtr, int host_drv,
diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c
index 983b8b3..7ab1c20 100644
--- a/drivers/mmc/host/sdhci_f_sdh30.c
+++ b/drivers/mmc/host/sdhci_f_sdh30.c
@@ -49,7 +49,8 @@ struct f_sdhost_priv {
 	struct device *dev;
 };
 
-static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host)
+static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host,
+						u8 signal_voltage)
 {
 	struct f_sdhost_priv *priv = sdhci_priv(host);
 	u32 ctrl = 0;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-01 19:32 ` Vaibhav Hiremath
@ 2015-09-01 19:32   ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-mmc; +Cc: ulf.hansson, linux-kernel, linux-arm-kernel, Vaibhav Hiremath

Currently, the sdhci_do_start_signal_voltage_switch() function invokes
controller specific voltage switch configuration only for 1.8v usecase;
but it is required for others as well.

For example, in case of PXA1928 SDH controller, we need to set different
configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
control register).

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
---
Note:
Currently ->voltage_switch() callback is only supported
in f_sdh30 driver. And I am not sure on the dependency of execution
sequence for that device. I could have moved ->voltage_switch() call
at one common place (above/below), but was not quite sure about it.
So, replicated/duplicated the call for other voltages.

 drivers/mmc/host/sdhci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3dd295f..b59b76d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 		/* Wait for 5ms */
 		usleep_range(5000, 5500);
 
+		/* Some controller need to do more when switching */
+		if (host->ops->voltage_switch)
+			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
+
 		/* 3.3V regulator output should be stable within 5 ms */
 		ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
 		if (!(ctrl & SDHCI_CTRL_VDD_180))
@@ -1803,6 +1807,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 				return -EIO;
 			}
 		}
+		/* Some controller need to do more when switching */
+		if (host->ops->voltage_switch)
+			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_120);
+
 		return 0;
 	default:
 		/* No signal voltage switch required */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-01 19:32   ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-arm-kernel

Currently, the sdhci_do_start_signal_voltage_switch() function invokes
controller specific voltage switch configuration only for 1.8v usecase;
but it is required for others as well.

For example, in case of PXA1928 SDH controller, we need to set different
configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
control register).

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
---
Note:
Currently ->voltage_switch() callback is only supported
in f_sdh30 driver. And I am not sure on the dependency of execution
sequence for that device. I could have moved ->voltage_switch() call
at one common place (above/below), but was not quite sure about it.
So, replicated/duplicated the call for other voltages.

 drivers/mmc/host/sdhci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3dd295f..b59b76d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 		/* Wait for 5ms */
 		usleep_range(5000, 5500);
 
+		/* Some controller need to do more when switching */
+		if (host->ops->voltage_switch)
+			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
+
 		/* 3.3V regulator output should be stable within 5 ms */
 		ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
 		if (!(ctrl & SDHCI_CTRL_VDD_180))
@@ -1803,6 +1807,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
 				return -EIO;
 			}
 		}
+		/* Some controller need to do more when switching */
+		if (host->ops->voltage_switch)
+			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_120);
+
 		return 0;
 	default:
 		/* No signal voltage switch required */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support
  2015-09-01 19:32 ` Vaibhav Hiremath
@ 2015-09-01 19:32   ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-mmc; +Cc: ulf.hansson, linux-kernel, linux-arm-kernel, Vaibhav Hiremath

In case PXA1928 family of devices, there is device/controller specific
configuration to control voltage/power on the IO pins.

This patch implements and enables the sdhci_ops->voltage_switch()
callback api.
Note that IO pad register addresses are fetched as a memory resource.

For example, in case of PXA1928 and family of devices, the DT property
would look something like,

sdh1: sdh@d4280000 {
	compatible = "mrvl,pxav3-mmc";
	reg-names = "sdhci", "io-pwr", "io-pwr-lock-unlock";
	reg = <0xd4280000 0x120>,
		<0xd401e81c 4>,
		<0xd4015068 8>;
	...
};

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
---
 drivers/mmc/host/sdhci-pxav3.c | 59 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 5d26fe0..cebb2f9 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -63,11 +63,18 @@
 #define IO_PWR_AKEY_ASSAR		0xeb10
 #define IO_PWR_MMC1_PAD_1V8		BIT(2)
 
+/* IO Power control */
+#define IO_PWR_AKEY_ASFAR		0xbaba
+#define IO_PWR_AKEY_ASSAR		0xeb10
+#define IO_PWR_MMC1_PAD_1V8		BIT(2)
+
 struct sdhci_pxa {
 	struct clk *clk_core;
 	struct clk *clk_io;
 	u8	power_mode;
 	void __iomem *sdio3_conf_reg;
+	void __iomem *io_pwr_reg;
+	void __iomem *io_pwr_lock_reg;
 };
 
 /*
@@ -307,6 +314,38 @@ static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs)
 		__func__, uhs, ctrl_2);
 }
 
+static void pxav3_voltage_switch(struct sdhci_host *host,
+						u8 signal_voltage)
+{
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct sdhci_pxa *pxa = pltfm_host->priv;
+	unsigned int val;
+
+	if (!pxa->io_pwr_reg || !pxa->io_pwr_lock_reg)
+		return;
+
+	/* Lock register is 64 bit: First & Second access register */
+	writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
+	writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
+	val = readl(pxa->io_pwr_reg);
+
+	switch (signal_voltage) {
+	case MMC_SIGNAL_VOLTAGE_180:
+	case MMC_SIGNAL_VOLTAGE_120:
+		val |= IO_PWR_MMC1_PAD_1V8;
+		break;
+	case MMC_SIGNAL_VOLTAGE_330:
+	default:
+		val &= ~IO_PWR_MMC1_PAD_1V8;
+		break;
+	}
+
+	writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
+	writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
+
+	writel(val, pxa->io_pwr_reg);
+}
+
 static const struct sdhci_ops pxav3_sdhci_ops = {
 	.set_clock			= sdhci_set_clock,
 	.platform_send_init_74_clocks	= pxav3_gen_init_74_clocks,
@@ -314,6 +353,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
 	.set_bus_width			= sdhci_set_bus_width,
 	.reset				= pxav3_reset,
 	.set_uhs_signaling		= pxav3_set_uhs_signaling,
+	.voltage_switch			= pxav3_voltage_switch,
 };
 
 static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
@@ -368,6 +408,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 	struct sdhci_host *host = NULL;
 	struct sdhci_pxa *pxa = NULL;
 	const struct of_device_id *match;
+	struct resource *res;
 	int ret;
 
 	pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa), GFP_KERNEL);
@@ -408,6 +449,24 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 			goto err_mbus_win;
 	}
 
+	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "io-pwr-conf");
+	if (res) {
+		pxa->io_pwr_reg = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(pxa->io_pwr_reg)) {
+			ret = PTR_ERR(pxa->io_pwr_reg);
+			goto err_mbus_win;
+		}
+	}
+
+	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "io-pwr-lock-unlock");
+	if (res) {
+		pxa->io_pwr_lock_reg = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(pxa->io_pwr_lock_reg)) {
+			ret = PTR_ERR(pxa->io_pwr_lock_reg);
+			goto err_mbus_win;
+		}
+	}
+
 	match = of_match_device(of_match_ptr(sdhci_pxav3_of_match), &pdev->dev);
 	if (match) {
 		ret = mmc_of_parse(host->mmc);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support
@ 2015-09-01 19:32   ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-01 19:32 UTC (permalink / raw)
  To: linux-arm-kernel

In case PXA1928 family of devices, there is device/controller specific
configuration to control voltage/power on the IO pins.

This patch implements and enables the sdhci_ops->voltage_switch()
callback api.
Note that IO pad register addresses are fetched as a memory resource.

For example, in case of PXA1928 and family of devices, the DT property
would look something like,

sdh1: sdh at d4280000 {
	compatible = "mrvl,pxav3-mmc";
	reg-names = "sdhci", "io-pwr", "io-pwr-lock-unlock";
	reg = <0xd4280000 0x120>,
		<0xd401e81c 4>,
		<0xd4015068 8>;
	...
};

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
---
 drivers/mmc/host/sdhci-pxav3.c | 59 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 5d26fe0..cebb2f9 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -63,11 +63,18 @@
 #define IO_PWR_AKEY_ASSAR		0xeb10
 #define IO_PWR_MMC1_PAD_1V8		BIT(2)
 
+/* IO Power control */
+#define IO_PWR_AKEY_ASFAR		0xbaba
+#define IO_PWR_AKEY_ASSAR		0xeb10
+#define IO_PWR_MMC1_PAD_1V8		BIT(2)
+
 struct sdhci_pxa {
 	struct clk *clk_core;
 	struct clk *clk_io;
 	u8	power_mode;
 	void __iomem *sdio3_conf_reg;
+	void __iomem *io_pwr_reg;
+	void __iomem *io_pwr_lock_reg;
 };
 
 /*
@@ -307,6 +314,38 @@ static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs)
 		__func__, uhs, ctrl_2);
 }
 
+static void pxav3_voltage_switch(struct sdhci_host *host,
+						u8 signal_voltage)
+{
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct sdhci_pxa *pxa = pltfm_host->priv;
+	unsigned int val;
+
+	if (!pxa->io_pwr_reg || !pxa->io_pwr_lock_reg)
+		return;
+
+	/* Lock register is 64 bit: First & Second access register */
+	writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
+	writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
+	val = readl(pxa->io_pwr_reg);
+
+	switch (signal_voltage) {
+	case MMC_SIGNAL_VOLTAGE_180:
+	case MMC_SIGNAL_VOLTAGE_120:
+		val |= IO_PWR_MMC1_PAD_1V8;
+		break;
+	case MMC_SIGNAL_VOLTAGE_330:
+	default:
+		val &= ~IO_PWR_MMC1_PAD_1V8;
+		break;
+	}
+
+	writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
+	writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
+
+	writel(val, pxa->io_pwr_reg);
+}
+
 static const struct sdhci_ops pxav3_sdhci_ops = {
 	.set_clock			= sdhci_set_clock,
 	.platform_send_init_74_clocks	= pxav3_gen_init_74_clocks,
@@ -314,6 +353,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
 	.set_bus_width			= sdhci_set_bus_width,
 	.reset				= pxav3_reset,
 	.set_uhs_signaling		= pxav3_set_uhs_signaling,
+	.voltage_switch			= pxav3_voltage_switch,
 };
 
 static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
@@ -368,6 +408,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 	struct sdhci_host *host = NULL;
 	struct sdhci_pxa *pxa = NULL;
 	const struct of_device_id *match;
+	struct resource *res;
 	int ret;
 
 	pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa), GFP_KERNEL);
@@ -408,6 +449,24 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 			goto err_mbus_win;
 	}
 
+	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "io-pwr-conf");
+	if (res) {
+		pxa->io_pwr_reg = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(pxa->io_pwr_reg)) {
+			ret = PTR_ERR(pxa->io_pwr_reg);
+			goto err_mbus_win;
+		}
+	}
+
+	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "io-pwr-lock-unlock");
+	if (res) {
+		pxa->io_pwr_lock_reg = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(pxa->io_pwr_lock_reg)) {
+			ret = PTR_ERR(pxa->io_pwr_lock_reg);
+			goto err_mbus_win;
+		}
+	}
+
 	match = of_match_device(of_match_ptr(sdhci_pxav3_of_match), &pdev->dev);
 	if (match) {
 		ret = mmc_of_parse(host->mmc);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-01 19:32   ` Vaibhav Hiremath
  (?)
@ 2015-09-02  7:04     ` Jisheng Zhang
  -1 siblings, 0 replies; 35+ messages in thread
From: Jisheng Zhang @ 2015-09-02  7:04 UTC (permalink / raw)
  To: Vaibhav Hiremath; +Cc: linux-mmc, ulf.hansson, linux-kernel, linux-arm-kernel

On Wed, 2 Sep 2015 01:02:17 +0530
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:

> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
> controller specific voltage switch configuration only for 1.8v usecase;
> but it is required for others as well.
> 
> For example, in case of PXA1928 SDH controller, we need to set different
> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
> control register).
> 
> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
> ---
> Note:
> Currently ->voltage_switch() callback is only supported
> in f_sdh30 driver. And I am not sure on the dependency of execution
> sequence for that device. I could have moved ->voltage_switch() call
> at one common place (above/below), but was not quite sure about it.
> So, replicated/duplicated the call for other voltages.
> 
>  drivers/mmc/host/sdhci.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 3dd295f..b59b76d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>  		/* Wait for 5ms */
>  		usleep_range(5000, 5500);
>  
> +		/* Some controller need to do more when switching */
> +		if (host->ops->voltage_switch)
> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);

Could this be implemented by regulator API? From patch set 3/3, the pxa1928
voltage_switch hook is to operate the IO pad registers, this seems not belong
to the SDHC IP core.

Thanks,
Jisheng

> +
>  		/* 3.3V regulator output should be stable within 5 ms */
>  		ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
>  		if (!(ctrl & SDHCI_CTRL_VDD_180))
> @@ -1803,6 +1807,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>  				return -EIO;
>  			}
>  		}
> +		/* Some controller need to do more when switching */
> +		if (host->ops->voltage_switch)
> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_120);
> +
>  		return 0;
>  	default:
>  		/* No signal voltage switch required */


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-02  7:04     ` Jisheng Zhang
  0 siblings, 0 replies; 35+ messages in thread
From: Jisheng Zhang @ 2015-09-02  7:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2 Sep 2015 01:02:17 +0530
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:

> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
> controller specific voltage switch configuration only for 1.8v usecase;
> but it is required for others as well.
> 
> For example, in case of PXA1928 SDH controller, we need to set different
> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
> control register).
> 
> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
> ---
> Note:
> Currently ->voltage_switch() callback is only supported
> in f_sdh30 driver. And I am not sure on the dependency of execution
> sequence for that device. I could have moved ->voltage_switch() call
> at one common place (above/below), but was not quite sure about it.
> So, replicated/duplicated the call for other voltages.
> 
>  drivers/mmc/host/sdhci.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 3dd295f..b59b76d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>  		/* Wait for 5ms */
>  		usleep_range(5000, 5500);
>  
> +		/* Some controller need to do more when switching */
> +		if (host->ops->voltage_switch)
> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);

Could this be implemented by regulator API? From patch set 3/3, the pxa1928
voltage_switch hook is to operate the IO pad registers, this seems not belong
to the SDHC IP core.

Thanks,
Jisheng

> +
>  		/* 3.3V regulator output should be stable within 5 ms */
>  		ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
>  		if (!(ctrl & SDHCI_CTRL_VDD_180))
> @@ -1803,6 +1807,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>  				return -EIO;
>  			}
>  		}
> +		/* Some controller need to do more when switching */
> +		if (host->ops->voltage_switch)
> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_120);
> +
>  		return 0;
>  	default:
>  		/* No signal voltage switch required */

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-02  7:04     ` Jisheng Zhang
  0 siblings, 0 replies; 35+ messages in thread
From: Jisheng Zhang @ 2015-09-02  7:04 UTC (permalink / raw)
  To: Vaibhav Hiremath; +Cc: linux-mmc, ulf.hansson, linux-kernel, linux-arm-kernel

On Wed, 2 Sep 2015 01:02:17 +0530
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:

> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
> controller specific voltage switch configuration only for 1.8v usecase;
> but it is required for others as well.
> 
> For example, in case of PXA1928 SDH controller, we need to set different
> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
> control register).
> 
> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
> ---
> Note:
> Currently ->voltage_switch() callback is only supported
> in f_sdh30 driver. And I am not sure on the dependency of execution
> sequence for that device. I could have moved ->voltage_switch() call
> at one common place (above/below), but was not quite sure about it.
> So, replicated/duplicated the call for other voltages.
> 
>  drivers/mmc/host/sdhci.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 3dd295f..b59b76d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>  		/* Wait for 5ms */
>  		usleep_range(5000, 5500);
>  
> +		/* Some controller need to do more when switching */
> +		if (host->ops->voltage_switch)
> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);

Could this be implemented by regulator API? From patch set 3/3, the pxa1928
voltage_switch hook is to operate the IO pad registers, this seems not belong
to the SDHC IP core.

Thanks,
Jisheng

> +
>  		/* 3.3V regulator output should be stable within 5 ms */
>  		ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
>  		if (!(ctrl & SDHCI_CTRL_VDD_180))
> @@ -1803,6 +1807,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>  				return -EIO;
>  			}
>  		}
> +		/* Some controller need to do more when switching */
> +		if (host->ops->voltage_switch)
> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_120);
> +
>  		return 0;
>  	default:
>  		/* No signal voltage switch required */


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-02  7:04     ` Jisheng Zhang
@ 2015-09-02  8:19       ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-02  8:19 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: linux-mmc, ulf.hansson, linus.walleij, linux-kernel,
	linux-arm-kernel



On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
> On Wed, 2 Sep 2015 01:02:17 +0530
> Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>
>> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
>> controller specific voltage switch configuration only for 1.8v usecase;
>> but it is required for others as well.
>>
>> For example, in case of PXA1928 SDH controller, we need to set different
>> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
>> control register).
>>
>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>> ---
>> Note:
>> Currently ->voltage_switch() callback is only supported
>> in f_sdh30 driver. And I am not sure on the dependency of execution
>> sequence for that device. I could have moved ->voltage_switch() call
>> at one common place (above/below), but was not quite sure about it.
>> So, replicated/duplicated the call for other voltages.
>>
>>   drivers/mmc/host/sdhci.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index 3dd295f..b59b76d 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>>   		/* Wait for 5ms */
>>   		usleep_range(5000, 5500);
>>
>> +		/* Some controller need to do more when switching */
>> +		if (host->ops->voltage_switch)
>> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
>
> Could this be implemented by regulator API? From patch set 3/3, the pxa1928
> voltage_switch hook is to operate the IO pad registers, this seems not belong
> to the SDHC IP core.
>

Not quite sure whether regulator would be right fit for this.

Initially I was thinking of making use of pinconf framework, using
PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
doing it.

Probably, question for pinctrl maintainer. Looping Linus Walleji.

Also note that, this configuration is not applicable to all pins/pads,
only handpicked pads have this configuration (voltage selection on
pads).
And this configuration is not part of the same register map.

It is part of separate register map (AIB_EXT_REG_BASE), called IO
domain power control register.
And that

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-02  8:19       ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-02  8:19 UTC (permalink / raw)
  To: linux-arm-kernel



On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
> On Wed, 2 Sep 2015 01:02:17 +0530
> Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>
>> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
>> controller specific voltage switch configuration only for 1.8v usecase;
>> but it is required for others as well.
>>
>> For example, in case of PXA1928 SDH controller, we need to set different
>> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
>> control register).
>>
>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>> ---
>> Note:
>> Currently ->voltage_switch() callback is only supported
>> in f_sdh30 driver. And I am not sure on the dependency of execution
>> sequence for that device. I could have moved ->voltage_switch() call
>> at one common place (above/below), but was not quite sure about it.
>> So, replicated/duplicated the call for other voltages.
>>
>>   drivers/mmc/host/sdhci.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index 3dd295f..b59b76d 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>>   		/* Wait for 5ms */
>>   		usleep_range(5000, 5500);
>>
>> +		/* Some controller need to do more when switching */
>> +		if (host->ops->voltage_switch)
>> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
>
> Could this be implemented by regulator API? From patch set 3/3, the pxa1928
> voltage_switch hook is to operate the IO pad registers, this seems not belong
> to the SDHC IP core.
>

Not quite sure whether regulator would be right fit for this.

Initially I was thinking of making use of pinconf framework, using
PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
doing it.

Probably, question for pinctrl maintainer. Looping Linus Walleji.

Also note that, this configuration is not applicable to all pins/pads,
only handpicked pads have this configuration (voltage selection on
pads).
And this configuration is not part of the same register map.

It is part of separate register map (AIB_EXT_REG_BASE), called IO
domain power control register.
And that

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-02  8:19       ` Vaibhav Hiremath
  (?)
@ 2015-09-02  8:26         ` Jisheng Zhang
  -1 siblings, 0 replies; 35+ messages in thread
From: Jisheng Zhang @ 2015-09-02  8:26 UTC (permalink / raw)
  To: Vaibhav Hiremath
  Cc: linux-mmc, ulf.hansson, linus.walleij, linux-kernel,
	linux-arm-kernel

On Wed, 2 Sep 2015 13:49:53 +0530
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:

> 
> 
> On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
> > On Wed, 2 Sep 2015 01:02:17 +0530
> > Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
> >
> >> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
> >> controller specific voltage switch configuration only for 1.8v usecase;
> >> but it is required for others as well.
> >>
> >> For example, in case of PXA1928 SDH controller, we need to set different
> >> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
> >> control register).
> >>
> >> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
> >> ---
> >> Note:
> >> Currently ->voltage_switch() callback is only supported
> >> in f_sdh30 driver. And I am not sure on the dependency of execution
> >> sequence for that device. I could have moved ->voltage_switch() call
> >> at one common place (above/below), but was not quite sure about it.
> >> So, replicated/duplicated the call for other voltages.
> >>
> >>   drivers/mmc/host/sdhci.c | 8 ++++++++
> >>   1 file changed, 8 insertions(+)
> >>
> >> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> >> index 3dd295f..b59b76d 100644
> >> --- a/drivers/mmc/host/sdhci.c
> >> +++ b/drivers/mmc/host/sdhci.c
> >> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
> >>   		/* Wait for 5ms */
> >>   		usleep_range(5000, 5500);
> >>
> >> +		/* Some controller need to do more when switching */
> >> +		if (host->ops->voltage_switch)
> >> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
> >
> > Could this be implemented by regulator API? From patch set 3/3, the pxa1928
> > voltage_switch hook is to operate the IO pad registers, this seems not belong
> > to the SDHC IP core.
> >
> 
> Not quite sure whether regulator would be right fit for this.

>From the patche[3/3], this can be achieved by abstracting the IO PAD as regulators
then, we may not need to touch the core sdhci.c. But I'm not sure whether this
is the good solution or not. sdhci Maintainers and experts may have better
suggestions.

> 
> Initially I was thinking of making use of pinconf framework, using
> PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
> doing it.
> 
> Probably, question for pinctrl maintainer. Looping Linus Walleji.
> 
> Also note that, this configuration is not applicable to all pins/pads,
> only handpicked pads have this configuration (voltage selection on
> pads).
> And this configuration is not part of the same register map.
> 
> It is part of separate register map (AIB_EXT_REG_BASE), called IO
> domain power control register.
> And that
> 
> Thanks,
> Vaibhav


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-02  8:26         ` Jisheng Zhang
  0 siblings, 0 replies; 35+ messages in thread
From: Jisheng Zhang @ 2015-09-02  8:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2 Sep 2015 13:49:53 +0530
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:

> 
> 
> On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
> > On Wed, 2 Sep 2015 01:02:17 +0530
> > Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
> >
> >> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
> >> controller specific voltage switch configuration only for 1.8v usecase;
> >> but it is required for others as well.
> >>
> >> For example, in case of PXA1928 SDH controller, we need to set different
> >> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
> >> control register).
> >>
> >> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
> >> ---
> >> Note:
> >> Currently ->voltage_switch() callback is only supported
> >> in f_sdh30 driver. And I am not sure on the dependency of execution
> >> sequence for that device. I could have moved ->voltage_switch() call
> >> at one common place (above/below), but was not quite sure about it.
> >> So, replicated/duplicated the call for other voltages.
> >>
> >>   drivers/mmc/host/sdhci.c | 8 ++++++++
> >>   1 file changed, 8 insertions(+)
> >>
> >> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> >> index 3dd295f..b59b76d 100644
> >> --- a/drivers/mmc/host/sdhci.c
> >> +++ b/drivers/mmc/host/sdhci.c
> >> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
> >>   		/* Wait for 5ms */
> >>   		usleep_range(5000, 5500);
> >>
> >> +		/* Some controller need to do more when switching */
> >> +		if (host->ops->voltage_switch)
> >> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
> >
> > Could this be implemented by regulator API? From patch set 3/3, the pxa1928
> > voltage_switch hook is to operate the IO pad registers, this seems not belong
> > to the SDHC IP core.
> >
> 
> Not quite sure whether regulator would be right fit for this.

>From the patche[3/3], this can be achieved by abstracting the IO PAD as regulators
then, we may not need to touch the core sdhci.c. But I'm not sure whether this
is the good solution or not. sdhci Maintainers and experts may have better
suggestions.

> 
> Initially I was thinking of making use of pinconf framework, using
> PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
> doing it.
> 
> Probably, question for pinctrl maintainer. Looping Linus Walleji.
> 
> Also note that, this configuration is not applicable to all pins/pads,
> only handpicked pads have this configuration (voltage selection on
> pads).
> And this configuration is not part of the same register map.
> 
> It is part of separate register map (AIB_EXT_REG_BASE), called IO
> domain power control register.
> And that
> 
> Thanks,
> Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-02  8:26         ` Jisheng Zhang
  0 siblings, 0 replies; 35+ messages in thread
From: Jisheng Zhang @ 2015-09-02  8:26 UTC (permalink / raw)
  To: Vaibhav Hiremath
  Cc: linux-mmc, ulf.hansson, linus.walleij, linux-kernel,
	linux-arm-kernel

On Wed, 2 Sep 2015 13:49:53 +0530
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:

> 
> 
> On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
> > On Wed, 2 Sep 2015 01:02:17 +0530
> > Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
> >
> >> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
> >> controller specific voltage switch configuration only for 1.8v usecase;
> >> but it is required for others as well.
> >>
> >> For example, in case of PXA1928 SDH controller, we need to set different
> >> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
> >> control register).
> >>
> >> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
> >> ---
> >> Note:
> >> Currently ->voltage_switch() callback is only supported
> >> in f_sdh30 driver. And I am not sure on the dependency of execution
> >> sequence for that device. I could have moved ->voltage_switch() call
> >> at one common place (above/below), but was not quite sure about it.
> >> So, replicated/duplicated the call for other voltages.
> >>
> >>   drivers/mmc/host/sdhci.c | 8 ++++++++
> >>   1 file changed, 8 insertions(+)
> >>
> >> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> >> index 3dd295f..b59b76d 100644
> >> --- a/drivers/mmc/host/sdhci.c
> >> +++ b/drivers/mmc/host/sdhci.c
> >> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
> >>   		/* Wait for 5ms */
> >>   		usleep_range(5000, 5500);
> >>
> >> +		/* Some controller need to do more when switching */
> >> +		if (host->ops->voltage_switch)
> >> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
> >
> > Could this be implemented by regulator API? From patch set 3/3, the pxa1928
> > voltage_switch hook is to operate the IO pad registers, this seems not belong
> > to the SDHC IP core.
> >
> 
> Not quite sure whether regulator would be right fit for this.

>From the patche[3/3], this can be achieved by abstracting the IO PAD as regulators
then, we may not need to touch the core sdhci.c. But I'm not sure whether this
is the good solution or not. sdhci Maintainers and experts may have better
suggestions.

> 
> Initially I was thinking of making use of pinconf framework, using
> PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
> doing it.
> 
> Probably, question for pinctrl maintainer. Looping Linus Walleji.
> 
> Also note that, this configuration is not applicable to all pins/pads,
> only handpicked pads have this configuration (voltage selection on
> pads).
> And this configuration is not part of the same register map.
> 
> It is part of separate register map (AIB_EXT_REG_BASE), called IO
> domain power control register.
> And that
> 
> Thanks,
> Vaibhav


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-02  8:26         ` Jisheng Zhang
@ 2015-09-02 11:43           ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-02 11:43 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: linux-mmc, ulf.hansson, linus.walleij, linux-kernel,
	linux-arm-kernel



On Wednesday 02 September 2015 01:56 PM, Jisheng Zhang wrote:
> On Wed, 2 Sep 2015 13:49:53 +0530
> Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>
>>
>>
>> On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
>>> On Wed, 2 Sep 2015 01:02:17 +0530
>>> Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>>>
>>>> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
>>>> controller specific voltage switch configuration only for 1.8v usecase;
>>>> but it is required for others as well.
>>>>
>>>> For example, in case of PXA1928 SDH controller, we need to set different
>>>> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
>>>> control register).
>>>>
>>>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>>>> ---
>>>> Note:
>>>> Currently ->voltage_switch() callback is only supported
>>>> in f_sdh30 driver. And I am not sure on the dependency of execution
>>>> sequence for that device. I could have moved ->voltage_switch() call
>>>> at one common place (above/below), but was not quite sure about it.
>>>> So, replicated/duplicated the call for other voltages.
>>>>
>>>>    drivers/mmc/host/sdhci.c | 8 ++++++++
>>>>    1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>>>> index 3dd295f..b59b76d 100644
>>>> --- a/drivers/mmc/host/sdhci.c
>>>> +++ b/drivers/mmc/host/sdhci.c
>>>> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>>>>    		/* Wait for 5ms */
>>>>    		usleep_range(5000, 5500);
>>>>
>>>> +		/* Some controller need to do more when switching */
>>>> +		if (host->ops->voltage_switch)
>>>> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
>>>
>>> Could this be implemented by regulator API? From patch set 3/3, the pxa1928
>>> voltage_switch hook is to operate the IO pad registers, this seems not belong
>>> to the SDHC IP core.
>>>
>>
>> Not quite sure whether regulator would be right fit for this.
>
>  From the patche[3/3], this can be achieved by abstracting the IO PAD as regulators
> then, we may not need to touch the core sdhci.c. But I'm not sure whether this
> is the good solution or not.

Exactly...

> sdhci Maintainers and experts may have better
> suggestions.
>

Thats is the reason I stamped it as a RFC :)

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-02 11:43           ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-02 11:43 UTC (permalink / raw)
  To: linux-arm-kernel



On Wednesday 02 September 2015 01:56 PM, Jisheng Zhang wrote:
> On Wed, 2 Sep 2015 13:49:53 +0530
> Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>
>>
>>
>> On Wednesday 02 September 2015 12:34 PM, Jisheng Zhang wrote:
>>> On Wed, 2 Sep 2015 01:02:17 +0530
>>> Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>>>
>>>> Currently, the sdhci_do_start_signal_voltage_switch() function invokes
>>>> controller specific voltage switch configuration only for 1.8v usecase;
>>>> but it is required for others as well.
>>>>
>>>> For example, in case of PXA1928 SDH controller, we need to set different
>>>> configuration for 3.3, 1.8 and 1.2 volt support (I/O domain power
>>>> control register).
>>>>
>>>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>>>> ---
>>>> Note:
>>>> Currently ->voltage_switch() callback is only supported
>>>> in f_sdh30 driver. And I am not sure on the dependency of execution
>>>> sequence for that device. I could have moved ->voltage_switch() call
>>>> at one common place (above/below), but was not quite sure about it.
>>>> So, replicated/duplicated the call for other voltages.
>>>>
>>>>    drivers/mmc/host/sdhci.c | 8 ++++++++
>>>>    1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>>>> index 3dd295f..b59b76d 100644
>>>> --- a/drivers/mmc/host/sdhci.c
>>>> +++ b/drivers/mmc/host/sdhci.c
>>>> @@ -1753,6 +1753,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host,
>>>>    		/* Wait for 5ms */
>>>>    		usleep_range(5000, 5500);
>>>>
>>>> +		/* Some controller need to do more when switching */
>>>> +		if (host->ops->voltage_switch)
>>>> +			host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_330);
>>>
>>> Could this be implemented by regulator API? From patch set 3/3, the pxa1928
>>> voltage_switch hook is to operate the IO pad registers, this seems not belong
>>> to the SDHC IP core.
>>>
>>
>> Not quite sure whether regulator would be right fit for this.
>
>  From the patche[3/3], this can be achieved by abstracting the IO PAD as regulators
> then, we may not need to touch the core sdhci.c. But I'm not sure whether this
> is the good solution or not.

Exactly...

> sdhci Maintainers and experts may have better
> suggestions.
>

Thats is the reason I stamped it as a RFC :)

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support
  2015-09-01 19:32   ` Vaibhav Hiremath
  (?)
@ 2015-09-02 13:51   ` Shawn Lin
  2015-09-02 14:32       ` Vaibhav Hiremath
  2015-09-03 18:35       ` Vaibhav Hiremath
  -1 siblings, 2 replies; 35+ messages in thread
From: Shawn Lin @ 2015-09-02 13:51 UTC (permalink / raw)
  To: Vaibhav Hiremath, linux-mmc
  Cc: shawn.lin, ulf.hansson, linux-kernel, linux-arm-kernel

On 2015/9/2 3:32, Vaibhav Hiremath wrote:
> In case PXA1928 family of devices, there is device/controller specific
> configuration to control voltage/power on the IO pins.
>
> This patch implements and enables the sdhci_ops->voltage_switch()
> callback api.
> Note that IO pad register addresses are fetched as a memory resource.
>
> For example, in case of PXA1928 and family of devices, the DT property
> would look something like,
>
> sdh1: sdh@d4280000 {
> 	compatible = "mrvl,pxav3-mmc";
> 	reg-names = "sdhci", "io-pwr", "io-pwr-lock-unlock";
> 	reg = <0xd4280000 0x120>,
> 		<0xd401e81c 4>,
> 		<0xd4015068 8>;
> 	...
> };
>
> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
> ---
>   drivers/mmc/host/sdhci-pxav3.c | 59 ++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 59 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index 5d26fe0..cebb2f9 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -63,11 +63,18 @@
>   #define IO_PWR_AKEY_ASSAR		0xeb10
>   #define IO_PWR_MMC1_PAD_1V8		BIT(2)
>
> +/* IO Power control */
> +#define IO_PWR_AKEY_ASFAR		0xbaba
> +#define IO_PWR_AKEY_ASSAR		0xeb10
> +#define IO_PWR_MMC1_PAD_1V8		BIT(2)
> +
>   struct sdhci_pxa {
>   	struct clk *clk_core;
>   	struct clk *clk_io;
>   	u8	power_mode;
>   	void __iomem *sdio3_conf_reg;
> +	void __iomem *io_pwr_reg;
> +	void __iomem *io_pwr_lock_reg;
>   };
>
>   /*
> @@ -307,6 +314,38 @@ static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs)
>   		__func__, uhs, ctrl_2);
>   }
>
> +static void pxav3_voltage_switch(struct sdhci_host *host,
> +						u8 signal_voltage)
> +{
> +	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> +	struct sdhci_pxa *pxa = pltfm_host->priv;
> +	unsigned int val;
> +
> +	if (!pxa->io_pwr_reg || !pxa->io_pwr_lock_reg)
> +		return;
> +
> +	/* Lock register is 64 bit: First & Second access register */
> +	writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
> +	writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
> +	val = readl(pxa->io_pwr_reg);
> +
> +	switch (signal_voltage) {
> +	case MMC_SIGNAL_VOLTAGE_180:
> +	case MMC_SIGNAL_VOLTAGE_120:
> +		val |= IO_PWR_MMC1_PAD_1V8;
> +		break;
> +	case MMC_SIGNAL_VOLTAGE_330:
> +	default:
> +		val &= ~IO_PWR_MMC1_PAD_1V8;
> +		break;
> +	}
> +
> +	writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
> +	writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
> +
> +	writel(val, pxa->io_pwr_reg);
> +}
> +
>   static const struct sdhci_ops pxav3_sdhci_ops = {
>   	.set_clock			= sdhci_set_clock,
>   	.platform_send_init_74_clocks	= pxav3_gen_init_74_clocks,
> @@ -314,6 +353,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
>   	.set_bus_width			= sdhci_set_bus_width,
>   	.reset				= pxav3_reset,
>   	.set_uhs_signaling		= pxav3_set_uhs_signaling,
> +	.voltage_switch			= pxav3_voltage_switch,
>   };
>
>   static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
> @@ -368,6 +408,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
>   	struct sdhci_host *host = NULL;
>   	struct sdhci_pxa *pxa = NULL;
>   	const struct of_device_id *match;
> +	struct resource *res;
>   	int ret;
>
>   	pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa), GFP_KERNEL);
> @@ -408,6 +449,24 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
>   			goto err_mbus_win;
>   	}
>
> +	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "io-pwr-conf");
> +	if (res) {
> +		pxa->io_pwr_reg = devm_ioremap_resource(&pdev->dev, res);
> +		if (IS_ERR(pxa->io_pwr_reg)) {
> +			ret = PTR_ERR(pxa->io_pwr_reg);
> +			goto err_mbus_win;
> +		}
> +	}

Hi Vaibhav,

Why not get it from syscon and use regmap API to deal with it.
IMO, that's okay, you can find examples from
drivers/mmc/host/dw_mmc-k3.c: dw_mci_hi6220_switch_voltage


> +
> +	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "io-pwr-lock-unlock");
> +	if (res) {
> +		pxa->io_pwr_lock_reg = devm_ioremap_resource(&pdev->dev, res);
> +		if (IS_ERR(pxa->io_pwr_lock_reg)) {
> +			ret = PTR_ERR(pxa->io_pwr_lock_reg);
> +			goto err_mbus_win;
> +		}
> +	}
> +
>   	match = of_match_device(of_match_ptr(sdhci_pxav3_of_match), &pdev->dev);
>   	if (match) {
>   		ret = mmc_of_parse(host->mmc);
>


-- 
Best Regards
Shawn Lin


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support
  2015-09-02 13:51   ` Shawn Lin
@ 2015-09-02 14:32       ` Vaibhav Hiremath
  2015-09-03 18:35       ` Vaibhav Hiremath
  1 sibling, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-02 14:32 UTC (permalink / raw)
  To: Shawn Lin, linux-mmc; +Cc: ulf.hansson, linux-kernel, linux-arm-kernel



On Wednesday 02 September 2015 07:21 PM, Shawn Lin wrote:
> On 2015/9/2 3:32, Vaibhav Hiremath wrote:
>> In case PXA1928 family of devices, there is device/controller specific
>> configuration to control voltage/power on the IO pins.
>>
>> This patch implements and enables the sdhci_ops->voltage_switch()
>> callback api.
>> Note that IO pad register addresses are fetched as a memory resource.
>>
>> For example, in case of PXA1928 and family of devices, the DT property
>> would look something like,
>>
>> sdh1: sdh@d4280000 {
>>     compatible = "mrvl,pxav3-mmc";
>>     reg-names = "sdhci", "io-pwr", "io-pwr-lock-unlock";
>>     reg = <0xd4280000 0x120>,
>>         <0xd401e81c 4>,
>>         <0xd4015068 8>;
>>     ...
>> };
>>
>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>> ---
>>   drivers/mmc/host/sdhci-pxav3.c | 59
>> ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 59 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-pxav3.c
>> b/drivers/mmc/host/sdhci-pxav3.c
>> index 5d26fe0..cebb2f9 100644
>> --- a/drivers/mmc/host/sdhci-pxav3.c
>> +++ b/drivers/mmc/host/sdhci-pxav3.c
>> @@ -63,11 +63,18 @@
>>   #define IO_PWR_AKEY_ASSAR        0xeb10
>>   #define IO_PWR_MMC1_PAD_1V8        BIT(2)
>>
>> +/* IO Power control */
>> +#define IO_PWR_AKEY_ASFAR        0xbaba
>> +#define IO_PWR_AKEY_ASSAR        0xeb10
>> +#define IO_PWR_MMC1_PAD_1V8        BIT(2)
>> +
>>   struct sdhci_pxa {
>>       struct clk *clk_core;
>>       struct clk *clk_io;
>>       u8    power_mode;
>>       void __iomem *sdio3_conf_reg;
>> +    void __iomem *io_pwr_reg;
>> +    void __iomem *io_pwr_lock_reg;
>>   };
>>
>>   /*
>> @@ -307,6 +314,38 @@ static void pxav3_set_uhs_signaling(struct
>> sdhci_host *host, unsigned int uhs)
>>           __func__, uhs, ctrl_2);
>>   }
>>
>> +static void pxav3_voltage_switch(struct sdhci_host *host,
>> +                        u8 signal_voltage)
>> +{
>> +    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>> +    struct sdhci_pxa *pxa = pltfm_host->priv;
>> +    unsigned int val;
>> +
>> +    if (!pxa->io_pwr_reg || !pxa->io_pwr_lock_reg)
>> +        return;
>> +
>> +    /* Lock register is 64 bit: First & Second access register */
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +    val = readl(pxa->io_pwr_reg);
>> +
>> +    switch (signal_voltage) {
>> +    case MMC_SIGNAL_VOLTAGE_180:
>> +    case MMC_SIGNAL_VOLTAGE_120:
>> +        val |= IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    case MMC_SIGNAL_VOLTAGE_330:
>> +    default:
>> +        val &= ~IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    }
>> +
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +
>> +    writel(val, pxa->io_pwr_reg);
>> +}
>> +
>>   static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_clock            = sdhci_set_clock,
>>       .platform_send_init_74_clocks    = pxav3_gen_init_74_clocks,
>> @@ -314,6 +353,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_bus_width            = sdhci_set_bus_width,
>>       .reset                = pxav3_reset,
>>       .set_uhs_signaling        = pxav3_set_uhs_signaling,
>> +    .voltage_switch            = pxav3_voltage_switch,
>>   };
>>
>>   static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
>> @@ -368,6 +408,7 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>       struct sdhci_host *host = NULL;
>>       struct sdhci_pxa *pxa = NULL;
>>       const struct of_device_id *match;
>> +    struct resource *res;
>>       int ret;
>>
>>       pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa),
>> GFP_KERNEL);
>> @@ -408,6 +449,24 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>               goto err_mbus_win;
>>       }
>>
>> +    res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
>> "io-pwr-conf");
>> +    if (res) {
>> +        pxa->io_pwr_reg = devm_ioremap_resource(&pdev->dev, res);
>> +        if (IS_ERR(pxa->io_pwr_reg)) {
>> +            ret = PTR_ERR(pxa->io_pwr_reg);
>> +            goto err_mbus_win;
>> +        }
>> +    }
>
> Hi Vaibhav,
>
> Why not get it from syscon and use regmap API to deal with it.
> IMO, that's okay, you can find examples from
> drivers/mmc/host/dw_mmc-k3.c: dw_mci_hi6220_switch_voltage
>
>

Thanks Shawn,
Good to know that, something similar is already in the mainline.

Quickly looked into the driver, and I think it looks ok and doable.
I will for couple of days, to see whether I get further comments and then
spin next version.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support
@ 2015-09-02 14:32       ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-02 14:32 UTC (permalink / raw)
  To: linux-arm-kernel



On Wednesday 02 September 2015 07:21 PM, Shawn Lin wrote:
> On 2015/9/2 3:32, Vaibhav Hiremath wrote:
>> In case PXA1928 family of devices, there is device/controller specific
>> configuration to control voltage/power on the IO pins.
>>
>> This patch implements and enables the sdhci_ops->voltage_switch()
>> callback api.
>> Note that IO pad register addresses are fetched as a memory resource.
>>
>> For example, in case of PXA1928 and family of devices, the DT property
>> would look something like,
>>
>> sdh1: sdh at d4280000 {
>>     compatible = "mrvl,pxav3-mmc";
>>     reg-names = "sdhci", "io-pwr", "io-pwr-lock-unlock";
>>     reg = <0xd4280000 0x120>,
>>         <0xd401e81c 4>,
>>         <0xd4015068 8>;
>>     ...
>> };
>>
>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>> ---
>>   drivers/mmc/host/sdhci-pxav3.c | 59
>> ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 59 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-pxav3.c
>> b/drivers/mmc/host/sdhci-pxav3.c
>> index 5d26fe0..cebb2f9 100644
>> --- a/drivers/mmc/host/sdhci-pxav3.c
>> +++ b/drivers/mmc/host/sdhci-pxav3.c
>> @@ -63,11 +63,18 @@
>>   #define IO_PWR_AKEY_ASSAR        0xeb10
>>   #define IO_PWR_MMC1_PAD_1V8        BIT(2)
>>
>> +/* IO Power control */
>> +#define IO_PWR_AKEY_ASFAR        0xbaba
>> +#define IO_PWR_AKEY_ASSAR        0xeb10
>> +#define IO_PWR_MMC1_PAD_1V8        BIT(2)
>> +
>>   struct sdhci_pxa {
>>       struct clk *clk_core;
>>       struct clk *clk_io;
>>       u8    power_mode;
>>       void __iomem *sdio3_conf_reg;
>> +    void __iomem *io_pwr_reg;
>> +    void __iomem *io_pwr_lock_reg;
>>   };
>>
>>   /*
>> @@ -307,6 +314,38 @@ static void pxav3_set_uhs_signaling(struct
>> sdhci_host *host, unsigned int uhs)
>>           __func__, uhs, ctrl_2);
>>   }
>>
>> +static void pxav3_voltage_switch(struct sdhci_host *host,
>> +                        u8 signal_voltage)
>> +{
>> +    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>> +    struct sdhci_pxa *pxa = pltfm_host->priv;
>> +    unsigned int val;
>> +
>> +    if (!pxa->io_pwr_reg || !pxa->io_pwr_lock_reg)
>> +        return;
>> +
>> +    /* Lock register is 64 bit: First & Second access register */
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +    val = readl(pxa->io_pwr_reg);
>> +
>> +    switch (signal_voltage) {
>> +    case MMC_SIGNAL_VOLTAGE_180:
>> +    case MMC_SIGNAL_VOLTAGE_120:
>> +        val |= IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    case MMC_SIGNAL_VOLTAGE_330:
>> +    default:
>> +        val &= ~IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    }
>> +
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +
>> +    writel(val, pxa->io_pwr_reg);
>> +}
>> +
>>   static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_clock            = sdhci_set_clock,
>>       .platform_send_init_74_clocks    = pxav3_gen_init_74_clocks,
>> @@ -314,6 +353,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_bus_width            = sdhci_set_bus_width,
>>       .reset                = pxav3_reset,
>>       .set_uhs_signaling        = pxav3_set_uhs_signaling,
>> +    .voltage_switch            = pxav3_voltage_switch,
>>   };
>>
>>   static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
>> @@ -368,6 +408,7 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>       struct sdhci_host *host = NULL;
>>       struct sdhci_pxa *pxa = NULL;
>>       const struct of_device_id *match;
>> +    struct resource *res;
>>       int ret;
>>
>>       pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa),
>> GFP_KERNEL);
>> @@ -408,6 +449,24 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>               goto err_mbus_win;
>>       }
>>
>> +    res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
>> "io-pwr-conf");
>> +    if (res) {
>> +        pxa->io_pwr_reg = devm_ioremap_resource(&pdev->dev, res);
>> +        if (IS_ERR(pxa->io_pwr_reg)) {
>> +            ret = PTR_ERR(pxa->io_pwr_reg);
>> +            goto err_mbus_win;
>> +        }
>> +    }
>
> Hi Vaibhav,
>
> Why not get it from syscon and use regmap API to deal with it.
> IMO, that's okay, you can find examples from
> drivers/mmc/host/dw_mmc-k3.c: dw_mci_hi6220_switch_voltage
>
>

Thanks Shawn,
Good to know that, something similar is already in the mainline.

Quickly looked into the driver, and I think it looks ok and doable.
I will for couple of days, to see whether I get further comments and then
spin next version.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support
  2015-09-02 13:51   ` Shawn Lin
@ 2015-09-03 18:35       ` Vaibhav Hiremath
  2015-09-03 18:35       ` Vaibhav Hiremath
  1 sibling, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-03 18:35 UTC (permalink / raw)
  To: Shawn Lin, linux-mmc; +Cc: ulf.hansson, linux-kernel, linux-arm-kernel



On Wednesday 02 September 2015 07:21 PM, Shawn Lin wrote:
> On 2015/9/2 3:32, Vaibhav Hiremath wrote:
>> In case PXA1928 family of devices, there is device/controller specific
>> configuration to control voltage/power on the IO pins.
>>
>> This patch implements and enables the sdhci_ops->voltage_switch()
>> callback api.
>> Note that IO pad register addresses are fetched as a memory resource.
>>
>> For example, in case of PXA1928 and family of devices, the DT property
>> would look something like,
>>
>> sdh1: sdh@d4280000 {
>>     compatible = "mrvl,pxav3-mmc";
>>     reg-names = "sdhci", "io-pwr", "io-pwr-lock-unlock";
>>     reg = <0xd4280000 0x120>,
>>         <0xd401e81c 4>,
>>         <0xd4015068 8>;
>>     ...
>> };
>>
>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>> ---
>>   drivers/mmc/host/sdhci-pxav3.c | 59
>> ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 59 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-pxav3.c
>> b/drivers/mmc/host/sdhci-pxav3.c
>> index 5d26fe0..cebb2f9 100644
>> --- a/drivers/mmc/host/sdhci-pxav3.c
>> +++ b/drivers/mmc/host/sdhci-pxav3.c
>> @@ -63,11 +63,18 @@
>>   #define IO_PWR_AKEY_ASSAR        0xeb10
>>   #define IO_PWR_MMC1_PAD_1V8        BIT(2)
>>
>> +/* IO Power control */
>> +#define IO_PWR_AKEY_ASFAR        0xbaba
>> +#define IO_PWR_AKEY_ASSAR        0xeb10
>> +#define IO_PWR_MMC1_PAD_1V8        BIT(2)
>> +
>>   struct sdhci_pxa {
>>       struct clk *clk_core;
>>       struct clk *clk_io;
>>       u8    power_mode;
>>       void __iomem *sdio3_conf_reg;
>> +    void __iomem *io_pwr_reg;
>> +    void __iomem *io_pwr_lock_reg;
>>   };
>>
>>   /*
>> @@ -307,6 +314,38 @@ static void pxav3_set_uhs_signaling(struct
>> sdhci_host *host, unsigned int uhs)
>>           __func__, uhs, ctrl_2);
>>   }
>>
>> +static void pxav3_voltage_switch(struct sdhci_host *host,
>> +                        u8 signal_voltage)
>> +{
>> +    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>> +    struct sdhci_pxa *pxa = pltfm_host->priv;
>> +    unsigned int val;
>> +
>> +    if (!pxa->io_pwr_reg || !pxa->io_pwr_lock_reg)
>> +        return;
>> +
>> +    /* Lock register is 64 bit: First & Second access register */
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +    val = readl(pxa->io_pwr_reg);
>> +
>> +    switch (signal_voltage) {
>> +    case MMC_SIGNAL_VOLTAGE_180:
>> +    case MMC_SIGNAL_VOLTAGE_120:
>> +        val |= IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    case MMC_SIGNAL_VOLTAGE_330:
>> +    default:
>> +        val &= ~IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    }
>> +
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +
>> +    writel(val, pxa->io_pwr_reg);
>> +}
>> +
>>   static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_clock            = sdhci_set_clock,
>>       .platform_send_init_74_clocks    = pxav3_gen_init_74_clocks,
>> @@ -314,6 +353,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_bus_width            = sdhci_set_bus_width,
>>       .reset                = pxav3_reset,
>>       .set_uhs_signaling        = pxav3_set_uhs_signaling,
>> +    .voltage_switch            = pxav3_voltage_switch,
>>   };
>>
>>   static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
>> @@ -368,6 +408,7 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>       struct sdhci_host *host = NULL;
>>       struct sdhci_pxa *pxa = NULL;
>>       const struct of_device_id *match;
>> +    struct resource *res;
>>       int ret;
>>
>>       pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa),
>> GFP_KERNEL);
>> @@ -408,6 +449,24 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>               goto err_mbus_win;
>>       }
>>
>> +    res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
>> "io-pwr-conf");
>> +    if (res) {
>> +        pxa->io_pwr_reg = devm_ioremap_resource(&pdev->dev, res);
>> +        if (IS_ERR(pxa->io_pwr_reg)) {
>> +            ret = PTR_ERR(pxa->io_pwr_reg);
>> +            goto err_mbus_win;
>> +        }
>> +    }
>
> Hi Vaibhav,
>
> Why not get it from syscon and use regmap API to deal with it.
> IMO, that's okay, you can find examples from
> drivers/mmc/host/dw_mmc-k3.c: dw_mci_hi6220_switch_voltage
>
>

After looking more into this, things are not looking good to me -

PXA1928 (thats what I have details for) has different needs here,

The lock/unlock register located in apbc_clocks register space, and sysconf
will not be right place for it.

I think the approach which I took in this series looks better to me :)

Thanks,
Vaibhav


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support
@ 2015-09-03 18:35       ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-03 18:35 UTC (permalink / raw)
  To: linux-arm-kernel



On Wednesday 02 September 2015 07:21 PM, Shawn Lin wrote:
> On 2015/9/2 3:32, Vaibhav Hiremath wrote:
>> In case PXA1928 family of devices, there is device/controller specific
>> configuration to control voltage/power on the IO pins.
>>
>> This patch implements and enables the sdhci_ops->voltage_switch()
>> callback api.
>> Note that IO pad register addresses are fetched as a memory resource.
>>
>> For example, in case of PXA1928 and family of devices, the DT property
>> would look something like,
>>
>> sdh1: sdh at d4280000 {
>>     compatible = "mrvl,pxav3-mmc";
>>     reg-names = "sdhci", "io-pwr", "io-pwr-lock-unlock";
>>     reg = <0xd4280000 0x120>,
>>         <0xd401e81c 4>,
>>         <0xd4015068 8>;
>>     ...
>> };
>>
>> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
>> ---
>>   drivers/mmc/host/sdhci-pxav3.c | 59
>> ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 59 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-pxav3.c
>> b/drivers/mmc/host/sdhci-pxav3.c
>> index 5d26fe0..cebb2f9 100644
>> --- a/drivers/mmc/host/sdhci-pxav3.c
>> +++ b/drivers/mmc/host/sdhci-pxav3.c
>> @@ -63,11 +63,18 @@
>>   #define IO_PWR_AKEY_ASSAR        0xeb10
>>   #define IO_PWR_MMC1_PAD_1V8        BIT(2)
>>
>> +/* IO Power control */
>> +#define IO_PWR_AKEY_ASFAR        0xbaba
>> +#define IO_PWR_AKEY_ASSAR        0xeb10
>> +#define IO_PWR_MMC1_PAD_1V8        BIT(2)
>> +
>>   struct sdhci_pxa {
>>       struct clk *clk_core;
>>       struct clk *clk_io;
>>       u8    power_mode;
>>       void __iomem *sdio3_conf_reg;
>> +    void __iomem *io_pwr_reg;
>> +    void __iomem *io_pwr_lock_reg;
>>   };
>>
>>   /*
>> @@ -307,6 +314,38 @@ static void pxav3_set_uhs_signaling(struct
>> sdhci_host *host, unsigned int uhs)
>>           __func__, uhs, ctrl_2);
>>   }
>>
>> +static void pxav3_voltage_switch(struct sdhci_host *host,
>> +                        u8 signal_voltage)
>> +{
>> +    struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>> +    struct sdhci_pxa *pxa = pltfm_host->priv;
>> +    unsigned int val;
>> +
>> +    if (!pxa->io_pwr_reg || !pxa->io_pwr_lock_reg)
>> +        return;
>> +
>> +    /* Lock register is 64 bit: First & Second access register */
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +    val = readl(pxa->io_pwr_reg);
>> +
>> +    switch (signal_voltage) {
>> +    case MMC_SIGNAL_VOLTAGE_180:
>> +    case MMC_SIGNAL_VOLTAGE_120:
>> +        val |= IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    case MMC_SIGNAL_VOLTAGE_330:
>> +    default:
>> +        val &= ~IO_PWR_MMC1_PAD_1V8;
>> +        break;
>> +    }
>> +
>> +    writel(IO_PWR_AKEY_ASFAR, pxa->io_pwr_lock_reg);
>> +    writel(IO_PWR_AKEY_ASSAR, pxa->io_pwr_lock_reg + 4);
>> +
>> +    writel(val, pxa->io_pwr_reg);
>> +}
>> +
>>   static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_clock            = sdhci_set_clock,
>>       .platform_send_init_74_clocks    = pxav3_gen_init_74_clocks,
>> @@ -314,6 +353,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
>>       .set_bus_width            = sdhci_set_bus_width,
>>       .reset                = pxav3_reset,
>>       .set_uhs_signaling        = pxav3_set_uhs_signaling,
>> +    .voltage_switch            = pxav3_voltage_switch,
>>   };
>>
>>   static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
>> @@ -368,6 +408,7 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>       struct sdhci_host *host = NULL;
>>       struct sdhci_pxa *pxa = NULL;
>>       const struct of_device_id *match;
>> +    struct resource *res;
>>       int ret;
>>
>>       pxa = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_pxa),
>> GFP_KERNEL);
>> @@ -408,6 +449,24 @@ static int sdhci_pxav3_probe(struct
>> platform_device *pdev)
>>               goto err_mbus_win;
>>       }
>>
>> +    res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
>> "io-pwr-conf");
>> +    if (res) {
>> +        pxa->io_pwr_reg = devm_ioremap_resource(&pdev->dev, res);
>> +        if (IS_ERR(pxa->io_pwr_reg)) {
>> +            ret = PTR_ERR(pxa->io_pwr_reg);
>> +            goto err_mbus_win;
>> +        }
>> +    }
>
> Hi Vaibhav,
>
> Why not get it from syscon and use regmap API to deal with it.
> IMO, that's okay, you can find examples from
> drivers/mmc/host/dw_mmc-k3.c: dw_mci_hi6220_switch_voltage
>
>

After looking more into this, things are not looking good to me -

PXA1928 (thats what I have details for) has different needs here,

The lock/unlock register located in apbc_clocks register space, and sysconf
will not be right place for it.

I think the approach which I took in this series looks better to me :)

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-02 11:43           ` Vaibhav Hiremath
@ 2015-09-14  9:30             ` Ulf Hansson
  -1 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2015-09-14  9:30 UTC (permalink / raw)
  To: Vaibhav Hiremath
  Cc: Jisheng Zhang, linux-mmc, Linus Walleij,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

[...]

>>>>
>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>> pxa1928
>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>> belong
>>>> to the SDHC IP core.
>>>>
>>>
>>> Not quite sure whether regulator would be right fit for this.
>>
>>
>>  From the patche[3/3], this can be achieved by abstracting the IO PAD as
>> regulators
>> then, we may not need to touch the core sdhci.c. But I'm not sure whether
>> this
>> is the good solution or not.
>
>
> Exactly...
>
>> sdhci Maintainers and experts may have better
>> suggestions.
>>
>
> Thats is the reason I stamped it as a RFC :)
>

[...]

>From an mmc core perspective it would be preferred if you implement
this as a regulator (vqmmc).

Especially since we will soon have an API for how to set the I/O
voltages - and the intelligence within that API is not something we
would like to implement for each and every host driver.
https://lkml.org/lkml/2015/8/31/367

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-14  9:30             ` Ulf Hansson
  0 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2015-09-14  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

[...]

>>>>
>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>> pxa1928
>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>> belong
>>>> to the SDHC IP core.
>>>>
>>>
>>> Not quite sure whether regulator would be right fit for this.
>>
>>
>>  From the patche[3/3], this can be achieved by abstracting the IO PAD as
>> regulators
>> then, we may not need to touch the core sdhci.c. But I'm not sure whether
>> this
>> is the good solution or not.
>
>
> Exactly...
>
>> sdhci Maintainers and experts may have better
>> suggestions.
>>
>
> Thats is the reason I stamped it as a RFC :)
>

[...]

>From an mmc core perspective it would be preferred if you implement
this as a regulator (vqmmc).

Especially since we will soon have an API for how to set the I/O
voltages - and the intelligence within that API is not something we
would like to implement for each and every host driver.
https://lkml.org/lkml/2015/8/31/367

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-14  9:30             ` Ulf Hansson
@ 2015-09-14  9:42               ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-14  9:42 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Jisheng Zhang, linux-mmc, Linus Walleij,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org



On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
> [...]
>
>>>>>
>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>> pxa1928
>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>> belong
>>>>> to the SDHC IP core.
>>>>>
>>>>
>>>> Not quite sure whether regulator would be right fit for this.
>>>
>>>
>>>   From the patche[3/3], this can be achieved by abstracting the IO PAD as
>>> regulators
>>> then, we may not need to touch the core sdhci.c. But I'm not sure whether
>>> this
>>> is the good solution or not.
>>
>>
>> Exactly...
>>
>>> sdhci Maintainers and experts may have better
>>> suggestions.
>>>
>>
>> Thats is the reason I stamped it as a RFC :)
>>
>
> [...]
>
>  From an mmc core perspective it would be preferred if you implement
> this as a regulator (vqmmc).
>
> Especially since we will soon have an API for how to set the I/O
> voltages - and the intelligence within that API is not something we
> would like to implement for each and every host driver.
> https://lkml.org/lkml/2015/8/31/367
>


I would still consider this as a regulator specific and may not address
the IO configuration within the SoC which are module specific.
The API regulator_set_voltage_triplet() will not have intelligence to
differentiate whether the call is coming from MMC or somewhere else.

Note that, the IO pad voltage configuration which I am referring to is
MMC specific and applicable only when pad is configured in MMC mode. So
technically it is not simply common pad voltage configuration.


And I am still not sure regulator framework would be right fit for
this. Pinctrl would have been right fit, but...since I saw f_sdh30
driver is already doing this, which is easy fit; so adopted the same.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-14  9:42               ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-14  9:42 UTC (permalink / raw)
  To: linux-arm-kernel



On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
> [...]
>
>>>>>
>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>> pxa1928
>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>> belong
>>>>> to the SDHC IP core.
>>>>>
>>>>
>>>> Not quite sure whether regulator would be right fit for this.
>>>
>>>
>>>   From the patche[3/3], this can be achieved by abstracting the IO PAD as
>>> regulators
>>> then, we may not need to touch the core sdhci.c. But I'm not sure whether
>>> this
>>> is the good solution or not.
>>
>>
>> Exactly...
>>
>>> sdhci Maintainers and experts may have better
>>> suggestions.
>>>
>>
>> Thats is the reason I stamped it as a RFC :)
>>
>
> [...]
>
>  From an mmc core perspective it would be preferred if you implement
> this as a regulator (vqmmc).
>
> Especially since we will soon have an API for how to set the I/O
> voltages - and the intelligence within that API is not something we
> would like to implement for each and every host driver.
> https://lkml.org/lkml/2015/8/31/367
>


I would still consider this as a regulator specific and may not address
the IO configuration within the SoC which are module specific.
The API regulator_set_voltage_triplet() will not have intelligence to
differentiate whether the call is coming from MMC or somewhere else.

Note that, the IO pad voltage configuration which I am referring to is
MMC specific and applicable only when pad is configured in MMC mode. So
technically it is not simply common pad voltage configuration.


And I am still not sure regulator framework would be right fit for
this. Pinctrl would have been right fit, but...since I saw f_sdh30
driver is already doing this, which is easy fit; so adopted the same.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-14  9:42               ` Vaibhav Hiremath
@ 2015-09-14 10:34                 ` Ulf Hansson
  -1 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2015-09-14 10:34 UTC (permalink / raw)
  To: Vaibhav Hiremath
  Cc: Jisheng Zhang, linux-mmc, Linus Walleij,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

On 14 September 2015 at 11:42, Vaibhav Hiremath
<vaibhav.hiremath@linaro.org> wrote:
>
>
> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>
>> [...]
>>
>>>>>>
>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>> pxa1928
>>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>>> belong
>>>>>> to the SDHC IP core.
>>>>>>
>>>>>
>>>>> Not quite sure whether regulator would be right fit for this.
>>>>
>>>>
>>>>
>>>>   From the patche[3/3], this can be achieved by abstracting the IO PAD
>>>> as
>>>> regulators
>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>> whether
>>>> this
>>>> is the good solution or not.
>>>
>>>
>>>
>>> Exactly...
>>>
>>>> sdhci Maintainers and experts may have better
>>>> suggestions.
>>>>
>>>
>>> Thats is the reason I stamped it as a RFC :)
>>>
>>
>> [...]
>>
>>  From an mmc core perspective it would be preferred if you implement
>> this as a regulator (vqmmc).
>>
>> Especially since we will soon have an API for how to set the I/O
>> voltages - and the intelligence within that API is not something we
>> would like to implement for each and every host driver.
>> https://lkml.org/lkml/2015/8/31/367
>>
>
>
> I would still consider this as a regulator specific and may not address
> the IO configuration within the SoC which are module specific.
> The API regulator_set_voltage_triplet() will not have intelligence to
> differentiate whether the call is coming from MMC or somewhere else.
>
> Note that, the IO pad voltage configuration which I am referring to is
> MMC specific and applicable only when pad is configured in MMC mode. So
> technically it is not simply common pad voltage configuration.
>
>
> And I am still not sure regulator framework would be right fit for
> this. Pinctrl would have been right fit, but...since I saw f_sdh30
> driver is already doing this, which is easy fit; so adopted the same.

Pinctrl would work as well, or perhaps a combination of both pinctrl
and a regulator.

What I don't like is the solution you have suggested in patch3.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-14 10:34                 ` Ulf Hansson
  0 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2015-09-14 10:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 September 2015 at 11:42, Vaibhav Hiremath
<vaibhav.hiremath@linaro.org> wrote:
>
>
> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>
>> [...]
>>
>>>>>>
>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>> pxa1928
>>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>>> belong
>>>>>> to the SDHC IP core.
>>>>>>
>>>>>
>>>>> Not quite sure whether regulator would be right fit for this.
>>>>
>>>>
>>>>
>>>>   From the patche[3/3], this can be achieved by abstracting the IO PAD
>>>> as
>>>> regulators
>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>> whether
>>>> this
>>>> is the good solution or not.
>>>
>>>
>>>
>>> Exactly...
>>>
>>>> sdhci Maintainers and experts may have better
>>>> suggestions.
>>>>
>>>
>>> Thats is the reason I stamped it as a RFC :)
>>>
>>
>> [...]
>>
>>  From an mmc core perspective it would be preferred if you implement
>> this as a regulator (vqmmc).
>>
>> Especially since we will soon have an API for how to set the I/O
>> voltages - and the intelligence within that API is not something we
>> would like to implement for each and every host driver.
>> https://lkml.org/lkml/2015/8/31/367
>>
>
>
> I would still consider this as a regulator specific and may not address
> the IO configuration within the SoC which are module specific.
> The API regulator_set_voltage_triplet() will not have intelligence to
> differentiate whether the call is coming from MMC or somewhere else.
>
> Note that, the IO pad voltage configuration which I am referring to is
> MMC specific and applicable only when pad is configured in MMC mode. So
> technically it is not simply common pad voltage configuration.
>
>
> And I am still not sure regulator framework would be right fit for
> this. Pinctrl would have been right fit, but...since I saw f_sdh30
> driver is already doing this, which is easy fit; so adopted the same.

Pinctrl would work as well, or perhaps a combination of both pinctrl
and a regulator.

What I don't like is the solution you have suggested in patch3.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-14 10:34                 ` Ulf Hansson
@ 2015-09-14 12:41                   ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-14 12:41 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Jisheng Zhang, linux-mmc, Linus Walleij,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org



On Monday 14 September 2015 04:04 PM, Ulf Hansson wrote:
> On 14 September 2015 at 11:42, Vaibhav Hiremath
> <vaibhav.hiremath@linaro.org> wrote:
>>
>>
>> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>>
>>> [...]
>>>
>>>>>>>
>>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>>> pxa1928
>>>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>>>> belong
>>>>>>> to the SDHC IP core.
>>>>>>>
>>>>>>
>>>>>> Not quite sure whether regulator would be right fit for this.
>>>>>
>>>>>
>>>>>
>>>>>    From the patche[3/3], this can be achieved by abstracting the IO PAD
>>>>> as
>>>>> regulators
>>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>>> whether
>>>>> this
>>>>> is the good solution or not.
>>>>
>>>>
>>>>
>>>> Exactly...
>>>>
>>>>> sdhci Maintainers and experts may have better
>>>>> suggestions.
>>>>>
>>>>
>>>> Thats is the reason I stamped it as a RFC :)
>>>>
>>>
>>> [...]
>>>
>>>   From an mmc core perspective it would be preferred if you implement
>>> this as a regulator (vqmmc).
>>>
>>> Especially since we will soon have an API for how to set the I/O
>>> voltages - and the intelligence within that API is not something we
>>> would like to implement for each and every host driver.
>>> https://lkml.org/lkml/2015/8/31/367
>>>
>>
>>
>> I would still consider this as a regulator specific and may not address
>> the IO configuration within the SoC which are module specific.
>> The API regulator_set_voltage_triplet() will not have intelligence to
>> differentiate whether the call is coming from MMC or somewhere else.
>>
>> Note that, the IO pad voltage configuration which I am referring to is
>> MMC specific and applicable only when pad is configured in MMC mode. So
>> technically it is not simply common pad voltage configuration.
>>
>>
>> And I am still not sure regulator framework would be right fit for
>> this. Pinctrl would have been right fit, but...since I saw f_sdh30
>> driver is already doing this, which is easy fit; so adopted the same.
>
> Pinctrl would work as well, or perhaps a combination of both pinctrl
> and a regulator.


Not sure, how I can propagate "call coming from MMC/SD" to both
regulator and pinctrl.
Probably pinctrl would already know, but then it doesn't know the
voltage settings.

Let me spend some time, but atleast at this point I am not sure.

>
> What I don't like is the solution you have suggested in patch3.
>

As I said, that was easy fit into existing implementation. :)
f_sdh30 already does something similar.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-14 12:41                   ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-14 12:41 UTC (permalink / raw)
  To: linux-arm-kernel



On Monday 14 September 2015 04:04 PM, Ulf Hansson wrote:
> On 14 September 2015 at 11:42, Vaibhav Hiremath
> <vaibhav.hiremath@linaro.org> wrote:
>>
>>
>> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>>
>>> [...]
>>>
>>>>>>>
>>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>>> pxa1928
>>>>>>> voltage_switch hook is to operate the IO pad registers, this seems not
>>>>>>> belong
>>>>>>> to the SDHC IP core.
>>>>>>>
>>>>>>
>>>>>> Not quite sure whether regulator would be right fit for this.
>>>>>
>>>>>
>>>>>
>>>>>    From the patche[3/3], this can be achieved by abstracting the IO PAD
>>>>> as
>>>>> regulators
>>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>>> whether
>>>>> this
>>>>> is the good solution or not.
>>>>
>>>>
>>>>
>>>> Exactly...
>>>>
>>>>> sdhci Maintainers and experts may have better
>>>>> suggestions.
>>>>>
>>>>
>>>> Thats is the reason I stamped it as a RFC :)
>>>>
>>>
>>> [...]
>>>
>>>   From an mmc core perspective it would be preferred if you implement
>>> this as a regulator (vqmmc).
>>>
>>> Especially since we will soon have an API for how to set the I/O
>>> voltages - and the intelligence within that API is not something we
>>> would like to implement for each and every host driver.
>>> https://lkml.org/lkml/2015/8/31/367
>>>
>>
>>
>> I would still consider this as a regulator specific and may not address
>> the IO configuration within the SoC which are module specific.
>> The API regulator_set_voltage_triplet() will not have intelligence to
>> differentiate whether the call is coming from MMC or somewhere else.
>>
>> Note that, the IO pad voltage configuration which I am referring to is
>> MMC specific and applicable only when pad is configured in MMC mode. So
>> technically it is not simply common pad voltage configuration.
>>
>>
>> And I am still not sure regulator framework would be right fit for
>> this. Pinctrl would have been right fit, but...since I saw f_sdh30
>> driver is already doing this, which is easy fit; so adopted the same.
>
> Pinctrl would work as well, or perhaps a combination of both pinctrl
> and a regulator.


Not sure, how I can propagate "call coming from MMC/SD" to both
regulator and pinctrl.
Probably pinctrl would already know, but then it doesn't know the
voltage settings.

Let me spend some time, but atleast at this point I am not sure.

>
> What I don't like is the solution you have suggested in patch3.
>

As I said, that was easy fit into existing implementation. :)
f_sdh30 already does something similar.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-14 12:41                   ` Vaibhav Hiremath
@ 2015-09-14 12:47                     ` Vaibhav Hiremath
  -1 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-14 12:47 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Jisheng Zhang, linux-mmc, Linus Walleij,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org



On Monday 14 September 2015 06:11 PM, Vaibhav Hiremath wrote:
>
>
> On Monday 14 September 2015 04:04 PM, Ulf Hansson wrote:
>> On 14 September 2015 at 11:42, Vaibhav Hiremath
>> <vaibhav.hiremath@linaro.org> wrote:
>>>
>>>
>>> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>>>
>>>> [...]
>>>>
>>>>>>>>
>>>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>>>> pxa1928
>>>>>>>> voltage_switch hook is to operate the IO pad registers, this
>>>>>>>> seems not
>>>>>>>> belong
>>>>>>>> to the SDHC IP core.
>>>>>>>>
>>>>>>>
>>>>>>> Not quite sure whether regulator would be right fit for this.
>>>>>>
>>>>>>
>>>>>>
>>>>>>    From the patche[3/3], this can be achieved by abstracting the
>>>>>> IO PAD
>>>>>> as
>>>>>> regulators
>>>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>>>> whether
>>>>>> this
>>>>>> is the good solution or not.
>>>>>
>>>>>
>>>>>
>>>>> Exactly...
>>>>>
>>>>>> sdhci Maintainers and experts may have better
>>>>>> suggestions.
>>>>>>
>>>>>
>>>>> Thats is the reason I stamped it as a RFC :)
>>>>>
>>>>
>>>> [...]
>>>>
>>>>   From an mmc core perspective it would be preferred if you implement
>>>> this as a regulator (vqmmc).
>>>>
>>>> Especially since we will soon have an API for how to set the I/O
>>>> voltages - and the intelligence within that API is not something we
>>>> would like to implement for each and every host driver.
>>>> https://lkml.org/lkml/2015/8/31/367
>>>>
>>>
>>>
>>> I would still consider this as a regulator specific and may not address
>>> the IO configuration within the SoC which are module specific.
>>> The API regulator_set_voltage_triplet() will not have intelligence to
>>> differentiate whether the call is coming from MMC or somewhere else.
>>>
>>> Note that, the IO pad voltage configuration which I am referring to is
>>> MMC specific and applicable only when pad is configured in MMC mode. So
>>> technically it is not simply common pad voltage configuration.
>>>
>>>
>>> And I am still not sure regulator framework would be right fit for
>>> this. Pinctrl would have been right fit, but...since I saw f_sdh30
>>> driver is already doing this, which is easy fit; so adopted the same.
>>
>> Pinctrl would work as well, or perhaps a combination of both pinctrl
>> and a regulator.
>
>
> Not sure, how I can propagate "call coming from MMC/SD" to both
> regulator and pinctrl.
> Probably pinctrl would already know, but then it doesn't know the
> voltage settings.
>
> Let me spend some time, but atleast at this point I am not sure.
>
>>

On the side note,
Lets park this patch aside, till I get back with better option.

It would be nice if you could review other patches, let them notget
blocked due to this.


Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-09-14 12:47                     ` Vaibhav Hiremath
  0 siblings, 0 replies; 35+ messages in thread
From: Vaibhav Hiremath @ 2015-09-14 12:47 UTC (permalink / raw)
  To: linux-arm-kernel



On Monday 14 September 2015 06:11 PM, Vaibhav Hiremath wrote:
>
>
> On Monday 14 September 2015 04:04 PM, Ulf Hansson wrote:
>> On 14 September 2015 at 11:42, Vaibhav Hiremath
>> <vaibhav.hiremath@linaro.org> wrote:
>>>
>>>
>>> On Monday 14 September 2015 03:00 PM, Ulf Hansson wrote:
>>>>
>>>> [...]
>>>>
>>>>>>>>
>>>>>>>> Could this be implemented by regulator API? From patch set 3/3, the
>>>>>>>> pxa1928
>>>>>>>> voltage_switch hook is to operate the IO pad registers, this
>>>>>>>> seems not
>>>>>>>> belong
>>>>>>>> to the SDHC IP core.
>>>>>>>>
>>>>>>>
>>>>>>> Not quite sure whether regulator would be right fit for this.
>>>>>>
>>>>>>
>>>>>>
>>>>>>    From the patche[3/3], this can be achieved by abstracting the
>>>>>> IO PAD
>>>>>> as
>>>>>> regulators
>>>>>> then, we may not need to touch the core sdhci.c. But I'm not sure
>>>>>> whether
>>>>>> this
>>>>>> is the good solution or not.
>>>>>
>>>>>
>>>>>
>>>>> Exactly...
>>>>>
>>>>>> sdhci Maintainers and experts may have better
>>>>>> suggestions.
>>>>>>
>>>>>
>>>>> Thats is the reason I stamped it as a RFC :)
>>>>>
>>>>
>>>> [...]
>>>>
>>>>   From an mmc core perspective it would be preferred if you implement
>>>> this as a regulator (vqmmc).
>>>>
>>>> Especially since we will soon have an API for how to set the I/O
>>>> voltages - and the intelligence within that API is not something we
>>>> would like to implement for each and every host driver.
>>>> https://lkml.org/lkml/2015/8/31/367
>>>>
>>>
>>>
>>> I would still consider this as a regulator specific and may not address
>>> the IO configuration within the SoC which are module specific.
>>> The API regulator_set_voltage_triplet() will not have intelligence to
>>> differentiate whether the call is coming from MMC or somewhere else.
>>>
>>> Note that, the IO pad voltage configuration which I am referring to is
>>> MMC specific and applicable only when pad is configured in MMC mode. So
>>> technically it is not simply common pad voltage configuration.
>>>
>>>
>>> And I am still not sure regulator framework would be right fit for
>>> this. Pinctrl would have been right fit, but...since I saw f_sdh30
>>> driver is already doing this, which is easy fit; so adopted the same.
>>
>> Pinctrl would work as well, or perhaps a combination of both pinctrl
>> and a regulator.
>
>
> Not sure, how I can propagate "call coming from MMC/SD" to both
> regulator and pinctrl.
> Probably pinctrl would already know, but then it doesn't know the
> voltage settings.
>
> Let me spend some time, but atleast at this point I am not sure.
>
>>

On the side note,
Lets park this patch aside, till I get back with better option.

It would be nice if you could review other patches, let them notget
blocked due to this.


Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
  2015-09-02  8:19       ` Vaibhav Hiremath
@ 2015-10-02 10:00         ` Linus Walleij
  -1 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2015-10-02 10:00 UTC (permalink / raw)
  To: Vaibhav Hiremath
  Cc: Jisheng Zhang, linux-mmc@vger.kernel.org, Ulf Hansson,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

On Wed, Sep 2, 2015 at 1:19 AM, Vaibhav Hiremath
<vaibhav.hiremath@linaro.org> wrote:

> Not quite sure whether regulator would be right fit for this.
>
> Initially I was thinking of making use of pinconf framework, using
> PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
> doing it.
>
> Probably, question for pinctrl maintainer. Looping Linus Walleji.

We have another pinctrl driver exposing the occasional fixed regulator
for exactly this purpose, see:
sh-pfc/pfc-sh73a0.c

So use the same mechanism for this driver.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages
@ 2015-10-02 10:00         ` Linus Walleij
  0 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2015-10-02 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 2, 2015 at 1:19 AM, Vaibhav Hiremath
<vaibhav.hiremath@linaro.org> wrote:

> Not quite sure whether regulator would be right fit for this.
>
> Initially I was thinking of making use of pinconf framework, using
> PIN_CONFIG_POWER_SOURCE, but that too I am not sure is the right way of
> doing it.
>
> Probably, question for pinctrl maintainer. Looping Linus Walleji.

We have another pinctrl driver exposing the occasional fixed regulator
for exactly this purpose, see:
sh-pfc/pfc-sh73a0.c

So use the same mechanism for this driver.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2015-10-02 10:00 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 19:32 [RFC 0/3] mmc: sdhci: pass signal voltage as an argument to ->voltage_switch() Vaibhav Hiremath
2015-09-01 19:32 ` Vaibhav Hiremath
2015-09-01 19:32 ` [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback Vaibhav Hiremath
2015-09-01 19:32   ` Vaibhav Hiremath
2015-09-01 19:32 ` [RFC 2/3] mmc: sdhci: add host_ops->voltage_switch callback for all other voltages Vaibhav Hiremath
2015-09-01 19:32   ` Vaibhav Hiremath
2015-09-02  7:04   ` Jisheng Zhang
2015-09-02  7:04     ` Jisheng Zhang
2015-09-02  7:04     ` Jisheng Zhang
2015-09-02  8:19     ` Vaibhav Hiremath
2015-09-02  8:19       ` Vaibhav Hiremath
2015-09-02  8:26       ` Jisheng Zhang
2015-09-02  8:26         ` Jisheng Zhang
2015-09-02  8:26         ` Jisheng Zhang
2015-09-02 11:43         ` Vaibhav Hiremath
2015-09-02 11:43           ` Vaibhav Hiremath
2015-09-14  9:30           ` Ulf Hansson
2015-09-14  9:30             ` Ulf Hansson
2015-09-14  9:42             ` Vaibhav Hiremath
2015-09-14  9:42               ` Vaibhav Hiremath
2015-09-14 10:34               ` Ulf Hansson
2015-09-14 10:34                 ` Ulf Hansson
2015-09-14 12:41                 ` Vaibhav Hiremath
2015-09-14 12:41                   ` Vaibhav Hiremath
2015-09-14 12:47                   ` Vaibhav Hiremath
2015-09-14 12:47                     ` Vaibhav Hiremath
2015-10-02 10:00       ` Linus Walleij
2015-10-02 10:00         ` Linus Walleij
2015-09-01 19:32 ` [RFC 3/3] mmc: sdhci-pxav3: Add ->voltage_switch callback support Vaibhav Hiremath
2015-09-01 19:32   ` Vaibhav Hiremath
2015-09-02 13:51   ` Shawn Lin
2015-09-02 14:32     ` Vaibhav Hiremath
2015-09-02 14:32       ` Vaibhav Hiremath
2015-09-03 18:35     ` Vaibhav Hiremath
2015-09-03 18:35       ` Vaibhav Hiremath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.