linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] ARM OMAP3530evm misc fixes
@ 2012-06-20  9:14 Zumeng Chen
  2012-06-20  9:14 ` [PATCH 1/5] ARM: OMAP3EVM: Add NAND flash definition Zumeng Chen
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-06-20  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

The series is based upon the latest linux-omap master branch from
Tony (3.5-rc2).

V3 Changes :

 1. [patch 5/5] Leave driver/input/touchscreen as-is. some changes
    on arch/arm/mach-omap2/common-board-devices.c, please see the
    shortlog for more information.
 2. For the first patch, I noticed GPMC driver conversion v5, so
    this is decided by Tony, we can drop it, and I'll create a new
    one if needed, but obviously I'm not very proper candidate for
    it.

 Thanks all comments :-)

Zumeng Chen (5):
      ARM: OMAP3EVM: Add NAND flash definition
      ARM: OMAP3EVM: Adding USB internal LDOs board file
      ARM: omap3evm: enable VBUS switch for EHCI tranceiver
      ARM: OMAP3EVM: cosmetic fixes for parent clk set
      ARM: OMAP3530evm: set pendown_state and debounce time for ads7846

 arch/arm/mach-omap2/board-omap3evm.c       |   74 +++++++++++++++++++++++++++-
 arch/arm/mach-omap2/common-board-devices.c |   18 ++++++-
 arch/arm/mach-omap2/common-board-devices.h |    1 +
 arch/arm/plat-omap/clock.c                 |    4 ++
 drivers/mfd/omap-usb-host.c                |    2 +-
 5 files changed, 95 insertions(+), 4 deletions(-)

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

* [PATCH 1/5] ARM: OMAP3EVM: Add NAND flash definition
  2012-06-20  9:14 [PATCH v3 0/5] ARM OMAP3530evm misc fixes Zumeng Chen
@ 2012-06-20  9:14 ` Zumeng Chen
  2012-06-20  9:14 ` [PATCH 2/5] ARM: OMAP3EVM: Adding USB internal LDOs board file Zumeng Chen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-06-20  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Tested-by: Zumeng Chen <zumeng.chen@windriver.com>
---
 arch/arm/mach-omap2/board-omap3evm.c |   39 ++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 639bd07..0b83d0e 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -24,6 +24,10 @@
 #include <linux/leds.h>
 #include <linux/interrupt.h>
 
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand.h>
+
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl.h>
@@ -43,6 +47,7 @@
 
 #include <plat/board.h>
 #include <plat/usb.h>
+#include <plat/nand.h>
 #include "common.h"
 #include <plat/mcspi.h>
 #include <video/omapdss.h>
@@ -607,6 +612,37 @@ static struct regulator_consumer_supply dummy_supplies[] = {
 	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
 };
 
+static struct mtd_partition omap3evm_nand_partitions[] = {
+	/* All the partition sizes are listed in terms of NAND block size */
+	{
+		.name           = "X-Loader",
+		.offset         = 0,
+		.size           = 4*(SZ_128K),
+		.mask_flags     = MTD_WRITEABLE
+	},
+	{
+		.name           = "U-Boot",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 14*(SZ_128K),
+		.mask_flags     = MTD_WRITEABLE
+	},
+	{
+		.name           = "U-Boot Env",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 2*(SZ_128K)
+	},
+	{
+		.name           = "Kernel",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 40*(SZ_128K)
+	},
+	{
+		.name           = "File system",
+		.size           = MTDPART_SIZ_FULL,
+		.offset         = MTDPART_OFS_APPEND,
+	},
+};
+
 static void __init omap3_evm_init(void)
 {
 	struct omap_board_mux *obm;
@@ -656,6 +692,9 @@ static void __init omap3_evm_init(void)
 	}
 	usb_musb_init(&musb_board_data);
 	usbhs_init(&usbhs_bdata);
+	omap_nand_flash_init(NAND_BUSWIDTH_16, omap3evm_nand_partitions,
+			     ARRAY_SIZE(omap3evm_nand_partitions));
+
 	omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
 	omap3evm_init_smsc911x();
 	omap3_evm_display_init();
-- 
1.7.5.4

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

* [PATCH 2/5] ARM: OMAP3EVM: Adding USB internal LDOs board file
  2012-06-20  9:14 [PATCH v3 0/5] ARM OMAP3530evm misc fixes Zumeng Chen
  2012-06-20  9:14 ` [PATCH 1/5] ARM: OMAP3EVM: Add NAND flash definition Zumeng Chen
