RE: [PATCH] arm: Fix DEBUG_LL for omap zoom2/3

2010-03-22 Thread Pais, Allen
 
   Hi all,
   
   Got a zoom3 finally! This is needed to boot with DEBUG_LL 
 + earlyprintk.
  
  And of course it won't compile because of a missing #.
  Here's the working version.
 
 One more time. Looks like what I posted is not enough, we
 also need to make sure the mapping does not overlap with
 other regions. So basically we can't use 0xfb00 like
 we currently have, let's use 0xf700 instead unless
 somebody has better ideas.

 With this patch[DEBUG_LL + earlyprintk],
 I still haven't been able to boot the kernel.
 Is it working on your side.
  
 The commit am using is : a842b5f9ce70e1b738eabb4d719860070180ed1c

- Allen

 
 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


RE: [PATCH] arm: Fix DEBUG_LL for omap zoom2/3

2010-03-22 Thread Pais, Allen
  
   With this patch[DEBUG_LL + earlyprintk],
   I still haven't been able to boot the kernel.
   Is it working on your side.

   The commit am using is : a842b5f9ce70e1b738eabb4d719860070180ed1c
 
 I think you will also need the 3630 serial fixes series posted
 recently.
 
 I just merged those into omap-fixes-for-linus (and master)
 branch(es). Maybe give it a try with at commit
 b3c7740a120c8a7775cb63b4d094466da5c01692 + this patch?

  Thanks, I'll pull in those fixes. 
 I believe the mux errors are fixed. Have a look at
 
http://dev.omapzoom.org/?p=manju/kernel-omap3-dev.git;a=commit;h=3499f5023ee90dc6ee3868a3147b87fe22a1d9b7

 Patch must have been missed some how.

- Allen

 
 BTW, I'm still seeing mux errors on zoom3, have not yet
 looked into those.
 
 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


RE: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

2010-02-02 Thread Pais, Allen


From: Sonasath, Moiz
Sent: Tuesday, February 02, 2010 3:40 PM
To: Tony Lindgren; Pais, Allen
Cc: linux-omap@vger.kernel.org
Subject: RE: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

Tony/Allen/Paul,

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Tony Lindgren
 Sent: Tuesday, February 02, 2010 10:56 AM
 To: Pais, Allen
 Cc: linux-omap@vger.kernel.org
 Subject: Re: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

 * Pais, Allen allen.p...@ti.com [100201 18:56]:
 
  
  From: Tony Lindgren [t...@atomide.com]
  Sent: Monday, February 01, 2010 7:53 PM
  To: Pais, Allen
  Cc: linux-omap@vger.kernel.org
  Subject: Re: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups
 
  Hi,
 
  * Pais, Allen allen.p...@ti.com [100121 02:31]:
   From 4044fcc9c517e86fbea9f7d3b15d5cf75a767476 Mon Sep 17 00:00:00 2001
   From: Allen Pais allen.p...@ti.com
   Date: Thu, 21 Jan 2010 21:00:04 +0530
   Subject: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups
  
   This patch disables GAIA I2C1 adn I2C4(SR) internal pull-up, to
   use only the external HW resistor =470 Ohm for the assured
   functionality in HS mode.
  
   While testing the I2C in High Speed mode, it was discovered that
   without a proper pull-up resistor, there is data corruption during
   multi-byte transfer. RTC(time_set) test case was used for testing.
  
   From the analysis done, it was concluded that ideally we need a
   pull-up of 1.6k Ohm(recomended) or atleast 470 Ohm or greater for
   assured performance in HS mode.
 
  Does this apply to 3630 only, or also 34xx? Is this safe to do
  always?
 
  [Allen] Yes, it does apply to 36xx only.

There is some confusion, this patch holds true for all OMAP34XX, 36XX as well 
as 44XX. The idea was to rely on only external Pull-up for I2C operation and 
disable any internal pull-up on any of the connected power IC's: 
Triton(TWL4030)/GAIA(TWL5030)/Phoenix(TWL6030)

[Allen] sorry about the confusion. I mistook it for the other patch. 

I did verify, the register 'REG_GPPUPDCTR1' holds true for 
Triton(TWL4030)/GAIA(TWL5030), hence for OMAP34XX/36XX.
But there is a register change for this PU/PD control on Phoenix(TWL6030) which 
is used with OMAP44XX. So I might have to modify this patch a little as this 
code will apply for TWL4030/5030 and have to introduce new code to achieve the 
intended fix for TWL6030.

The second patch of the series: 'omap: 3630: Disable internal pull-ups'
applies only for OMAP36XX as it is a new feature introduced in OMAP3630.

I have to check if that feature is available on OMAP44XX as well, if so I will 
modify that patch to extend to OMAP44XX in future.

Although

 Sounds like then this configuration should be passed from the
 board-*.c file in platform_data as the external pulls depend
 on the board.

  BTW, once ready it hould be sent to Samuel Ortiz with linux-omap
  list Cc'd:
 
  [Allen] i'll have it sent to Samuel also.

 Thanks, we can't merge it yet though, see above.

 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

Regards
Moiz Sonasath
--
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 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

2010-02-01 Thread Pais, Allen


From: Tony Lindgren [t...@atomide.com]
Sent: Monday, February 01, 2010 7:53 PM
To: Pais, Allen
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

Hi,

* Pais, Allen allen.p...@ti.com [100121 02:31]:
 From 4044fcc9c517e86fbea9f7d3b15d5cf75a767476 Mon Sep 17 00:00:00 2001
 From: Allen Pais allen.p...@ti.com
 Date: Thu, 21 Jan 2010 21:00:04 +0530
 Subject: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

 This patch disables GAIA I2C1 adn I2C4(SR) internal pull-up, to
 use only the external HW resistor =470 Ohm for the assured
 functionality in HS mode.

 While testing the I2C in High Speed mode, it was discovered that
 without a proper pull-up resistor, there is data corruption during
 multi-byte transfer. RTC(time_set) test case was used for testing.

 From the analysis done, it was concluded that ideally we need a
 pull-up of 1.6k Ohm(recomended) or atleast 470 Ohm or greater for
 assured performance in HS mode.

Does this apply to 3630 only, or also 34xx? Is this safe to do
always?

[Allen] Yes, it does apply to 36xx only. 

BTW, once ready it hould be sent to Samuel Ortiz with linux-omap
list Cc'd:

[Allen] i'll have it sent to Samuel also.

Thanks,

- Allen

$ grep -A4 MFD MAINTAINERS
MULTIFUNCTION DEVICES (MFD)
M:  Samuel Ortiz sa...@linux.intel.com
T:  git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
S:  Supported
F:  drivers/mfd/

Regards,

