All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23
@ 2010-11-29  6:19 Kuninori Morimoto
  2010-11-29  8:26 ` Paul Mundt
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: Kuninori Morimoto @ 2010-11-29  6:19 UTC (permalink / raw)
  To: linux-sh

RGB24 bus needs 18-23 pin

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 889ce4f..e6407cc 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -294,6 +294,12 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_IRQ6_39,	NULL);
 
 	/* LCDC */
+	gpio_request(GPIO_FN_LCDD23,   NULL);
+	gpio_request(GPIO_FN_LCDD22,   NULL);
+	gpio_request(GPIO_FN_LCDD21,   NULL);
+	gpio_request(GPIO_FN_LCDD20,   NULL);
+	gpio_request(GPIO_FN_LCDD19,   NULL);
+	gpio_request(GPIO_FN_LCDD18,   NULL);
 	gpio_request(GPIO_FN_LCDD17,   NULL);
 	gpio_request(GPIO_FN_LCDD16,   NULL);
 	gpio_request(GPIO_FN_LCDD15,   NULL);
-- 
1.7.0.4


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
@ 2010-11-29  8:26 ` Paul Mundt
  2010-11-30  4:37 ` [PATCH] ARM: mach-shmobile: mackerel: Add USB1(Host) support Kuninori Morimoto
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-11-29  8:26 UTC (permalink / raw)
  To: linux-sh

On Mon, Nov 29, 2010 at 03:19:52PM +0900, Kuninori Morimoto wrote:
> RGB24 bus needs 18-23 pin
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-mackerel.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
Applied to rmobile/mackerel, thanks.

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

* [PATCH] ARM: mach-shmobile: mackerel: Add USB1(Host) support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
  2010-11-29  8:26 ` Paul Mundt
@ 2010-11-30  4:37 ` Kuninori Morimoto
  2010-11-30  5:18 ` Paul Mundt
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Kuninori Morimoto @ 2010-11-30  4:37 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   69 ++++++++++++++++++++++++++++++-
 1 files changed, 68 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index e6407cc..f9418e7 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -33,6 +33,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/smsc911x.h>
+#include <linux/usb/r8a66597.h>
 
 #include <video/sh_mobile_lcdc.h>
 
@@ -114,8 +115,22 @@
  * IRQ9  | ICR2A.IRQ9SA\010  | KEY(TCA6408)       | Low
  * IRQ21 | ICR4A.IRQ21SA\011 | Sensor(ADXL345)    | High
  * IRQ22 | ICR4A.IRQ22SA\011 | Sensor(AK8975)     | High
+ */
 
-*/
+/*
+ * USB
+ *
+ * USB0 : CN22 : Function
+ * USB1 : CN31 : Function/Host *1
+ *
+ * J30 (for CN31) *1
+ * ----------+---------------+-------------
+ * 1-2 short | VBUS 5V       | Host
+ * open      | external VBUS | Function
+ *
+ * *1
+ * CN31 is used as Host in Linux.
+ */
 
 /* MTD */
 static struct mtd_partition nor_flash_partitions[] = {
@@ -254,10 +269,51 @@ static struct platform_device lcdc_device = {
 	},
 };
 
