Skip to contentSkip to conversation

arm: omap3: cm-t35: add support for cm-t3730

PATCH Superseded Igor Grinberg 3 participants 15 messages May 5, 2011 – Jun 27, 2011

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

PATCH 1/1 arm: omap3: cm-t35: add support for cm-t3730

cm-t3730 is basically the same board as cm-t35, but has DM3730 SoC assembled and therefore some changes are required.

---
 arch/arm/mach-omap2/Kconfig        |    2 +-
 arch/arm/mach-omap2/board-cm-t35.c |   62 +++++++++++++++++++++++++++---------
 2 files changed, 48 insertions(+), 16 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -1
index b997a35..920b6bc 100644
@@ -266,7 +266,7 @@ config MACH_OMAP_ZOOM3
 	select REGULATOR_FIXED_VOLTAGE
 
 config MACH_CM_T35
-	bool "CompuLab CM-T35 module"
+	bool "CompuLab CM-T35/CM-T3730 modules"
 	depends on ARCH_OMAP3
 	default y
 	select OMAP_PACKAGE_CUS
arch/arm/mach-omap2/board-cm-t35.c +47 -15

99 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 arm: omap3: cm-t35: add support for cm-t3730

Quoted 8 lines · Igor Grinberg

cm-t3730 is basically the same board as cm-t35, but has DM3730 SoC assembled and therefore some changes are required.

---
 arch/arm/mach-omap2/Kconfig        |    2 +-
 arch/arm/mach-omap2/board-cm-t35.c |   62 +++++++++++++++++++++++++++---------
 2 files changed, 48 insertions(+), 16 deletions(-)
Quoted 123 lines
arch/arm/mach-omap2/Kconfig +1 -1
index b997a35..920b6bc 100644
@@ -266,7 +266,7 @@ config MACH_OMAP_ZOOM3
 	select REGULATOR_FIXED_VOLTAGE
 
 config MACH_CM_T35
-	bool "CompuLab CM-T35 module"
+	bool "CompuLab CM-T35/CM-T3730 modules"
 	depends on ARCH_OMAP3
 	default y
 	select OMAP_PACKAGE_CUS
arch/arm/mach-omap2/board-cm-t35.c +47 -15
index 6063be8..c0f6ce0 100644
@@ -524,7 +524,7 @@ static void __init cm_t35_init_early(void)
 }
 
 #ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux board_mux[] __initdata = {
