[PATCHv2] omap: id: add chip id recognition for omap4430 es2.3

2011-12-07 Thread David Anders
allow for the omap4430 es2.3 revision to be recognized in the
omap4_check_revision() function.

most aspects of all omap4430 es2.x versions are identical, however
a number of small variations such as default pullup or pulldown
resistor configurations vary between revisions.

detailed information on silicon errata for omap4430 revisions can
be found at http://focus.ti.com/pdfs/wtbu/swpz009D.pdf

Signed-off-by: David Anders x0132...@ti.com
---
 arch/arm/mach-omap2/id.c  |7 +--
 arch/arm/plat-omap/include/plat/cpu.h |1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d27daf9..a0878e0 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -386,8 +386,11 @@ static void __init omap4_check_revision(void)
omap_revision = OMAP4430_REV_ES2_1;
break;
case 4:
-   default:
omap_revision = OMAP4430_REV_ES2_2;
+   break;
+   case 6:
+   default:
+   omap_revision = OMAP4430_REV_ES2_3;
}
break;
case 0xb94e:
@@ -400,7 +403,7 @@ static void __init omap4_check_revision(void)
break;
default:
/* Unknown default to latest silicon rev as default */
-   omap_revision = OMAP4430_REV_ES2_2;
+   omap_revision = OMAP4430_REV_ES2_3;
}
 
pr_info(OMAP%04x ES%d.%d\n, omap_rev()  16,
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 649b370..a2fc6d3 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -416,6 +416,7 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20  8))
 #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21  8))
 #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22  8))
+#define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23  8))
 
 #define OMAP446X_CLASS 0x44600044
 #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10  8))
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap: id: add chip id recognition for omap4430 es2.3

2011-12-07 Thread David Anders

Tony,

On 12/07/2011 05:43 PM, Tony Lindgren wrote:

* David Andersx0132...@ti.com  [07 09:43]:
   

allow for the omap4430 es2.3 revision to be recognized in the
omap4_check_revision() function.

most aspects of all omap4430 es2.x versions are identical, however
a number of small variations such as default pullup or pulldown
resistor configurations vary between revisions.

detailed information on silicon errata for omap4430 revisions can
be found at http://focus.ti.com/pdfs/wtbu/swpz009D.pdf
 

Thanks applying into soc branch.

   


i have a v2 of this patch that corrects a missing break. please apply v2 
instead



Tony

   


thanks
Dave


Signed-off-by: David Andersx0132...@ti.com
---
  arch/arm/mach-omap2/id.c  |6 --
  arch/arm/plat-omap/include/plat/cpu.h |1 +
  2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d27daf9..6681238 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -386,8 +386,10 @@ static void __init omap4_check_revision(void)
omap_revision = OMAP4430_REV_ES2_1;
break;
case 4:
-   default:
omap_revision = OMAP4430_REV_ES2_2;
+   case 6:
+   default:
+   omap_revision = OMAP4430_REV_ES2_3;
}
break;
case 0xb94e:
@@ -400,7 +402,7 @@ static void __init omap4_check_revision(void)
break;
default:
/* Unknown default to latest silicon rev as default */
-   omap_revision = OMAP4430_REV_ES2_2;
+   omap_revision = OMAP4430_REV_ES2_3;
}

pr_info(OMAP%04x ES%d.%d\n, omap_rev()  16,
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 649b370..a2fc6d3 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -416,6 +416,7 @@ IS_OMAP_TYPE(3517, 0x3517)
  #define OMAP4430_REV_ES2_0(OMAP443X_CLASS | (0x20  8))
  #define OMAP4430_REV_ES2_1(OMAP443X_CLASS | (0x21  8))
  #define OMAP4430_REV_ES2_2(OMAP443X_CLASS | (0x22  8))
+#define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23  8))

  #define OMAP446X_CLASS0x44600044
  #define OMAP4460_REV_ES1_0(OMAP446X_CLASS | (0x10  8))
--
1.7.0.4

 


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2] omap: id: add chip id recognition for omap4430 es2.3

2011-12-07 Thread David Anders

Tony,


On 12/07/2011 06:23 PM, Tony Lindgren wrote:

* David Andersx0132...@ti.com  [111207 15:29]:
   

allow for the omap4430 es2.3 revision to be recognized in the
omap4_check_revision() function.

most aspects of all omap4430 es2.x versions are identical, however
a number of small variations such as default pullup or pulldown
resistor configurations vary between revisions.

detailed information on silicon errata for omap4430 revisions can
be found at http://focus.ti.com/pdfs/wtbu/swpz009D.pdf
 

I have the earlier one already applied, this seems to be the
exact same patch, right?

   


same core patch, with a break; added to the case 4.

if you would rather i can provide a one line fix patch


Tony
   


Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] omap4: i2c: add post idle reset registers flag

2011-11-08 Thread David Anders

On 11/08/2011 02:11 AM, Shubhrajyoti wrote:

On Tuesday 08 November 2011 03:01 AM, David Anders wrote:
   

omap44xx i2c devices need to have the registers reset post idle
similar to omap3xxx devices. this adds the additional flag for
OMAP_I2C_FLAG_RESET_REGS_POSTIDLE to the omap44xx i2c_dev_attr.
 