Tony


 Signed-off-by: Moiz Sonasath m-sonas...@ti.com
 Signed-off-by: Allen Pais allen.p...@ti.com
 ---
  drivers/mfd/twl-core.c  |   10 ++
  include/linux/i2c/twl.h |   13 +
  2 files changed, 23 insertions(+), 0 deletions(-)

 diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
 index 2a76065..7dcb5e9 100644
 --- a/drivers/mfd/twl-core.c
 +++ b/drivers/mfd/twl-core.c
 @@ -965,6 +965,7 @@ twl_probe(struct i2c_client *client, const struct 
 i2c_device_id *id)
   int status;
   unsignedi;
   struct twl4030_platform_data*pdata = client-dev.platform_data;
 + u8 temp;

   if (!pdata) {
   dev_dbg(client-dev, no platform data?\n);
 @@ -1031,6 +1032,15 @@ twl_probe(struct i2c_client *client, const struct 
 i2c_device_id *id)
   if (status  0)
   goto fail;
   }
 + /* Disable GAIA I2C Pull-up on I2C1 and I2C4(SR) interface
 +  * program I2C_SCL_CTRL_PU(bit 0)=0, I2C_SDA_CTRL_PU (bit 2)=0,
 +  * SR_I2C_SCL_CTRL_PU(bit 4)=0 and SR_I2C_SDA_CTRL_PU(bit 6)=0.
 +  */
 +
 + twl_i2c_read_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
 + temp = ~(SR_I2C_SDA_CTRL_PU | SR_I2C_SCL_CTRL_PU | \
 + I2C_SDA_CTRL_PU | I2C_SCL_CTRL_PU);
 + twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);

   status = add_children(pdata, id-driver_data);
  fail:
 diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
 index bf1c5be..2f4faf9 100644
 --- a/include/linux/i2c/twl.h
 +++ b/include/linux/i2c/twl.h
 @@ -168,6 +168,19 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned 
 num_bytes);
  int twl6030_interrupt_unmask(u8 bit_mask, u8 offset);
  int twl6030_interrupt_mask(u8 bit_mask, u8 offset);

 +/*Interface Bit Register (INTBR) offsets
 + *(Use TWL_4030_MODULE_INTBR)
 + */
 +
 +#define REG_GPPUPDCTR1   0x0F
 +
 +/*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */
 +
 +#define I2C_SCL_CTRL_PU  BIT(0)
 +#define I2C_SDA_CTRL_PU  BIT(2)
 +#define SR_I2C_SCL_CTRL_PU   BIT(4)
 +#define SR_I2C_SDA_CTRL_PU   BIT(6)
 +
  /*--*/

  /*
 --
 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
--
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/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

2010-01-21 Thread Pais, Allen
From 4044fcc9c517e86fbea9f7d3b15d5cf75a767476 Mon Sep 17 00:00:00 2001
From: Allen Pais allen.p...@ti.com
Date: Thu, 21 Jan 2010 21:00:04 +0530
Subject: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups

This patch disables GAIA I2C1 adn I2C4(SR) internal pull-up, to
use only the external HW resistor =470 Ohm for the assured
functionality in HS mode.

While testing the I2C in High Speed mode, it was discovered that
without a proper pull-up resistor, there is data corruption during
multi-byte transfer. RTC(time_set) test case was used for testing.

From the analysis done, it was concluded that ideally we need a
pull-up of 1.6k Ohm(recomended) or atleast 470 Ohm or greater for
assured performance in HS mode.

Signed-off-by: Moiz Sonasath m-sonas...@ti.com
Signed-off-by: Allen Pais allen.p...@ti.com
---
 drivers/mfd/twl-core.c  |   10 ++
 include/linux/i2c/twl.h |   13 +
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 2a76065..7dcb5e9 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -965,6 +965,7 @@ twl_probe(struct i2c_client *client, const struct 
i2c_device_id *id)
int status;
unsignedi;
struct twl4030_platform_data*pdata = client-dev.platform_data;
+   u8 temp;
 
if (!pdata) {
dev_dbg(client-dev, no platform data?\n);
@@ -1031,6 +1032,15 @@ twl_probe(struct i2c_client *client, const struct 
i2c_device_id *id)
if (status  0)
goto fail;
}
+   /* Disable GAIA I2C Pull-up on I2C1 and I2C4(SR) interface
+* program I2C_SCL_CTRL_PU(bit 0)=0, I2C_SDA_CTRL_PU (bit 2)=0,
+* SR_I2C_SCL_CTRL_PU(bit 4)=0 and SR_I2C_SDA_CTRL_PU(bit 6)=0.
+*/
+
+   twl_i2c_read_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
+   temp = ~(SR_I2C_SDA_CTRL_PU | SR_I2C_SCL_CTRL_PU | \
+   I2C_SDA_CTRL_PU | I2C_SCL_CTRL_PU);
+   twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
 
status = add_children(pdata, id-driver_data);
 fail:
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index bf1c5be..2f4faf9 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -168,6 +168,19 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned 
num_bytes);
 int twl6030_interrupt_unmask(u8 bit_mask, u8 offset);
 int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
 
+/*Interface Bit Register (INTBR) offsets
+ *(Use TWL_4030_MODULE_INTBR)
+ */
+
+#define REG_GPPUPDCTR1 0x0F
+
+/*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */
+
+#define I2C_SCL_CTRL_PUBIT(0)
+#define I2C_SDA_CTRL_PUBIT(2)
+#define SR_I2C_SCL_CTRL_PU BIT(4)
+#define SR_I2C_SDA_CTRL_PU BIT(6)
+
 /*--*/
 
 /*
-- 
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


[PATCH 2/2] omap: 3630: Disable internal pull-ups

2010-01-21 Thread Pais, Allen
From 9a6b34dca3ff8ce4a200df4b65037978e4325452 Mon Sep 17 00:00:00 2001
From: Allen Pais allen.p...@ti.com
Date: Thu, 21 Jan 2010 21:23:41 +0530
Subject: [PATCH 2/2] omap: 3630: Disable internal pull-ups

This patch disables the newly introduced internal pull-up feature in
OMAP3630, to use only the external HW resistor =470 Ohm for the
assured functionality in HS mode.

While testing the I2C in High Speed mode, it was discovered that
without a proper pull-up resistor, there is data corruption during
multi-byte transfers. RTC(time_set) test case was used for testing.

From the analysis done, it was concluded that ideally we need a
pull-up of 1.6K Ohm (recomended) or atleast 470 Ohm or greater for
assured performance in HS mode.

Signed-off-by: Moiz Sonasath m-sonas...@ti.com
Signed-off-by: Allen Pais allen.p...@ti.com
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |   20 
 arch/arm/plat-omap/include/plat/control.h|   13 +
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 5c8474c..3ddd51a 100755
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -257,6 +257,26 @@ static struct i2c_board_info __initdata 
zoom_i2c_boardinfo[] = {
 
 static int __init omap_i2c_init(void)
 {
+   /* Disable OMAP 3630 internal pull-ups for I2Ci */
+   if (cpu_is_omap3630()) {
+   u32 prog_io;
+   prog_io = omap_ctrl_readl(OMAP343X_CONTROL_PROG_IO1);
+   /* Program (bit 19)=1 to disable internal pull-up on I2C1 */
+   prog_io |= OMAP3630_PRG_I2C1_PULLUPRESX;
+   /* Program (bit 0)=1 to disable internal pull-up on I2C2 */
+   prog_io |= OMAP3630_PRG_I2C2_PULLUPRESX;
+   omap_ctrl_writel(prog_io, OMAP343X_CONTROL_PROG_IO1);
+
+   prog_io = omap_ctrl_readl(OMAP36XX_CONTROL_PROG_IO2);
+   /* Program (bit 7)=1 to disable internal pull-up on I2C3 */
+   prog_io |= OMAP3630_PRG_I2C3_PULLUPRESX;
+   omap_ctrl_writel(prog_io, OMAP36XX_CONTROL_PROG_IO2);
+
+   prog_io = omap_ctrl_readl(OMAP36XX_CONTROL_PROG_IO_WKUP1);
+   /* Program (bit 5)=1 to disable internall pull-up on I2C4(SR) */
+   prog_io |= OMAP_3630_PRG_SR_PULLUPRESX;
+   omap_ctrl_writel(prog_io, OMAP36XX_CONTROL_PROG_IO_WKUP1);
+   }
omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo,
ARRAY_SIZE(zoom_i2c_boardinfo));
omap_register_i2c_bus(2, 400, NULL, 0);
diff --git a/arch/arm/plat-omap/include/plat/control.h 
b/arch/arm/plat-omap/include/plat/control.h
index a745d62..2213d4b 100644
--- a/arch/arm/plat-omap/include/plat/control.h
+++ b/arch/arm/plat-omap/include/plat/control.h
@@ -160,6 +160,8 @@
 #define OMAP343X_CONTROL_SRAMLDO5  (OMAP2_CONTROL_GENERAL + 0x02C0)
 #define OMAP343X_CONTROL_CSI   (OMAP2_CONTROL_GENERAL + 0x02C4)
 
+/* 36xx-only CONTROL_GENERAL registor offsets */
+#define OMAP36XX_CONTROL_PROG_IO2  (OMAP2_CONTROL_GENERAL + 0x0198)
 
 /* 34xx PADCONF register offsets */
 #define OMAP343X_PADCONF_ETK(i)(OMAP2_CONTROL_PADCONFS + 0x5a8 