+static struct omap_board_mux cm_t35_common_board_mux[] __initdata = {
 	/* nCS and IRQ for CM-T35 ethernet */
 	OMAP3_MUX(GPMC_NCS5, OMAP_MUX_MODE0),
 	OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
@@ -580,17 +580,12 @@ static struct omap_board_mux board_mux[] __initdata = {
 	OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 
-	/* DSS */
+	/* common DSS */
 	OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
+
 	OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
@@ -603,12 +598,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 	OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 
 	/* display controls */
 	OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -621,6 +610,39 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static void cm_t35_mux_init(void)
+{
+	int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT;
+
+	omap3_mux_init(cm_t35_common_board_mux, OMAP_PACKAGE_CUS);
+
+	if (cpu_is_omap34xx()) {
+		omap_mux_init_signal("gpio_70", mux_mode);
+		omap_mux_init_signal("gpio_71", mux_mode);
+		omap_mux_init_signal("gpio_72", mux_mode);
+		omap_mux_init_signal("gpio_73", mux_mode);
+		omap_mux_init_signal("gpio_74", mux_mode);
+		omap_mux_init_signal("gpio_75", mux_mode);
+	} else if (cpu_is_omap3630()) {
+		mux_mode = OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT;
+		omap_mux_init_signal("sys_boot0", mux_mode);
+		omap_mux_init_signal("sys_boot1", mux_mode);
+		omap_mux_init_signal("sys_boot3", mux_mode);
+		omap_mux_init_signal("sys_boot4", mux_mode);
+		omap_mux_init_signal("sys_boot5", mux_mode);
+		omap_mux_init_signal("sys_boot6", mux_mode);
+	}
+
+	omap_mux_init_signal("dss_data18", mux_mode);
+	omap_mux_init_signal("dss_data19", mux_mode);
+	omap_mux_init_signal("dss_data20", mux_mode);
+	omap_mux_init_signal("dss_data21", mux_mode);
+	omap_mux_init_signal("dss_data22", mux_mode);
+	omap_mux_init_signal("dss_data23", mux_mode);
+}
+#else
+static inline void cm_t35_mux_init(void) {}
 #endif
 
 static struct omap_board_config_kernel cm_t35_config[] __initdata = {
@@ -630,7 +652,7 @@ static void __init cm_t35_init(void)
 {
 	omap_board_config = cm_t35_config;
 	omap_board_config_size = ARRAY_SIZE(cm_t35_config);
-	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
+	cm_t35_mux_init();
 	omap_serial_init();
 	cm_t35_init_i2c();
 	cm_t35_init_nand();
@@ -652,3 +674,13 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
 	.init_machine	= cm_t35_init,
 	.timer		= &omap_timer,
 MACHINE_END
+
+MACHINE_START(CM_T3730, "Compulab CM-T3730")
+	.boot_params	= 0x80000100,
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= cm_t35_init_early,
+	.init_irq	= omap_init_irq,
+	.init_machine	= cm_t35_init,
+	.timer		= &omap_timer,
+MACHINE_END
Signature · 2 lines
Sincerely yours,
Mike.
#2 lore raw

PATCH v2 1/1 arm: omap3: cm-t35: add support for cm-t3730

cm-t3730 is basically the same board as cm-t35, but has DM3730 SoC assembled and therefore some changes are required.

---
v2: Add debug uart entry

 arch/arm/mach-omap2/Kconfig                  |    2 +-
 arch/arm/mach-omap2/board-cm-t35.c           |   62 +++++++++++++++++++------
 arch/arm/plat-omap/include/plat/uncompress.h |    1 +
 3 files changed, 49 insertions(+), 16 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -1
index b997a35..920b6bc 100644
@@ -266,7 +266,7 @@ config MACH_OMAP_ZOOM3
 	select REGULATOR_FIXED_VOLTAGE
 
 config MACH_CM_T35
-	bool "CompuLab CM-T35 module"
+	bool "CompuLab CM-T35/CM-T3730 modules"
 	depends on ARCH_OMAP3
 	default y
 	select OMAP_PACKAGE_CUS
arch/arm/mach-omap2/board-cm-t35.c +47 -15

99 lines not on this page · raw message

arch/arm/plat-omap/include/plat/uncompress.h +1 -0
index 30b891c..1fdabe0 100644
@@ -149,6 +149,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		/* omap3 based boards using UART3 */
 		DEBUG_LL_OMAP3(3, cm_t35);
 		DEBUG_LL_OMAP3(3, cm_t3517);
+		DEBUG_LL_OMAP3(3, cm_t3730);
 		DEBUG_LL_OMAP3(3, craneboard);
 		DEBUG_LL_OMAP3(3, devkit8000);
 		DEBUG_LL_OMAP3(3, igep0020);
Signature · 1 line
1.7.3.4
maintainer
#3 lore raw

PATCH v2 1/1 arm: omap3: cm-t35: add support for cm-t3730

Quoted 26 lines · Igor Grinberg

cm-t3730 is basically the same board as cm-t35, but has DM3730 SoC assembled and therefore some changes are required.

arch/arm/mach-omap2/board-cm-t35.c +23 -0
+static void cm_t35_mux_init(void)
+{
+	int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT;
+
+	omap3_mux_init(cm_t35_common_board_mux, OMAP_PACKAGE_CUS);
+
+	if (cpu_is_omap34xx()) {
+		omap_mux_init_signal("gpio_70", mux_mode);
+		omap_mux_init_signal("gpio_71", mux_mode);
+		omap_mux_init_signal("gpio_72", mux_mode);
+		omap_mux_init_signal("gpio_73", mux_mode);
+		omap_mux_init_signal("gpio_74", mux_mode);
+		omap_mux_init_signal("gpio_75", mux_mode);
+	} else if (cpu_is_omap3630()) {
+		mux_mode = OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT;
+		omap_mux_init_signal("sys_boot0", mux_mode);
+		omap_mux_init_signal("sys_boot1", mux_mode);
+		omap_mux_init_signal("sys_boot3", mux_mode);
+		omap_mux_init_signal("sys_boot4", mux_mode);
+		omap_mux_init_signal("sys_boot5", mux_mode);
+		omap_mux_init_signal("sys_boot6", mux_mode);
+	}
+

arch/arm/mach-omap2/board-cm-t35.c static struct omap_board_mux board_mux[] __initdata = { · line 646

Quoted 10 lines
arch/arm/mach-omap2/board-cm-t35.c +9 -0
+	omap_mux_init_signal("dss_data18", mux_mode);
+	omap_mux_init_signal("dss_data19", mux_mode);
+	omap_mux_init_signal("dss_data20", mux_mode);
+	omap_mux_init_signal("dss_data21", mux_mode);
+	omap_mux_init_signal("dss_data22", mux_mode);
+	omap_mux_init_signal("dss_data23", mux_mode);
+}
+#else
+static inline void cm_t35_mux_init(void) {}
 #endif

Should this cpu_is_omap if else done once and then set some data based on it? That would be better if you need to use it for detection for other things later on as it will avoid multiple cpu_is/machine_is if else lines of code.

Regards,

Tony

#4 lore raw

PATCH v2 1/1 arm: omap3: cm-t35: add support for cm-t3730

Hi Tony,

Quoted 32 lines · Tony Lindgren
Quoted 31 lines · Igor Grinberg

cm-t3730 is basically the same board as cm-t35, but has DM3730 SoC assembled and therefore some changes are required.

arch/arm/mach-omap2/board-cm-t35.c +29 -0
+static void cm_t35_mux_init(void)
+{
+	int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT;
+
+	omap3_mux_init(cm_t35_common_board_mux, OMAP_PACKAGE_CUS);
+
+	if (cpu_is_omap34xx()) {
+		omap_mux_init_signal("gpio_70", mux_mode);
+		omap_mux_init_signal("gpio_71", mux_mode);
+		omap_mux_init_signal("gpio_72", mux_mode);
+		omap_mux_init_signal("gpio_73", mux_mode);
+		omap_mux_init_signal("gpio_74", mux_mode);
+		omap_mux_init_signal("gpio_75", mux_mode);
+	} else if (cpu_is_omap3630()) {
+		mux_mode = OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT;
+		omap_mux_init_signal("sys_boot0", mux_mode);
+		omap_mux_init_signal("sys_boot1", mux_mode);
+		omap_mux_init_signal("sys_boot3", mux_mode);
+		omap_mux_init_signal("sys_boot4", mux_mode);
+		omap_mux_init_signal("sys_boot5", mux_mode);
+		omap_mux_init_signal("sys_boot6", mux_mode);
+	}
+
+	omap_mux_init_signal("dss_data18", mux_mode);
+	omap_mux_init_signal("dss_data19", mux_mode);
+	omap_mux_init_signal("dss_data20", mux_mode);
+	omap_mux_init_signal("dss_data21", mux_mode);
+	omap_mux_init_signal("dss_data22", mux_mode);
+	omap_mux_init_signal("dss_data23", mux_mode);
Quoted 8 lines

arch/arm/mach-omap2/board-cm-t35.c static struct omap_board_mux board_mux[] __initdata = { · line 646

Quoted 4 lines
arch/arm/mach-omap2/board-cm-t35.c +3 -0
+}
+#else
+static inline void cm_t35_mux_init(void) {}
 #endif

Should this cpu_is_omap if else done once and then set some data based on it? That would be better if you need to use it for detection for other things later on as it will avoid multiple cpu_is/machine_is if else lines of code.

I'm not sure I understand what are you trying to propose here...
If you look once again on the code, there is currently only one if (cpu_is_..) {} else {} statement currently present.
(I can remove the "if (cpu_is_omap3630())" - it indeed has no value)

Indeed, there will be some other differences...
Each time I submit a patch, I try to be as optimal as I can, but again I'm open for suggestions...
(though I think it is optimal, e.g. 33 lines for a new running board...)

Signature · 2 lines
Regards,
Igor.
maintainer
#5 lore raw

PATCH v2 1/1 arm: omap3: cm-t35: add support for cm-t3730

Quoted 10 lines · Igor Grinberg

I'm not sure I understand what are you trying to propose here...
If you look once again on the code, there is currently only one if (cpu_is_..) {} else {} statement currently present.
(I can remove the "if (cpu_is_omap3630())" - it indeed has no value)

Indeed, there will be some other differences...
Each time I submit a patch, I try to be as optimal as I can, but again I'm open for suggestions...
(though I think it is optimal, e.g. 33 lines for a new running board...)

What I meant is that maybe you should do the detection first in some get_revision function and populate the gpio pins there. Sort of like this recent beagle patch:

https://patchwork.kernel.org/patch/859662/

That way adding support for other differences will be easier.

Regards,

Tony

#6 lore raw

PATCH v2 1/1 arm: omap3: cm-t35: add support for cm-t3730

Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Igor Grinberg

I'm not sure I understand what are you trying to propose here...
If you look once again on the code, there is currently only one if (cpu_is_..) {} else {} statement currently present.
(I can remove the "if (cpu_is_omap3630())" - it indeed has no value)

Indeed, there will be some other differences...
Each time I submit a patch, I try to be as optimal as I can, but again I'm open for suggestions...
(though I think it is optimal, e.g. 33 lines for a new running board...)

Quoted 5 lines

What I meant is that maybe you should do the detection first in some get_revision function and populate the gpio pins there. Sort of like this recent beagle patch:

https://patchwork.kernel.org/patch/859662/

Yes I've seen this patch (actually, I was one of the people who reviewed it).

Quoted 1 line

That way adding support for other differences will be easier.

OK, now I understand what you mean.
I think currently this is not optimal for cm-t35/3730 and will just complicate things and introduce more l-o-c.

The situation on beagle board is much more complicated then on cm-t3x. Beagle has quite a large number of revisions,
while cm-t35 has only one and cm-t3730 has only one. Moreover, there is no difference in gpios - same numbers are used for the same functionality.

In particular the only two differences (that s/w cares about) between the boards are:
1) mux of the DSS pins
2) no NAND on cm-t3730 (still not introduced by the patch in subj)

Nevertheless, I will try to come up with something, so we can see and decide what is a better option.

I will base it on your devel-board branch
(correct me if you want it some other way).

Signature · 2 lines
Regards,
Igor.
maintainer
#7 lore raw

PATCH v2 1/1 arm: omap3: cm-t35: add support for cm-t3730

Quoted 31 lines · Igor Grinberg
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Igor Grinberg

I'm not sure I understand what are you trying to propose here...
If you look once again on the code, there is currently only one if (cpu_is_..) {} else {} statement currently present.
(I can remove the "if (cpu_is_omap3630())" - it indeed has no value)

Indeed, there will be some other differences...
Each time I submit a patch, I try to be as optimal as I can, but again I'm open for suggestions...
(though I think it is optimal, e.g. 33 lines for a new running board...)

Quoted 5 lines

What I meant is that maybe you should do the detection first in some get_revision function and populate the gpio pins there. Sort of like this recent beagle patch:

https://patchwork.kernel.org/patch/859662/

Yes I've seen this patch (actually, I was one of the people who reviewed it).

Quoted 1 line

That way adding support for other differences will be easier.

OK, now I understand what you mean.
I think currently this is not optimal for cm-t35/3730 and will just complicate things and introduce more l-o-c.

The situation on beagle board is much more complicated then on cm-t3x. Beagle has quite a large number of revisions,
while cm-t35 has only one and cm-t3730 has only one. Moreover, there is no difference in gpios - same numbers are used for the same functionality.

Quoted 6 lines

In particular the only two differences (that s/w cares about) between the boards are:
1) mux of the DSS pins
2) no NAND on cm-t3730 (still not introduced by the patch in subj)

Nevertheless, I will try to come up with something, so we can see and decide what is a better option.

OK if the differences are minimal, then it's up to you to which way you want to patch it: )

Quoted 2 lines

I will base it on your devel-board branch
(correct me if you want it some other way).

That's good thanks.

Regards,

Tony

#8 lore raw

PATCH 1/3 arm: omap3: cm-t35: minor comments fixes

Update authors and copyright, remove Free S/W Foundation postal address, fix offsets of NAND partitions in comments.

---
 arch/arm/mach-omap2/board-cm-t35.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
arch/arm/mach-omap2/board-cm-t35.c +5 -9
index 77456de..6c5881b 100644
@@ -1,8 +1,9 @@
 /*
  * board-cm-t35.c (CompuLab CM-T35 module)
  *
- * Copyright (C) 2009 CompuLab, Ltd.
- * Author: Mike Rapoport <[email protected]>
+ * Copyright (C) 2009-2011 CompuLab, Ltd.
+ * Authors: Mike Rapoport <[email protected]>
+ *	    Igor Grinberg <[email protected]>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -13,11 +14,6 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
  */
 
 #include <linux/kernel.h>
@@ -149,12 +145,12 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
 	},
 	{
 		.name           = "linux",
-		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x280000 */
+		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x2A0000 */
 		.size           = 32 * NAND_BLOCK_SIZE,
 	},
 	{
 		.name           = "rootfs",
-		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x680000 */
+		.offset         = MTDPART_OFS_APPEND,	/* Offset = 0x6A0000 */
 		.size           = MTDPART_SIZ_FULL,
 	},
 };