Hello Anders a similar patch is already posted
http://www.spinics.net/lists/linux-i2c/msg05913.html

   


oops, i did a quick search of the mailing lists but didn't see your 
patch, so submitted this one.


are you going to babysit this one through?


Signed-off-by: David Andersx0132...@ti.com
---
  arch/arm/mach-omap2/omap_hwmod_44xx_data.c |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 7695e5d..e93dc40 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2257,7 +2257,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = 
{
  };

  static struct omap_i2c_dev_attr i2c_dev_attr = {
-   .flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
+   .flags  = OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
+ OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  };

  /* i2c1 */
 
   


Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] omap: id: add chip id recognition for omap4430 es2.3

2011-11-07 Thread David Anders
allow for the omap4430 es2.3 revision to be recognized in the
omap4_check_revision() function.

most aspects of all omap4430 es2.x versions are identical, however
a number of small variations such as default pullup or pulldown
resistor configurations vary between revisions.

detailed information on silicon errata for omap4430 revisions can
be found at http://focus.ti.com/pdfs/wtbu/swpz009D.pdf

Signed-off-by: David Anders x0132...@ti.com
---
 arch/arm/mach-omap2/id.c  |6 --
 arch/arm/plat-omap/include/plat/cpu.h |1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d27daf9..6681238 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -386,8 +386,10 @@ static void __init omap4_check_revision(void)
omap_revision = OMAP4430_REV_ES2_1;
break;
case 4:
-   default:
omap_revision = OMAP4430_REV_ES2_2;
+   case 6:
+   default:
+   omap_revision = OMAP4430_REV_ES2_3;
}
break;
case 0xb94e:
@@ -400,7 +402,7 @@ static void __init omap4_check_revision(void)
break;
default:
/* Unknown default to latest silicon rev as default */
-   omap_revision = OMAP4430_REV_ES2_2;
+   omap_revision = OMAP4430_REV_ES2_3;
}
 
pr_info(OMAP%04x ES%d.%d\n, omap_rev()  16,
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 649b370..a2fc6d3 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -416,6 +416,7 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20  8))
 #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21  8))
 #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22  8))
+#define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23  8))
 
 #define OMAP446X_CLASS 0x44600044
 #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10  8))
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] omap4: i2c: add post idle reset registers flag

2011-11-07 Thread David Anders
omap44xx i2c devices need to have the registers reset post idle
similar to omap3xxx devices. this adds the additional flag for
OMAP_I2C_FLAG_RESET_REGS_POSTIDLE to the omap44xx i2c_dev_attr.

Signed-off-by: David Anders x0132...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 7695e5d..e93dc40 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2257,7 +2257,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = 
{
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
-   .flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
+   .flags  =  OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
+   OMAP_I2C_FLAG_BUS_SHIFT_NONE,
 };
 
 /* i2c1 */
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] omap4: i2c: add post idle reset registers flag

2011-11-07 Thread David Anders
omap44xx i2c devices need to have the registers reset post idle
similar to omap3xxx devices. this adds the additional flag for
OMAP_I2C_FLAG_RESET_REGS_POSTIDLE to the omap44xx i2c_dev_attr.

Signed-off-by: David Anders x0132...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 7695e5d..e93dc40 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2257,7 +2257,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = 
{
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
-   .flags  = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
+   .flags  = OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
+ OMAP_I2C_FLAG_BUS_SHIFT_NONE,
 };
 
 /* i2c1 */
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP4: PandaBoard: remove unused power regulators

2011-03-15 Thread David Anders
the pandaboard does not use the VUSIM or VAUX1 power regulators on the TWL6030
and are left floating. if the VUSIM and VAUX1 power regulators are initilized,
noise on the unloaded regulators generates an overcurrent interrupt causing the
system to power down. this patch removes the initialization of the unused power
regulators of VUSIM and VAUX1.

Signed-off-by: David Anders x0132...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |   28 
 1 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index e944025..abc913b 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -220,19 +220,6 @@ static int __init omap4_twl6030_hsmmc_init(struct 
omap2_hsmmc_info *controllers)
return 0;
 }
 