+ \
@@ -192,6 +194,9 @@
 #define OMAP343X_CONTROL_WKUP_DEBOBS3 (OMAP343X_CONTROL_GENERAL_WKUP + 0x014)
 #define OMAP343X_CONTROL_WKUP_DEBOBS4 (OMAP343X_CONTROL_GENERAL_WKUP + 0x018)
 
+/* 36xx-only GENERAL_WKUP register offsets */
+#define OMAP_36XX_CONTROL_PROG_IO_WKUP1(OMAP343X_CONTROL_GENERAL_WKUP 
+ 0x020)
+
 /* 34xx D2D idle-related pins, handled by PM core */
 #define OMAP3_PADCONF_SAD2D_MSTANDBY   0x250
 #define OMAP3_PADCONF_SAD2D_IDLEACK0x254
@@ -242,6 +247,8 @@
 #define OMAP2_PBIASLITEVMODE0  (1  0)
 
 /* CONTROL_PROG_IO1 bits */
+#define OMAP3630_PRG_I2C2_PULLUPRESX   (1  0)
+#define OMAP3630_PRG_I2C1_PULLUPRESX   (1  19)
 #define OMAP3630_PRG_SDMMC1_SPEEDCTRL  (1  20)
 
 /* CONTROL_IVA2_BOOTMOD bits */
@@ -249,6 +256,12 @@
 #define OMAP3_IVA2_BOOTMOD_MASK(0xf  0)
 #define OMAP3_IVA2_BOOTMOD_IDLE(0x1  0)
 
+/* CONTROL_PROG_IO2 bits on omap3630 */
+#define OMAP3630_PRG_I2C3_PULLUPRESX   (1  7)
+
+/* CONTROL_PROG_IO_WKUP1 bits on omap3630 */
+#define OMAP3630_PRG_SR_PULLUPRESX (1  5)
+
 /* CONTROL_PADCONF_X bits */
 #define OMAP3_PADCONF_WAKEUPEVENT0 (1  15)
 #define OMAP3_PADCONF_WAKEUPENABLE0(1  14)
-- 
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


[PATCH 2/2 V2] omap: 3630: Disable internal pull-ups

2010-01-21 Thread Pais, Allen
From 4aa00e5dd0bdf06b7eb421cef9e066670669691e Mon Sep 17 00:00:00 2001
From: Allen Pais allen.p...@ti.com
Date: Thu, 21 Jan 2010 21:54:04 +0530
Subject: [PATCH 2/2] omap: 3630: Disable internal pull-ups

This patch disables the newly introduced internal pull-up feature in
OMAP3630, to use only the external HW resistor =470 Ohm for the
assured functionality in HS mode.

While testing the I2C in High Speed mode, it was discovered that
without a proper pull-up resistor, there is data corruption during
multi-byte transfers. RTC(time_set) test case was used for testing.

From the analysis done, it was concluded that ideally we need a
pull-up of 1.6K Ohm (recomended) or atleast 470 Ohm or greater for
assured performance in HS mode.

Signed-off-by: Moiz Sonasath m-sonas...@ti.com
Signed-off-by: Allen Pais allen.p...@ti.com
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |   21 +
 arch/arm/plat-omap/include/plat/control.h|   13 +
 2 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 5c8474c..804e8f5 100755
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -23,6 +23,7 @@
 
 #include plat/common.h
 #include plat/usb.h
+#include plat/control.h
 
 #include mux.h
 #include mmc-twl4030.h
@@ -257,6 +258,26 @@ static struct i2c_board_info __initdata 
zoom_i2c_boardinfo[] = {
 
 static int __init omap_i2c_init(void)
 {
+   /* Disable OMAP 3630 internal pull-ups for I2Ci */
+   if (cpu_is_omap3630()) {
+   u32 prog_io;
+   prog_io = omap_ctrl_readl(OMAP343X_CONTROL_PROG_IO1);
+   /* Program (bit 19)=1 to disable internal pull-up on I2C1 */
+   prog_io |= OMAP3630_PRG_I2C1_PULLUPRESX;
+   /* Program (bit 0)=1 to disable internal pull-up on I2C2 */
+   prog_io |= OMAP3630_PRG_I2C2_PULLUPRESX;
+   omap_ctrl_writel(prog_io, OMAP343X_CONTROL_PROG_IO1);
+
+   prog_io = omap_ctrl_readl(OMAP36XX_CONTROL_PROG_IO2);
+   /* Program (bit 7)=1 to disable internal pull-up on I2C3 */
+   prog_io |= OMAP3630_PRG_I2C3_PULLUPRESX;
+   omap_ctrl_writel(prog_io, OMAP36XX_CONTROL_PROG_IO2);
+
+   prog_io = omap_ctrl_readl(OMAP36XX_CONTROL_PROG_IO_WKUP1);
+   /* Program (bit 5)=1 to disable internall pull-up on I2C4(SR) */
+   prog_io |= OMAP3630_PRG_SR_PULLUPRESX;
+   omap_ctrl_writel(prog_io, OMAP36XX_CONTROL_PROG_IO_WKUP1);
+   }
omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo,
ARRAY_SIZE(zoom_i2c_boardinfo));
omap_register_i2c_bus(2, 400, NULL, 0);
diff --git a/arch/arm/plat-omap/include/plat/control.h 
b/arch/arm/plat-omap/include/plat/control.h
index a745d62..4fb487a 100644
--- a/arch/arm/plat-omap/include/plat/control.h
+++ b/arch/arm/plat-omap/include/plat/control.h
@@ -160,6 +160,8 @@
 #define OMAP343X_CONTROL_SRAMLDO5  (OMAP2_CONTROL_GENERAL + 0x02C0)
 #define OMAP343X_CONTROL_CSI   (OMAP2_CONTROL_GENERAL + 0x02C4)
 
+/* 36xx-only CONTROL_GENERAL registor offsets */
+#define OMAP36XX_CONTROL_PROG_IO2  (OMAP2_CONTROL_GENERAL + 0x0198)
 
 /* 34xx PADCONF register offsets */
 #define OMAP343X_PADCONF_ETK(i)(OMAP2_CONTROL_PADCONFS + 0x5a8 
+ \
@@ -192,6 +194,9 @@
 #define OMAP343X_CONTROL_WKUP_DEBOBS3 (OMAP343X_CONTROL_GENERAL_WKUP + 0x014)
 #define OMAP343X_CONTROL_WKUP_DEBOBS4 (OMAP343X_CONTROL_GENERAL_WKUP + 0x018)
 
+/* 36xx-only GENERAL_WKUP register offsets */
+#define OMAP36XX_CONTROL_PROG_IO_WKUP1 (OMAP343X_CONTROL_GENERAL_WKUP + 0x020)
+
 /* 34xx D2D idle-related pins, handled by PM core */
 #define OMAP3_PADCONF_SAD2D_MSTANDBY   0x250
 #define OMAP3_PADCONF_SAD2D_IDLEACK0x254
@@ -242,6 +247,8 @@
 #define OMAP2_PBIASLITEVMODE0  (1  0)
 
 /* CONTROL_PROG_IO1 bits */
+#define OMAP3630_PRG_I2C2_PULLUPRESX   (1  0)
+#define OMAP3630_PRG_I2C1_PULLUPRESX   (1  19)
 #define OMAP3630_PRG_SDMMC1_SPEEDCTRL  (1  20)
 
 /* CONTROL_IVA2_BOOTMOD bits */
@@ -249,6 +256,12 @@
 #define OMAP3_IVA2_BOOTMOD_MASK(0xf  0)
 #define OMAP3_IVA2_BOOTMOD_IDLE(0x1  0)
 
+/* CONTROL_PROG_IO2 bits on omap3630 */
+#define OMAP3630_PRG_I2C3_PULLUPRESX   (1  7)
+
+/* CONTROL_PROG_IO_WKUP1 bits on omap3630 */
+#define OMAP3630_PRG_SR_PULLUPRESX (1  5)
+
 /* CONTROL_PADCONF_X bits */
 #define OMAP3_PADCONF_WAKEUPEVENT0 (1  15)
 #define OMAP3_PADCONF_WAKEUPENABLE0(1  14)
-- 
1.6.3.3


- Allen --
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/2] Introduce 3630sdp board file.