Signature · 1 line
1.7.3.4
#9 lore raw

PATCH 2/3 arm: omap3: cm-t35: fix slow path warning

In reply to Tony Lindgren

Fix warning issued by gpio_set_value() call with TPS gpios.

---
 arch/arm/mach-omap2/board-cm-t35.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-cm-t35.c +2 -2
index 6c5881b..256b81c 100644
@@ -466,9 +466,9 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
 	if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) {
 		gpio_export(wlan_rst, 0);
 		udelay(10);
-		gpio_set_value(wlan_rst, 0);
+		gpio_set_value_cansleep(wlan_rst, 0);
 		udelay(10);
-		gpio_set_value(wlan_rst, 1);
+		gpio_set_value_cansleep(wlan_rst, 1);
 	} else {
 		pr_err("CM-T35: could not obtain gpio for WiFi reset\n");
 	}
Signature · 1 line
1.7.3.4
#10 lore raw

PATCH v3 3/3 arm: omap3: cm-t35: add support for cm-t3730

In reply to Tony Lindgren

cm-t3730 is basically the same board as cm-t35,
but has AM/DM3730 SoC assembled and therefore some changes are required.

---
v3: fix MACH_* selection
remove completely the use of cpu_is_*
v2: Add debug uart entry

 arch/arm/mach-omap2/Kconfig                  |    6 ++-
 arch/arm/mach-omap2/board-cm-t35.c           |   77 ++++++++++++++++++++-----
 arch/arm/plat-omap/include/plat/uncompress.h |    1 +
 3 files changed, 67 insertions(+), 17 deletions(-)
