Skip to contentSkip to conversation

initial support for LogicPD's OMAP3530LV SOM and OMAP35x Torpedo dev boards

PATCH In review Jacob Tanenbaum 2 participants 7 messages Aug 25, 2010 – Sep 2, 2010

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 initial support for LogicPD's OMAP3530LV SOM and OMAP35x Torpedo dev boards

Adding LogicPD OMAP3 board support

Adding support for LogicPD's OMAP 3530 LV SOM and OMAP 35x Torpedo board.

Tested against: 81e09f50c93edff607259cbe374a3006c9c5fa74

---
 arch/arm/configs/omap3_defconfig       |    2 +
 arch/arm/mach-omap2/Kconfig            |   16 +++
 arch/arm/mach-omap2/Makefile           |    4 +
 arch/arm/mach-omap2/board-omap3logic.c |  174 ++++++++++++++++++++++++++++++++
 4 files changed, 196 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-omap3logic.c
arch/arm/configs/omap3_defconfig +2 -0
index 5db9a6b..f510dfd 100644
@@ -37,6 +37,8 @@ CONFIG_MACH_OMAP_2430SDP=y
 CONFIG_MACH_OMAP3_BEAGLE=y
 CONFIG_MACH_DEVKIT8000=y
 CONFIG_MACH_OMAP_LDP=y
+CONFIG_MACH_OMAP3530_LV_SOM=y
+CONFIG_MACH_OMAP3_TORPEDO=y
 CONFIG_MACH_OVERO=y
 CONFIG_MACH_OMAP3EVM=y
 CONFIG_MACH_OMAP3517EVM=y
arch/arm/mach-omap2/Kconfig +16 -0
index b48bacf..caa9147 100644
@@ -135,6 +135,22 @@ config MACH_OMAP_LDP
 	default y
 	select OMAP_PACKAGE_CBB
 
+config MACH_OMAP3530_LV_SOM
+	bool "OMAP3 Logic 3530 LV SOM board"
+	depends on ARCH_OMAP3
+	help 
+	 Support for the LogicPD OMAP3530 SOM Development kit for 
+	 full description please see the products webpage at 
+	 http://www.logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap35x-development-kit
+
+config MACH_OMAP3_TORPEDO
+	bool "OMAP3 Logic 35x Torpedo board"
+	depends on ARCH_OMAP3
+	help 
+	 Support for the LogicPD OMAP35x Torpedo Development kit 
+	 for full description please see the products webpage at
+	 http://www.logicpd.com/products/development-kits/zoom-omap35x-torpedo-development-kit
+
 config MACH_OVERO
 	bool "Gumstix Overo board"
 	depends on ARCH_OMAP3
arch/arm/mach-omap2/Makefile +4 -0
index 63b2d88..bc77d32 100644
@@ -114,6 +114,10 @@ obj-$(CONFIG_MACH_DEVKIT8000)     	+= board-devkit8000.o \
 obj-$(CONFIG_MACH_OMAP_LDP)		+= board-ldp.o \
 					   board-flash.o \
 					   hsmmc.o
+obj-$(CONFIG_MACH_OMAP3530_LV_SOM)      += board-omap3logic.o \
+					   hsmmc.o
+obj-$(CONFIG_MACH_OMAP3_TORPEDO)        += board-omap3logic.o \
+					   hsmmc.o
 obj-$(CONFIG_MACH_OVERO)		+= board-overo.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP3EVM)		+= board-omap3evm.o \
arch/arm/mach-omap2/board-omap3logic.c new file +174 -0

174 lines not on this page · raw message

Signature · 1 line
1.7.2.1
#1 lore raw

PATCH 2/4 Low-level init of hsmmc controller for LogicPD's OMAP3530LV SOM and OMAP 35x Torpedo dev boards

From: jake <jake@Glados.(none)>

ARM: OMAP3LOGIC: Adding SDMMC support
Add low-level initialization for hsmmc controller for LogicPD's OMAP 3530 LV SOM and OMAP 35x Torpedo board.

Tested against: 81e09f50c93edff607259cbe374a3006c9c5fa74

---
 arch/arm/mach-omap2/board-omap3logic.c |   40 +++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-omap3logic.c +39 -1
index 30af7da..bd83a83 100644
@@ -33,6 +33,7 @@
 #include <asm/mach/map.h>
 
 #include "mux.h"