2009-10-26 Thread Pais, Allen
OMAP3630 is a migration in GS70 process of the OMAP3430 with some performance 
improvements. OMAP3630 is a high performance multimedia application processor 
based on the enhanced OMAP 3 Architecture integrated on a 45nm process

OMAP3630's architecture is designed for 2.5G wireless terminals, 3G wireless 
terminals, rich multi-media featured handsets and high performance PDAs to 
provide best-in-class video, image and graphics processing sufficient to 
support:
Streaming video,
2D/3D mobile gaming,
Video conferencing,
High resolution still image,
Video capture.

arch/arm/mach-omap2/board-3630sdp.c |  188 + 
arch/arm/mach-omap2/Kconfig |4   
arch/arm/mach-omap2/Makefile|1 + ++  --
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/2] Added board-3630.c file.

2009-10-26 Thread Pais, Allen
From 553ee2299d0ea6493e8587e7cc832361646f81a7 Mon Sep 17 00:00:00 2001
From: Allen Pais allen.p...@ti.com
Date: Mon, 26 Oct 2009 12:50:17 +0530
Subject: [PATCH 1/2] Added board-3630.c file.

The following sequence of patch set is to adds minimal OMAP3630 board support 
to OMAP GIT. 
This patch is tested on TI's OMAP3630 SDP.

OMAP 3630 is an ARM Cortex A8 based Multimedia Application processor. For more 
information please visit:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123navigation
 
Id=12836contentId=52606

Signed-off-by: Allen Pais allen.p...@ti.com
---
 arch/arm/mach-omap2/board-3630sdp.c |  188 +++
 1 files changed, 188 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-3630sdp.c

diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
new file mode 100644
index 000..d3ddbd1
--- /dev/null
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -0,0 +1,188 @@
+/*
+ *  linux/arch/arm/mach-omap2/board-3630sdp.c
+ *  Copyright (C) 2007 Texas Instruments
+ *  Modified from mach-omap2/board-generic.c
+ *  Initial code: Allen Pais
+ *  
+ *  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/input.h
+#include linux/input/matrix_keypad.h
+#include linux/gpio.h
+#include linux/i2c/twl4030.h
+#include linux/regulator/machine.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/common.h
+#include plat/usb.h
+
+#include mmc-twl4030.h
+#include sdram-micron-mt46h32m32lf-6.h
+
+/* 3630SDP has Qwerty keyboard*/
+static int board_keymap[] = {
+   KEY(0, 0, KEY_E),
+   KEY(1, 0, KEY_R),
+   KEY(2, 0, KEY_T),
+   KEY(3, 0, KEY_HOME),
+   KEY(6, 0, KEY_I),
+   KEY(7, 0, KEY_LEFTSHIFT),
+   KEY(0, 1, KEY_D),
+   KEY(1, 1, KEY_F),
+   KEY(2, 1, KEY_G),
+   KEY(3, 1, KEY_SEND),
+   KEY(6, 1, KEY_K),
+   KEY(7, 1, KEY_ENTER),
+   KEY(0, 2, KEY_X),
+   KEY(1, 2, KEY_C),
+   KEY(2, 2, KEY_V),
+   KEY(3, 2, KEY_END),
+   KEY(6, 2, KEY_DOT),
+   KEY(7, 2, KEY_CAPSLOCK),
+   KEY(0, 3, KEY_Z),
+   KEY(1, 3, KEY_KPPLUS),
+   KEY(2, 3, KEY_B),
+   KEY(3, 3, KEY_F1),
+   KEY(6, 3, KEY_O),
+   KEY(7, 3, KEY_SPACE),
+   KEY(0, 4, KEY_W),
+   KEY(1, 4, KEY_Y),
+   KEY(2, 4, KEY_U),
+   KEY(3, 4, KEY_F2),
+   KEY(4, 4, KEY_VOLUMEUP),
+   KEY(6, 4, KEY_L),
+   KEY(7, 4, KEY_LEFT),
+   KEY(0, 5, KEY_S),
+   KEY(1, 5, KEY_H),
+   KEY(2, 5, KEY_J),
+   KEY(3, 5, KEY_F3),
+   KEY(5, 5, KEY_VOLUMEDOWN),
+   KEY(6, 5, KEY_M),
+   KEY(4, 5, KEY_ENTER),
+   KEY(7, 5, KEY_RIGHT),
+   KEY(0, 6, KEY_Q),
+   KEY(1, 6, KEY_A),
+   KEY(2, 6, KEY_N),
+   KEY(3, 6, KEY_BACKSPACE),
+   KEY(6, 6, KEY_P),
+   KEY(7, 6, KEY_UP),
+   KEY(6, 7, KEY_SELECT),
+   KEY(7, 7, KEY_DOWN),
+   KEY(0, 7, KEY_PROG1),   /*MACRO 1 User defined */
+   KEY(1, 7, KEY_PROG2),   /*MACRO 2 User defined */
+   KEY(2, 7, KEY_PROG3),   /*MACRO 3 User defined */
+   KEY(3, 7, KEY_PROG4),   /*MACRO 4 User defined */
+   0
+};
+
+static struct matrix_keymap_data board_map_data = {
+   .keymap = board_keymap,
+   .keymap_size= ARRAY_SIZE(board_keymap),
+};
+
+static struct twl4030_keypad_data sdp3630_kp_twl4030_data = {
+   .keymap_data= board_map_data,
+   .rows   = 8,
+   .cols   = 8,
+   .rep= 1,
+};
+
+static struct omap_board_config_kernel sdp3630_config[] __initdata = {
+};
+
+
+static int sdp3630_batt_table[] = {
+/* 0 C*/
+30800, 29500, 28300, 27100,
+26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
+17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
+11600, 11200, 10800, 10400, 1, 9630,  9280,  8950,  8620,  8310,
+8020,  7730,  7460,  7200,  6950,  6710,  6470,  6250,  6040,  5830,
+5640,  5450,  5260,  5090,  4920,  4760,  4600,  4450,  4310,  4170,
+4040,  3910,  3790,  3670,  3550
+};
+
+static struct twl4030_bci_platform_data sdp3630_bci_data = {
+   .battery_tmp_tbl= sdp3630_batt_table,
+   .tblsize= ARRAY_SIZE(sdp3630_batt_table),
+};
+
+static struct twl4030_usb_data sdp3630_usb_data = {
+   .usb_mode   = T2_USB_MODE_ULPI,
+};
+
+static void __init omap_sdp3630_init_irq(void)
+{
+   omap_board_config = sdp3630_config;
+   omap_board_config_size = ARRAY_SIZE(sdp3630_config);
+   omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
+mt46h32m32lf6_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+static struct twl4030_madc_platform_data sdp3630_madc_data = {
+   

[PATCH 2/2] Accomodate the board file change in Kconfig

2009-10-26 Thread Pais, Allen
From 0599ed35fde00cd84681e5d8f9a57a797fae1270 Mon Sep 17 00:00:00 2001
From: Allen Pais allen.p...@ti.com
Date: Mon, 26 Oct 2009 12:51:02 +0530
Subject: [PATCH 2/2] Accomodate the board file change in Kconfig


Signed-off-by: Allen Pais allen.p...@ti.com
---
 arch/arm/mach-omap2/Kconfig  |4 
 arch/arm/mach-omap2/Makefile |1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index aad194f..f555c18 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -73,6 +73,10 @@ config MACH_OMAP_3430SDP
bool OMAP 3430 SDP board
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
+config MACH_OMAP_3630SDP
+   bool OMAP 3630 SDP board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_NOKIA_N800
bool
 
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 6b7702f..d6afc01 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_MACH_OMAP3_PANDORA)  += board-omap3pandora.o 
\
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)+= board-3430sdp.o \
   mmc-twl4030.o
+obj-$(CONFIG_MACH_OMAP_3630SDP)+= board-3630sdp.o
 obj-$(CONFIG_MACH_NOKIA_N8X0)  += board-n8x0.o
 obj-$(CONFIG_MACH_NOKIA_RX51)  += board-rx51.o \
   board-rx51-peripherals.o \
-- 
1.5.4.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


