All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Some am3517 related patches [V2]
@ 2010-04-19 10:20 Stanley.Miao
  2010-04-19 10:20 ` [PATCH 1/9] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

Changes from V2:
1, Removed the controversial patches. I will submit them later.

Some am3517 related patches. The detaild changelog is below:

Stanley.Miao (9):
      omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled
      omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL
      AM3517: rename the i2c boardinfo to make it more readable
      AM3517: Add platform init code for regulator driver
      AM3517: Add audio codec platform data
      AM3517: initialize i2c subsystem after mux subsystem
      OMAP: fix a gpmc nand problem
      omap: init the gpio pinmux for mmc
      omap hsmmc: fix the hsmmc driver for am3517.

 arch/arm/mach-omap2/board-am3517evm.c  |  149 +++++++++++++++++++++++++++++---
 arch/arm/mach-omap2/devices.c          |    7 ++
 arch/arm/mach-omap2/gpmc-nand.c        |    3 +
 arch/arm/mach-omap2/hsmmc.c            |   32 +++++--
 arch/arm/plat-omap/include/plat/irqs.h |    2 -
 arch/arm/plat-omap/include/plat/nand.h |    7 ++
 6 files changed, 178 insertions(+), 22 deletions(-)


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

* [PATCH 1/9] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 10:20 ` [PATCH 2/9] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL Stanley.Miao
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