+#include "hsmmc.h"
 
 #include <plat/mux.h>
 #include <plat/board.h>
@@ -110,6 +111,7 @@ static struct twl4030_platform_data omap3logic_twldata = {
 
 	/* platform_data for children goes here */
 	.gpio		= &omap3logic_gpio_data,
+	.vmmc1		= &omap3logic_vmmc1,
 };
 
 static struct i2c_board_info __initdata omap3logic_i2c_boardinfo[] = {
@@ -128,6 +130,42 @@ static int __init omap3logic_i2c_init(void)
 	return 0;
 }
 
+static struct omap2_hsmmc_info __initdata board_mmc_info[] = {
+	{
+		.name		= "external",
+		.mmc		= 1,
+		.wires		= 4,
+		.gpio_cd	= -EINVAL,
+		.gpio_wp	= -EINVAL,
+	},
+	{}      /* Terminator */
+};
+
+static void __init board_mmc_init(void)
+{
+	/* OMAP3530 LV SOM board */
+	if (machine_is_omap3530_lv_som()) {
+		board_mmc_info[0].gpio_cd = OMAP3530_LV_SOM_MMC_GPIO_CD;
+		board_mmc_info[0].gpio_wp = OMAP3530_LV_SOM_MMC_GPIO_WP;
+		omap_mux_init_signal("gpio_110", OMAP_PIN_OUTPUT);
+		omap_mux_init_signal("gpio_126", OMAP_PIN_OUTPUT);
+
+
+	/* OMAP3 Torpedo board */
+	} else if (machine_is_omap3_torpedo()) {
+		board_mmc_info[0].gpio_cd = OMAP3_TORPEDO_MMC_GPIO_CD;
+		omap_mux_init_signal("gpio_127", OMAP_PIN_OUTPUT);
+	/* unsupported board */
+	} else {
+		printk(KERN_ERR "%s(): unknown machine type\n", __func__);
+	return;
+	}
+
+	omap2_hsmmc_init(board_mmc_info);
+	/* link regulators to MMC adapters */
+	omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev;
+}
+
 static void __init omap3logic_init_irq(void)
 {
 	init_sdram(mt46h32m32lf6_sdrc_params);
@@ -141,7 +179,7 @@ static void __init omap3logic_init(void)
 {
 	omap3logic_i2c_init();
 	omap_serial_init();
-
+	board_mmc_init();
 	/* Ensure SDRC pins are mux'd for self-refresh */
 	omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
 	omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
Signature · 1 line
1.7.2.1
#2 lore raw

PATCH 3/4 add generic smsc911x support for LogicPD's OMAP 3530LV SOM and Torpedo 35x dev kits

ARM: OMAP3: Add generic smsc911x support when connected to GPMC

Introduce of a generic way to setup smsc911x based Ethernet controller connected to GPMC similar to gpmc-smc91x but without timing setup.

Tested against: 81e09f50c93edff607259cbe374a3006c9c5fa74

---
 arch/arm/mach-omap2/Makefile                    |    4 +
 arch/arm/mach-omap2/gpmc-smsc911x.c             |  113 +++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/gpmc-smsc911x.h |   35 +++++++
 3 files changed, 152 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/gpmc-smsc911x.c
 create mode 100644 arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
arch/arm/mach-omap2/Makefile +4 -0
index bc77d32..668bfc7 100644
@@ -177,3 +177,7 @@ obj-y					+= $(nand-m) $(nand-y)
 
 smc91x-$(CONFIG_SMC91X)			:= gpmc-smc91x.o
 obj-y					+= $(smc91x-m) $(smc91x-y)
+
+smsc911x-$(CONFIG_SMSC911X)		:= gpmc-smsc911x.o
+obj-y					+= $(smsc911x-m) $(smsc911x-y)
+
arch/arm/mach-omap2/gpmc-smsc911x.c new file +113 -0

113 lines not on this page · raw message

arch/arm/plat-omap/include/plat/gpmc-smsc911x.h new file +35 -0
new file mode 100644
index 0000000..e5f3a48
@@ -0,0 +1,35 @@
+/*
+ * arch/arm/plat-omap/include/mach/gpmc-smsc911x.h
+ *
+ * Copyright (C) 2009 Li-Pro.Net
+ * Stephan Linz <[email protected]>
+ *
+ * Modified from arch/arm/plat-omap/include/mach/gpmc-smc91x.h
+ *
+ * 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.
+ */
+
+#ifndef __ASM_ARCH_OMAP_GPMC_SMSC911X_H__
+
+struct omap_smsc911x_platform_data {
+	int	cs;
+	int	gpio_irq;
+	int	gpio_reset;
+	u32	flags;
+};
+
+#if defined(CONFIG_SMSC911X) || \
+	defined(CONFIG_SMSC911X_MODULE)
+
+extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d);
+
+#else
+
+static inline void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d)
+{
+}
+
+#endif
+#endif
Signature · 1 line
1.7.2.1
#3 lore raw