+/* USB1 (Host) */
+static void usb1_host_port_power(int port, int power)
+{
+	if (!power) /* only power-on is supported for now */
+		return;
+
+	/* set VBOUT/PWEN and EXTLP1 in DVSTCTR */
+	__raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008);
+}
+
+static struct r8a66597_platdata usb1_host_data = {
+	.on_chip	= 1,
+	.port_power	= usb1_host_port_power,
+};
+
+static struct resource usb1_host_resources[] = {
+	[0] = {
+		.name	= "USBHS",
+		.start	= 0xE68B0000,
+		.end	= 0xE68B00E6 - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= evt2irq(0x1ce0) /* USB1_USB1I0 */,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device usb1_host_device = {
+	.name	= "r8a66597_hcd",
+	.id	= 1,
+	.dev = {
+		.dma_mask		= NULL,         /*  not use dma */
+		.coherent_dma_mask	= 0xffffffff,
+		.platform_data		= &usb1_host_data,
+	},
+	.num_resources	= ARRAY_SIZE(usb1_host_resources),
+	.resource	= usb1_host_resources,
+};
+
 static struct platform_device *mackerel_devices[] __initdata = {
 	&nor_flash_device,
 	&smc911x_device,
 	&lcdc_device,
+	&usb1_host_device,
 };
 
 static struct map_desc mackerel_io_desc[] __initdata = {
@@ -327,6 +383,17 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_PORT151, NULL); /* LCDDON */
 	gpio_direction_output(GPIO_PORT151, 1);
 
+	/* USB enable */
+	gpio_request(GPIO_FN_VBUS0_1,    NULL);
+	gpio_request(GPIO_FN_IDIN_1_18,  NULL);
+	gpio_request(GPIO_FN_PWEN_1_115, NULL);
+	gpio_request(GPIO_FN_OVCN_1_114, NULL);
+	gpio_request(GPIO_FN_EXTLP_1,    NULL);
+	gpio_request(GPIO_FN_OVCN2_1,    NULL);
+
+	/* setup USB phy */
+	__raw_writew(0x8a0a, 0xE6058130);	/* USBCR2 */
+
 
 	sh7372_add_standard_devices();
 
-- 
1.7.0.4


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add USB1(Host) support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
  2010-11-29  8:26 ` Paul Mundt
  2010-11-30  4:37 ` [PATCH] ARM: mach-shmobile: mackerel: Add USB1(Host) support Kuninori Morimoto
@ 2010-11-30  5:18 ` Paul Mundt
  2010-11-30  6:52 ` [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support Kuninori Morimoto
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-11-30  5:18 UTC (permalink / raw)
  To: linux-sh

On Tue, Nov 30, 2010 at 01:37:33PM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-mackerel.c |   69 ++++++++++++++++++++++++++++++-
>  1 files changed, 68 insertions(+), 1 deletions(-)
> 
Applied, thanks.

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

* [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (2 preceding siblings ...)
  2010-11-30  5:18 ` Paul Mundt
@ 2010-11-30  6:52 ` Kuninori Morimoto
  2010-12-01  0:31 ` [PATCH] ARM: mach-shmobile: mackerel: Add FSI-AK4643 support Kuninori Morimoto
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Kuninori Morimoto @ 2010-11-30  6:52 UTC (permalink / raw)
  To: linux-sh

you can control it by
echo 0 > /sys/class/leds/led0/brightness
echo 1 > /sys/class/leds/led0/brightness

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   40 +++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index f9418e7..b9528b0 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -29,6 +29,7 @@
 #include <linux/gpio.h>
 #include <linux/input.h>
 #include <linux/io.h>
+#include <linux/leds.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
@@ -309,11 +310,50 @@ static struct platform_device usb1_host_device = {
 	.resource	= usb1_host_resources,
 };
 
+/* LED */
+static struct gpio_led mackerel_leds[] = {
+	{
+		.name		= "led0",
+		.gpio		= GPIO_PORT0,
+		.default_state	= LEDS_GPIO_DEFSTATE_ON,
+	},
+	{
+		.name		= "led1",
+		.gpio		= GPIO_PORT1,
+		.default_state	= LEDS_GPIO_DEFSTATE_ON,
+	},
+	{
+		.name		= "led2",
+		.gpio		= GPIO_PORT2,
+		.default_state	= LEDS_GPIO_DEFSTATE_ON,
+	},
+	{
+		.name		= "led3",
+		.gpio		= GPIO_PORT159,
+		.default_state	= LEDS_GPIO_DEFSTATE_ON,
+	}
+};
+
+static struct gpio_led_platform_data mackerel_leds_pdata = {
+	.leds = mackerel_leds,
+	.num_leds = ARRAY_SIZE(mackerel_leds),
+};
+
+static struct platform_device leds_device = {
+	.name = "leds-gpio",
+	.id = 0,
+	.dev = {
+		.platform_data  = &mackerel_leds_pdata,
+	},
+};
+
+
 static struct platform_device *mackerel_devices[] __initdata = {
 	&nor_flash_device,
 	&smc911x_device,
 	&lcdc_device,
 	&usb1_host_device,
+	&leds_device,
 };
 
 static struct map_desc mackerel_io_desc[] __initdata = {
-- 
1.7.1


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

* [PATCH] ARM: mach-shmobile: mackerel: Add FSI-AK4643 support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (3 preceding siblings ...)
  2010-11-30  6:52 ` [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support Kuninori Morimoto
@ 2010-12-01  0:31 ` Kuninori Morimoto
  2010-12-01  7:09 ` [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support Paul Mundt
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Kuninori Morimoto @ 2010-12-01  0:31 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
This patch is depend on
[PATCH] ARM: mach-shmobile: mackerel: Add LEDs support

On paul's rmobile/mackerel branch + this patch,
compile is OK, but FSI-AK4643 doesn't work.
If ALSA tree was merged, it start work.

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

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index b9528b0..cf3e660 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -29,15 +29,19 @@
 #include <linux/gpio.h>
 #include <linux/input.h>
 #include <linux/io.h>
+#include <linux/i2c.h>
 #include <linux/leds.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/smsc911x.h>
+#include <linux/sh_intc.h>
 #include <linux/usb/r8a66597.h>
 
 #include <video/sh_mobile_lcdc.h>
 
+#include <sound/sh_fsi.h>
+
 #include <mach/common.h>
 #include <mach/sh7372.h>
 
@@ -133,6 +137,21 @@
  * CN31 is used as Host in Linux.
  */
 
+/*
+ * FIXME !!
+ *
+ * gpio_no_direction
+ * are quick_hack.
+ *
+ * current gpio frame work doesn't have
+ * the method to control only pull up/down/free.
+ * this function should be replaced by correct gpio function
+ */
+static void __init gpio_no_direction(u32 addr)
+{
+	__raw_writeb(0x00, addr);
+}
+
 /* MTD */
 static struct mtd_partition nor_flash_partitions[] = {
 	{
@@ -347,6 +366,42 @@ static struct platform_device leds_device = {
 	},
 };
 
+/* FSI */
+#define IRQ_FSI evt2irq(0x1840)
+static struct sh_fsi_platform_info fsi_info = {
+	.porta_flags =	SH_FSI_BRS_INV		|
+			SH_FSI_OUT_SLAVE_MODE	|
+			SH_FSI_IN_SLAVE_MODE	|
+			SH_FSI_OFMT(PCM)	|
+			SH_FSI_IFMT(PCM),
+};
+
+static struct resource fsi_resources[] = {
+	[0] = {
+		.name	= "FSI",
+		.start	= 0xFE3C0000,
+		.end	= 0xFE3C0400 - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = IRQ_FSI,
+		.flags  = IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device fsi_device = {
+	.name		= "sh_fsi2",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(fsi_resources),
+	.resource	= fsi_resources,
+	.dev	= {
+		.platform_data	= &fsi_info,
+	},
+};
+
+static struct platform_device fsi_ak4643_device = {
+	.name		= "sh_fsi2_a_ak4643",
+};
 
 static struct platform_device *mackerel_devices[] __initdata = {
 	&nor_flash_device,
@@ -354,6 +409,15 @@ static struct platform_device *mackerel_devices[] __initdata = {
 	&lcdc_device,
 	&usb1_host_device,
 	&leds_device,
+	&fsi_device,
+	&fsi_ak4643_device,
+};
+
+/* I2C */
+static struct i2c_board_info i2c0_devices[] = {
+	{
+		I2C_BOARD_INFO("ak4643", 0x13),
+	},
 };
 
 static struct map_desc mackerel_io_desc[] __initdata = {
@@ -377,6 +441,8 @@ static void __init mackerel_map_io(void)
 	shmobile_setup_console();
 }
 
+#define GPIO_PORT9CR	0xE6051009
+#define GPIO_PORT10CR	0xE605100A
 static void __init mackerel_init(void)
 {
 	sh7372_pinmux_init();
@@ -434,6 +500,24 @@ static void __init mackerel_init(void)
 	/* setup USB phy */
 	__raw_writew(0x8a0a, 0xE6058130);	/* USBCR2 */
 
+	/* enable FSI2 port A (ak4643) */
+	gpio_request(GPIO_FN_FSIAIBT,	NULL);
+	gpio_request(GPIO_FN_FSIAILR,	NULL);
+	gpio_request(GPIO_FN_FSIAISLD,	NULL);
+	gpio_request(GPIO_FN_FSIAOSLD,	NULL);
+	gpio_request(GPIO_PORT161,	NULL);
+	gpio_direction_output(GPIO_PORT161, 0); /* slave */
+
+	gpio_request(GPIO_PORT9,  NULL);
+	gpio_request(GPIO_PORT10, NULL);
+	gpio_no_direction(GPIO_PORT9CR);  /* FSIAOBT needs no direction */
+	gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */
+
+	intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */
+
+
+	i2c_register_board_info(0, i2c0_devices,
+				ARRAY_SIZE(i2c0_devices));
 
 	sh7372_add_standard_devices();
 
-- 
1.7.1


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (4 preceding siblings ...)
  2010-12-01  0:31 ` [PATCH] ARM: mach-shmobile: mackerel: Add FSI-AK4643 support Kuninori Morimoto
@ 2010-12-01  7:09 ` Paul Mundt
  2010-12-07  9:12 ` [PATCH] ARM: mach-shmobile: mackerel: Add Accelerometer sensor support sim.chinyeow
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-01  7:09 UTC (permalink / raw)
  To: linux-sh

On Tue, Nov 30, 2010 at 03:52:18PM +0900, Kuninori Morimoto wrote:
> you can control it by
> echo 0 > /sys/class/leds/led0/brightness
> echo 1 > /sys/class/leds/led0/brightness
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

On Wed, Dec 01, 2010 at 09:31:46AM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> This patch is depend on
> [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support
> 
> On paul's rmobile/mackerel branch + this patch,
> compile is OK, but FSI-AK4643 doesn't work.
> If ALSA tree was merged, it start work.
> 
That's fine, it'll all get sorted out in -next or the merge window.

Both applied, thanks.

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

* [PATCH] ARM: mach-shmobile: mackerel: Add Accelerometer sensor support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (5 preceding siblings ...)
  2010-12-01  7:09 ` [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support Paul Mundt
@ 2010-12-07  9:12 ` sim.chinyeow
  2010-12-08  5:37 ` Paul Mundt
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: sim.chinyeow @ 2010-12-07  9:12 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index f9418e7..7ae1b03 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -309,6 +309,15 @@ static struct platform_device usb1_host_device = {
 	.resource	= usb1_host_resources,
 };
 
+#define IRQ21 evt2irq(0x32a0)
+static struct i2c_board_info i2c1_devices[] = {
+	/* Accelerometer */
+	{
+		I2C_BOARD_INFO("adxl34x", 0x53),
+		.irq = IRQ21,
+	},
+};
+
 static struct platform_device *mackerel_devices[] __initdata = {
 	&nor_flash_device,
 	&smc911x_device,
@@ -394,6 +403,12 @@ static void __init mackerel_init(void)
 	/* setup USB phy */
 	__raw_writew(0x8a0a, 0xE6058130);	/* USBCR2 */
 
+	/* enable Accelerometer */
+	gpio_request(GPIO_FN_IRQ21,	NULL);
+	set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
+
+	i2c_register_board_info(1, i2c1_devices,
+				ARRAY_SIZE(i2c1_devices));
 
 	sh7372_add_standard_devices();
 
-- 
1.7.2.3


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add Accelerometer sensor support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (6 preceding siblings ...)
  2010-12-07  9:12 ` [PATCH] ARM: mach-shmobile: mackerel: Add Accelerometer sensor support sim.chinyeow
@ 2010-12-08  5:37 ` Paul Mundt
  2010-12-09  1:55 ` [PATCH] ARM: mach-shmobile: mackerel: Add keypad tca6408a support chinyeow.sim.xt
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-08  5:37 UTC (permalink / raw)
  To: linux-sh

On Tue, Dec 07, 2010 at 06:12:14PM +0900, sim.chinyeow wrote:
> Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-mackerel.c |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
Applied to rmobile/mackerel, thanks.

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

* [PATCH] ARM: mach-shmobile: mackerel: Add keypad tca6408a support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (7 preceding siblings ...)
  2010-12-08  5:37 ` Paul Mundt
@ 2010-12-09  1:55 ` chinyeow.sim.xt
  2010-12-13  5:10 ` Paul Mundt
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: chinyeow.sim.xt @ 2010-12-09  1:55 UTC (permalink / raw)
  To: linux-sh

This patch maps key0/key1/key2/key3 as HOME/MENU/BACK/POWER buttons
on mackerel board.

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   38 +++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index a0caa9e..3e30a52 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -36,6 +36,7 @@
 #include <linux/mtd/physmap.h>
 #include <linux/smsc911x.h>
 #include <linux/sh_intc.h>
+#include <linux/tca6416_keypad.h>
 #include <linux/usb/r8a66597.h>
 
 #include <video/sh_mobile_lcdc.h>
@@ -413,11 +414,44 @@ static struct platform_device *mackerel_devices[] __initdata = {
 	&fsi_ak4643_device,
 };
 
+/* Keypad Initialization */
+#define KEYPAD_BUTTON(ev_type, ev_code, act_low) \
+{								\
+	.type		= ev_type,				\
+	.code		= ev_code,				\
+	.active_low	= act_low,				\
+}
+
+#define KEYPAD_BUTTON_LOW(event_code) KEYPAD_BUTTON(EV_KEY, event_code, 1)
+
+static struct tca6416_button mackerel_gpio_keys[] = {
+	KEYPAD_BUTTON_LOW(KEY_HOME),
+	KEYPAD_BUTTON_LOW(KEY_MENU),
+	KEYPAD_BUTTON_LOW(KEY_BACK),
+	KEYPAD_BUTTON_LOW(KEY_POWER),
+};
+
+static struct tca6416_keys_platform_data mackerel_tca6416_keys_info = {
+	.buttons	= mackerel_gpio_keys,
+	.nbuttons	= ARRAY_SIZE(mackerel_gpio_keys),
+	.rep		= 1,
+	.use_polling	= 0,
+	.pinmask	= 0x000F,
+};
+
 /* I2C */
+#define IRQ9 evt2irq(0x0320)
+
 static struct i2c_board_info i2c0_devices[] = {
 	{
 		I2C_BOARD_INFO("ak4643", 0x13),
 	},
+	/* Keypad */
+	{
+		I2C_BOARD_INFO("tca6408-keys", 0x20),
+		.platform_data = &mackerel_tca6416_keys_info,
+		.irq = IRQ9,
+	},
 };
 
 #define IRQ21 evt2irq(0x32a0)
@@ -525,6 +559,10 @@ static void __init mackerel_init(void)
 
 	intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */
 
+	/* enable Keypad */
+	gpio_request(GPIO_FN_IRQ9_42,	NULL);
+	set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);
+
 	/* enable Accelerometer */
 	gpio_request(GPIO_FN_IRQ21,	NULL);
 	set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
-- 
1.7.2.3


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add keypad tca6408a support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (8 preceding siblings ...)
  2010-12-09  1:55 ` [PATCH] ARM: mach-shmobile: mackerel: Add keypad tca6408a support chinyeow.sim.xt
@ 2010-12-13  5:10 ` Paul Mundt
  2010-12-14  5:18 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Yusuke Goda
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-13  5:10 UTC (permalink / raw)
  To: linux-sh

On Thu, Dec 09, 2010 at 10:55:55AM +0900, chinyeow.sim.xt@renesas.com wrote:
> This patch maps key0/key1/key2/key3 as HOME/MENU/BACK/POWER buttons
> on mackerel board.
> 
> Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>

Applied, thanks.

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

* [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (9 preceding siblings ...)
  2010-12-13  5:10 ` Paul Mundt
@ 2010-12-14  5:18 ` Yusuke Goda
  2010-12-14  9:50 ` Paul Mundt
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Yusuke Goda @ 2010-12-14  5:18 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |  175 +++++++++++++++++++++++++++++++
 1 files changed, 175 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 3e30a52..f62f9b9 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -31,6 +31,9 @@
 #include <linux/io.h>
 #include <linux/i2c.h>
 #include <linux/leds.h>
+#include <linux/mfd/sh_mobile_sdhi.h>
+#include <linux/mfd/tmio.h>
+#include <linux/mmc/host.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
@@ -139,6 +142,38 @@
  */

 /*
+ * SDHI0 (CN12)
+ *
+ * SW56 : OFF
+ *
+ */
+
+/* MMC /SDHI1 (CN7)
+ *
+ * I/O voltage : 1.8v
+ *
+ * Power voltage : 1.8v or 3.3v
+ *  J22 : select power voltage
+ *	1-2 pin : 1.8v
+ *	2-3 pin : 3.3v
+ *
+ *	SW1	|	SW33
+ *		| bit1 | bit2 | bit3 | bit4
+ * -------------+------+------+------+-------
+ * MMC0	  OFF	|  OFF |  ON  |  ON  |  X
+ * MMC1	  ON	|  OFF |  ON  |  X   | ON
+ * SDHI1  OFF	|  ON  |   X  |  OFF | ON
+ *
+ */
+
+/*
+ * SDHI2 (CN23)
+ *
+ * microSD card sloct
+ *
+ */
+
+/*
  * FIXME !!
  *
  * gpio_no_direction
@@ -404,6 +439,114 @@ static struct platform_device fsi_ak4643_device = {
 	.name		= "sh_fsi2_a_ak4643",
 };

+/*
+ * The card detect pin of the top SD/MMC slot (CN7) is active low and is
+ * connected to GPIO A22 of SH7372 (GPIO_PORT41).
+ */
+static int slot_cn7_get_cd(struct platform_device *pdev)
+{
+	if (gpio_is_valid(GPIO_PORT41))
+		return !gpio_get_value(GPIO_PORT41);
+	else
+		return -ENXIO;
+}
+
+/* SDHI0 */
+static struct sh_mobile_sdhi_info sdhi0_info = {
+	.dma_slave_tx	= SHDMA_SLAVE_SDHI0_TX,
+	.dma_slave_rx	= SHDMA_SLAVE_SDHI0_RX,
+	.tmio_caps	= MMC_CAP_SD_HIGHSPEED,
+};
+
+static struct resource sdhi0_resources[] = {
+	[0] = {
+		.name	= "SDHI0",
+		.start	= 0xe6850000,
+		.end	= 0xe68501ff,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= evt2irq(0x0e00) /* SDHI0 */,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device sdhi0_device = {
+	.name		= "sh_mobile_sdhi",
+	.num_resources	= ARRAY_SIZE(sdhi0_resources),
+	.resource	= sdhi0_resources,
+	.id		= 0,
+	.dev	= {
+		.platform_data	= &sdhi0_info,
+	},
+};
+
+/* SDHI1 */
+static struct sh_mobile_sdhi_info sdhi1_info = {
+	.dma_slave_tx	= SHDMA_SLAVE_SDHI1_TX,
+	.dma_slave_rx	= SHDMA_SLAVE_SDHI1_RX,
+	.tmio_ocr_mask	= MMC_VDD_165_195,
+	.tmio_flags	= TMIO_MMC_WRPROTECT_DISABLE,
+	.tmio_caps	= MMC_CAP_SD_HIGHSPEED |
+			  MMC_CAP_NEEDS_POLL,
+	.get_cd		= slot_cn7_get_cd,
+};
+
+static struct resource sdhi1_resources[] = {
+	[0] = {
+		.name	= "SDHI1",
+		.start	= 0xe6860000,
+		.end	= 0xe68601ff,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= evt2irq(0x0e80),
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device sdhi1_device = {
+	.name		= "sh_mobile_sdhi",
+	.num_resources	= ARRAY_SIZE(sdhi1_resources),
+	.resource	= sdhi1_resources,
+	.id		= 1,
+	.dev	= {
+		.platform_data	= &sdhi1_info,
+	},
+};
+
+/* SDHI2 */
+static struct sh_mobile_sdhi_info sdhi2_info = {
+	.dma_slave_tx	= SHDMA_SLAVE_SDHI2_TX,
+	.dma_slave_rx	= SHDMA_SLAVE_SDHI2_RX,
+	.tmio_flags	= TMIO_MMC_WRPROTECT_DISABLE,
+	.tmio_caps	= MMC_CAP_SD_HIGHSPEED |
+			  MMC_CAP_NEEDS_POLL,
+};
+
+static struct resource sdhi2_resources[] = {
+	[0] = {
+		.name	= "SDHI2",
+		.start	= 0xe6870000,
+		.end	= 0xe68701ff,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= evt2irq(0x1200),
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device sdhi2_device = {
+	.name	= "sh_mobile_sdhi",
+	.num_resources	= ARRAY_SIZE(sdhi2_resources),
+	.resource	= sdhi2_resources,
+	.id		= 2,
+	.dev	= {
+		.platform_data	= &sdhi2_info,
+	},
+};
+
 static struct platform_device *mackerel_devices[] __initdata = {
 	&nor_flash_device,
 	&smc911x_device,
@@ -412,6 +555,9 @@ static struct platform_device *mackerel_devices[] __initdata = {
 	&leds_device,
 	&fsi_device,
 	&fsi_ak4643_device,
+	&sdhi0_device,
+	&sdhi1_device,
+	&sdhi2_device,
 };

 /* Keypad Initialization */
@@ -567,6 +713,35 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_IRQ21,	NULL);
 	set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);

+	/* enable SDHI0 */
+	gpio_request(GPIO_FN_SDHICD0, NULL);
+	gpio_request(GPIO_FN_SDHIWP0, NULL);
+	gpio_request(GPIO_FN_SDHICMD0, NULL);
+	gpio_request(GPIO_FN_SDHICLK0, NULL);
+	gpio_request(GPIO_FN_SDHID0_3, NULL);
+	gpio_request(GPIO_FN_SDHID0_2, NULL);
+	gpio_request(GPIO_FN_SDHID0_1, NULL);
+	gpio_request(GPIO_FN_SDHID0_0, NULL);
+
+	/* enable SDHI1 */
+	gpio_request(GPIO_FN_SDHICMD1, NULL);
+	gpio_request(GPIO_FN_SDHICLK1, NULL);
+	gpio_request(GPIO_FN_SDHID1_3, NULL);
+	gpio_request(GPIO_FN_SDHID1_2, NULL);
+	gpio_request(GPIO_FN_SDHID1_1, NULL);
+	gpio_request(GPIO_FN_SDHID1_0, NULL);
+	/* card detect pin for MMC slot (CN7) */
+	gpio_request(GPIO_PORT41, NULL);
+	gpio_direction_input(GPIO_PORT41);
+
+	/* enable SDHI2 */
+	gpio_request(GPIO_FN_SDHICMD2, NULL);
+	gpio_request(GPIO_FN_SDHICLK2, NULL);
+	gpio_request(GPIO_FN_SDHID2_3, NULL);
+	gpio_request(GPIO_FN_SDHID2_2, NULL);
+	gpio_request(GPIO_FN_SDHID2_1, NULL);
+	gpio_request(GPIO_FN_SDHID2_0, NULL);
+
 	i2c_register_board_info(0, i2c0_devices,
 				ARRAY_SIZE(i2c0_devices));
 	i2c_register_board_info(1, i2c1_devices,
-- 
1.5.6.5



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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (10 preceding siblings ...)
  2010-12-14  5:18 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Yusuke Goda
@ 2010-12-14  9:50 ` Paul Mundt
  2010-12-15  4:08 ` [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support Yusuke Goda
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-14  9:50 UTC (permalink / raw)
  To: linux-sh

On Tue, Dec 14, 2010 at 02:18:03PM +0900, Yusuke Goda wrote:
> Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-mackerel.c |  175 +++++++++++++++++++++++++++++++
>  1 files changed, 175 insertions(+), 0 deletions(-)
> 
Applied to rmobile/mackerel, thanks.

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

* [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (11 preceding siblings ...)
  2010-12-14  9:50 ` Paul Mundt
@ 2010-12-15  4:08 ` Yusuke Goda
  2010-12-15  6:02 ` Paul Mundt
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Yusuke Goda @ 2010-12-15  4:08 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   61 +++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index f62f9b9..efd7f14 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -34,6 +34,7 @@
 #include <linux/mfd/sh_mobile_sdhi.h>
 #include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
+#include <linux/mmc/sh_mmcif.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
@@ -481,6 +482,7 @@ static struct platform_device sdhi0_device = {
 	},
 };

+#if !defined(CONFIG_MMC_SH_MMCIF)
 /* SDHI1 */
 static struct sh_mobile_sdhi_info sdhi1_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI1_TX,
@@ -514,6 +516,7 @@ static struct platform_device sdhi1_device = {
 		.platform_data	= &sdhi1_info,
 	},
 };
+#endif

 /* SDHI2 */
 static struct sh_mobile_sdhi_info sdhi2_info = {
@@ -547,6 +550,47 @@ static struct platform_device sdhi2_device = {
 	},
 };

+/* SH_MMCIF */
+static struct resource sh_mmcif_resources[] = {
+	[0] = {
+		.name	= "MMCIF",
+		.start	= 0xE6BD0000,
+		.end	= 0xE6BD00FF,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		/* MMC ERR */
+		.start	= evt2irq(0x1ac0),
+		.flags	= IORESOURCE_IRQ,
+	},
+	[2] = {
+		/* MMC NOR */
+		.start	= evt2irq(0x1ae0),
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct sh_mmcif_plat_data sh_mmcif_plat = {
+	.sup_pclk	= 0,
+	.ocr		= MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
+	.caps		= MMC_CAP_4_BIT_DATA |
+			  MMC_CAP_8_BIT_DATA |
+			  MMC_CAP_NEEDS_POLL,
+	.get_cd		= slot_cn7_get_cd,
+};
+
+static struct platform_device sh_mmcif_device = {
+	.name		= "sh_mmcif",
+	.id		= 0,
+	.dev		= {
+		.dma_mask		= NULL,
+		.coherent_dma_mask	= 0xffffffff,
+		.platform_data		= &sh_mmcif_plat,
+	},
+	.num_resources	= ARRAY_SIZE(sh_mmcif_resources),
+	.resource	= sh_mmcif_resources,
+};
+
 static struct platform_device *mackerel_devices[] __initdata = {
 	&nor_flash_device,
 	&smc911x_device,
@@ -556,8 +600,11 @@ static struct platform_device *mackerel_devices[] __initdata = {
 	&fsi_device,
 	&fsi_ak4643_device,
 	&sdhi0_device,
+#if !defined(CONFIG_MMC_SH_MMCIF)
 	&sdhi1_device,
+#endif
 	&sdhi2_device,
+	&sh_mmcif_device,
 };

 /* Keypad Initialization */
@@ -723,6 +770,7 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_SDHID0_1, NULL);
 	gpio_request(GPIO_FN_SDHID0_0, NULL);

+#if !defined(CONFIG_MMC_SH_MMCIF)
 	/* enable SDHI1 */
 	gpio_request(GPIO_FN_SDHICMD1, NULL);
 	gpio_request(GPIO_FN_SDHICLK1, NULL);
@@ -730,6 +778,7 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_SDHID1_2, NULL);
 	gpio_request(GPIO_FN_SDHID1_1, NULL);
 	gpio_request(GPIO_FN_SDHID1_0, NULL);
+#endif
 	/* card detect pin for MMC slot (CN7) */
 	gpio_request(GPIO_PORT41, NULL);
 	gpio_direction_input(GPIO_PORT41);
@@ -742,6 +791,18 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_SDHID2_1, NULL);
 	gpio_request(GPIO_FN_SDHID2_0, NULL);

+	/* MMCIF */
+	gpio_request(GPIO_FN_MMCD0_0, NULL);
+	gpio_request(GPIO_FN_MMCD0_1, NULL);
+	gpio_request(GPIO_FN_MMCD0_2, NULL);
+	gpio_request(GPIO_FN_MMCD0_3, NULL);
+	gpio_request(GPIO_FN_MMCD0_4, NULL);
+	gpio_request(GPIO_FN_MMCD0_5, NULL);
+	gpio_request(GPIO_FN_MMCD0_6, NULL);
+	gpio_request(GPIO_FN_MMCD0_7, NULL);
+	gpio_request(GPIO_FN_MMCCMD0, NULL);
+	gpio_request(GPIO_FN_MMCCLK0, NULL);
+
 	i2c_register_board_info(0, i2c0_devices,
 				ARRAY_SIZE(i2c0_devices));
 	i2c_register_board_info(1, i2c1_devices,
-- 
1.5.6.5



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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (12 preceding siblings ...)
  2010-12-15  4:08 ` [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support Yusuke Goda
@ 2010-12-15  6:02 ` Paul Mundt
  2010-12-15  6:40 ` Magnus Damm
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-15  6:02 UTC (permalink / raw)
  To: linux-sh

On Wed, Dec 15, 2010 at 01:08:05PM +0900, Yusuke Goda wrote:
> @@ -723,6 +770,7 @@ static void __init mackerel_init(void)
>  	gpio_request(GPIO_FN_SDHID0_1, NULL);
>  	gpio_request(GPIO_FN_SDHID0_0, NULL);
> 
> +#if !defined(CONFIG_MMC_SH_MMCIF)
>  	/* enable SDHI1 */
>  	gpio_request(GPIO_FN_SDHICMD1, NULL);
>  	gpio_request(GPIO_FN_SDHICLK1, NULL);
> @@ -730,6 +778,7 @@ static void __init mackerel_init(void)
>  	gpio_request(GPIO_FN_SDHID1_2, NULL);
>  	gpio_request(GPIO_FN_SDHID1_1, NULL);
>  	gpio_request(GPIO_FN_SDHID1_0, NULL);
> +#endif
>  	/* card detect pin for MMC slot (CN7) */
>  	gpio_request(GPIO_PORT41, NULL);
>  	gpio_direction_input(GPIO_PORT41);
> @@ -742,6 +791,18 @@ static void __init mackerel_init(void)
>  	gpio_request(GPIO_FN_SDHID2_1, NULL);
>  	gpio_request(GPIO_FN_SDHID2_0, NULL);
> 
> +	/* MMCIF */
> +	gpio_request(GPIO_FN_MMCD0_0, NULL);
> +	gpio_request(GPIO_FN_MMCD0_1, NULL);
> +	gpio_request(GPIO_FN_MMCD0_2, NULL);
> +	gpio_request(GPIO_FN_MMCD0_3, NULL);
> +	gpio_request(GPIO_FN_MMCD0_4, NULL);
> +	gpio_request(GPIO_FN_MMCD0_5, NULL);
> +	gpio_request(GPIO_FN_MMCD0_6, NULL);
> +	gpio_request(GPIO_FN_MMCD0_7, NULL);
> +	gpio_request(GPIO_FN_MMCCMD0, NULL);
> +	gpio_request(GPIO_FN_MMCCLK0, NULL);
> +

So we can infer that MMCIF and SDHI1 are muxed on the same pins and we
need to select one or the other based on the configuration. Is there a
way to figure out which mode we are in based off of the card detect pin?
It would be nice to detect this at runtime instead of having to hardcode
the configuration.

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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (13 preceding siblings ...)
  2010-12-15  6:02 ` Paul Mundt
@ 2010-12-15  6:40 ` Magnus Damm
  2010-12-15  6:43 ` Magnus Damm
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Magnus Damm @ 2010-12-15  6:40 UTC (permalink / raw)
  To: linux-sh

On Wed, Dec 15, 2010 at 3:02 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> On Wed, Dec 15, 2010 at 01:08:05PM +0900, Yusuke Goda wrote:
>> @@ -723,6 +770,7 @@ static void __init mackerel_init(void)
>>       gpio_request(GPIO_FN_SDHID0_1, NULL);
>>       gpio_request(GPIO_FN_SDHID0_0, NULL);
>>
>> +#if !defined(CONFIG_MMC_SH_MMCIF)
>>       /* enable SDHI1 */
>>       gpio_request(GPIO_FN_SDHICMD1, NULL);
>>       gpio_request(GPIO_FN_SDHICLK1, NULL);
>> @@ -730,6 +778,7 @@ static void __init mackerel_init(void)
>>       gpio_request(GPIO_FN_SDHID1_2, NULL);
>>       gpio_request(GPIO_FN_SDHID1_1, NULL);
>>       gpio_request(GPIO_FN_SDHID1_0, NULL);
>> +#endif
>>       /* card detect pin for MMC slot (CN7) */
>>       gpio_request(GPIO_PORT41, NULL);
>>       gpio_direction_input(GPIO_PORT41);
>> @@ -742,6 +791,18 @@ static void __init mackerel_init(void)
>>       gpio_request(GPIO_FN_SDHID2_1, NULL);
>>       gpio_request(GPIO_FN_SDHID2_0, NULL);
>>
>> +     /* MMCIF */
>> +     gpio_request(GPIO_FN_MMCD0_0, NULL);
>> +     gpio_request(GPIO_FN_MMCD0_1, NULL);
>> +     gpio_request(GPIO_FN_MMCD0_2, NULL);
>> +     gpio_request(GPIO_FN_MMCD0_3, NULL);
>> +     gpio_request(GPIO_FN_MMCD0_4, NULL);
>> +     gpio_request(GPIO_FN_MMCD0_5, NULL);
>> +     gpio_request(GPIO_FN_MMCD0_6, NULL);
>> +     gpio_request(GPIO_FN_MMCD0_7, NULL);
>> +     gpio_request(GPIO_FN_MMCCMD0, NULL);
>> +     gpio_request(GPIO_FN_MMCCLK0, NULL);
>> +
>
> So we can infer that MMCIF and SDHI1 are muxed on the same pins and we
> need to select one or the other based on the configuration. Is there a
> way to figure out which mode we are in based off of the card detect pin?
> It would be nice to detect this at runtime instead of having to hardcode
> the configuration.

Good luck with that. =)

The "mackerel" board is quite similar to AP4EVB. There is no way to
detect during runtime.

/ magnus

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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (14 preceding siblings ...)
  2010-12-15  6:40 ` Magnus Damm
@ 2010-12-15  6:43 ` Magnus Damm
  2010-12-15  7:35 ` Yusuke Goda
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Magnus Damm @ 2010-12-15  6:43 UTC (permalink / raw)
  To: linux-sh

2010/12/15 Yusuke Goda <yusuke.goda.sx@renesas.com>:
> Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> ---
> +static struct sh_mmcif_plat_data sh_mmcif_plat = {
> +       .sup_pclk       = 0,
> +       .ocr            = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
> +       .caps           = MMC_CAP_4_BIT_DATA |
> +                         MMC_CAP_8_BIT_DATA |
> +                         MMC_CAP_NEEDS_POLL,
> +       .get_cd         = slot_cn7_get_cd,
> +};

Can we select VDD voltage on this board? I thought it was fixed to
3.3V? Or perhaps I don't understand how the OCR field is supposed to
work.

Thanks,

/ magnus

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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (15 preceding siblings ...)
  2010-12-15  6:43 ` Magnus Damm
@ 2010-12-15  7:35 ` Yusuke Goda
  2010-12-15  7:39 ` Magnus Damm
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Yusuke Goda @ 2010-12-15  7:35 UTC (permalink / raw)
  To: linux-sh

Hi Magnus-san

(2010/12/15 15:43), Magnus Damm wrote:
> 2010/12/15 Yusuke Goda <yusuke.goda.sx@renesas.com>:
>> Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
>> ---
>> +static struct sh_mmcif_plat_data sh_mmcif_plat = {
>> +       .sup_pclk       = 0,
>> +       .ocr            = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
>> +       .caps           = MMC_CAP_4_BIT_DATA |
>> +                         MMC_CAP_8_BIT_DATA |
>> +                         MMC_CAP_NEEDS_POLL,
>> +       .get_cd         = slot_cn7_get_cd,
>> +};
> 
> Can we select VDD voltage on this board? I thought it was fixed to
> 3.3V? Or perhaps I don't understand how the OCR field is supposed to
> work.
The mackerel(and ap4evb) can select 1.8v or 3.3v by J22.
This OCR field set to support either voltage for the card inserted.
User have to change J22 depends the card to be used.

cheers,
Goda


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (16 preceding siblings ...)
  2010-12-15  7:35 ` Yusuke Goda
@ 2010-12-15  7:39 ` Magnus Damm
  2010-12-15  7:59 ` Yusuke Goda
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Magnus Damm @ 2010-12-15  7:39 UTC (permalink / raw)
  To: linux-sh

Hi Goda-san,

On Wed, Dec 15, 2010 at 4:35 PM, Yusuke Goda <yusuke.goda.sx@renesas.com> wrote:
> (2010/12/15 15:43), Magnus Damm wrote:
>> 2010/12/15 Yusuke Goda <yusuke.goda.sx@renesas.com>:
>>> Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
>>> ---
>>> +static struct sh_mmcif_plat_data sh_mmcif_plat = {
>>> +       .sup_pclk       = 0,
>>> +       .ocr            = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
>>> +       .caps           = MMC_CAP_4_BIT_DATA |
>>> +                         MMC_CAP_8_BIT_DATA |
>>> +                         MMC_CAP_NEEDS_POLL,
>>> +       .get_cd         = slot_cn7_get_cd,
>>> +};
>>
>> Can we select VDD voltage on this board? I thought it was fixed to
>> 3.3V? Or perhaps I don't understand how the OCR field is supposed to
>> work.
> The mackerel(and ap4evb) can select 1.8v or 3.3v by J22.
> This OCR field set to support either voltage for the card inserted.
> User have to change J22 depends the card to be used.

Ok, I understand. If it is not documented in the board source code
already, please send a patch to add comment about J22 and the OCR
field.

Thank you!

/ magnus

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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (17 preceding siblings ...)
  2010-12-15  7:39 ` Magnus Damm
@ 2010-12-15  7:59 ` Yusuke Goda
  2010-12-20  1:06 ` [PATCH] ARM: mach-shmobile: mackerel: Add GPS support Yusuke Goda
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Yusuke Goda @ 2010-12-15  7:59 UTC (permalink / raw)
  To: linux-sh

Hi Magnus-san

(2010/12/15 16:39), Magnus Damm wrote:
> Hi Goda-san,
> 
> On Wed, Dec 15, 2010 at 4:35 PM, Yusuke Goda <yusuke.goda.sx@renesas.com> wrote:
>> (2010/12/15 15:43), Magnus Damm wrote:
>>> 2010/12/15 Yusuke Goda <yusuke.goda.sx@renesas.com>:
>>>> Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
>>>> ---
>>>> +static struct sh_mmcif_plat_data sh_mmcif_plat = {
>>>> +       .sup_pclk       = 0,
>>>> +       .ocr            = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
>>>> +       .caps           = MMC_CAP_4_BIT_DATA |
>>>> +                         MMC_CAP_8_BIT_DATA |
>>>> +                         MMC_CAP_NEEDS_POLL,
>>>> +       .get_cd         = slot_cn7_get_cd,
>>>> +};
>>>
>>> Can we select VDD voltage on this board? I thought it was fixed to
>>> 3.3V? Or perhaps I don't understand how the OCR field is supposed to
>>> work.
>> The mackerel(and ap4evb) can select 1.8v or 3.3v by J22.
>> This OCR field set to support either voltage for the card inserted.
>> User have to change J22 depends the card to be used.
> 
> Ok, I understand. If it is not documented in the board source code
> already, please send a patch to add comment about J22 and the OCR
> field.
OK!
I send v2 patch.

/Goda


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

* [PATCH] ARM: mach-shmobile: mackerel: Add GPS support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (18 preceding siblings ...)
  2010-12-15  7:59 ` Yusuke Goda
@ 2010-12-20  1:06 ` Yusuke Goda
  2010-12-20 16:15 ` Paul Mundt
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Yusuke Goda @ 2010-12-20  1:06 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index fd46f06..c0d18cb 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -807,6 +807,10 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_MMCCMD0, NULL);
 	gpio_request(GPIO_FN_MMCCLK0, NULL);

+	/* enable GPS module (GT-720F) */
+	gpio_request(GPIO_FN_SCIFA2_TXD1, NULL);
+	gpio_request(GPIO_FN_SCIFA2_RXD1, NULL);
+
 	i2c_register_board_info(0, i2c0_devices,
 				ARRAY_SIZE(i2c0_devices));
 	i2c_register_board_info(1, i2c1_devices,
-- 
1.5.6.5



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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add GPS support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (19 preceding siblings ...)
  2010-12-20  1:06 ` [PATCH] ARM: mach-shmobile: mackerel: Add GPS support Yusuke Goda
@ 2010-12-20 16:15 ` Paul Mundt
  2010-12-23  6:36 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Simon Horman
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-20 16:15 UTC (permalink / raw)
  To: linux-sh

On Mon, Dec 20, 2010 at 10:06:04AM +0900, Yusuke Goda wrote:
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -807,6 +807,10 @@ static void __init mackerel_init(void)
>  	gpio_request(GPIO_FN_MMCCMD0, NULL);
>  	gpio_request(GPIO_FN_MMCCLK0, NULL);
> 
> +	/* enable GPS module (GT-720F) */
> +	gpio_request(GPIO_FN_SCIFA2_TXD1, NULL);
> +	gpio_request(GPIO_FN_SCIFA2_RXD1, NULL);
> +
>  	i2c_register_board_info(0, i2c0_devices,
>  				ARRAY_SIZE(i2c0_devices));
>  	i2c_register_board_info(1, i2c1_devices,

Applied to rmobile/mackerel, thanks.

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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (20 preceding siblings ...)
  2010-12-20 16:15 ` Paul Mundt
@ 2010-12-23  6:36 ` Simon Horman
  2011-01-07  9:48 ` [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23 Yusuke Goda
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Simon Horman @ 2010-12-23  6:36 UTC (permalink / raw)
  To: linux-sh

Hi Goda-san,

The SDHI1 portions of this code do not seem to work for me.
If I remove then then I can access SDHI0 and 2, but if they
are included then I can't access any MMC devices.

I can access the same port that SDHI1 uses by using
the MMCIF driver as per your subsequent patch.

Let me know if I can provide any more information.


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

* [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (21 preceding siblings ...)
  2010-12-23  6:36 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Simon Horman
@ 2011-01-07  9:48 ` Yusuke Goda
  2011-01-11  0:47 ` [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support chinyeow.sim.xt
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Yusuke Goda @ 2011-01-07  9:48 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 42f7c0d..bea5320 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -524,6 +524,15 @@ static struct platform_device sdhi1_device = {
 };
 #endif

+/*
+ * The card detect pin of the top SD/MMC slot (CN23) is active low and is
+ * connected to GPIO SCIFB_SCK of SH7372 (GPIO_PORT162).
+ */
+static int slot_cn23_get_cd(struct platform_device *pdev)
+{
+	return !gpio_get_value(GPIO_PORT162);
+}
+
 /* SDHI2 */
 static struct sh_mobile_sdhi_info sdhi2_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI2_TX,
@@ -531,6 +540,7 @@ static struct sh_mobile_sdhi_info sdhi2_info = {
 	.tmio_flags	= TMIO_MMC_WRPROTECT_DISABLE,
 	.tmio_caps	= MMC_CAP_SD_HIGHSPEED |
 			  MMC_CAP_NEEDS_POLL,
+	.get_cd		= slot_cn23_get_cd,
 };

 static struct resource sdhi2_resources[] = {
@@ -904,6 +914,10 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_SDHID2_1, NULL);
 	gpio_request(GPIO_FN_SDHID2_0, NULL);

+	/* card detect pin for microSD slot (CN23) */
+	gpio_request(GPIO_PORT162, NULL);
+	gpio_direction_input(GPIO_PORT162);
+
 	/* MMCIF */
 	gpio_request(GPIO_FN_MMCD0_0, NULL);
 	gpio_request(GPIO_FN_MMCD0_1, NULL);
-- 
1.5.6.5


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

* [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (22 preceding siblings ...)
  2011-01-07  9:48 ` [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23 Yusuke Goda
@ 2011-01-11  0:47 ` chinyeow.sim.xt
  2011-01-11  3:53 ` [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23 Paul Mundt
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: chinyeow.sim.xt @ 2011-01-11  0:47 UTC (permalink / raw)
  To: linux-sh

From: Tony SIM <chinyeow.sim.xt@renesas.com>


Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 42f7c0d..b0027d2 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -746,6 +746,7 @@ static struct tca6416_keys_platform_data mackerel_tca6416_keys_info = {
 };
 
 /* I2C */
+#define IRQ7 evt2irq(0x02e0)
 #define IRQ9 evt2irq(0x0320)
 
 static struct i2c_board_info i2c0_devices[] = {
@@ -758,6 +759,11 @@ static struct i2c_board_info i2c0_devices[] = {
 		.platform_data = &mackerel_tca6416_keys_info,
 		.irq = IRQ9,
 	},
+	/* Touchscreen */
+	{
+		I2C_BOARD_INFO("st1232-ts", 0x55),
+		.irq = IRQ7,
+	},
 };
 
 #define IRQ21 evt2irq(0x32a0)
@@ -869,6 +875,10 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_IRQ9_42,	NULL);
 	set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);
 
+	/* enable Touchscreen */
+	gpio_request(GPIO_FN_IRQ7_40,	NULL);
+	set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
+
 	/* enable Accelerometer */
 	gpio_request(GPIO_FN_IRQ21,	NULL);
 	set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
-- 
1.7.2.3


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (23 preceding siblings ...)
  2011-01-11  0:47 ` [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support chinyeow.sim.xt
@ 2011-01-11  3:53 ` Paul Mundt
  2011-01-11  3:57 ` [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support Paul Mundt
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2011-01-11  3:53 UTC (permalink / raw)
  To: linux-sh

On Fri, Jan 07, 2011 at 06:48:36PM +0900, Yusuke Goda wrote:
> Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-mackerel.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
Applied, thanks.

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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (24 preceding siblings ...)
  2011-01-11  3:53 ` [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23 Paul Mundt
@ 2011-01-11  3:57 ` Paul Mundt
  2011-01-11  9:27 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Yusuke Goda
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2011-01-11  3:57 UTC (permalink / raw)
  To: linux-sh

On Tue, Jan 11, 2011 at 09:47:59AM +0900, chinyeow.sim.xt@renesas.com wrote:
> From: Tony SIM <chinyeow.sim.xt@renesas.com>
> 
> 
> Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
> ---
>  arch/arm/mach-shmobile/board-mackerel.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
Applied, thanks.

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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (25 preceding siblings ...)
  2011-01-11  3:57 ` [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support Paul Mundt
@ 2011-01-11  9:27 ` Yusuke Goda
  2011-01-11 22:48 ` Simon Horman
  2012-01-19  0:37 ` [PATCH] ARM: mach-shmobile: mackerel: add ak4642 amixer settings on comment Kuninori Morimoto
  28 siblings, 0 replies; 30+ messages in thread
From: Yusuke Goda @ 2011-01-11  9:27 UTC (permalink / raw)
  To: linux-sh

Hi Simon-san

Sorry for the late reply.

As for AP4 and the mackerel board,
the I/O voltage of SDHI1 and MMCIF is 1.8v fixation.
So do not recognize the memory card.(Requires 3.3v)
The new memory card, 3.3v from 1.8v seems to be able to bring down.
However, AP4 and mackerel board can not support.

Perhaps that supports 1.8v eSD and eMMC would be recognized only.

Thanks,
Goda

(2010/12/23 15:36), Simon Horman wrote:
> Hi Goda-san,
> 
> The SDHI1 portions of this code do not seem to work for me.
> If I remove then then I can access SDHI0 and 2, but if they
> are included then I can't access any MMC devices.
> 
> I can access the same port that SDHI1 uses by using
> the MMCIF driver as per your subsequent patch.
> 
> Let me know if I can provide any more information.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 


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

* Re: [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (26 preceding siblings ...)
  2011-01-11  9:27 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Yusuke Goda
@ 2011-01-11 22:48 ` Simon Horman
  2012-01-19  0:37 ` [PATCH] ARM: mach-shmobile: mackerel: add ak4642 amixer settings on comment Kuninori Morimoto
  28 siblings, 0 replies; 30+ messages in thread
From: Simon Horman @ 2011-01-11 22:48 UTC (permalink / raw)
  To: linux-sh

On Tue, Jan 11, 2011 at 06:27:30PM +0900, Yusuke Goda wrote:
> Hi Simon-san
> 
> Sorry for the late reply.
> 
> As for AP4 and the mackerel board,
> the I/O voltage of SDHI1 and MMCIF is 1.8v fixation.
> So do not recognize the memory card.(Requires 3.3v)
> The new memory card, 3.3v from 1.8v seems to be able to bring down.
> However, AP4 and mackerel board can not support.
> 
> Perhaps that supports 1.8v eSD and eMMC would be recognized only.

Hi Goda-san,

sorry for not replying to my own post earlier.
Magnus pointed out that the problem I was seeing
was due to not setting SW33 correctly. Other than
the proposed documentation update that I posted
(and you commented on) everything is fine now.

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

* [PATCH] ARM: mach-shmobile: mackerel: add ak4642 amixer settings on comment
  2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
                   ` (27 preceding siblings ...)
  2011-01-11 22:48 ` Simon Horman
@ 2012-01-19  0:37 ` Kuninori Morimoto
  28 siblings, 0 replies; 30+ messages in thread
From: Kuninori Morimoto @ 2012-01-19  0:37 UTC (permalink / raw)
  To: linux-sh

current ak4642 needs amixer settings for playing which was not
needed on old kernel.
This patch show it on comment area

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-mackerel.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index d2150c1..76d8754 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -208,6 +208,16 @@
  */
 
 /*
+ * FSI - AK4642
+ *
+ * it needs amixer settings for playing
+ *
+ * amixer set "Headphone" on
+ * amixer set "HPOUTL Mixer DACH" on
+ * amixer set "HPOUTR Mixer DACH" on
+ */
+
+/*
  * FIXME !!
  *
  * gpio_no_direction
-- 
1.7.5.4


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

end of thread, other threads:[~2012-01-19  0:37 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29  6:19 [PATCH] ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23 Kuninori Morimoto
2010-11-29  8:26 ` Paul Mundt
2010-11-30  4:37 ` [PATCH] ARM: mach-shmobile: mackerel: Add USB1(Host) support Kuninori Morimoto
2010-11-30  5:18 ` Paul Mundt
2010-11-30  6:52 ` [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support Kuninori Morimoto
2010-12-01  0:31 ` [PATCH] ARM: mach-shmobile: mackerel: Add FSI-AK4643 support Kuninori Morimoto
2010-12-01  7:09 ` [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support Paul Mundt
2010-12-07  9:12 ` [PATCH] ARM: mach-shmobile: mackerel: Add Accelerometer sensor support sim.chinyeow
2010-12-08  5:37 ` Paul Mundt
2010-12-09  1:55 ` [PATCH] ARM: mach-shmobile: mackerel: Add keypad tca6408a support chinyeow.sim.xt
2010-12-13  5:10 ` Paul Mundt
2010-12-14  5:18 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Yusuke Goda
2010-12-14  9:50 ` Paul Mundt
2010-12-15  4:08 ` [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support Yusuke Goda
2010-12-15  6:02 ` Paul Mundt
2010-12-15  6:40 ` Magnus Damm
2010-12-15  6:43 ` Magnus Damm
2010-12-15  7:35 ` Yusuke Goda
2010-12-15  7:39 ` Magnus Damm
2010-12-15  7:59 ` Yusuke Goda
2010-12-20  1:06 ` [PATCH] ARM: mach-shmobile: mackerel: Add GPS support Yusuke Goda
2010-12-20 16:15 ` Paul Mundt
2010-12-23  6:36 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Simon Horman
2011-01-07  9:48 ` [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23 Yusuke Goda
2011-01-11  0:47 ` [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support chinyeow.sim.xt
2011-01-11  3:53 ` [PATCH] ARM: mach-shmobile: mackerel: Add support get_cd in CN23 Paul Mundt
2011-01-11  3:57 ` [PATCH] ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support Paul Mundt
2011-01-11  9:27 ` [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support Yusuke Goda
2011-01-11 22:48 ` Simon Horman
2012-01-19  0:37 ` [PATCH] ARM: mach-shmobile: mackerel: add ak4642 amixer settings on comment Kuninori Morimoto

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.