-static struct regulator_init_data omap4_panda_vaux1 = {
-   .constraints = {
-   .min_uV = 100,
-   .max_uV = 300,
-   .apply_uV   = true,
-   .valid_modes_mask   = REGULATOR_MODE_NORMAL
-   | REGULATOR_MODE_STANDBY,
-   .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-   | REGULATOR_CHANGE_MODE
-   | REGULATOR_CHANGE_STATUS,
-   },
-};
-
 static struct regulator_init_data omap4_panda_vaux2 = {
.constraints = {
.min_uV = 120,
@@ -288,19 +275,6 @@ static struct regulator_init_data omap4_panda_vpp = {
},
 };
 
-static struct regulator_init_data omap4_panda_vusim = {
-   .constraints = {
-   .min_uV = 120,
-   .max_uV = 290,
-   .apply_uV   = true,
-   .valid_modes_mask   = REGULATOR_MODE_NORMAL
-   | REGULATOR_MODE_STANDBY,
-   .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-   | REGULATOR_CHANGE_MODE
-   | REGULATOR_CHANGE_STATUS,
-   },
-};
-
 static struct regulator_init_data omap4_panda_vana = {
.constraints = {
.min_uV = 210,
@@ -356,12 +330,10 @@ static struct twl4030_platform_data omap4_panda_twldata = 
{
/* Regulators */
.vmmc   = omap4_panda_vmmc,
.vpp= omap4_panda_vpp,
-   .vusim  = omap4_panda_vusim,
.vana   = omap4_panda_vana,
.vcxio  = omap4_panda_vcxio,
.vdac   = omap4_panda_vdac,
.vusb   = omap4_panda_vusb,
-   .vaux1  = omap4_panda_vaux1,
.vaux2  = omap4_panda_vaux2,
.vaux3  = omap4_panda_vaux3,
.usb= omap4_usbphy_data,
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Open issues after 2.6.38 merge window

2011-01-14 Thread David Anders

Tony,

i've been testing the 2.6.37 kernel on ES2.0, ES2.1, ES2.2 using the 
following:


x-loader:
git://gitorious.org/x-loader/x-loader.git
branch: master
 6f3a261 omap1: remove support for 1710 and 1510
defconfig: omap4430panda_config

U-boot:
git://git.denx.de/u-boot.git
tag: v2010.12
defconfig: omap4_panda_config

kernel:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
tag: v2.6.37
defconfig: omap2plus_defconfig

i've not seen the power off issue you have described.


thanks
Dave



On 01/14/2011 01:47 PM, Tony Lindgren wrote:

Hi all,

Before I update out master branch, let's try to summarize the
open issues after the merge window. Here's a list of issues
in omap-fixes-for-linus that I'm aware of:

- NFS root oopses while mounting root

- omap4430 es1.0 hangs if L2X0 cache is enabled

- omap4 panda powers down after boot (watchdog?)

- omap3 ldp board powers down after boot?

Any other issues?

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
   


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BeagleBoard stops at booting kernel with 2.6.37-rc5

2010-12-16 Thread David Anders

Elvis,

please enable earlyprintk in your kernel config and add earlyprintk 
to your boot args. this will provide a more detailed boot log even if 
the tty is incorrect.


Dave

On 12/16/2010 02:19 PM, Elvis Dowson wrote:

Hi,
 I'm working with linux mainline 2.6.37-rc5 and my custom beagleboard 
based platform stops at booting the kernel. Is there a fix for this?

reading uImage

2432692 bytes read
Booting from mmc ...
## Booting kernel from Legacy Image at 8200 ...
Image Name:   Linux-2.6.37-rc5
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:2432628 Bytes =  2.3 MB
Load Address: 80008000
Entry Point:  80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.


Elvis Dowson

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
   


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP4: Pandaboard: Fixing MMC card detect gpio line

2010-12-08 Thread David Anders

On 12/07/2010 06:13 AM, Murthy, Raghuveer wrote:

The .gpio_cd member of omap2_hsmmc_info is not initialized. This
will default to zero. On Pandaboard this interferes with gpio line
assigned for powering TFP410 DVI chip.

This fix was missed out in the previous commit bf56f0a6668cd, from
Nishanth Menon

Signed-off-by: Kishore Kadiyalakishore.kadiy...@ti.com
Signed-off-by: Raghuveer Murthyraghuveer.mur...@ti.com
Acked-by: Nishanth Menonn...@ti.com
   


Tested-by: David Anders x0132...@ti.com


---
  arch/arm/mach-omap2/board-omap4panda.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index ad6b5cc..0ccc24f 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -142,6 +142,7 @@ static struct omap2_hsmmc_info mmc[] = {
.mmc= 1,
.caps   = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
.gpio_wp= -EINVAL,
+   .gpio_cd= -EINVAL,
},
{}  /* Terminator */
  };
   


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] omap4: pandaboard: machine cleanups

2010-10-07 Thread David Anders
PandaBoard machine file related cleanups.

David Anders (3):
  omap4: pandaboard: remove unused hsmmc definition
  omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
  omap4: pandaboard: enable the ehci port on pandaboard

 arch/arm/mach-omap2/board-omap4panda.c |   69 +---
 1 files changed, 63 insertions(+), 6 deletions(-)

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] omap4: pandaboard: remove unused hsmmc definition

2010-10-07 Thread David Anders
remove the second hsmmc definition as it is only used on the
expansion header of the PandaBoard and can be mux for other
functions.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 992a03e..dc16884 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -98,10 +98,6 @@ static struct regulator_consumer_supply 
omap4_panda_vmmc_supply[] = {
.supply = vmmc,
.dev_name = mmci-omap-hs.0,
},
-   {
-   .supply = vmmc,
-   .dev_name = mmci-omap-hs.1,
-   },
 };
 
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -187,7 +183,7 @@ static struct regulator_init_data omap4_panda_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
-   .num_consumer_supplies  = 2,
+   .num_consumer_supplies  = 1,
.consumer_supplies  = omap4_panda_vmmc_supply,
 };
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] omap4: pandaboard: enable the ehci port on pandaboard

2010-10-07 Thread David Anders
The OMAP4 PandaBoard has EHCI port1 hooked up to an external
SMSC3320 transciever. GPIO 1 is used to power on the transceiver
and GPIO 62 for reset on the transceiver.