@ 2012-06-20  9:14 ` Zumeng Chen
  2012-06-20  9:14 ` [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver Zumeng Chen
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-06-20  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

EHCI PHY requires these regulators:
        EVM Rev >=E  --> VAUX2
        EVM Rev < E  --> VUSB1V5, VUSB1V8

Adding USB internal LDOs (vusb1v5 & vusb1v8) and VAUX2 to omap3evm
board file. Also removing vaux2_{1/2/3} supplies as they are not
used on omap3 evm.

But we need not to add vaux2 in twl4030_platform_data since it will
be added conditionally.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
---
 arch/arm/mach-omap2/board-omap3evm.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 0b83d0e..1bfbe42 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -466,6 +466,28 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
 };
 #endif
 
+/* VAUX2 for USB */
+static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
+	REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"),	/* OMAP ISP */
+	REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"),	/* OMAP ISP */
+	REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
+	REGULATOR_SUPPLY("vaux2", NULL),
+};
+
+static struct regulator_init_data omap3evm_vaux2 = {
+	.constraints = {
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies		= ARRAY_SIZE(omap3evm_vaux2_supplies),
+	.consumer_supplies		= omap3evm_vaux2_supplies,
+};
+
 static struct twl4030_platform_data omap3evm_twldata = {
 	/* platform_data for children goes here */
 	.keypad		= &omap3evm_kp_data,
@@ -659,6 +681,9 @@ static void __init omap3_evm_init(void)
 	omap_mux_init_gpio(63, OMAP_PIN_INPUT);
 	omap_hsmmc_init(mmc);
 
+	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
+		omap3evm_twldata.vaux2 = &omap3evm_vaux2;
+
 	omap3_evm_i2c_init();
 
 	omap_display_init(&omap3_evm_dss_data);
-- 
1.7.5.4

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

* [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver
  2012-06-20  9:14 [PATCH v3 0/5] ARM OMAP3530evm misc fixes Zumeng Chen
  2012-06-20  9:14 ` [PATCH 1/5] ARM: OMAP3EVM: Add NAND flash definition Zumeng Chen
  2012-06-20  9:14 ` [PATCH 2/5] ARM: OMAP3EVM: Adding USB internal LDOs board file Zumeng Chen
@ 2012-06-20  9:14 ` Zumeng Chen
  2012-06-20 12:05   ` Sergei Shtylyov
  2012-06-20  9:14 ` [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set Zumeng Chen
  2012-06-20  9:14 ` [PATCH 5/5] ARM: OMAP3530evm: set pendown_state and debounce time for ads7846 Zumeng Chen
  4 siblings, 1 reply; 13+ messages in thread
From: Zumeng Chen @ 2012-06-20  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

This was chosen by following the trace on the schematic from component U131
and U134 to the CPEN pin on the USB3320 device.

TWL4030.GPIO2-...->(T2_GPIO2_3V3)U131-..>nUSB2_EN-..>U134-..>EXP_nUSB2_1V8
which starts EHCI tranceiver USB3320.

This will set TWL4030.GPIO2 as output pin to drive EHCI tranceiver.

Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
---
 arch/arm/mach-omap2/board-omap3evm.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 1bfbe42..02d8047 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -360,6 +360,15 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
 
 	platform_device_register(&leds_gpio);
 
+	/* Enable VBUS switch by setting TWL4030.GPIO2DIR as output
+	 * for starting USB tranceiver
+	 */
+	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
+		u8 val;
+		twl_i2c_read_u8(TWL4030_MODULE_GPIO, &val, REG_GPIODATADIR1);
+		val |= 0x04; /* TWL4030.GPIO2DIR BIT at GPIODATADIR1(0x9B) */
+		twl_i2c_write_u8(TWL4030_MODULE_GPIO, val, REG_GPIODATADIR1);
+	}
 	return 0;
 }
 
-- 
1.7.5.4

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

* [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set
  2012-06-20  9:14 [PATCH v3 0/5] ARM OMAP3530evm misc fixes Zumeng Chen
                   ` (2 preceding siblings ...)
  2012-06-20  9:14 ` [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver Zumeng Chen
@ 2012-06-20  9:14 ` Zumeng Chen
  2012-06-20 16:00   ` Jon Hunter
  2012-07-06  8:38   ` Tony Lindgren
  2012-06-20  9:14 ` [PATCH 5/5] ARM: OMAP3530evm: set pendown_state and debounce time for ads7846 Zumeng Chen
  4 siblings, 2 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-06-20  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

Since it's no more sense to set parent for dummy clock,
so we can just ignore it to mute failed message.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Zumeng Chen <zumeng.chen@gmail.com>
---
 arch/arm/plat-omap/clock.c  |    4 ++++
 drivers/mfd/omap-usb-host.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 62ec5c4..c7e26e4 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -149,6 +149,10 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
 	if (!arch_clock || !arch_clock->clk_set_parent)
 		return ret;
 
+	/* If the clock is a dummy clock just return */
+	if (clk == &dummy_ck)
+		return 0;
+
 	spin_lock_irqsave(&clockfw_lock, flags);
 	if (clk->usecount == 0) {
 		ret = arch_clock->clk_set_parent(clk, parent);
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 7e96bb2..c9d27c4 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -699,7 +699,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
 	}
 
 	if (is_ehci_phy_mode(pdata->port_mode[0])) {
-		/* for OMAP3 , the clk set paretn fails */
+		/* for OMAP3 , the clk set parent fails */
 		ret = clk_set_parent(omap->utmi_p1_fck,
 					omap->xclk60mhsp1_ck);
 		if (ret != 0)
-- 
1.7.5.4

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

* [PATCH 5/5] ARM: OMAP3530evm: set pendown_state and debounce time for ads7846
  2012-06-20  9:14 [PATCH v3 0/5] ARM OMAP3530evm misc fixes Zumeng Chen
                   ` (3 preceding siblings ...)
  2012-06-20  9:14 ` [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set Zumeng Chen
@ 2012-06-20  9:14 ` Zumeng Chen
  4 siblings, 0 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-06-20  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

Currently most ads7846 config definitions for OMAP3 series boards have
been moved to common-board-devices.c, and it is transparent for init.
And it's no very proper to do gpio_request based on get_pendown_state
since omap_ads7846_init knows everything about ads7846_config.

So it's more fit to request gpio according to the right gpio_pendown
and set debounce time conditionally. If we don't set proper debouce
time, there are flooded interrupt counters of ads7846 responding to
one time touch on screen, then the driver couldn't work very well.

This patch has been validated on 3530evm.

Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
---
 arch/arm/mach-omap2/board-omap3evm.c       |    1 -
 arch/arm/mach-omap2/common-board-devices.c |   18 ++++++++++++++++--
 arch/arm/mach-omap2/common-board-devices.h |    1 +
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 02d8047..834cfc0 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -58,7 +58,6 @@
 #include "hsmmc.h"
 #include "common-board-devices.h"
 
-#define OMAP3_EVM_TS_GPIO	175
 #define OMAP3_EVM_EHCI_VBUS	22
 #define OMAP3_EVM_EHCI_SELECT	61
 
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index 1706ebc..4ba070e 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -35,6 +35,16 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = {
 	.turbo_mode	= 0,
 };
 
+/*
+ * ADS7846 driver maybe request a gpio according to the value
+ * of pdata->get_pendown_state, but we have done this. So set
+ * get_pendown_state to avoid twice gpio requesting.
+ */
+static int omap3_get_pendown_state(void)
+{
+	return !gpio_get_value(OMAP3_EVM_TS_GPIO);
+}
+
 static struct ads7846_platform_data ads7846_config = {
 	.x_max			= 0x0fff,
 	.y_max			= 0x0fff,
@@ -45,6 +55,7 @@ static struct ads7846_platform_data ads7846_config = {
 	.debounce_rep		= 1,
 	.gpio_pendown		= -EINVAL,
 	.keep_vref_on		= 1,
+	.get_pendown_state	= &omap3_get_pendown_state,
 };
 
 static struct spi_board_info ads7846_spi_board_info __initdata = {
@@ -63,14 +74,17 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
 	struct spi_board_info *spi_bi = &ads7846_spi_board_info;
 	int err;
 
-	if (board_pdata && board_pdata->get_pendown_state) {
+	if (gpio_pendown) {
 		err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown");
 		if (err) {
 			pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err);
 			return;
 		}
-		gpio_export(gpio_pendown, 0);
 
+		/* TS GPIOPendown doesn't allow user to change the direction */
+		gpio_export(gpio_pendown, false);
+
+		/* Set proper debouce time for ads7846. */
 		if (gpio_debounce)
 			gpio_set_debounce(gpio_pendown, gpio_debounce);
 	}
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index a0b4a428..4c4ef6a 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -4,6 +4,7 @@
 #include "twl-common.h"
 
 #define NAND_BLOCK_SIZE	SZ_128K
+#define OMAP3_EVM_TS_GPIO	175
 
 struct mtd_partition;
 struct ads7846_platform_data;
-- 
1.7.5.4

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

* [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver
  2012-06-20  9:14 ` [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver Zumeng Chen
@ 2012-06-20 12:05   ` Sergei Shtylyov
  2012-06-21  1:03     ` Zumeng Chen
  2012-07-06  8:41     ` Tony Lindgren
  0 siblings, 2 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2012-06-20 12:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 20-06-2012 13:14, Zumeng Chen wrote:

> This was chosen by following the trace on the schematic from component U131
> and U134 to the CPEN pin on the USB3320 device.

> TWL4030.GPIO2-...->(T2_GPIO2_3V3)U131-..>nUSB2_EN-..>U134-..>EXP_nUSB2_1V8
> which starts EHCI tranceiver USB3320.

> This will set TWL4030.GPIO2 as output pin to drive EHCI tranceiver.

> Signed-off-by: Zumeng Chen<zumeng.chen@windriver.com>
> ---
>   arch/arm/mach-omap2/board-omap3evm.c |    9 +++++++++
>   1 files changed, 9 insertions(+), 0 deletions(-)

> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 1bfbe42..02d8047 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -360,6 +360,15 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
>
>   	platform_device_register(&leds_gpio);
>
> +	/* Enable VBUS switch by setting TWL4030.GPIO2DIR as output
> +	 * for starting USB tranceiver
> +	 */
> +	if (get_omap3_evm_rev()>= OMAP3EVM_BOARD_GEN_2) {
> +		u8 val;

    Empty line after declaration block wouldn't hurt...

> +		twl_i2c_read_u8(TWL4030_MODULE_GPIO,&val, REG_GPIODATADIR1);
> +		val |= 0x04; /* TWL4030.GPIO2DIR BIT at GPIODATADIR1(0x9B) */
> +		twl_i2c_write_u8(TWL4030_MODULE_GPIO, val, REG_GPIODATADIR1);
> +	}
>   	return 0;
>   }

WBR, Sergei

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

* [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set
  2012-06-20  9:14 ` [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set Zumeng Chen
@ 2012-06-20 16:00   ` Jon Hunter
  2012-06-21  1:05     ` Zumeng Chen
  2012-07-06  8:38   ` Tony Lindgren
  1 sibling, 1 reply; 13+ messages in thread
From: Jon Hunter @ 2012-06-20 16:00 UTC (permalink / raw)
  To: linux-arm-kernel


On 06/20/2012 04:14 AM, Zumeng Chen wrote:
> Since it's no more sense to set parent for dummy clock,
> so we can just ignore it to mute failed message.
> 
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> Signed-off-by: Zumeng Chen <zumeng.chen@gmail.com>
> ---
>  arch/arm/plat-omap/clock.c  |    4 ++++
>  drivers/mfd/omap-usb-host.c |    2 +-
>  2 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
> index 62ec5c4..c7e26e4 100644
> --- a/arch/arm/plat-omap/clock.c
> +++ b/arch/arm/plat-omap/clock.c
> @@ -149,6 +149,10 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
>  	if (!arch_clock || !arch_clock->clk_set_parent)
>  		return ret;
>  
> +	/* If the clock is a dummy clock just return */
> +	if (clk == &dummy_ck)
> +		return 0;
> +
>  	spin_lock_irqsave(&clockfw_lock, flags);
>  	if (clk->usecount == 0) {
>  		ret = arch_clock->clk_set_parent(clk, parent);
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 7e96bb2..c9d27c4 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -699,7 +699,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
>  	}
>  
>  	if (is_ehci_phy_mode(pdata->port_mode[0])) {
> -		/* for OMAP3 , the clk set paretn fails */
> +		/* for OMAP3 , the clk set parent fails */

Can't we remove this comment now with the above fix? It is no longer
relevant, right?

Cheers
Jon

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

* [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver
  2012-06-20 12:05   ` Sergei Shtylyov
@ 2012-06-21  1:03     ` Zumeng Chen
  2012-07-06  8:41     ` Tony Lindgren
  1 sibling, 0 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-06-21  1:03 UTC (permalink / raw)
  To: linux-arm-kernel

? 2012?06?20? 20:05, Sergei Shtylyov ??:
> Hello.
>
> On 20-06-2012 13:14, Zumeng Chen wrote:
>
>> This was chosen by following the trace on the schematic from 
>> component U131
>> and U134 to the CPEN pin on the USB3320 device.
>
>> TWL4030.GPIO2-...->(T2_GPIO2_3V3)U131-..>nUSB2_EN-..>U134-..>EXP_nUSB2_1V8 
>>
>> which starts EHCI tranceiver USB3320.
>
>> This will set TWL4030.GPIO2 as output pin to drive EHCI tranceiver.
>
>> Signed-off-by: Zumeng Chen<zumeng.chen@windriver.com>
>> ---
>> arch/arm/mach-omap2/board-omap3evm.c | 9 +++++++++
>> 1 files changed, 9 insertions(+), 0 deletions(-)
>
>> diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
>> b/arch/arm/mach-omap2/board-omap3evm.c
>> index 1bfbe42..02d8047 100644
>> --- a/arch/arm/mach-omap2/board-omap3evm.c
>> +++ b/arch/arm/mach-omap2/board-omap3evm.c
>> @@ -360,6 +360,15 @@ static int omap3evm_twl_gpio_setup(struct device 
>> *dev,
>>
>> platform_device_register(&leds_gpio);
>>
>> + /* Enable VBUS switch by setting TWL4030.GPIO2DIR as output
>> + * for starting USB tranceiver
>> + */
>> + if (get_omap3_evm_rev()>= OMAP3EVM_BOARD_GEN_2) {
>> + u8 val;
>
> Empty line after declaration block wouldn't hurt...
Yes, Agreed.

Regards,
Zumeng
>
>> + twl_i2c_read_u8(TWL4030_MODULE_GPIO,&val, REG_GPIODATADIR1);
>> + val |= 0x04; /* TWL4030.GPIO2DIR BIT at GPIODATADIR1(0x9B) */
>> + twl_i2c_write_u8(TWL4030_MODULE_GPIO, val, REG_GPIODATADIR1);
>> + }
>> return 0;
>> }
>
> WBR, Sergei

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

* [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set
  2012-06-20 16:00   ` Jon Hunter
@ 2012-06-21  1:05     ` Zumeng Chen
  0 siblings, 0 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-06-21  1:05 UTC (permalink / raw)
  To: linux-arm-kernel

? 2012?06?21? 00:00, Jon Hunter ??:
> On 06/20/2012 04:14 AM, Zumeng Chen wrote:
>> Since it's no more sense to set parent for dummy clock,
>> so we can just ignore it to mute failed message.
>>
>> Signed-off-by: Jon Hunter<jon-hunter@ti.com>
>> Signed-off-by: Zumeng Chen<zumeng.chen@gmail.com>
>> ---
>>   arch/arm/plat-omap/clock.c  |    4 ++++
>>   drivers/mfd/omap-usb-host.c |    2 +-
>>   2 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
>> index 62ec5c4..c7e26e4 100644
>> --- a/arch/arm/plat-omap/clock.c
>> +++ b/arch/arm/plat-omap/clock.c
>> @@ -149,6 +149,10 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
>>   	if (!arch_clock || !arch_clock->clk_set_parent)
>>   		return ret;
>>
>> +	/* If the clock is a dummy clock just return */
>> +	if (clk ==&dummy_ck)
>> +		return 0;
>> +
>>   	spin_lock_irqsave(&clockfw_lock, flags);
>>   	if (clk->usecount == 0) {
>>   		ret = arch_clock->clk_set_parent(clk, parent);
>> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
>> index 7e96bb2..c9d27c4 100644
>> --- a/drivers/mfd/omap-usb-host.c
>> +++ b/drivers/mfd/omap-usb-host.c
>> @@ -699,7 +699,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
>>   	}
>>
>>   	if (is_ehci_phy_mode(pdata->port_mode[0])) {
>> -		/* for OMAP3 , the clk set paretn fails */
>> +		/* for OMAP3 , the clk set parent fails */
> Can't we remove this comment now with the above fix? It is no longer
> relevant, right?
Yes, NP.

Regards,
Zumeng
>
> Cheers
> Jon
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set
  2012-06-20  9:14 ` [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set Zumeng Chen
  2012-06-20 16:00   ` Jon Hunter
@ 2012-07-06  8:38   ` Tony Lindgren
  1 sibling, 0 replies; 13+ messages in thread
From: Tony Lindgren @ 2012-07-06  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

* Zumeng Chen <zumeng.chen@windriver.com> [120620 02:19]:
> Since it's no more sense to set parent for dummy clock,
> so we can just ignore it to mute failed message.

This is something Paul should look at.

Regards,

Tony
 
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> Signed-off-by: Zumeng Chen <zumeng.chen@gmail.com>
> ---
>  arch/arm/plat-omap/clock.c  |    4 ++++
>  drivers/mfd/omap-usb-host.c |    2 +-
>  2 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
> index 62ec5c4..c7e26e4 100644
> --- a/arch/arm/plat-omap/clock.c
> +++ b/arch/arm/plat-omap/clock.c
> @@ -149,6 +149,10 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
>  	if (!arch_clock || !arch_clock->clk_set_parent)
>  		return ret;
>  
> +	/* If the clock is a dummy clock just return */
> +	if (clk == &dummy_ck)
> +		return 0;
> +
>  	spin_lock_irqsave(&clockfw_lock, flags);
>  	if (clk->usecount == 0) {
>  		ret = arch_clock->clk_set_parent(clk, parent);
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 7e96bb2..c9d27c4 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -699,7 +699,7 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev)
>  	}
>  
>  	if (is_ehci_phy_mode(pdata->port_mode[0])) {
> -		/* for OMAP3 , the clk set paretn fails */
> +		/* for OMAP3 , the clk set parent fails */
>  		ret = clk_set_parent(omap->utmi_p1_fck,
>  					omap->xclk60mhsp1_ck);
>  		if (ret != 0)
> -- 
> 1.7.5.4
> 

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

* [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver
  2012-06-20 12:05   ` Sergei Shtylyov
  2012-06-21  1:03     ` Zumeng Chen
@ 2012-07-06  8:41     ` Tony Lindgren
  2012-07-08  7:50       ` Zumeng Chen
  1 sibling, 1 reply; 13+ messages in thread
From: Tony Lindgren @ 2012-07-06  8:41 UTC (permalink / raw)
  To: linux-arm-kernel

* Sergei Shtylyov <sshtylyov@mvista.com> [120620 05:10]:
> On 20-06-2012 13:14, Zumeng Chen wrote:
> >
> >This will set TWL4030.GPIO2 as output pin to drive EHCI tranceiver.
...

> >+	/* Enable VBUS switch by setting TWL4030.GPIO2DIR as output
> >+	 * for starting USB tranceiver
> >+	 */
> >+	if (get_omap3_evm_rev()>= OMAP3EVM_BOARD_GEN_2) {
> >+		u8 val;
> 
>    Empty line after declaration block wouldn't hurt...
> 

I'll apply these into devel-board branch with the extra line
added. Not taking the clock related patch 4/5 as that's something
Paul should queue.

Also note that the board-*.c files are being phased out with
devicetree support.

Regards,

Tony

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

* [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver
  2012-07-06  8:41     ` Tony Lindgren
@ 2012-07-08  7:50       ` Zumeng Chen
  0 siblings, 0 replies; 13+ messages in thread
From: Zumeng Chen @ 2012-07-08  7:50 UTC (permalink / raw)
  To: linux-arm-kernel

? 2012?07?06? 16:41, Tony Lindgren ??:
> * Sergei Shtylyov<sshtylyov@mvista.com>  [120620 05:10]:
>> On 20-06-2012 13:14, Zumeng Chen wrote:
>>> This will set TWL4030.GPIO2 as output pin to drive EHCI tranceiver.
> ...
>
>>> +	/* Enable VBUS switch by setting TWL4030.GPIO2DIR as output
>>> +	 * for starting USB tranceiver
>>> +	 */
>>> +	if (get_omap3_evm_rev()>= OMAP3EVM_BOARD_GEN_2) {
>>> +		u8 val;
>>     Empty line after declaration block wouldn't hurt...
>>
> I'll apply these into devel-board branch with the extra line
> added. Not taking the clock related patch 4/5 as that's something
> Paul should queue.
>
> Also note that the board-*.c files are being phased out with
> devicetree support.
Thanks Tony for your comments, I understand all of them.

Regards,
Zumeng
>
> Regards,
>
> Tony

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

end of thread, other threads:[~2012-07-08  7:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-20  9:14 [PATCH v3 0/5] ARM OMAP3530evm misc fixes Zumeng Chen
2012-06-20  9:14 ` [PATCH 1/5] ARM: OMAP3EVM: Add NAND flash definition Zumeng Chen
2012-06-20  9:14 ` [PATCH 2/5] ARM: OMAP3EVM: Adding USB internal LDOs board file Zumeng Chen
2012-06-20  9:14 ` [PATCH 3/5] ARM: omap3evm: enable VBUS switch for EHCI tranceiver Zumeng Chen
2012-06-20 12:05   ` Sergei Shtylyov
2012-06-21  1:03     ` Zumeng Chen
2012-07-06  8:41     ` Tony Lindgren
2012-07-08  7:50       ` Zumeng Chen
2012-06-20  9:14 ` [PATCH 4/5] ARM: OMAP3EVM: cosmetic fixes for parent clk set Zumeng Chen
2012-06-20 16:00   ` Jon Hunter
2012-06-21  1:05     ` Zumeng Chen
2012-07-06  8:38   ` Tony Lindgren
2012-06-20  9:14 ` [PATCH 5/5] ARM: OMAP3530evm: set pendown_state and debounce time for ads7846 Zumeng Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).