RE: [PATCH 1/2] Added board-3630.c file.

2009-10-26 Thread Pais, Allen
 

-Original Message-
From: linux-omap-ow...@vger.kernel.org 
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Menon, Nishanth
Sent: Monday, October 26, 2009 4:40 PM
To: Pais, Allen; linux-omap@vger.kernel.org
Subject: RE: [PATCH 1/2] Added board-3630.c file.

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- 
 ow...@vger.kernel.org] On Behalf Of Pais, Allen
 Sent: Monday, October 26, 2009 2:43 AM
 To: linux-omap@vger.kernel.org
 Subject: [PATCH 1/2] Added board-3630.c file.
 
 From 553ee2299d0ea6493e8587e7cc832361646f81a7 Mon Sep 17 00:00:00 2001
 From: Allen Pais allen.p...@ti.com
 Date: Mon, 26 Oct 2009 12:50:17 +0530
 Subject: [PATCH 1/2] Added board-3630.c file.
 
 The following sequence of patch set is to adds minimal OMAP3630 board 
 support to OMAP GIT.
 This patch is tested on TI's OMAP3630 SDP.
 
 OMAP 3630 is an ARM Cortex A8 based Multimedia Application processor. 
 For more information please visit:
 http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateI
 d=61
 23navigation
 Id=12836contentId=52606
 
 Signed-off-by: Allen Pais allen.p...@ti.com
 ---
  arch/arm/mach-omap2/board-3630sdp.c |  188
 +++
  1 files changed, 188 insertions(+), 0 deletions(-)  create mode 
 100644 arch/arm/mach-omap2/board-3630sdp.c
 
 diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach- 
 omap2/board-3630sdp.c new file mode 100644 index 000..d3ddbd1
 --- /dev/null
 +++ b/arch/arm/mach-omap2/board-3630sdp.c
 @@ -0,0 +1,188 @@
 +/*
 + *  linux/arch/arm/mach-omap2/board-3630sdp.c
 + *  Copyright (C) 2007 Texas Instruments
2007 I don't recollect 3630 in 2007.

 + *  Modified from mach-omap2/board-generic.c
 + *  Initial code: Allen Pais
 + *
 + *  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/input.h
 +#include linux/input/matrix_keypad.h #include linux/gpio.h 
 +#include linux/i2c/twl4030.h #include linux/regulator/machine.h
 +
 +#include asm/mach-types.h
 +#include asm/mach/arch.h
 +
 +#include plat/common.h
 +#include plat/usb.h
 +
 +#include mmc-twl4030.h
 +#include sdram-micron-mt46h32m32lf-6.h
 +
 +/* 3630SDP has Qwerty keyboard*/
 +static int board_keymap[] = {
 + KEY(0, 0, KEY_E),
 + KEY(1, 0, KEY_R),
 + KEY(2, 0, KEY_T),
 + KEY(3, 0, KEY_HOME),
 + KEY(6, 0, KEY_I),
 + KEY(7, 0, KEY_LEFTSHIFT),
 + KEY(0, 1, KEY_D),
 + KEY(1, 1, KEY_F),
 + KEY(2, 1, KEY_G),
 + KEY(3, 1, KEY_SEND),
 + KEY(6, 1, KEY_K),
 + KEY(7, 1, KEY_ENTER),
 + KEY(0, 2, KEY_X),
 + KEY(1, 2, KEY_C),
 + KEY(2, 2, KEY_V),
 + KEY(3, 2, KEY_END),
 + KEY(6, 2, KEY_DOT),
 + KEY(7, 2, KEY_CAPSLOCK),
 + KEY(0, 3, KEY_Z),
 + KEY(1, 3, KEY_KPPLUS),
 + KEY(2, 3, KEY_B),
 + KEY(3, 3, KEY_F1),
 + KEY(6, 3, KEY_O),
 + KEY(7, 3, KEY_SPACE),
 + KEY(0, 4, KEY_W),
 + KEY(1, 4, KEY_Y),
 + KEY(2, 4, KEY_U),
 + KEY(3, 4, KEY_F2),
 + KEY(4, 4, KEY_VOLUMEUP),
 + KEY(6, 4, KEY_L),
 + KEY(7, 4, KEY_LEFT),
 + KEY(0, 5, KEY_S),
 + KEY(1, 5, KEY_H),
 + KEY(2, 5, KEY_J),
 + KEY(3, 5, KEY_F3),
 + KEY(5, 5, KEY_VOLUMEDOWN),
 + KEY(6, 5, KEY_M),
 + KEY(4, 5, KEY_ENTER),
 + KEY(7, 5, KEY_RIGHT),
 + KEY(0, 6, KEY_Q),
 + KEY(1, 6, KEY_A),
 + KEY(2, 6, KEY_N),
 + KEY(3, 6, KEY_BACKSPACE),
 + KEY(6, 6, KEY_P),
 + KEY(7, 6, KEY_UP),
 + KEY(6, 7, KEY_SELECT),
 + KEY(7, 7, KEY_DOWN),
 + KEY(0, 7, KEY_PROG1),   /*MACRO 1 User defined */
 + KEY(1, 7, KEY_PROG2),   /*MACRO 2 User defined */
 + KEY(2, 7, KEY_PROG3),   /*MACRO 3 User defined */
 + KEY(3, 7, KEY_PROG4),   /*MACRO 4 User defined */
 + 0
 +};

NAK. Could we follow the same issue with zoom2 - break the keypad into a 
Separate one and use it instead? Same for all reused zoom2 components..