Signed-off-by: David Anders x0132...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |   54 
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 9327ad4..a9d8a19 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -41,6 +41,9 @@
 #include hsmmc.h
 #include control.h
 
+#define GPIO_HUB_POWER 1
+#define GPIO_HUB_NRESET62
+
 static struct gpio_led gpio_leds[] = {
{
.name   = pandaboard::status1,
@@ -78,6 +81,56 @@ static void __init omap4_panda_init_irq(void)
omap_gpio_init();
 }
 
+static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .phy_reset  = false,
+   .reset_gpio_port[0]  = -EINVAL,
+   .reset_gpio_port[1]  = -EINVAL,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap4_ehci_init(void)
+{
+   int ret;
+
+
+   /* disable the power to the usb hub prior to init */
+   ret = gpio_request(GPIO_HUB_POWER, hub_power);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_POWER);
+   goto error1;
+   }
+   gpio_export(GPIO_HUB_POWER, 0);
+   gpio_direction_output(GPIO_HUB_POWER, 0);
+   gpio_set_value(GPIO_HUB_POWER, 0);
+
+   /* reset phy+hub */
+   ret = gpio_request(GPIO_HUB_NRESET, hub_nreset);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_NRESET);
+   goto error2;
+   }
+   gpio_export(GPIO_HUB_NRESET, 0);
+   gpio_direction_output(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 1);
+
+   usb_ehci_init(ehci_pdata);
+
+   /* enable power to hub */
+   gpio_set_value(GPIO_HUB_POWER, 1);
+   return;
+
+error2:
+   gpio_free(GPIO_HUB_POWER);
+error1:
+   pr_err(Unable to initialize EHCI power/reset\n);
+   return;
+
+}
+
 static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_UTMI,