PATCH 4/4 Enabling Ethernet support for LogicPD's OMAP 3530LV SOM and OMAP 35x Torpedo dev board

From: Jacob Tanenbaum <[email protected]>

ARM: OMAP3LOGIC: Ethernet driver and NFS added in defconfig

Enable SMSC911x Ethernet driver and allow root file system on NFS for LogicPD's OMAP 3530 LV SOM and OMAP 35x Torpedo board.

Tested against: 81e09f50c93edff607259cbe374a3006c9c5fa74

---
 arch/arm/mach-omap2/board-omap3logic.c |   83 ++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3logic.c +83 -0
index bd83a83..42d6ffe 100644
@@ -38,6 +38,7 @@
 #include <plat/mux.h>
 #include <plat/board.h>
 #include <plat/common.h>
+#include <plat/gpmc-smsc911x.h>
 #include <plat/gpmc.h>
 #include <plat/timer-gp.h>
 #include <plat/sdrc.h>
@@ -166,6 +167,77 @@ static void __init board_mmc_init(void)
 	omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev;
 }
 
+static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = {
+	.cs             = OMAP3LOGIC_SMSC911X_CS,
+	.gpio_irq       = -EINVAL,
+	.gpio_reset     = -EINVAL,
+	.flags          = IORESOURCE_IRQ_LOWLEVEL,
+};
+
+/* TODO/FIXME (comment by Peter Barada, LogicPD):
+ * Fix the PBIAS voltage for Torpedo MMC1 pins that
+ * are used for other needs (IRQs, etc).
+static inline void __init omap3_torpedo_fix_pbias_voltage(void) */
+static void omap3torpedo_fix_pbias_voltage(void)
+{
+	u16 control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
+	static int pbias_fixed = -1;
+	u32 reg;
+
+	if (!pbias_fixed) {
+		/* Set the bias for the pin */
+		reg = omap_ctrl_readl(control_pbias_offset);
+
+		reg &= ~OMAP343X_PBIASLITEPWRDNZ1;
+		omap_ctrl_writel(reg, control_pbias_offset);
+
+		/* 100ms delay required for PBIAS configuration */
+		msleep(100);
+
+		reg |= OMAP343X_PBIASLITEVMODE1;
+		reg |= OMAP343X_PBIASLITEPWRDNZ1;
+		omap_ctrl_writel(reg | 0x300, control_pbias_offset);
+
+		pbias_fixed = 1;
+	}
+}
+
+static inline void __init board_smsc911x_init(void)
+{
+	/* OMAP3530 LV SOM board */
+	if (machine_is_omap3530_lv_som()) {
+		board_smsc911x_data.gpio_irq =
+					OMAP3530_LV_SOM_SMSC911X_GPIO_IRQ;
+		/* board_smsc911x_data.gpio_reset
+			driven by SYS_nRESWARM, no GPIO */
+		/* omap_cfg_reg(AE1_34XX_GPIO152_UP); */
+		omap_mux_init_signal("gpio_152", OMAP_PIN_INPUT);
+
+/* omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);*/
+
+	/* OMAP3 Torpedo board */
+	} else if (machine_is_omap3_torpedo()) {
+		board_smsc911x_data.gpio_irq = OMAP3_TORPEDO_SMSC911X_GPIO_IRQ;
+		/* board_smsc911x_data.gpio_reset driven
+			by SYS_nRESWARM, no GPIO */
+		/*omap_cfg_reg(AE1_34XX_GPIO152_UP);*/
+		omap_mux_init_signal("gpio_129", OMAP_PIN_INPUT);
+		/* TODO/FIXME (comment by Peter Barada, LogicPD):
+		* On Torpedo, LAN9221 IRQ is an MMC1_DATA7 pin
+		* and IRQ1760 IRQ is MMC1_DATA4 pin - need
+		* to update PBIAS to get voltage to the device
+		* so the IRQs works correctly rather than float
+		* and cause an IRQ storm...
+								*/
+		omap3torpedo_fix_pbias_voltage();
+	/* unsupported board */
+	} else {
+		printk(KERN_ERR "%s(): unknown machine type\n", __func__);
+		return;
+	}
+	gpmc_smsc911x_init(&board_smsc911x_data);
+}
+
 static void __init omap3logic_init_irq(void)
 {
 	init_sdram(mt46h32m32lf6_sdrc_params);
@@ -175,11 +247,22 @@ static void __init omap3logic_init_irq(void)
 	omap_gpio_init();
 }
 
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+	{ .reg_offset = OMAP_MUX_TERMINATOR },
+};
+#else
+#define board_mux       NULL
+#endif
+
 static void __init omap3logic_init(void)
 {
+	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 	omap3logic_i2c_init();
 	omap_serial_init();
 	board_mmc_init();
+	board_smsc911x_init();
+
 	/* Ensure SDRC pins are mux'd for self-refresh */
 	omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
 	omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
Signature · 1 line
1.7.2.1
#4 lore raw

Re: [PATCH 4/4] Enabling Ethernet support for LogicPD's OMAP 3530LV SOM and OMAP 35x Torpedo dev board

Quoted 4 lines · Jacob Tanenbaum
arch/arm/mach-omap2/board-omap3logic.c +4 -0
+static inline void __init board_smsc911x_init(void)
+{
+	/* OMAP3530 LV SOM board */
+	if (machine_is_omap3530_lv_som()) {

arch/arm/mach-omap2/board-omap3logic.c static void __init board_mmc_init(void) · line 218

Quoted 10 lines
arch/arm/mach-omap2/board-omap3logic.c +10 -0
+		board_smsc911x_data.gpio_irq =
+					OMAP3530_LV_SOM_SMSC911X_GPIO_IRQ;
+		/* board_smsc911x_data.gpio_reset
+			driven by SYS_nRESWARM, no GPIO */
+		/* omap_cfg_reg(AE1_34XX_GPIO152_UP); */
+		omap_mux_init_signal("gpio_152", OMAP_PIN_INPUT);
+
+/* omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);*/
+
+	/* OMAP3 Torpedo board */

missing tab? Maybe it would make sense to put this after the line below?

Quoted 5 lines
arch/arm/mach-omap2/board-omap3logic.c +5 -0
+	} else if (machine_is_omap3_torpedo()) {
+		board_smsc911x_data.gpio_irq = OMAP3_TORPEDO_SMSC911X_GPIO_IRQ;
+		/* board_smsc911x_data.gpio_reset driven
+			by SYS_nRESWARM, no GPIO */
+		/*omap_cfg_reg(AE1_34XX_GPIO152_UP);*/

arch/arm/mach-omap2/board-omap3logic.c static void __init board_mmc_init(void) · line 233

Quoted 10 lines
arch/arm/mach-omap2/board-omap3logic.c +10 -0
+		omap_mux_init_signal("gpio_129", OMAP_PIN_INPUT);
+		/* TODO/FIXME (comment by Peter Barada, LogicPD):
+		* On Torpedo, LAN9221 IRQ is an MMC1_DATA7 pin
+		* and IRQ1760 IRQ is MMC1_DATA4 pin - need
+		* to update PBIAS to get voltage to the device
+		* so the IRQs works correctly rather than float
+		* and cause an IRQ storm...
+								*/
+		omap3torpedo_fix_pbias_voltage();
+	/* unsupported board */

missing tab? or maybe it should be moved after the line below.

Quoted 6 lines
arch/arm/mach-omap2/board-omap3logic.c +6 -0
+	} else {
+		printk(KERN_ERR "%s(): unknown machine type\n", __func__);
+		return;
+	}
+	gpmc_smsc911x_init(&board_smsc911x_data);
+}
#5 lore raw

Re: [PATCH 2/4] Low-level init of hsmmc controller for LogicPD's OMAP3530LV SOM and OMAP 35x Torpedo dev boards

In reply to Jacob Tanenbaum
Quoted 1 line · Jacob Tanenbaum

From: jake <jake@Glados.(none)>

Not a valid address... please fix.

Quoted 7 lines

ARM: OMAP3LOGIC: Adding SDMMC support
Add low-level initialization for hsmmc controller for LogicPD's OMAP 3530 LV SOM and OMAP 35x Torpedo board.

Tested against: 81e09f50c93edff607259cbe374a3006c9c5fa74

I'm confused why these comments are indented.

arch/arm/mach-omap2/board-omap3logic.c static int __init omap3logic_i2c_init(void) · line 154

Quoted 11 lines
arch/arm/mach-omap2/board-omap3logic.c +11 -0
+static void __init board_mmc_init(void)
+{
+	/* OMAP3530 LV SOM board */
+	if (machine_is_omap3530_lv_som()) {
+		board_mmc_info[0].gpio_cd = OMAP3530_LV_SOM_MMC_GPIO_CD;
+		board_mmc_info[0].gpio_wp = OMAP3530_LV_SOM_MMC_GPIO_WP;
+		omap_mux_init_signal("gpio_110", OMAP_PIN_OUTPUT);
+		omap_mux_init_signal("gpio_126", OMAP_PIN_OUTPUT);
+
+
+	/* OMAP3 Torpedo board */

missing tab?

arch/arm/mach-omap2/board-omap3logic.c static int __init omap3logic_i2c_init(void) · line 158

Quoted 4 lines
arch/arm/mach-omap2/board-omap3logic.c +4 -0
+	} else if (machine_is_omap3_torpedo()) {
+		board_mmc_info[0].gpio_cd = OMAP3_TORPEDO_MMC_GPIO_CD;
+		omap_mux_init_signal("gpio_127", OMAP_PIN_OUTPUT);
+	/* unsupported board */

missing tab?

arch/arm/mach-omap2/board-omap3logic.c static int __init omap3logic_i2c_init(void) · line 161

Quoted 3 lines
arch/arm/mach-omap2/board-omap3logic.c +3 -0
+	} else {
+		printk(KERN_ERR "%s(): unknown machine type\n", __func__);
+	return;

missing tab?

#6 lore raw
In reply to Jacob Tanenbaum

arch/arm/mach-omap2/board-omap3logic.c line 61

Quoted 6 lines · Jacob Tanenbaum
arch/arm/mach-omap2/board-omap3logic.c new file +6 -0
+/* Micron MT46H32M32LF-6 */
+/* FIXME: borrowed from sdram-micron-mt46h32m32lf-6.h because on LogicPD
+ * boards we can't use the default values -- why? I suspect the reason
+ * lies in the boot strap code. We correct this part if we have ported
+ * U-Boot and X-Load. */
+void init_sdram(struct omap_sdrc_params *sdrc_cs0){

static? { on the following line?

arch/arm/mach-omap2/board-omap3logic.c line 71

Quoted 10 lines
arch/arm/mach-omap2/board-omap3logic.c new file +10 -0
+	sdrc_cs0[0].actim_ctrla = 0xaa9db4c6;
+	sdrc_cs0[0].actim_ctrlb = 0x00011517;
+	sdrc_cs0[0].rfr_ctrl    = 0x0004e201;
+	sdrc_cs0[1].rate        = 165941176;
+	sdrc_cs0[1].actim_ctrla = 0xaa9db4c6;
+	sdrc_cs0[1].actim_ctrlb = 0x00011217;
+	sdrc_cs0[1].rfr_ctrl    = 0x0004dc01;
+	sdrc_cs0[2].actim_ctrla = 0x8a99b481;
+	sdrc_cs0[2].actim_ctrlb = 0x00011312;
+	sdrc_cs0[2].rfr_ctrl    = 0x0003de017;

36-bit hex numbers?

arch/arm/mach-omap2/board-omap3logic.c line 78

Quoted 7 lines
arch/arm/mach-omap2/board-omap3logic.c new file +7 -0
+	sdrc_cs0[3].actim_ctrla = 0x8a99b481;
+	sdrc_cs0[3].actim_ctrlb = 0x00011312;
+	sdrc_cs0[3].rfr_ctrl    = 0x0003de01;
+}
+
+static struct regulator_consumer_supply omap3logic_vmmc1_supply = {
+		.supply			= "vmmc",

Any reason for the additional tabs?