If CONFIG_MTD_NAND_OMAP2 is not enabled, there will be a compile error,
"gpmc_nand_init() is not defined". Add a inline noop function to fix it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/plat-omap/include/plat/nand.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index 6ba88d2..f8efd54 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -29,4 +29,11 @@ struct omap_nand_platform_data {
 /* size (4 KiB) for IO mapping */
 #define	NAND_IO_SIZE	SZ_4K
 
+#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
 extern int gpmc_nand_init(struct omap_nand_platform_data *d);
+#else
+static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
+{
+	return 0;
+}
+#endif
-- 
1.5.4.3


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

* [PATCH 2/9] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
  2010-04-19 10:20 ` [PATCH 1/9] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 10:20 ` [PATCH 3/9] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

INT_34XX_BENCH_MPU_EMUL was defined twice, another is at Line 312.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/plat-omap/include/plat/irqs.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index b65088a..4017019 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -345,8 +345,6 @@
 #define INT_34XX_MMC3_IRQ	94
 #define INT_34XX_GPT12_IRQ	95
 
-#define	INT_34XX_BENCH_MPU_EMUL	3
-
 #define INT_35XX_HECC0_IRQ		24
 #define INT_35XX_HECC1_IRQ		28
 #define INT_35XX_EMAC_C0_RXTHRESH_IRQ	67
-- 
1.5.4.3


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

* [PATCH 3/9] AM3517: rename the i2c boardinfo to make it more readable
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
  2010-04-19 10:20 ` [PATCH 1/9] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
  2010-04-19 10:20 ` [PATCH 2/9] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 10:20 ` [PATCH 4/9] AM3517: Add platform init code for regulator driver Stanley.Miao
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

There are three i2c buses on am3517, now rename these three boardinfo
structure name to am3517evm_i2c1_boardinfo, am3517evm_i2c2_boardinfo,
and am3517evm_i2c3_boardinfo, to make it more readable.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 6ae8805..3acfcae 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -39,7 +39,7 @@
 #define LCD_PANEL_BKLIGHT_PWR	182
 #define LCD_PANEL_PWM		181
 
-static struct i2c_board_info __initdata am3517evm_i2c_boardinfo[] = {
+static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = {
 	{
 		I2C_BOARD_INFO("s35390a", 0x30),
 		.type		= "s35390a",
@@ -69,7 +69,7 @@ static void __init am3517_evm_rtc_init(void)
 		gpio_free(GPIO_RTCS35390A_IRQ);
 		return;
 	}
-	am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
+	am3517evm_i2c1_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
 }
 
 /*
@@ -80,7 +80,7 @@ static void __init am3517_evm_rtc_init(void)
 static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 };
-static struct i2c_board_info __initdata am3517evm_tca6416_info_0[] = {
+static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
 	{
 		I2C_BOARD_INFO("tca6416", 0x21),
 		.platform_data = &am3517evm_gpio_expander_info_0,
@@ -94,7 +94,7 @@ static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_1 = {
 static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES + 32,
 };
-static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = {
+static struct i2c_board_info __initdata am3517evm_i2c3_boardinfo[] = {
 	{
 		I2C_BOARD_INFO("tca6416", 0x20),
 		.platform_data = &am3517evm_ui_gpio_expander_info_1,
@@ -108,10 +108,10 @@ static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = {
 static int __init am3517_evm_i2c_init(void)
 {
 	omap_register_i2c_bus(1, 400, NULL, 0);
-	omap_register_i2c_bus(2, 400, am3517evm_tca6416_info_0,
-			ARRAY_SIZE(am3517evm_tca6416_info_0));
-	omap_register_i2c_bus(3, 400, am3517evm_ui_tca6416_info,
-			ARRAY_SIZE(am3517evm_ui_tca6416_info));
+	omap_register_i2c_bus(2, 400, am3517evm_i2c2_boardinfo,
+			ARRAY_SIZE(am3517evm_i2c2_boardinfo));
+	omap_register_i2c_bus(3, 400, am3517evm_i2c3_boardinfo,
+			ARRAY_SIZE(am3517evm_i2c3_boardinfo));
 
 	return 0;
 }
@@ -311,8 +311,8 @@ static void __init am3517_evm_init(void)
 	/* RTC - S35390A */
 	am3517_evm_rtc_init();
 
-	i2c_register_board_info(1, am3517evm_i2c_boardinfo,
-				ARRAY_SIZE(am3517evm_i2c_boardinfo));
+	i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
+				ARRAY_SIZE(am3517evm_i2c1_boardinfo));
 }
 
 static void __init am3517_evm_map_io(void)
-- 
1.5.4.3


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

* [PATCH 4/9] AM3517: Add platform init code for regulator driver
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
                   ` (2 preceding siblings ...)
  2010-04-19 10:20 ` [PATCH 3/9] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 16:20   ` Aggarwal, Anuj
  2010-04-19 10:20 ` [PATCH 5/9] AM3517: Add audio codec platform data Stanley.Miao
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

Add platform init code for regulator driver.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |  122 +++++++++++++++++++++++++++++++++
 1 files changed, 122 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 3acfcae..41f766c 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -21,6 +21,7 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/i2c/pca953x.h>
+#include <linux/regulator/machine.h>
 
 #include <mach/hardware.h>
 #include <mach/am35xx.h>
@@ -46,6 +47,122 @@ static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = {
 	},
 };
 
+/* TPS65023 specific initialization */
+/* VDCDC1 -> VDD_CORE */
+static struct regulator_consumer_supply am3517_evm_vdcdc1_supplies[] = {
+	{
+		.supply = "vdd_core",
+	},
+};
+
+/* VDCDC2 -> VDDSHV */
+static struct regulator_consumer_supply am3517_evm_vdcdc2_supplies[] = {
+	{
+		.supply = "vddshv",
+	},
+};
+
+/* VDCDC2 |-> VDDS
+	   |-> VDDS_SRAM_CORE_BG
+	   |-> VDDS_SRAM_MPU */
+static struct regulator_consumer_supply am3517_evm_vdcdc3_supplies[] = {
+	{
+		.supply = "vdds",
+	},
+	{
+		.supply = "vdds_sram_core_bg",
+	},
+	{
+		.supply = "vdds_sram_mpu",
+	},
+};
+
+/* LDO1 |-> VDDA1P8V_USBPHY
+	 |-> VDDA_DAC */
+static struct regulator_consumer_supply am3517_evm_ldo1_supplies[] = {
+	{
+		.supply = "vdda1p8v_usbphy",
+	},
+	{
+		.supply = "vdda_dac",
+	},
+};
+
+/* LDO2 -> VDDA3P3V_USBPHY */
+static struct regulator_consumer_supply am3517_evm_ldo2_supplies[] = {
+	{
+		.supply = "vdda3p3v_usbphy",
+	},
+};
+
+static struct regulator_init_data am3517_evm_regulator_data[] = {
+	/* DCDC1 */
+	{
+		.constraints = {
+			.min_uV = 1200000,
+			.max_uV = 1200000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_evm_vdcdc1_supplies),
+		.consumer_supplies = am3517_evm_vdcdc1_supplies,
+	},
+	/* DCDC2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_evm_vdcdc2_supplies),
+		.consumer_supplies = am3517_evm_vdcdc2_supplies,
+	},
+	/* DCDC3 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_evm_vdcdc3_supplies),
+		.consumer_supplies = am3517_evm_vdcdc3_supplies,
+	},
+	/* LDO1 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_evm_ldo1_supplies),
+		.consumer_supplies = am3517_evm_ldo1_supplies,
+	},
+	/* LDO2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_evm_ldo2_supplies),
+		.consumer_supplies = am3517_evm_ldo2_supplies,
+	},
+};
+
 /*
  * RTC - S35390A
  */
@@ -103,6 +220,11 @@ static struct i2c_board_info __initdata am3517evm_i2c3_boardinfo[] = {
 		I2C_BOARD_INFO("tca6416", 0x21),
 		.platform_data = &am3517evm_ui_gpio_expander_info_2,
 	},
+	{
+		I2C_BOARD_INFO("tps65023", 0x48),
+		.flags = I2C_CLIENT_WAKE,
+		.platform_data = &am3517_evm_regulator_data[0],
+	},
 };
 
 static int __init am3517_evm_i2c_init(void)
-- 
1.5.4.3


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

* [PATCH 5/9] AM3517: Add audio codec platform data
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
                   ` (3 preceding siblings ...)
  2010-04-19 10:20 ` [PATCH 4/9] AM3517: Add platform init code for regulator driver Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 16:08   ` Aggarwal, Anuj
  2010-04-19 10:20 ` [PATCH 6/9] AM3517: initialize i2c subsystem after mux subsystem Stanley.Miao
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

Codec tlv320aic23 is on the second i2c bus. Add the tlv320aic23 info in
i2c2 board_info.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 41f766c..f24e367 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -199,6 +199,9 @@ static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
 };
 static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
 	{
+		I2C_BOARD_INFO("tlv320aic23", 0x1A),
+	},
+	{
 		I2C_BOARD_INFO("tca6416", 0x21),
 		.platform_data = &am3517evm_gpio_expander_info_0,
 	},
-- 
1.5.4.3


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

* [PATCH 6/9] AM3517: initialize i2c subsystem after mux subsystem
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
                   ` (4 preceding siblings ...)
  2010-04-19 10:20 ` [PATCH 5/9] AM3517: Add audio codec platform data Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 10:20 ` [PATCH 7/9] OMAP: fix a gpmc nand problem Stanley.Miao
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

The initialize of i2c subsystem will set pinmux, so it should be done
after the initialize of mux subsystem initialization.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index f24e367..f8f99b8 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -419,9 +419,9 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 static void __init am3517_evm_init(void)
 {
-	am3517_evm_i2c_init();
-
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
+	am3517_evm_i2c_init();
 	platform_add_devices(am3517_evm_devices,
 				ARRAY_SIZE(am3517_evm_devices));
 
-- 
1.5.4.3


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

* [PATCH 7/9] OMAP: fix a gpmc nand problem
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
                   ` (5 preceding siblings ...)
  2010-04-19 10:20 ` [PATCH 6/9] AM3517: initialize i2c subsystem after mux subsystem Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 10:20 ` [PATCH 8/9] omap: init the gpio pinmux for mmc Stanley.Miao
  2010-04-19 10:20 ` [PATCH 9/9] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao
  8 siblings, 0 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

If gpmc_t isn't given, we don't need to set timing for gpmc, or it will cause
a Oops.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/gpmc-nand.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 64d74f0..e57fb29 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -39,6 +39,9 @@ static int omap2_nand_gpmc_retime(void)
 	struct gpmc_timings t;
 	int err;
 
+	if (!gpmc_nand_data->gpmc_t)
+		return 0;
+
 	memset(&t, 0, sizeof(t));
 	t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk);
 	t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on);