.mode   = MUSB_PERIPHERAL,
@@ -314,6 +367,7 @@ static void __init omap4_panda_init(void)
omap4_twl6030_hsmmc_init(mmc);
/* OMAP4 Panda uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
+   omap4_ehci_init();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
if (!cpu_is_omap44xx())
usb_musb_init(musb_board_data);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set

2010-10-07 Thread David Anders
Avoid possible crash if CONFIG_MMC_OMAP_HS is not set.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index dc16884..9327ad4 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -116,7 +116,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device 
*dev)
 
 static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
 {
-   struct omap_mmc_platform_data *pdata = dev-platform_data;
+   struct omap_mmc_platform_data *pdata;
+
+   /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
+   if (!dev) {
+   pr_err(Failed omap4_twl6030_hsmmc_set_late_init\n);
+   return;
+   }
+   pdata = dev-platform_data;
 
pdata-init =   omap4_twl6030_hsmmc_late_init;
 }
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] omap4: pandaboard: machine cleanups

2010-10-06 Thread David Anders

Tony,

must have missed this request, i'll repost now

thanks
Dave

On 10/06/2010 03:56 PM, Tony Lindgren wrote:

* Tony Lindgrent...@atomide.com  [100927 15:22]:
   

* David Andersx0132...@ti.com  [100921 14:15]:
 

PandaBoard machine file related cleanups.

David Anders (4):
   omap4: pandaboard: remove unused hsmmc definition
   omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
   omap4: pandaboard: Adding card detect support for MMC1
   omap4: pandaboard: enable the ehci port on pandaboard

  arch/arm/mach-omap2/board-omap4panda.c |   76 +---
  1 files changed, 69 insertions(+), 7 deletions(-)
   

David, please repost this series one more time with linux-arm-kernel
list also Cc'd in addition to the linux-omap list.
 

Ping, we're starting to run out of time!

Tony
   


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard

2010-10-06 Thread David Anders
The OMAP4 PandaBoard has EHCI port1 hooked up to an external
SMSC3320 transciever. GPIO 1 is used to power on the transceiver
and GPIO 62 for reset on the transceiver.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |   54 
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 94e819c..6163a59 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -39,6 +39,8 @@
 #include plat/mmc.h
 #include hsmmc.h
 
+#define GPIO_HUB_POWER 1
+#define GPIO_HUB_NRESET62
 
 static void __init omap4_panda_init_irq(void)
 {
@@ -280,6 +282,57 @@ static int __init omap4_panda_i2c_init(void)
omap_register_i2c_bus(4, 400, NULL, 0);
return 0;
 }
+
+static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .phy_reset  = false,
+   .reset_gpio_port[0]  = -EINVAL,
+   .reset_gpio_port[1]  = -EINVAL,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap4_ehci_init(void)
+{
+   int ret;
+
+
+   /* disable the power to the usb hub prior to init */
+   ret = gpio_request(GPIO_HUB_POWER, hub_power);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_POWER);
+   goto error1;
+   }
+   gpio_export(GPIO_HUB_POWER, 0);
+   gpio_direction_output(GPIO_HUB_POWER, 0);
+   gpio_set_value(GPIO_HUB_POWER, 0);
+
+   /* reset phy+hub */
+   ret = gpio_request(GPIO_HUB_NRESET, hub_nreset);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_NRESET);
+   goto error2;
+   }
+   gpio_export(GPIO_HUB_NRESET, 0);
+   gpio_direction_output(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 1);
+
+   usb_ehci_init(ehci_pdata);
+
+   /* enable power to hub */
+   gpio_set_value(GPIO_HUB_POWER, 1);
+   return;
+
+error2:
+   gpio_free(GPIO_HUB_POWER);
+error1:
+   pr_err(Unable to initialize EHCI power/reset\n);
+   return;
+
+}
+
 static void __init omap4_panda_init(void)
 {
omap4_panda_i2c_init();
@@ -287,6 +340,7 @@ static void __init omap4_panda_init(void)
omap4_twl6030_hsmmc_init(mmc);
/* OMAP4 Panda uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
+   omap4_ehci_init();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
if (!cpu_is_omap44xx())
usb_musb_init(musb_board_data);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] omap4: pandaboard: machine cleanups

2010-10-06 Thread David Anders
PandaBoard machine file related cleanups.

David Anders (4):
  omap4: pandaboard: remove unused hsmmc definition
  omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
  omap4: pandaboard: Adding card detect support for MMC1
  omap4: pandaboard: enable the ehci port on pandaboard

 arch/arm/mach-omap2/board-omap4panda.c |   76 +---
 1 files changed, 69 insertions(+), 7 deletions(-)

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition

2010-10-06 Thread David Anders
remove the second hsmmc definition as it is only used on the
expansion header of the PandaBoard and can be mux for other
functions.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 96f5bbb..093d13b 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -67,10 +67,6 @@ static struct regulator_consumer_supply 
omap4_panda_vmmc_supply[] = {
.supply = vmmc,
.dev_name = mmci-omap-hs.0,
},
-   {
-   .supply = vmmc,
-   .dev_name = mmci-omap-hs.1,
-   },
 };
 
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -156,7 +152,7 @@ static struct regulator_init_data omap4_panda_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
-   .num_consumer_supplies  = 2,
+   .num_consumer_supplies  = 1,
.consumer_supplies  = omap4_panda_vmmc_supply,
 };
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set

2010-10-06 Thread David Anders
Avoid possible crash if CONFIG_MMC_OMAP_HS is not set.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 093d13b..697c0bd 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -85,7 +85,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
 
 static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
 {
-   struct omap_mmc_platform_data *pdata = dev-platform_data;
+   struct omap_mmc_platform_data *pdata;
+
+   /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
+   if (!dev) {
+   pr_err(Failed omap4_twl6030_hsmmc_set_late_init\n);
+   return;
+   }
+   pdata = dev-platform_data;
 
pdata-init =   omap4_twl6030_hsmmc_late_init;
 }
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1

2010-10-06 Thread David Anders
Adding card detect callback function and card detect configuration
function for MMC1 Controller.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---

patch depends on https://patchwork.kernel.org/patch/189952/

 arch/arm/mach-omap2/board-omap4panda.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 697c0bd..94e819c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct omap_mmc_platform_data *pdata = dev-platform_data;
 
/* Setting MMC1 Card detect Irq */
-   if (pdev-id == 0)
+   if (pdev-id == 0) {
+   ret = twl6030_mmc_card_detect_config();
+   if (ret)
+   pr_err(Failed configuring MMC1 card detect\n);
pdata-slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
+   pdata-slots[0].card_detect = twl6030_mmc_card_detect;
+   }
return ret;
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1

2010-10-06 Thread David Anders
Adding card detect callback function and card detect configuration
function for MMC1 Controller.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---

patch depends on https://patchwork.kernel.org/patch/189952/

 arch/arm/mach-omap2/board-omap4panda.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 697c0bd..94e819c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct omap_mmc_platform_data *pdata = dev-platform_data;
 
/* Setting MMC1 Card detect Irq */
-   if (pdev-id == 0)
+   if (pdev-id == 0) {
+   ret = twl6030_mmc_card_detect_config();
+   if (ret)
+   pr_err(Failed configuring MMC1 card detect\n);
pdata-slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
+   pdata-slots[0].card_detect = twl6030_mmc_card_detect;
+   }
return ret;
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard

2010-10-06 Thread David Anders
The OMAP4 PandaBoard has EHCI port1 hooked up to an external
SMSC3320 transciever. GPIO 1 is used to power on the transceiver
and GPIO 62 for reset on the transceiver.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |   54 
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 94e819c..6163a59 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -39,6 +39,8 @@
 #include plat/mmc.h
 #include hsmmc.h
 
+#define GPIO_HUB_POWER 1
+#define GPIO_HUB_NRESET62
 
 static void __init omap4_panda_init_irq(void)
 {
@@ -280,6 +282,57 @@ static int __init omap4_panda_i2c_init(void)
omap_register_i2c_bus(4, 400, NULL, 0);
return 0;
 }
+
+static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .phy_reset  = false,
+   .reset_gpio_port[0]  = -EINVAL,
+   .reset_gpio_port[1]  = -EINVAL,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap4_ehci_init(void)
+{
+   int ret;
+
+
+   /* disable the power to the usb hub prior to init */
+   ret = gpio_request(GPIO_HUB_POWER, hub_power);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_POWER);
+   goto error1;
+   }
+   gpio_export(GPIO_HUB_POWER, 0);
+   gpio_direction_output(GPIO_HUB_POWER, 0);
+   gpio_set_value(GPIO_HUB_POWER, 0);
+
+   /* reset phy+hub */
+   ret = gpio_request(GPIO_HUB_NRESET, hub_nreset);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_NRESET);
+   goto error2;
+   }
+   gpio_export(GPIO_HUB_NRESET, 0);
+   gpio_direction_output(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 1);
+
+   usb_ehci_init(ehci_pdata);
+
+   /* enable power to hub */
+   gpio_set_value(GPIO_HUB_POWER, 1);
+   return;
+
+error2:
+   gpio_free(GPIO_HUB_POWER);
+error1:
+   pr_err(Unable to initialize EHCI power/reset\n);
+   return;
+
+}
+
 static void __init omap4_panda_init(void)
 {
omap4_panda_i2c_init();
@@ -287,6 +340,7 @@ static void __init omap4_panda_init(void)
omap4_twl6030_hsmmc_init(mmc);
/* OMAP4 Panda uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
+   omap4_ehci_init();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
if (!cpu_is_omap44xx())
usb_musb_init(musb_board_data);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set

2010-10-06 Thread David Anders
Avoid possible crash if CONFIG_MMC_OMAP_HS is not set.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 093d13b..697c0bd 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -85,7 +85,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
 
 static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
 {
-   struct omap_mmc_platform_data *pdata = dev-platform_data;
+   struct omap_mmc_platform_data *pdata;
+
+   /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
+   if (!dev) {
+   pr_err(Failed omap4_twl6030_hsmmc_set_late_init\n);
+   return;
+   }
+   pdata = dev-platform_data;
 
pdata-init =   omap4_twl6030_hsmmc_late_init;
 }
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] omap4: pandaboard: machine cleanups

2010-10-06 Thread David Anders
PandaBoard machine file related cleanups.

David Anders (4):
  omap4: pandaboard: remove unused hsmmc definition
  omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
  omap4: pandaboard: Adding card detect support for MMC1
  omap4: pandaboard: enable the ehci port on pandaboard

 arch/arm/mach-omap2/board-omap4panda.c |   76 +---
 1 files changed, 69 insertions(+), 7 deletions(-)

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition

2010-10-06 Thread David Anders
remove the second hsmmc definition as it is only used on the
expansion header of the PandaBoard and can be mux for other
functions.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 96f5bbb..093d13b 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -67,10 +67,6 @@ static struct regulator_consumer_supply 
omap4_panda_vmmc_supply[] = {
.supply = vmmc,
.dev_name = mmci-omap-hs.0,
},
-   {
-   .supply = vmmc,
-   .dev_name = mmci-omap-hs.1,
-   },
 };
 
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -156,7 +152,7 @@ static struct regulator_init_data omap4_panda_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
-   .num_consumer_supplies  = 2,
+   .num_consumer_supplies  = 1,
.consumer_supplies  = omap4_panda_vmmc_supply,
 };
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1

2010-09-22 Thread David Anders

On 09/22/2010 03:43 AM, Gadiyar, Anand wrote:

On Wed, Sep 22, 2010 at 12:58 PM, Bryan Wubryan...@canonical.com  wrote:
   

On Wed, Sep 22, 2010 at 5:24 AM, David Andersx0132...@ti.com  wrote:
 

Adding card detect callback function and card detect configuration
function for MMC1 Controller.

Signed-off-by: David Andersx0132...@ti.com
Signed-off-by: Anand Gadiyargadi...@ti.com
---

patch depends on https://patchwork.kernel.org/patch/189952/

  arch/arm/mach-omap2/board-omap4panda.c |7 ++-
  1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 697c0bd..94e819c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct omap_mmc_platform_data *pdata = dev-platform_data;

/* Setting MMC1 Card detect Irq */
-   if (pdev-id == 0)
+   if (pdev-id == 0) {
+   ret = twl6030_mmc_card_detect_config();
   

It looks like we need this function from twl6030 driver, otherwise we
will get this compiling error:


In file included from arch/arm/mach-omap2/board-omap4panda.c:38:
arch/arm/plat-omap/include/plat/usb.h:109: warning: return type
defaults to 'int'
arch/arm/mach-omap2/board-omap4panda.c: In function
'omap4_twl6030_hsmmc_late_init':
arch/arm/mach-omap2/board-omap4panda.c:81: error: implicit declaration
of function 'twl6030_mmc_card_detect_config'
arch/arm/mach-omap2/board-omap4panda.c:86: error:
'twl6030_mmc_card_detect' undeclared (first use in this function)
arch/arm/mach-omap2/board-omap4panda.c:86: error: (Each undeclared
identifier is reported only once
arch/arm/mach-omap2/board-omap4panda.c:86: error: for each function it
appears in.)
arch/arm/mach-omap2/board-omap4panda.c: In function 'omap4_panda_init':
arch/arm/mach-omap2/board-omap4panda.c:285: warning: unused variable 'status'


Thanks,
-Bryan
 

I thought the dependent patch [1] took care of this in the header file?
(Haven't actually tried this out - will take a look in a bit)

[1] https://patchwork.kernel.org/patch/189952/
   


correct! this patch depends on the reference patch being applied.

   


 

+   if (ret)
+   pr_err(Failed configuring MMC1 card detect\n);
pdata-slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
+   pdata-slots[0].card_detect = twl6030_mmc_card_detect;
+   }
return ret;
  }

   

\
   


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition

2010-09-21 Thread David Anders
remove the second hsmmc definition as it is only used on the
expansion header of the PandaBoard and can be mux for other
functions.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 96f5bbb..093d13b 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -67,10 +67,6 @@ static struct regulator_consumer_supply 
omap4_panda_vmmc_supply[] = {
.supply = vmmc,
.dev_name = mmci-omap-hs.0,
},
-   {
-   .supply = vmmc,
-   .dev_name = mmci-omap-hs.1,
-   },
 };
 
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -156,7 +152,7 @@ static struct regulator_init_data omap4_panda_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
-   .num_consumer_supplies  = 2,
+   .num_consumer_supplies  = 1,
.consumer_supplies  = omap4_panda_vmmc_supply,
 };
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set