[Allen] Yes, we should do that. Not only for keypad but also
For display panel and touch screen so that sdp3630, zoom3 and
Zoom2 could use the same code, without having to duplicate
Code.

 +
 +static struct matrix_keymap_data board_map_data = {
 + .keymap = board_keymap,
 + .keymap_size= ARRAY_SIZE(board_keymap),
 +};
 +
 +static struct twl4030_keypad_data sdp3630_kp_twl4030_data = {
 + .keymap_data= board_map_data,
 + .rows   = 8,
 + .cols   = 8,
 + .rep= 1,
 +};
 +
 +static struct omap_board_config_kernel sdp3630_config[] __initdata = 
 +{ };
 +
 +
 +static int sdp3630_batt_table[] = {
 +/* 0 C*/
 +30800, 29500, 28300, 27100,
 +26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, 
 +17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, 
 +11600

RE: [PATCH v2] OMAP3: introduce OMAP3630

2009-10-15 Thread Pais, Allen
Muxes for OMAP 3630.

Signed-off-by: Allen Pais allen.p...@ti.com
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index b5fac32..93abb74 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -551,6 +551,42 @@ MUX_CFG_34XX(AF13_3430_MMC3_DAT3, 0x5e2,
 MUX_CFG_34XX(AF26_34XX_SYS_NIRQ, 0x1E0,
OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
OMAP34XX_MUX_MODE0)
+
+/*Muxes for 3630 */
+MUX_CFG_34XX(H26_3630_DSS_DATA18, 0x100,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(H25_3630_DSS_DATA19, 0x102,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(E28_3630_DSS_DATA20, 0x104,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(J26_3630_DSS_DATA21, 0x106,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(AC27_3630_DSS_DATA22, 0x108,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(AC28_3630_DSS_DATA23, 0x10A,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
+MUX_CFG_34XX(AF9_3630_ETKD8, 0x5EC,
+   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(AG9_3630_ETKD9, 0x5EE,
+   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(AG7_3630_ETKD12, 0x5F0,
+   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
+MUX_CFG_34XX(AA25_3630_UART2_TX, 0x178,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(AD25_3630_UART2_RX, 0x17A,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(AB25_3630_UART2_RTS, 0x176,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(AB26_3630_UART2_CTS, 0x174,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
+MUX_CFG_34XX(H20_UART3_RX_IRRX, 0x19E,
+   OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
+MUX_CFG_34XX(H21_UART3_TX_IRTX, 0x1A0,
+   OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
 };
 
 #define OMAP34XX_PINS_SZ   ARRAY_SIZE(omap34xx_pins)
diff --git a/arch/arm/plat-omap/include/mach/mux.h 
b/arch/arm/plat-omap/include/mach/mux.h
index 0f49d2d..8d8cbe1 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -890,6 +890,32 @@ enum omap34xx_index {
 
/* SYS_NIRQ T2 INT1 */
AF26_34XX_SYS_NIRQ,
+
+   /*Muxes for 3630*/
+   K28_3630_CAM_D6,
+   L28_3630_CAM_D7,
+   K27_3630_CAM_D8,
+   L27_3630_CAM_D9,
+
+   H26_3630_DSS_DATA18,
+   H25_3630_DSS_DATA19,
+   E28_3630_DSS_DATA20,
+   J26_3630_DSS_DATA21,
+   AC27_3630_DSS_DATA22,
+   AC28_3630_DSS_DATA23,
+
+   AF9_3630_ETKD8,
+   AG9_3630_ETKD9,
+   AG7_3630_ETK12,
+
+   AA25_3630_UART2_TX,
+   AD25_3630_UART2_RX,
+   AB25_3630_UART2_RTS,
+   AB26_3630_UART2_CTS,
+
+   H20_UART3_RX_IRRX,
+   H21_UART3_TX_IRTX,
+
 };
 
 struct omap_mux_cfg {--
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


[RFC][Patch V1] OMAP3: Mux Changes.

2009-10-15 Thread Pais, Allen
Please ignore my previous mail.

Muxes for OMAP 3630.

Signed-off-by: Allen Pais allen.p...@ti.com diff --git 
a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index b5fac32..93abb74 
100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -551,6 +551,42 @@ MUX_CFG_34XX(AF13_3430_MMC3_DAT3, 0x5e2,  
MUX_CFG_34XX(AF26_34XX_SYS_NIRQ, 0x1E0,
OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
OMAP34XX_MUX_MODE0)
+
+/*Muxes for 3630 */
+MUX_CFG_34XX(H26_3630_DSS_DATA18, 0x100,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(H25_3630_DSS_DATA19, 0x102,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(E28_3630_DSS_DATA20, 0x104,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(J26_3630_DSS_DATA21, 0x106,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(AC27_3630_DSS_DATA22, 0x108,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(AC28_3630_DSS_DATA23, 0x10A,
+   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
+MUX_CFG_34XX(AF9_3630_ETKD8, 0x5EC,
+   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(AG9_3630_ETKD9, 0x5EE,
+   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(AG7_3630_ETKD12, 0x5F0,
+   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
+MUX_CFG_34XX(AA25_3630_UART2_TX, 0x178,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(AD25_3630_UART2_RX, 0x17A,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(AB25_3630_UART2_RTS, 0x176,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(AB26_3630_UART2_CTS, 0x174,
+   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
+MUX_CFG_34XX(H20_UART3_RX_IRRX, 0x19E,
+   OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) 
+MUX_CFG_34XX(H21_UART3_TX_IRTX, 0x1A0,
+   OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
+
 };
 
 #define OMAP34XX_PINS_SZ   ARRAY_SIZE(omap34xx_pins)
diff --git a/arch/arm/plat-omap/include/mach/mux.h 
b/arch/arm/plat-omap/include/mach/mux.h
index 0f49d2d..8d8cbe1 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -890,6 +890,32 @@ enum omap34xx_index {
 
/* SYS_NIRQ T2 INT1 */
AF26_34XX_SYS_NIRQ,
+
+   /*Muxes for 3630*/
+   K28_3630_CAM_D6,
+   L28_3630_CAM_D7,
+   K27_3630_CAM_D8,
+   L27_3630_CAM_D9,
+
+   H26_3630_DSS_DATA18,
+   H25_3630_DSS_DATA19,
+   E28_3630_DSS_DATA20,
+   J26_3630_DSS_DATA21,
+   AC27_3630_DSS_DATA22,
+   AC28_3630_DSS_DATA23,
+
+   AF9_3630_ETKD8,
+   AG9_3630_ETKD9,
+   AG7_3630_ETK12,
+
+   AA25_3630_UART2_TX,
+   AD25_3630_UART2_RX,
+   AB25_3630_UART2_RTS,
+   AB26_3630_UART2_CTS,
+
+   H20_UART3_RX_IRRX,
+   H21_UART3_TX_IRTX,
+
 };
 
 struct omap_mux_cfg {--
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: [RFC][Patch V1] OMAP3: Mux Changes.

2009-10-15 Thread Pais, Allen
 


Hi Allen,
a) A simple comment to all my comments: why cant we have these in bootloader 
and just simply leave the mux file alone?
[Allen] Yes Nishanth, this would be a much cleaner approach. Even Santosh had 
suggested
The same, if we can conclude on a approach here, I can go ahead and do the Mux 
Change it accordingly.
b) Are you doing this for a specific platform or are they generic 3630 pin mux 
changes?
[Allen] No, not as of now.

- Allen

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- 
 ow...@vger.kernel.org] On Behalf Of Menon, Nishanth
 Sent: Thursday, October 15, 2009 7:24 AM
 To: Pais, Allen; Aguirre Rodriguez, Sergio Alberto; linux-omap
 Cc: Chikkature Rajashekar, Madhusudhan; Pandita, Vikram; Gadiyar, 
 Anand; Cousson, Benoit; Felipe Balbi; Kevin Hilman; Premi, Sanjeev; 
 Shilimkar, Santosh; Tony Lindgren
 Subject: RE: [RFC][Patch V1] OMAP3: Mux Changes.
 
 Please send your patch using git send email. And generate your patch 
 using git format patch
 
  -Original Message-
  From: Pais, Allen
  Sent: Thursday, October 15, 2009 4:38 AM
 
  Please ignore my previous mail.
 
  Muxes for OMAP 3630.
 
  Signed-off-by: Allen Pais allen.p...@ti.com diff --git
 a/arch/arm/mach-
  omap2/mux.c b/arch/arm/mach-omap2/mux.c index b5fac32..93abb74 
  100644
 
 
  --- a/arch/arm/mach-omap2/mux.c
  +++ b/arch/arm/mach-omap2/mux.c
  @@ -551,6 +551,42 @@ MUX_CFG_34XX(AF13_3430_MMC3_DAT3, 0x5e2, 
  MUX_CFG_34XX(AF26_34XX_SYS_NIRQ, 0x1E0,
  OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
  OMAP34XX_MUX_MODE0)
  +
  +/*Muxes for 3630 */
  +MUX_CFG_34XX(H26_3630_DSS_DATA18, 0x100,
  +   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(H25_3630_DSS_DATA19, 0x102,
  +   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(E28_3630_DSS_DATA20, 0x104,
  +   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(J26_3630_DSS_DATA21, 0x106,
  +   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(AC27_3630_DSS_DATA22, 0x108,
  +   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(AC28_3630_DSS_DATA23, 0x10A,
  +   OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
 Why cant I do this in Board file?
I Really typed that??? Dumb me.. apologies on the noise.. I had meant 
bootloader..
  +
  +MUX_CFG_34XX(AF9_3630_ETKD8, 0x5EC,
  +   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(AG9_3630_ETKD9, 0x5EE,
  +   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(AG7_3630_ETKD12, 0x5F0,
  +   OMAP34XX_MUX_MODE1 | OMAP34XX_PIN_INPUT_PULLDOWN)
 Why am I doing this?
  +
  +MUX_CFG_34XX(AA25_3630_UART2_TX, 0x178,
  +   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(AD25_3630_UART2_RX, 0x17A,
  +   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(AB25_3630_UART2_RTS, 0x176,
  +   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(AB26_3630_UART2_CTS, 0x174,
  +   OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
 Please explain..
  +
  +MUX_CFG_34XX(H20_UART3_RX_IRRX, 0x19E,
  +   OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) 
  +MUX_CFG_34XX(H21_UART3_TX_IRTX, 0x1A0,
  +   OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
  +
   };
 ??
 
   #define OMAP34XX_PINS_SZ   ARRAY_SIZE(omap34xx_pins)
  diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat- 
  omap/include/mach/mux.h index 0f49d2d..8d8cbe1 100644
  --- a/arch/arm/plat-omap/include/mach/mux.h
  +++ b/arch/arm/plat-omap/include/mach/mux.h
  @@ -890,6 +890,32 @@ enum omap34xx_index {
 
  /* SYS_NIRQ T2 INT1 */
  AF26_34XX_SYS_NIRQ,
  +
  +   /*Muxes for 3630*/
  +   K28_3630_CAM_D6,
  +   L28_3630_CAM_D7,
  +   K27_3630_CAM_D8,
  +   L27_3630_CAM_D9,
  +
  +   H26_3630_DSS_DATA18,
  +   H25_3630_DSS_DATA19,
  +   E28_3630_DSS_DATA20,
  +   J26_3630_DSS_DATA21,
  +   AC27_3630_DSS_DATA22,
  +   AC28_3630_DSS_DATA23,
  +
  +   AF9_3630_ETKD8,
  +   AG9_3630_ETKD9,
  +   AG7_3630_ETK12,
  +
  +   AA25_3630_UART2_TX,
  +   AD25_3630_UART2_RX,
  +   AB25_3630_UART2_RTS,
  +   AB26_3630_UART2_CTS,
  +
  +   H20_UART3_RX_IRRX,
  +   H21_UART3_TX_IRTX,
  +
   };
 
   struct omap_mux_cfg {
 --
 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


Regards,
Nishanth Menon

--
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: [RFC][PATCH] OMAP3: introduce OMAP3630

2009-10-08 Thread Pais, Allen
Nishanth,

 Would there be CONFIG_ARCH_OMAP3630?

- Allen


From: Menon, Nishanth
Sent: Thursday, October 08, 2009 9:40 AM
To: Premi, Sanjeev
Cc: Pandita, Vikram; Shilimkar, Santosh; linux-omap; Chikkature Rajashekar, 
Madhusudhan; Pais, Allen; Gadiyar, Anand; Cousson, Benoit; Kevin Hilman; 
Aguirre Rodriguez, Sergio Alberto; Tony Lindgren
Subject: Re: [RFC][PATCH] OMAP3: introduce OMAP3630

Premi, Sanjeev had written, on 10/08/2009 09:23 AM, the following:
 -Original Message-
 From: Pandita, Vikram
 Sent: Thursday, October 08, 2009 7:01 PM
 To: Shilimkar, Santosh; Menon, Nishanth; linux-omap
 Cc: Chikkature Rajashekar, Madhusudhan; Pais, Allen; Gadiyar,
 Anand; Cousson, Benoit; Kevin Hilman; Premi, Sanjeev; Aguirre
 Rodriguez, Sergio Alberto; Tony Lindgren
 Subject: RE: [RFC][PATCH] OMAP3: introduce OMAP3630



 -Original Message-
 From: Shilimkar, Santosh
 diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-
 omap/include/mach/cpu.h
 index 431fec4..af1080f 100644
 --- a/arch/arm/plat-omap/include/mach/cpu.h
 +++ b/arch/arm/plat-omap/include/mach/cpu.h
 @@ -383,6 +383,12 @@ IS_OMAP_TYPE(3430, 0x3430)
  #define OMAP3430_REV_ES2_10x34302034
  #define OMAP3430_REV_ES3_00x34303034
  #define OMAP3430_REV_ES3_10x34304034
 +/* NOTE: Add 36xx series below
 + * If additional 34xx series are added, OMAP3430_REV_ES can be
 + * added above the 3630 defines and series renumbered to ensure
 + * rev()  checks to work
 + */
 +#define OMAP3630_REV_ES1_00x34305034

  #define OMAP443X_CLASS0x44300034
 Was expecting that this patch will add cpu_is_omap36xx() in cpu.h
 apart from above. Is this handled in another patch ?
 Idea is to re-use all 34xx code for 36xx, as per the mail
 thread on list, and given in reference.
 Hence at run time, the check could be:

 if (omap_rev() == OMAP3630_REV_ES1_0)
  x

 cpu_is_omap34xx() will be true for 36xx as well.

 [sp] This case seems quite similar to the OMAP35x.
  Can you look at this thread:

  http://marc.info/?l=linux-omapm=125372581804902w=2

  It applies equally well here as well...
  I will be submitting updated patch tomorrow.
yes, any specifics should be  feature based IMHO. we will need to extend
the feature list.

--
Regards,
Nishanth Menon--
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][RFC] OMAP3630: Create architecture macros and config entries.

2009-09-21 Thread Pais, Allen
Hi Sergio,

 I agree to the point you stated, that 34xx should not depend
on 36xx, this would call for code duplication in my opinion. we'll
need to add many more files in the mach-omap2/ w.r.t to 36xx.

I don't see a approach which could reduce the duplication, any
comments on the same would be very helpful to us.

Thanks

- Allen

From: Aguirre Rodriguez, Sergio Alberto
Sent: Monday, September 21, 2009 2:41 PM
To: Pais, Allen; linux-omap@vger.kernel.org; Raju, Veeramanikandan; Bongale, 
Hariprasad
Subject: RE: [PATCH][RFC] OMAP3630: Create architecture macros and config 
entries.

Allen,

Some comments inlined below:

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Pais, Allen
 Sent: Sunday, September 20, 2009 2:47 AM
 To: linux-omap@vger.kernel.org; Raju, Veeramanikandan; Bongale, Hariprasad
 Subject: [PATCH][RFC] OMAP3630: Create architecture macros and config
 entries.


 This patch creates the architectural macros for OMAP3630.

 Signed-off-by: Allen Pais allen.p...@ti.com

 arch/arm/mach-omap2/Kconfig |   13 ++
 arch/arm/plat-omap/include/mach/cpu.h   |   30 +-

 diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
 index 75b1c7e..618b7d5 100755
 --- a/arch/arm/mach-omap2/Kconfig
 +++ b/arch/arm/mach-omap2/Kconfig
 @@ -19,11 +19,20 @@ config ARCH_OMAP34XX
   bool OMAP34xx Based System
   depends on ARCH_OMAP3

 +config ARCH_OMAP36XX
 + bool OMAP36xx Based System
 + depends on ARCH_OMAP3
 +
  config ARCH_OMAP3430
   bool OMAP3430 support
   depends on ARCH_OMAP3  ARCH_OMAP34XX
   select ARCH_OMAP_OTG

 +config ARCH_OMAP3630
 + bool OMAP3630 support
 + depends on ARCH_OMAP3  ARCH_OMAP34XX  ARCH_OMAP36XX

Why not:

depends on ARCH_OMAP3  ARCH_OMAP36XX

? IMHO, the 36XX support shouldn't depend on 34XX.

 + select ARCH_OMAP_OTG
 +
  comment OMAP Board Type
   depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4

 @@ -73,6 +82,10 @@ config MACH_OMAP_3430SDP
   bool OMAP 3430 SDP board
   depends on ARCH_OMAP3  ARCH_OMAP34XX

 +config MACH_OMAP_3630SDP
 + bool OMAP 3630 SDP board
 + depends on ARCH_OMAP3  ARCH_OMAP34XX  ARCH_OMAP36XX
 +
  config MACH_NOKIA_N8X0
   bool Nokia N800/N810
   depends on ARCH_OMAP2420
 diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-
 omap/include/mach/cpu.h
 index 7a5f9e8..73c656c 100755
 --- a/arch/arm/plat-omap/include/mach/cpu.h
 +++ b/arch/arm/plat-omap/include/mach/cpu.h
 @@ -157,10 +157,12 @@ IS_OMAP_CLASS(15xx, 0x15)
  IS_OMAP_CLASS(16xx, 0x16)
  IS_OMAP_CLASS(24xx, 0x24)
  IS_OMAP_CLASS(34xx, 0x34)
 +IS_OMAP_CLASS(36xx, 0x36)

  IS_OMAP_SUBCLASS(242x, 0x242)
  IS_OMAP_SUBCLASS(243x, 0x243)
  IS_OMAP_SUBCLASS(343x, 0x343)
 +IS_OMAP_SUBCLASS(363x, 0x363)

  #define cpu_is_omap7xx() 0
  #define cpu_is_omap15xx()0
 @@ -170,6 +172,8 @@ IS_OMAP_SUBCLASS(343x, 0x343)
  #define cpu_is_omap243x()0
  #define cpu_is_omap34xx()0
  #define cpu_is_omap343x()0
 +#define cpu_is_omap36xx()0
 +#define cpu_is_omap363x()0
  #define cpu_is_omap44xx()0
  #define cpu_is_omap443x()0

 @@ -245,6 +249,14 @@ IS_OMAP_SUBCLASS(343x, 0x343)
  #  undef  cpu_is_omap343x
  #  define cpu_is_omap343x()  1
  # endif
 +# if defined(CONFIG_ARCH_OMAP36XX)
 +#  undef  cpu_is_omap36xx
 +#  define cpu_is_omap36xx()  1
 +# endif
 +# if defined(CONFIG_ARCH_OMAP3630)
 +#  undef  cpu_is_omap363x
 +#  define cpu_is_omap363x()  1
 +# endif
  #endif

  /*
 @@ -287,6 +299,7 @@ IS_OMAP_TYPE(2422, 0x2422)
  IS_OMAP_TYPE(2423, 0x2423)
  IS_OMAP_TYPE(2430, 0x2430)
  IS_OMAP_TYPE(3430, 0x3430)
 +IS_OMAP_TYPE(3630, 0x3630)

  #define cpu_is_omap310() 0
  #define cpu_is_omap730() 0
 @@ -302,6 +315,7 @@ IS_OMAP_TYPE(3430, 0x3430)
  #define cpu_is_omap2423()0
  #define cpu_is_omap2430()0
  #define cpu_is_omap3430()0
 +#define cpu_is_omap3630()0

  /*
   * Whether we have MULTI_OMAP1 or not, we still need to distinguish
 @@ -354,6 +368,11 @@ IS_OMAP_TYPE(3430, 0x3430)
  # define cpu_is_omap3430()   is_omap3430()
  #endif

 +#if defined(CONFIG_ARCH_OMAP36XX)
 +# undef cpu_is_omap3630
 +# define cpu_is_omap3630()   1
 +#endif
 +
  # if defined(CONFIG_ARCH_OMAP4)
  # undef cpu_is_omap44xx
  # undef cpu_is_omap443x
 @@ -365,7 +384,7 @@ IS_OMAP_TYPE(3430, 0x3430)
  #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \
   cpu_is_omap16xx())
  #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \
 - cpu_is_omap44xx())
 + cpu_is_omap36xx || cpu_is_omap44xx())

  /* Various silicon revisions for omap2 */
  #define OMAP242X_CLASS   0x24200024

[PATCH][RFC] OMAP3630: Create architecture macros and config entries.

2009-09-20 Thread Pais, Allen

This patch creates the architectural macros for OMAP3630. 

Signed-off-by: Allen Pais allen.p...@ti.com

arch/arm/mach-omap2/Kconfig |   13 ++
arch/arm/plat-omap/include/mach/cpu.h   |   30 +-

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 75b1c7e..618b7d5 100755
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -19,11 +19,20 @@ config ARCH_OMAP34XX
bool OMAP34xx Based System
depends on ARCH_OMAP3
 
+config ARCH_OMAP36XX
+   bool OMAP36xx Based System
+   depends on ARCH_OMAP3
+
 config ARCH_OMAP3430
bool OMAP3430 support
depends on ARCH_OMAP3  ARCH_OMAP34XX
select ARCH_OMAP_OTG
 
+config ARCH_OMAP3630
+   bool OMAP3630 support
+   depends on ARCH_OMAP3  ARCH_OMAP34XX  ARCH_OMAP36XX
+   select ARCH_OMAP_OTG
+
 comment OMAP Board Type
depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4
 
@@ -73,6 +82,10 @@ config MACH_OMAP_3430SDP
bool OMAP 3430 SDP board
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
+config MACH_OMAP_3630SDP
+   bool OMAP 3630 SDP board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX  ARCH_OMAP36XX
+
 config MACH_NOKIA_N8X0
bool Nokia N800/N810
depends on ARCH_OMAP2420
diff --git a/arch/arm/plat-omap/include/mach/cpu.h 
b/arch/arm/plat-omap/include/mach/cpu.h
index 7a5f9e8..73c656c 100755
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -157,10 +157,12 @@ IS_OMAP_CLASS(15xx, 0x15)
 IS_OMAP_CLASS(16xx, 0x16)
 IS_OMAP_CLASS(24xx, 0x24)
 IS_OMAP_CLASS(34xx, 0x34)
+IS_OMAP_CLASS(36xx, 0x36)
 
 IS_OMAP_SUBCLASS(242x, 0x242)
 IS_OMAP_SUBCLASS(243x, 0x243)
 IS_OMAP_SUBCLASS(343x, 0x343)
+IS_OMAP_SUBCLASS(363x, 0x363)
 
 #define cpu_is_omap7xx()   0
 #define cpu_is_omap15xx()  0
@@ -170,6 +172,8 @@ IS_OMAP_SUBCLASS(343x, 0x343)
 #define cpu_is_omap243x()  0
 #define cpu_is_omap34xx()  0
 #define cpu_is_omap343x()  0
+#define cpu_is_omap36xx()  0
+#define cpu_is_omap363x()  0
 #define cpu_is_omap44xx()  0
 #define cpu_is_omap443x()  0
 
@@ -245,6 +249,14 @@ IS_OMAP_SUBCLASS(343x, 0x343)
 #  undef  cpu_is_omap343x
 #  define cpu_is_omap343x()1
 # endif
+# if defined(CONFIG_ARCH_OMAP36XX)
+#  undef  cpu_is_omap36xx
+#  define cpu_is_omap36xx()1
+# endif
+# if defined(CONFIG_ARCH_OMAP3630)
+#  undef  cpu_is_omap363x
+#  define cpu_is_omap363x()1
+# endif
 #endif
 
 /*
@@ -287,6 +299,7 @@ IS_OMAP_TYPE(2422, 0x2422)
 IS_OMAP_TYPE(2423, 0x2423)
 IS_OMAP_TYPE(2430, 0x2430)
 IS_OMAP_TYPE(3430, 0x3430)
+IS_OMAP_TYPE(3630, 0x3630)
 
 #define cpu_is_omap310()   0
 #define cpu_is_omap730()   0
@@ -302,6 +315,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()  0
 #define cpu_is_omap2430()  0
 #define cpu_is_omap3430()  0
+#define cpu_is_omap3630()  0
 
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -354,6 +368,11 @@ IS_OMAP_TYPE(3430, 0x3430)
 # define cpu_is_omap3430() is_omap3430()
 #endif
 
+#if defined(CONFIG_ARCH_OMAP36XX)
+# undef cpu_is_omap3630
+# define cpu_is_omap3630() 1
+#endif
+
 # if defined(CONFIG_ARCH_OMAP4)
 # undef cpu_is_omap44xx
 # undef cpu_is_omap443x
@@ -365,7 +384,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_class_is_omap1()   (cpu_is_omap7xx() || cpu_is_omap15xx() || \
cpu_is_omap16xx())
 #define cpu_class_is_omap2()   (cpu_is_omap24xx() || cpu_is_omap34xx() || \
-   cpu_is_omap44xx())
+   cpu_is_omap36xx || cpu_is_omap44xx())
 
 /* Various silicon revisions for omap2 */
 #define OMAP242X_CLASS 0x24200024
@@ -382,6 +401,9 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP3430_REV_ES3_0 0x34303034
 #define OMAP3430_REV_ES3_1 0x34304034
 
+#define OMAP363X_CLASS 0x36300036
+#define OMAP3630_REV_ES1_0 0x36300036
+
 #define OMAP443X_CLASS 0x44300034
 
 /*
@@ -406,6 +428,12 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define CHIP_IS_OMAP3430ES3_0  (1  5)
 #define CHIP_IS_OMAP3430ES3_1  (1  6)
 
+/* OMAP 3630 CHIP is backword compatible to 3430
+ * 3630 ES1 IS compatible with 3430 ES2 */
+
+#define CHIP_IS_OMAP3630   (1  2)
+#define CHIP_IS_OMAP3630ES1(1  4)
+
 #define CHIP_IS_OMAP24XX   (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
 /*
--
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