arch/arm/mach-omap2/Kconfig +5 -1
index 19d5891..4ae6257 100644
@@ -266,9 +266,10 @@ config MACH_OMAP_ZOOM3
 	select REGULATOR_FIXED_VOLTAGE
 
 config MACH_CM_T35
-	bool "CompuLab CM-T35 module"
+	bool "CompuLab CM-T35/CM-T3730 modules"
 	depends on ARCH_OMAP3
 	default y
+	select MACH_CM_T3730
 	select OMAP_PACKAGE_CUS
 
 config MACH_CM_T3517
@@ -277,6 +278,9 @@ config MACH_CM_T3517
 	default y
 	select OMAP_PACKAGE_CBB
 
+config MACH_CM_T3730
+       bool
+
 config MACH_IGEP0020
 	bool "IGEP v2 board"
 	depends on ARCH_OMAP3
arch/arm/mach-omap2/board-cm-t35.c +61 -16

123 lines not on this page · raw message

arch/arm/plat-omap/include/plat/uncompress.h +1 -0
index ac4b60d..a067484 100644
@@ -148,6 +148,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		/* omap3 based boards using UART3 */
 		DEBUG_LL_OMAP3(3, cm_t35);
 		DEBUG_LL_OMAP3(3, cm_t3517);
+		DEBUG_LL_OMAP3(3, cm_t3730);
 		DEBUG_LL_OMAP3(3, craneboard);
 		DEBUG_LL_OMAP3(3, devkit8000);
 		DEBUG_LL_OMAP3(3, igep0020);