2010-09-21 Thread David Anders
Avoid possible crash if CONFIG_MMC_OMAP_HS is not set.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 093d13b..697c0bd 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -85,7 +85,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
 
 static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
 {
-   struct omap_mmc_platform_data *pdata = dev-platform_data;
+   struct omap_mmc_platform_data *pdata;
+
+   /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
+   if (!dev) {
+   pr_err(Failed omap4_twl6030_hsmmc_set_late_init\n);
+   return;
+   }
+   pdata = dev-platform_data;
 
pdata-init =   omap4_twl6030_hsmmc_late_init;
 }
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1

2010-09-21 Thread David Anders
Adding card detect callback function and card detect configuration
function for MMC1 Controller.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---

patch depends on https://patchwork.kernel.org/patch/189952/

 arch/arm/mach-omap2/board-omap4panda.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 697c0bd..94e819c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,9 +77,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct omap_mmc_platform_data *pdata = dev-platform_data;
 
/* Setting MMC1 Card detect Irq */
-   if (pdev-id == 0)
+   if (pdev-id == 0) {
+   ret = twl6030_mmc_card_detect_config();
+   if (ret)
+   pr_err(Failed configuring MMC1 card detect\n);
pdata-slots[0].card_detect_irq = TWL6030_IRQ_BASE +
MMCDETECT_INTR_OFFSET;
+   pdata-slots[0].card_detect = twl6030_mmc_card_detect;
+   }
return ret;
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard

