Skip to contentSkip to conversation

ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23

PATCH Applied Kuninori Morimoto 6 participants 30 messages Nov 29, 2010 – Jan 19, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23

RGB24 bus needs 18-23 pin

---
 arch/arm/mach-shmobile/board-mackerel.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +6 -0
index 889ce4f..e6407cc 100644
@@ -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);
Signature · 1 line
1.7.0.4
Applied
#1 lore raw
Quoted 7 lines · Kuninori Morimoto

RGB24 bus needs 18-23 pin

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

Applied to rmobile/mackerel, thanks.

#2 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add USB1(Host) support

In reply to Kuninori Morimoto
---
 arch/arm/mach-shmobile/board-mackerel.c |   69 ++++++++++++++++++++++++++++++-
 1 files changed, 68 insertions(+), 1 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +68 -1
index e6407cc..f9418e7 100644
@@ -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.IRQ9SA10  | KEY(TCA6408)       | Low
  * IRQ21 | ICR4A.IRQ21SA11 | Sensor(ADXL345)    | High
  * IRQ22 | ICR4A.IRQ22SA11 | 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();
 
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add LEDs support

In reply to Kuninori Morimoto

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

---
 arch/arm/mach-shmobile/board-mackerel.c |   40 +++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +40 -0
index f9418e7..b9528b0 100644
@@ -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 = {
Signature · 1 line
1.7.1
#5 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add FSI-AK4643 support

In reply to Kuninori Morimoto

---
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(-)
arch/arm/mach-shmobile/board-mackerel.c +84 -0
index b9528b0..cf3e660 100644
@@ -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();
 
Signature · 1 line
1.7.1
#6 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support

In reply to Kuninori Morimoto
Quoted 5 lines · Kuninori Morimoto

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

Quoted 9 lines · Kuninori Morimoto

---
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.

#7 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add Accelerometer sensor support

In reply to Kuninori Morimoto
---
 arch/arm/mach-shmobile/board-mackerel.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +15 -0
index f9418e7..7ae1b03 100644
@@ -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();
 
Signature · 1 line
1.7.2.3
#9 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add keypad tca6408a support

In reply to Kuninori Morimoto

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

---
 arch/arm/mach-shmobile/board-mackerel.c |   38 +++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +38 -0
index a0caa9e..3e30a52 100644
@@ -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);
Signature · 1 line
1.7.2.3
#11 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add sdhi support

In reply to Kuninori Morimoto
---
 arch/arm/mach-shmobile/board-mackerel.c |  175 +++++++++++++++++++++++++++++++
 1 files changed, 175 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +175 -0
index 3e30a52..f62f9b9 100644
@@ -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,
Signature · 1 line
1.5.6.5
#13 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add mmcif support

In reply to Kuninori Morimoto
---
 arch/arm/mach-shmobile/board-mackerel.c |   61 +++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +61 -0
index f62f9b9..efd7f14 100644
@@ -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,
Signature · 1 line
1.5.6.5
#14 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support

In reply to Kuninori Morimoto
Quoted 22 lines · Yusuke Goda
(quoted diff) +4 -0
@@ -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);

Review static void __init mackerel_init(void) · line 805

Quoted 10 lines
(quoted diff) +10 -0
+	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.

maintainer
#15 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support

In reply to Kuninori Morimoto
Quoted 31 lines · Paul Mundt
Quoted 30 lines · Yusuke Goda
(quoted diff) +12 -0
@@ -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);
Quoted 8 lines

Review static void __init mackerel_init(void) · line 805

Quoted 2 lines
(quoted diff) +2 -0
+     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

maintainer
#16 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support

In reply to Kuninori Morimoto

2010/12/15 Yusuke Goda <[email protected]>:

Review

Quoted 10 lines

---

(quoted diff) +8 -0
+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

#17 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support

In reply to Kuninori Morimoto

Hi Magnus-san

Quoted 15 lines · Magnus Damm

2010/12/15 Yusuke Goda <[email protected]>:

Review

Quoted 10 lines

---

(quoted diff) +8 -0
+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

maintainer
#18 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support

In reply to Kuninori Morimoto

Hi Goda-san,

Quoted 16 lines · Yusuke Goda
Quoted 15 lines · Magnus Damm

2010/12/15 Yusuke Goda <[email protected]>:

Review

Quoted 10 lines

---

(quoted diff) +8 -0
+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.

Quoted 3 lines

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

#19 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add mmcif support

In reply to Kuninori Morimoto

Hi Magnus-san

Quoted 19 lines · Magnus Damm

Hi Goda-san,

Quoted 16 lines · Yusuke Goda
Quoted 15 lines · Magnus Damm

2010/12/15 Yusuke Goda <[email protected]>:

Review

Quoted 10 lines

---

(quoted diff) +8 -0
+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.

Quoted 7 lines
Quoted 3 lines

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

#20 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add GPS support

In reply to Kuninori Morimoto
---
 arch/arm/mach-shmobile/board-mackerel.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +4 -0
index fd46f06..c0d18cb 100644
@@ -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,
Signature · 1 line
1.5.6.5
Applied
#21 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add GPS support

In reply to Kuninori Morimoto

arch/arm/mach-shmobile/board-mackerel.c static void __init mackerel_init(void) · line 816

Quoted 13 lines · Yusuke Goda
arch/arm/mach-shmobile/board-mackerel.c +4 -0
@@ -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.

#22 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support

In reply to Kuninori Morimoto

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.

#23 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add support get_cd in CN23

In reply to Kuninori Morimoto
---
 arch/arm/mach-shmobile/board-mackerel.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +14 -0
index 42f7c0d..bea5320 100644
@@ -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);
Signature · 1 line
1.5.6.5
#24 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support

In reply to Kuninori Morimoto

From: Tony SIM <[email protected]>

---
 arch/arm/mach-shmobile/board-mackerel.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +10 -0
index 42f7c0d..b0027d2 100644
@@ -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);
Signature · 1 line
1.7.2.3
#27 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support

In reply to Kuninori Morimoto

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

Quoted 17 lines · Simon Horman

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#28 lore raw

Re: [PATCH] ARM: mach-shmobile: mackerel: Add sdhi support

In reply to Kuninori Morimoto
Quoted 11 lines · Yusuke Goda

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.

#29 lore raw

PATCH 1/1 ARM: mach-shmobile: mackerel: add ak4642 amixer settings on comment

In reply to Kuninori Morimoto

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

---
 arch/arm/mach-shmobile/board-mackerel.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +10 -0
index d2150c1..76d8754 100644
@@ -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
Signature · 1 line
1.7.5.4