Signature · 1 line
1.7.3.4
#11 lore raw

PATCH v3 3/3 arm: omap3: cm-t35: add support for cm-t3730

Tony,

Does this one look better?

Quoted 187 lines · Igor Grinberg

cm-t3730 is basically the same board as cm-t35,
but has AM/DM3730 SoC assembled and therefore some changes are required.

---
v3: fix MACH_* selection
remove completely the use of cpu_is_*
v2: Add debug uart entry

 arch/arm/mach-omap2/Kconfig                  |    6 ++-
 arch/arm/mach-omap2/board-cm-t35.c           |   77 ++++++++++++++++++++-----
 arch/arm/plat-omap/include/plat/uncompress.h |    1 +
 3 files changed, 67 insertions(+), 17 deletions(-)
arch/arm/mach-omap2/Kconfig +5 -1
index 19d5891..4ae6257 100644
@@ -266,9 +266,10 @@ config MACH_OMAP_ZOOM3
 	select REGULATOR_FIXED_VOLTAGE
 
 config MACH_CM_T35
-	bool "CompuLab CM-T35 module"
+	bool "CompuLab CM-T35/CM-T3730 modules"
 	depends on ARCH_OMAP3
 	default y
+	select MACH_CM_T3730
 	select OMAP_PACKAGE_CUS
 
 config MACH_CM_T3517