-- 
1.5.4.3


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

* [PATCH 8/9] omap: init the gpio pinmux for mmc
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
                   ` (6 preceding siblings ...)
  2010-04-19 10:20 ` [PATCH 7/9] OMAP: fix a gpmc nand problem Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  2010-04-19 10:20 ` [PATCH 9/9] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao
  8 siblings, 0 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

There is two gpio for mmc use, one is for card detecting, another is
used for checking write protect. Intialize its pinmux in case the bootloader
doesn't set it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/devices.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 23e4d77..df9c62a 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -591,6 +591,13 @@ static inline void omap_hsmmc_reset(void) {}
 static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
 			int controller_nr)
 {
+	if (mmc_controller->slots[0].switch_pin > 0)
+		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
+					OMAP_PIN_INPUT_PULLUP);
+	if (mmc_controller->slots[0].gpio_wp > 0)
+		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
+					OMAP_PIN_INPUT_PULLUP);
+
 	if (cpu_is_omap2420() && controller_nr == 0) {
 		omap_cfg_reg(H18_24XX_MMC_CMD);
 		omap_cfg_reg(H15_24XX_MMC_CLKI);
-- 
1.5.4.3


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

* [PATCH 9/9] omap hsmmc: fix the hsmmc driver for am3517.
  2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
                   ` (7 preceding siblings ...)
  2010-04-19 10:20 ` [PATCH 8/9] omap: init the gpio pinmux for mmc Stanley.Miao
@ 2010-04-19 10:20 ` Stanley.Miao
  8 siblings, 0 replies; 12+ messages in thread
