Re: [PATCHv3 1/1] omap3: Add minimal OMAP3 IGEP module support.

2010-10-05 Thread Tony Lindgren
* Enric Balletbo i Serra  [101002 14:58]:
> The OMAP3 IGEP module is a low-power, high performance production-ready
> system-on-module (SOM) based on TI's OMAP3 family. More about this
> board at www.igep.es.

Adding this to omap-for-linus. Updated it for to use MMC caps instead
of wires and to be selected by default in Kconfig.

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


[PATCHv3 1/1] omap3: Add minimal OMAP3 IGEP module support.

2010-10-02 Thread Enric Balletbo i Serra
The OMAP3 IGEP module is a low-power, high performance production-ready
system-on-module (SOM) based on TI's OMAP3 family. More about this
board at www.igep.es.

Signed-off-by: Enric Balletbo i Serra 
---
 arch/arm/mach-omap2/Kconfig  |5 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0030.c |  401 ++
 arch/arm/plat-omap/include/plat/uncompress.h |1 +
 4 files changed, 409 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-igep0030.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b48bacf..233bfbe 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -220,6 +220,11 @@ config MACH_IGEP0020
default y
select OMAP_PACKAGE_CBB
 
+config MACH_IGEP0030
+   bool "IGEP OMAP3 module"
+   depends on ARCH_OMAP3
+   select OMAP_PACKAGE_CBB
+
 config MACH_SBC3530
bool "OMAP3 SBC STALKER board"
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 88d3a1e..71386d4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -148,6 +148,8 @@ obj-$(CONFIG_MACH_CM_T35)   += board-cm-t35.o \
   hsmmc.o
 obj-$(CONFIG_MACH_IGEP0020)+= board-igep0020.o \
   hsmmc.o
+obj-$(CONFIG_MACH_IGEP0030)+= board-igep0030.o \
+  hsmmc.o
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o \
diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
new file mode 100644
index 000..55c7806
--- /dev/null
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -0,0 +1,401 @@
+/*
+ * Copyright (C) 2010 - ISEE 2007 SL
+ *
+ * Modified from mach-omap2/board-generic.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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "mux.h"
+#include "hsmmc.h"
+#include "sdram-numonyx-m65kam.h"
+
+#define IGEP3_GPIO_LED0_GREEN  54
+#define IGEP3_GPIO_LED0_RED53
+#define IGEP3_GPIO_LED1_RED16
+
+#define IGEP3_GPIO_WIFI_NPD138
+#define IGEP3_GPIO_WIFI_NRESET 139
+#define IGEP3_GPIO_BT_NRESET   137
+
+#define IGEP3_GPIO_USBH_NRESET  115
+
+
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
+   defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+
+#define ONENAND_MAP 0x2000
+
+/*
+ * x2 Flash built-in COMBO POP MEMORY
+ * Since the device is equipped with two DataRAMs, and two-plane NAND
+ * Flash memory array, these two component enables simultaneous program
+ * of 4KiB. Plane1 has only even blocks such as block0, block2, block4
+ * while Plane2 has only odd blocks such as block1, block3, block5.
+ * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
+ */
+
+static struct mtd_partition igep3_onenand_partitions[] = {
+   {
+   .name   = "X-Loader",
+   .offset = 0,
+   .size   = 2 * (64*(2*2048))
+   },
+   {
+   .name   = "U-Boot",
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 6 * (64*(2*2048)),
+   },
+   {
+   .name   = "Environment",
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 2 * (64*(2*2048)),
+   },
+   {
+   .name   = "Kernel",
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 12 * (64*(2*2048)),
+   },
+   {
+   .name   = "File System",
+   .offset = MTDPART_OFS_APPEND,
+   .size   = MTDPART_SIZ_FULL,
+   },
+};
+
+static struct omap_onenand_platform_data igep3_onenand_pdata = {
+   .parts = igep3_onenand_partitions,
+   .nr_parts = ARRAY_SIZE(igep3_onenand_partitions),
+   .onenand_setup = NULL,
+   .dma_channel= -1,   /* disable DMA in OMAP OneNAND driver */
+};
+
+static struct platform_device igep3_onenand_device = {
+   .name   = "omap2-onenand",
+   .id = -1,
+   .dev = {
+   .platform_data = &igep3_onenand_pdata,
+   },
+};
+
+void __init igep3_flash_init(void)
+{
+   u8 cs = 0;
+   u8 onenandcs = GPMC_CS_NUM + 1;
+
+   for (cs = 0; cs < GPMC_CS_NUM; cs++) {
+   u32 ret;
+   ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
+
+