All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 2/7] ARM: shmobile: ape6evm: add MMCIF support
@ 2013-07-10  8:13 Guennadi Liakhovetski
  2013-07-10 13:20 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2013-07-10  8:13 UTC (permalink / raw)
  To: linux-sh

Add MMCIF support to the APE6EVM board in PIO mode only. Power supply is
fixed for now, eventually support for the tps80032 regulator, also
supplying both VDD and VccQ to the MMCIF slot should be added to APE6EVM.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
---

v4: dropped DMA support

Hi Simon, this patch is again for the APE6EVM state before the "ARM: 
shmobile: ape6evm: add SDHI interfaces" patch. As discussed with you, you 
prefer to regenerate your tree with this patch applied first, and the 
"SDHI" one on top, to fix the regulator issue, that emerged due to the 
reversed commit order. After this patch applied, the original SDHI patch 
version should be used.
Thanks
Guennadi

 arch/arm/mach-shmobile/board-ape6evm.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index af6dd39..8c7529c 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -21,6 +21,8 @@
 #include <linux/gpio.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
+#include <linux/mmc/host.h>
+#include <linux/mmc/sh_mmcif.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/fixed.h>
@@ -54,6 +56,25 @@ static const struct smsc911x_platform_config lan9220_data = {
 	.irq_polarity	= SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
 };
 
+/*
+ * On APE6EVM power is supplied to MMCIF by a tps80032 regulator. For now we
+ * model a VDD supply to MMCIF, using a fixed 3.3V regulator.
+ */
+static struct regulator_consumer_supply fixed3v3_power_consumers[] +{
+	REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
+};
+
+/* MMCIF */
+static struct sh_mmcif_plat_data mmcif0_pdata = {
+	.caps		= MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
+};
+
+static struct resource mmcif0_resources[] = {
+	DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"),
+	DEFINE_RES_IRQ(gic_spi(169)),
+};
+
 static const struct pinctrl_map ape6evm_pinctrl_map[] = {
 	/* SCIFA0 console */
 	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4",
@@ -61,6 +82,11 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = {
 	/* SMSC */
 	PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a73a4",
 				  "irqc_irq40", "irqc"),
+	/* MMCIF0 */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4",
+				  "mmc0_data8", "mmc0"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4",
+				  "mmc0_ctrl", "mmc0"),
 };
 
 static void __init ape6evm_add_standard_devices(void)
@@ -93,6 +119,11 @@ static void __init ape6evm_add_standard_devices(void)
 	platform_device_register_resndata(&platform_bus, "smsc911x", -1,
 					  lan9220_res, ARRAY_SIZE(lan9220_res),
 					  &lan9220_data, sizeof(lan9220_data));
+	regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
+				     ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
+	platform_device_register_resndata(&platform_bus, "sh_mmcif", 0,
+					  mmcif0_resources, ARRAY_SIZE(mmcif0_resources),
+					  &mmcif0_pdata, sizeof(mmcif0_pdata));
 }
 
 static const char *ape6evm_boards_compat_dt[] __initdata = {
-- 
1.7.2.5


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

* Re: [PATCH v4 2/7] ARM: shmobile: ape6evm: add MMCIF support
  2013-07-10  8:13 [PATCH v4 2/7] ARM: shmobile: ape6evm: add MMCIF support Guennadi Liakhovetski
@ 2013-07-10 13:20 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2013-07-10 13:20 UTC (permalink / raw)
  To: linux-sh

On Wed, Jul 10, 2013 at 10:13:08AM +0200, Guennadi Liakhovetski wrote:
> Add MMCIF support to the APE6EVM board in PIO mode only. Power supply is
> fixed for now, eventually support for the tps80032 regulator, also
> supplying both VDD and VccQ to the MMCIF slot should be added to APE6EVM.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> Acked-by: Magnus Damm <damm@opensource.se>
> ---
> 
> v4: dropped DMA support
> 
> Hi Simon, this patch is again for the APE6EVM state before the "ARM: 
> shmobile: ape6evm: add SDHI interfaces" patch. As discussed with you, you 
> prefer to regenerate your tree with this patch applied first, and the 
> "SDHI" one on top, to fix the regulator issue, that emerged due to the 
> reversed commit order. After this patch applied, the original SDHI patch 
> version should be used.

Thanks, and sorry once again for messing things up.

I have done the following:

1. Dropped "ARM: shmobile: ape6evm: add SDHI interfaces"
2. Applied this patch
3. Applied the original (v3) version of "ARM: shmobile: ape6evm: add SDHI
   interfaces"

These changes are queued up for v3.12 in the boards branch and
should appear on renesas-next-20130710v2.

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

end of thread, other threads:[~2013-07-10 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10  8:13 [PATCH v4 2/7] ARM: shmobile: ape6evm: add MMCIF support Guennadi Liakhovetski
2013-07-10 13:20 ` Simon Horman

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.