From: Stanley.Miao @ 2010-04-19 10:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, hvaibhav, srk

AM3517 don't have the register OMAP343X_CONTROL_PBIAS_LITE and the regulators
like "vmmc", so we set a noop "set_power" function for it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/hsmmc.c |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 9ad2295..5f46797 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -139,6 +139,12 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot,
 	}
 }
 
+static int am3517_mmc_set_power(struct device *dev, int slot, int power_on,
+								int vdd)
+{
+	return 0;
+}
+
 static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
 
 void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
@@ -150,7 +156,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
 	if (cpu_is_omap2430()) {
 		control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
 		control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
-	} else {
+	} else if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
 		control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
 		control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
 	}
@@ -216,12 +222,25 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
 		 */
 		mmc->slots[0].ocr_mask = c->ocr_mask;
 
+		if (!cpu_is_omap3517() && !cpu_is_omap3505()) {
+			switch (c->mmc) {
+			case 1:
+				/* on-chip level shifting via PBIAS0/PBIAS1 */
+				mmc->slots[0].before_set_reg = hsmmc1_before_set_reg;
+				mmc->slots[0].after_set_reg = hsmmc1_after_set_reg;
+				break;
+			case 2:
+			case 3:
+				/* off-chip level shifting, or none */
+				mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
+				mmc->slots[0].after_set_reg = NULL;
+				break;
+			}
+		} else /* cpu_is_omap3517() || cpu_is_omap3505() */
+			mmc->slots[0].set_power = am3517_mmc_set_power;
+
 		switch (c->mmc) {
 		case 1:
-			/* on-chip level shifting via PBIAS0/PBIAS1 */
-			mmc->slots[0].before_set_reg = hsmmc1_before_set_reg;
-			mmc->slots[0].after_set_reg = hsmmc1_after_set_reg;
-
 			/* Omap3630 HSMMC1 supports only 4-bit */
 			if (cpu_is_omap3630() && c->wires > 4) {
 				c->wires = 4;
@@ -235,9 +254,6 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
 				c->wires = 4;
 			/* FALLTHROUGH */
 		case 3:
-			/* off-chip level shifting, or none */
-			mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
-			mmc->slots[0].after_set_reg = NULL;
 			break;
 		default:
 			pr_err("MMC%d configuration not supported!\n", c->mmc);
-- 
1.5.4.3


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

* RE: [PATCH 5/9] AM3517: Add audio codec platform data
  2010-04-19 10:20 ` [PATCH 5/9] AM3517: Add audio codec platform data Stanley.Miao
@ 2010-04-19 16:08   ` Aggarwal, Anuj
  0 siblings, 0 replies; 12+ messages in thread
From: Aggarwal, Anuj @ 2010-04-19 16:08 UTC (permalink / raw)
  To: Stanley.Miao, linux-omap
  Cc: tony, Hiremath, Vaibhav, Govindarajan, Sriramakrishnan

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Stanley.Miao
> Sent: Monday, April 19, 2010 3:51 PM
> To: linux-omap@vger.kernel.org
> Cc: tony@atomide.com; Hiremath, Vaibhav; Govindarajan, Sriramakrishnan
> Subject: [PATCH 5/9] AM3517: Add audio codec platform data
> 
> Codec tlv320aic23 is on the second i2c bus. Add the tlv320aic23 info in
> i2c2 board_info.
> 
> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
>  arch/arm/mach-omap2/board-am3517evm.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-
> omap2/board-am3517evm.c
> index 41f766c..f24e367 100644
> --- a/arch/arm/mach-omap2/board-am3517evm.c
> +++ b/arch/arm/mach-omap2/board-am3517evm.c
> @@ -199,6 +199,9 @@ static struct pca953x_platform_data
> am3517evm_gpio_expander_info_0 = {
>  };
>  static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
>  	{
> +		I2C_BOARD_INFO("tlv320aic23", 0x1A),
> +	},
> +	{
>  		I2C_BOARD_INFO("tca6416", 0x21),
>  		.platform_data = &am3517evm_gpio_expander_info_0,
>  	},
[Aggarwal, Anuj] Similar patch exists at:

http://marc.info/?l=linux-omap&m=125684238323749&w=2 

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

* RE: [PATCH 4/9] AM3517: Add platform init code for regulator driver
  2010-04-19 10:20 ` [PATCH 4/9] AM3517: Add platform init code for regulator driver Stanley.Miao
@ 2010-04-19 16:20   ` Aggarwal, Anuj
  0 siblings, 0 replies; 12+ messages in thread
From: Aggarwal, Anuj @ 2010-04-19 16:20 UTC (permalink / raw)
  To: Stanley.Miao, linux-omap
  Cc: tony, Hiremath, Vaibhav, Govindarajan, Sriramakrishnan

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Stanley.Miao
> Sent: Monday, April 19, 2010 3:51 PM
> To: linux-omap@vger.kernel.org
> Cc: tony@atomide.com; Hiremath, Vaibhav; Govindarajan, Sriramakrishnan
> Subject: [PATCH 4/9] AM3517: Add platform init code for regulator driver
> 
> Add platform init code for regulator driver.
> 
> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
>  arch/arm/mach-omap2/board-am3517evm.c |  122
> +++++++++++++++++++++++++++++++++
>  1 files changed, 122 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-
> omap2/board-am3517evm.c
> index 3acfcae..41f766c 100644
> --- a/arch/arm/mach-omap2/board-am3517evm.c
> +++ b/arch/arm/mach-omap2/board-am3517evm.c
> @@ -21,6 +21,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/gpio.h>
>  #include <linux/i2c/pca953x.h>
> +#include <linux/regulator/machine.h>
> 
>  #include <mach/hardware.h>
>  #include <mach/am35xx.h>
> @@ -46,6 +47,122 @@ static struct i2c_board_info __initdata
> am3517evm_i2c1_boardinfo[] = {
>  	},
>  };
> 
> +/* TPS65023 specific initialization */
> +/* VDCDC1 -> VDD_CORE */
> +static struct regulator_consumer_supply am3517_evm_vdcdc1_supplies[] = {
> +	{
> +		.supply = "vdd_core",
> +	},
> +};
> +
> +/* VDCDC2 -> VDDSHV */
> +static struct regulator_consumer_supply am3517_evm_vdcdc2_supplies[] = {
> +	{
> +		.supply = "vddshv",
> +	},
> +};
> +
> +/* VDCDC2 |-> VDDS
> +	   |-> VDDS_SRAM_CORE_BG
> +	   |-> VDDS_SRAM_MPU */
> +static struct regulator_consumer_supply am3517_evm_vdcdc3_supplies[] = {
> +	{
> +		.supply = "vdds",
> +	},
> +	{
> +		.supply = "vdds_sram_core_bg",
> +	},
> +	{
> +		.supply = "vdds_sram_mpu",
> +	},
> +};
> +
> +/* LDO1 |-> VDDA1P8V_USBPHY
> +	 |-> VDDA_DAC */
> +static struct regulator_consumer_supply am3517_evm_ldo1_supplies[] = {
> +	{
> +		.supply = "vdda1p8v_usbphy",
> +	},
> +	{
> +		.supply = "vdda_dac",
> +	},
> +};
> +
> +/* LDO2 -> VDDA3P3V_USBPHY */
> +static struct regulator_consumer_supply am3517_evm_ldo2_supplies[] = {
> +	{
> +		.supply = "vdda3p3v_usbphy",
> +	},
> +};
> +
> +static struct regulator_init_data am3517_evm_regulator_data[] = {
> +	/* DCDC1 */
> +	{
> +		.constraints = {
> +			.min_uV = 1200000,
> +			.max_uV = 1200000,
> +			.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
> +			.always_on = true,
> +			.apply_uV = false,
> +		},
> +		.num_consumer_supplies =
> ARRAY_SIZE(am3517_evm_vdcdc1_supplies),
> +		.consumer_supplies = am3517_evm_vdcdc1_supplies,
> +	},
> +	/* DCDC2 */
> +	{
> +		.constraints = {
> +			.min_uV = 3300000,
> +			.max_uV = 3300000,
> +			.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
> +			.always_on = true,
> +			.apply_uV = false,
> +		},
> +		.num_consumer_supplies =
> ARRAY_SIZE(am3517_evm_vdcdc2_supplies),
> +		.consumer_supplies = am3517_evm_vdcdc2_supplies,
> +	},
> +	/* DCDC3 */
> +	{
> +		.constraints = {
> +			.min_uV = 1800000,
> +			.max_uV = 1800000,
> +			.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
> +			.always_on = true,
> +			.apply_uV = false,
> +		},
> +		.num_consumer_supplies =
> ARRAY_SIZE(am3517_evm_vdcdc3_supplies),
> +		.consumer_supplies = am3517_evm_vdcdc3_supplies,
> +	},
> +	/* LDO1 */
> +	{
> +		.constraints = {
> +			.min_uV = 1800000,
> +			.max_uV = 1800000,
> +			.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
> +			.always_on = false,
> +			.apply_uV = false,
> +		},
> +		.num_consumer_supplies = ARRAY_SIZE(am3517_evm_ldo1_supplies),
> +		.consumer_supplies = am3517_evm_ldo1_supplies,
> +	},
> +	/* LDO2 */
> +	{
> +		.constraints = {
> +			.min_uV = 3300000,
> +			.max_uV = 3300000,
> +			.valid_modes_mask = REGULATOR_MODE_NORMAL,
> +			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
> +			.always_on = false,
> +			.apply_uV = false,
> +		},
> +		.num_consumer_supplies = ARRAY_SIZE(am3517_evm_ldo2_supplies),
> +		.consumer_supplies = am3517_evm_ldo2_supplies,
> +	},
> +};
> +
>  /*
>   * RTC - S35390A
>   */
> @@ -103,6 +220,11 @@ static struct i2c_board_info __initdata
> am3517evm_i2c3_boardinfo[] = {
>  		I2C_BOARD_INFO("tca6416", 0x21),
>  		.platform_data = &am3517evm_ui_gpio_expander_info_2,
>  	},
> +	{
> +		I2C_BOARD_INFO("tps65023", 0x48),
> +		.flags = I2C_CLIENT_WAKE,
> +		.platform_data = &am3517_evm_regulator_data[0],
> +	},
>  };
> 
>  static int __init am3517_evm_i2c_init(void)