@@ -277,6 +278,9 @@ config MACH_CM_T3517
 	default y
 	select OMAP_PACKAGE_CBB
 
+config MACH_CM_T3730
+       bool
+
 config MACH_IGEP0020
 	bool "IGEP v2 board"
 	depends on ARCH_OMAP3
arch/arm/mach-omap2/board-cm-t35.c +61 -16
index 256b81c..ea31281 100644
@@ -1,5 +1,5 @@
 /*
- * board-cm-t35.c (CompuLab CM-T35 module)
+ * CompuLab CM-T35/CM-T3730 modules support
  *
  * Copyright (C) 2009-2011 CompuLab, Ltd.
  * Authors: Mike Rapoport <[email protected]>
@@ -574,17 +574,11 @@ static struct omap_board_mux board_mux[] __initdata = {
 	OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 
-	/* DSS */
+	/* common DSS */
 	OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
@@ -597,12 +591,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 	OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 
 	/* display controls */
 	OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -615,19 +603,53 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static void __init cm_t3x_common_dss_mux_init(int mux_mode)
+{
+	omap_mux_init_signal("dss_data18", mux_mode);
+	omap_mux_init_signal("dss_data19", mux_mode);
+	omap_mux_init_signal("dss_data20", mux_mode);
+	omap_mux_init_signal("dss_data21", mux_mode);
+	omap_mux_init_signal("dss_data22", mux_mode);
+	omap_mux_init_signal("dss_data23", mux_mode);
+}
+
+static void __init cm_t35_init_mux(void)
+{
+	omap_mux_init_signal("gpio_70", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_71", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_72", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_73", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_74", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_75", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	cm_t3x_common_dss_mux_init(OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+}
+
+static void __init cm_t3730_init_mux(void)
+{
+	omap_mux_init_signal("sys_boot0", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot1", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot3", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot4", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot5", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot6", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	cm_t3x_common_dss_mux_init(OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+}
+#else
+static inline void cm_t35_init_mux(void) {}
+static inline void cm_t3730_init_mux(void) {}
 #endif
 
 static struct omap_board_config_kernel cm_t35_config[] __initdata = {
 };
 
-static void __init cm_t35_init(void)
+static void __init cm_t3x_common_init(void)
 {
 	omap_board_config = cm_t35_config;
 	omap_board_config_size = ARRAY_SIZE(cm_t35_config);
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
 	omap_serial_init();
 	cm_t35_init_i2c();
-	cm_t35_init_nand();
 	omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
 	cm_t35_init_ethernet();
 	cm_t35_init_led();
@@ -637,6 +659,19 @@ static void __init cm_t35_init(void)
 	usbhs_init(&usbhs_bdata);
 }
 
+static void __init cm_t35_init(void)
+{
+	cm_t3x_common_init();
+	cm_t35_init_mux();
+	cm_t35_init_nand();
+}
+
+static void __init cm_t3730_init(void)
+{
+	cm_t3x_common_init();
+	cm_t3730_init_mux();
+}
+
 MACHINE_START(CM_T35, "Compulab CM-T35")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
@@ -646,3 +681,13 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
 	.init_machine	= cm_t35_init,
 	.timer		= &omap_timer,
 MACHINE_END
+
+MACHINE_START(CM_T3730, "Compulab CM-T3730")
+	.boot_params    = 0x80000100,
+	.reserve        = omap_reserve,
+	.map_io         = omap3_map_io,
+	.init_early     = cm_t35_init_early,
+	.init_irq       = omap_init_irq,
+	.init_machine   = cm_t3730_init,
+	.timer          = &omap_timer,
+MACHINE_END
arch/arm/plat-omap/include/plat/uncompress.h +1 -0
index ac4b60d..a067484 100644
@@ -148,6 +148,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		/* omap3 based boards using UART3 */
 		DEBUG_LL_OMAP3(3, cm_t35);
 		DEBUG_LL_OMAP3(3, cm_t3517);
+		DEBUG_LL_OMAP3(3, cm_t3730);
 		DEBUG_LL_OMAP3(3, craneboard);
 		DEBUG_LL_OMAP3(3, devkit8000);
 		DEBUG_LL_OMAP3(3, igep0020);
Signature · 2 lines
Regards,
Igor.
#12 lore raw

PATCH v3 3/3 arm: omap3: cm-t35: add support for cm-t3730

Tony,

I'd really like us to decide, because I want my (currently) out of tree port to be based on one of the patches (v2 or v3).

Can you please, look into this?

Thanks

Quoted 195 lines · Igor Grinberg

Tony,

Does this one look better?

Quoted 187 lines · Igor Grinberg

cm-t3730 is basically the same board as cm-t35,
but has AM/DM3730 SoC assembled and therefore some changes are required.

---
v3: fix MACH_* selection
remove completely the use of cpu_is_*
v2: Add debug uart entry

 arch/arm/mach-omap2/Kconfig                  |    6 ++-
 arch/arm/mach-omap2/board-cm-t35.c           |   77 ++++++++++++++++++++-----
 arch/arm/plat-omap/include/plat/uncompress.h |    1 +
 3 files changed, 67 insertions(+), 17 deletions(-)
arch/arm/mach-omap2/Kconfig +5 -1
index 19d5891..4ae6257 100644
@@ -266,9 +266,10 @@ config MACH_OMAP_ZOOM3
 	select REGULATOR_FIXED_VOLTAGE
 
 config MACH_CM_T35
-	bool "CompuLab CM-T35 module"
+	bool "CompuLab CM-T35/CM-T3730 modules"
 	depends on ARCH_OMAP3
 	default y
+	select MACH_CM_T3730
 	select OMAP_PACKAGE_CUS
 
 config MACH_CM_T3517
@@ -277,6 +278,9 @@ config MACH_CM_T3517
 	default y
 	select OMAP_PACKAGE_CBB
 
+config MACH_CM_T3730
+       bool
+
 config MACH_IGEP0020
 	bool "IGEP v2 board"
 	depends on ARCH_OMAP3
arch/arm/mach-omap2/board-cm-t35.c +61 -16
index 256b81c..ea31281 100644
@@ -1,5 +1,5 @@
 /*
- * board-cm-t35.c (CompuLab CM-T35 module)
+ * CompuLab CM-T35/CM-T3730 modules support
  *
  * Copyright (C) 2009-2011 CompuLab, Ltd.
  * Authors: Mike Rapoport <[email protected]>
@@ -574,17 +574,11 @@ static struct omap_board_mux board_mux[] __initdata = {
 	OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
 
-	/* DSS */
+	/* common DSS */
 	OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
@@ -597,12 +591,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 	OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 	OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
-	OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
 
 	/* display controls */
 	OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -615,19 +603,53 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static void __init cm_t3x_common_dss_mux_init(int mux_mode)
+{
+	omap_mux_init_signal("dss_data18", mux_mode);
+	omap_mux_init_signal("dss_data19", mux_mode);
+	omap_mux_init_signal("dss_data20", mux_mode);
+	omap_mux_init_signal("dss_data21", mux_mode);
+	omap_mux_init_signal("dss_data22", mux_mode);
+	omap_mux_init_signal("dss_data23", mux_mode);
+}
+
+static void __init cm_t35_init_mux(void)
+{
+	omap_mux_init_signal("gpio_70", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_71", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_72", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_73", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_74", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("gpio_75", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+	cm_t3x_common_dss_mux_init(OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
+}
+
+static void __init cm_t3730_init_mux(void)
+{
+	omap_mux_init_signal("sys_boot0", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot1", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot3", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot4", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot5", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	omap_mux_init_signal("sys_boot6", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+	cm_t3x_common_dss_mux_init(OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
+}
+#else
+static inline void cm_t35_init_mux(void) {}
+static inline void cm_t3730_init_mux(void) {}
 #endif
 
 static struct omap_board_config_kernel cm_t35_config[] __initdata = {
 };
 
-static void __init cm_t35_init(void)
+static void __init cm_t3x_common_init(void)
 {
 	omap_board_config = cm_t35_config;
 	omap_board_config_size = ARRAY_SIZE(cm_t35_config);
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
 	omap_serial_init();
 	cm_t35_init_i2c();
-	cm_t35_init_nand();
 	omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
 	cm_t35_init_ethernet();
 	cm_t35_init_led();
@@ -637,6 +659,19 @@ static void __init cm_t35_init(void)
 	usbhs_init(&usbhs_bdata);
 }
 
+static void __init cm_t35_init(void)
+{
+	cm_t3x_common_init();
+	cm_t35_init_mux();
+	cm_t35_init_nand();
+}
+
+static void __init cm_t3730_init(void)
+{
+	cm_t3x_common_init();
+	cm_t3730_init_mux();
+}
+
 MACHINE_START(CM_T35, "Compulab CM-T35")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
@@ -646,3 +681,13 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
 	.init_machine	= cm_t35_init,
 	.timer		= &omap_timer,
 MACHINE_END
+
+MACHINE_START(CM_T3730, "Compulab CM-T3730")
+	.boot_params    = 0x80000100,
+	.reserve        = omap_reserve,
+	.map_io         = omap3_map_io,
+	.init_early     = cm_t35_init_early,
+	.init_irq       = omap_init_irq,
+	.init_machine   = cm_t3730_init,
+	.timer          = &omap_timer,
+MACHINE_END
arch/arm/plat-omap/include/plat/uncompress.h +1 -0
index ac4b60d..a067484 100644
@@ -148,6 +148,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		/* omap3 based boards using UART3 */
 		DEBUG_LL_OMAP3(3, cm_t35);
 		DEBUG_LL_OMAP3(3, cm_t3517);
+		DEBUG_LL_OMAP3(3, cm_t3730);
 		DEBUG_LL_OMAP3(3, craneboard);
 		DEBUG_LL_OMAP3(3, devkit8000);
 		DEBUG_LL_OMAP3(3, igep0020);
Signature · 2 lines
Regards,
Igor.
maintainer
#13 lore raw

PATCH v3 3/3 arm: omap3: cm-t35: add support for cm-t3730

Quoted 6 lines · Igor Grinberg

Tony,

I'd really like us to decide, because I want my (currently) out of tree port to be based on one of the patches (v2 or v3).

Can you please, look into this?

Sorry for the delay, yes that looks good to me. Will add to devel-board branch.

Regards,

Tony

#14 lore raw

PATCH v3 3/3 arm: omap3: cm-t35: add support for cm-t3730

Quoted 8 lines · Tony Lindgren
Quoted 6 lines · Igor Grinberg

Tony,

I'd really like us to decide, because I want my (currently) out of tree port to be based on one of the patches (v2 or v3).

Can you please, look into this?

Sorry for the delay, yes that looks good to me. Will add to devel-board branch.

Thanks,

please also, don't forget the 1/3 and 2/3 trivial patches.

Signature · 2 lines
Regards,
Igor.