2010-09-21 Thread David Anders
The OMAP4 PandaBoard has EHCI port1 hooked up to an external
SMSC3320 transciever. GPIO 1 is used to power on the transceiver
and GPIO 62 for reset on the transceiver.

Signed-off-by: David Anders x0132...@ti.com
Signed-off-by: Anand Gadiyar gadi...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |   54 
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index 94e819c..6163a59 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -39,6 +39,8 @@
 #include plat/mmc.h
 #include hsmmc.h
 
+#define GPIO_HUB_POWER 1
+#define GPIO_HUB_NRESET62
 
 static void __init omap4_panda_init_irq(void)
 {
@@ -280,6 +282,57 @@ static int __init omap4_panda_i2c_init(void)
omap_register_i2c_bus(4, 400, NULL, 0);
return 0;
 }
+
+static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .phy_reset  = false,
+   .reset_gpio_port[0]  = -EINVAL,
+   .reset_gpio_port[1]  = -EINVAL,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap4_ehci_init(void)
+{
+   int ret;
+
+
+   /* disable the power to the usb hub prior to init */
+   ret = gpio_request(GPIO_HUB_POWER, hub_power);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_POWER);
+   goto error1;
+   }
+   gpio_export(GPIO_HUB_POWER, 0);
+   gpio_direction_output(GPIO_HUB_POWER, 0);
+   gpio_set_value(GPIO_HUB_POWER, 0);
+
+   /* reset phy+hub */
+   ret = gpio_request(GPIO_HUB_NRESET, hub_nreset);
+   if (ret) {
+   pr_err(Cannot request GPIO %d\n, GPIO_HUB_NRESET);
+   goto error2;
+   }
+   gpio_export(GPIO_HUB_NRESET, 0);
+   gpio_direction_output(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 0);
+   gpio_set_value(GPIO_HUB_NRESET, 1);
+
+   usb_ehci_init(ehci_pdata);
+
+   /* enable power to hub */
+   gpio_set_value(GPIO_HUB_POWER, 1);
+   return;
+
+error2:
+   gpio_free(GPIO_HUB_POWER);
+error1:
+   pr_err(Unable to initialize EHCI power/reset\n);
+   return;
+
+}
+
 static void __init omap4_panda_init(void)
 {
omap4_panda_i2c_init();
@@ -287,6 +340,7 @@ static void __init omap4_panda_init(void)
omap4_twl6030_hsmmc_init(mmc);
/* OMAP4 Panda uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
+   omap4_ehci_init();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
if (!cpu_is_omap44xx())
usb_musb_init(musb_board_data);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] omap4: pandaboard: machine cleanups

2010-09-21 Thread David Anders
PandaBoard machine file related cleanups.

David Anders (4):
  omap4: pandaboard: remove unused hsmmc definition
  omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
  omap4: pandaboard: Adding card detect support for MMC1
  omap4: pandaboard: enable the ehci port on pandaboard

 arch/arm/mach-omap2/board-omap4panda.c |   76 +---
 1 files changed, 69 insertions(+), 7 deletions(-)

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Add OMAP4 Panda Support

2010-06-24 Thread David Anders
Add initial support for the OMAP4 based Panda Board.

Signed-off-by: David Anders x0132...@ti.com
---
 arch/arm/mach-omap2/Kconfig|4 +
 arch/arm/mach-omap2/Makefile   |2 +
 arch/arm/mach-omap2/board-omap4panda.c |  305 
 3 files changed, 311 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-omap4panda.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b31b6f1..8956a76 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -157,6 +157,10 @@ config MACH_OMAP_4430SDP
bool OMAP 4430 SDP board
depends on ARCH_OMAP4
 
+config MACH_OMAP4_PANDA
+   bool OMAP4 Panda Board
+   depends on ARCH_OMAP4
+
 config OMAP3_EMU
bool OMAP3 debugging peripherals
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 6c6d7c6..09a47c2 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -143,6 +143,8 @@ obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK)  += 
board-omap3touchbook.o \
   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o \
   hsmmc.o
+obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \
+  hsmmc.o
 
 obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
 
diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
new file mode 100644
index 000..ed08226
--- /dev/null
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -0,0 +1,305 @@
+/*
+ * Board support file for OMAP4430 based PandaBoard.
+ *
+ * Copyright (C) 2010 Texas Instruments
+ *
+ * Author: David Anders x0132...@ti.com
+ *
+ * Based on mach-omap2/board-4430sdp.c
+ *
+ * Author: Santosh Shilimkar santosh.shilim...@ti.com
+ *
+ * Based on mach-omap2/board-3430sdp.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/io.h
+#include linux/gpio.h
+#include linux/usb/otg.h
+#include linux/i2c/twl.h
+#include linux/regulator/machine.h
+
+#include mach/hardware.h
+#include mach/omap4-common.h
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/control.h
+#include plat/timer-gp.h
+#include plat/usb.h
+#include plat/mmc.h
+#include hsmmc.h
+
+
+static void __init omap4_panda_init_irq(void)
+{
+   omap2_init_common_hw(NULL, NULL);
+   gic_init_irq();
+   omap_gpio_init();
+}
+
+static struct omap_musb_board_data musb_board_data = {
+   .interface_type = MUSB_INTERFACE_UTMI,
+   .mode   = MUSB_PERIPHERAL,
+   .power  = 100,
+};
+
+static struct omap2_hsmmc_info mmc[] = {
+   {
+   .mmc= 1,
+   .wires  = 8,
+   .gpio_wp= -EINVAL,
+   },
+   {}  /* Terminator */
+};
+
+static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
+   {
+   .supply = vmmc,
+   .dev_name = mmci-omap-hs.0,
+   },
+   {
+   .supply = vmmc,
+   .dev_name = mmci-omap-hs.1,
+   },
+};
+
+static int omap4_twl6030_hsmmc_late_init(struct device *dev)
+{
+   int ret = 0;
+   struct platform_device *pdev = container_of(dev,
+   struct platform_device, dev);
+   struct omap_mmc_platform_data *pdata = dev-platform_data;
+
+   /* Setting MMC1 Card detect Irq */
+   if (pdev-id == 0)
+   pdata-slots[0].card_detect_irq = TWL6030_IRQ_BASE +
+   MMCDETECT_INTR_OFFSET;
+   return ret;
+}
+
+static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
+{
+   struct omap_mmc_platform_data *pdata = dev-platform_data;
+
+   pdata-init =   omap4_twl6030_hsmmc_late_init;
+}
+
+static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info 
*controllers)
+{
+   struct omap2_hsmmc_info *c;
+
+   omap2_hsmmc_init(controllers);
+   for (c = controllers; c-mmc; c++)
+   omap4_twl6030_hsmmc_set_late_init(c-dev);
+
+   return 0;
+}
+
+static struct regulator_init_data omap4_panda_vaux1 = {
+   .constraints = {
+   .min_uV = 100,
+   .max_uV = 300,
+   .apply_uV   = true,
+   .valid_modes_mask   = REGULATOR_MODE_NORMAL
+   | REGULATOR_MODE_STANDBY,
+   .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE

[PATCH] select NOP_USB_XCEIV for OMAP4

2010-06-23 Thread David Anders
Add select statement to force selection of NOP_USB_XCEIV for OMAP4.

Signed-off-by: David Anders x0132...@ti.com
---
 drivers/usb/musb/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index cfd38ed..e4624bc 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -11,6 +11,7 @@ config USB_MUSB_HDRC
depends on (USB || USB_GADGET)
depends on (ARM || (BF54x  !BF544) || (BF52x  !BF522  !BF523))
select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
+   select NOP_USB_XCEIV if ARCH_OMAP4
select TWL4030_USB if MACH_OMAP_3430SDP
select USB_OTG_UTILS
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
-- 
1.6.3.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html