[Aggarwal, Anuj] I can see an exactly same patch at:

http://arago-project.org/git/projects/?p=linux-omap3.git;a=commit;h=4ff9cb47c50dc6df362702ad3ae69b70de098372 

(Commit id 4ff9cb47c on http://arago-project.org/git/projects/?p=linux-omap3.git) 

Can you help me understand what changes you have done in this patch?

Please make sure that you give due credit to the original owner of 
the patch on basis of which you are deriving/submitting your patches.


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

end of thread, other threads:[~2010-04-19 16:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-19 10:20 [PATCH 0/9] Some am3517 related patches [V2] Stanley.Miao
2010-04-19 10:20 ` [PATCH 1/9] omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is not enabled Stanley.Miao
2010-04-19 10:20 ` [PATCH 2/9] omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL Stanley.Miao
2010-04-19 10:20 ` [PATCH 3/9] AM3517: rename the i2c boardinfo to make it more readable Stanley.Miao
2010-04-19 10:20 ` [PATCH 4/9] AM3517: Add platform init code for regulator driver Stanley.Miao
2010-04-19 16:20   ` Aggarwal, Anuj
2010-04-19 10:20 ` [PATCH 5/9] AM3517: Add audio codec platform data Stanley.Miao
2010-04-19 16:08   ` Aggarwal, Anuj
2010-04-19 10:20 ` [PATCH 6/9] AM3517: initialize i2c subsystem after mux subsystem Stanley.Miao
2010-04-19 10:20 ` [PATCH 7/9] OMAP: fix a gpmc nand problem Stanley.Miao
2010-04-19 10:20 ` [PATCH 8/9] omap: init the gpio pinmux for mmc Stanley.Miao
2010-04-19 10:20 ` [PATCH 9/9] omap hsmmc: fix the hsmmc driver for am3517 Stanley.Miao

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.