Skip to contentSkip to conversation

arm, omap3: Add support for TechNexion modules

PATCH New Stefan Roese 2 participants 10 messages Dec 4, 2013 – Dec 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/5 arm, omap3: Add support for TechNexion modules

From: Tapani Utriainen <[email protected]>

Add support for TechNexion TAO3530 SoM

This patch has been posted quite a long time ago. I ported it to the latest mainline U-Boot version. With some additional cleanup and enhancements.

CC Sandeep Paulraj <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

---
v2:
- Removed ULPI defines as they are not needed (incorrect) here
- Moved MACH_TYPE from mach-types.h to board config header
- Use puts instead of printf when possible
- Removed some unused defines
- Switched to alterate memtest

 board/technexion/tao3530/Makefile  |   5 +
 board/technexion/tao3530/tao3530.c | 170 +++++++++++++++++
 board/technexion/tao3530/tao3530.h | 364 +++++++++++++++++++++++++++++++++++++
 boards.cfg                         |   1 +
 include/configs/tao3530.h          | 301 ++++++++++++++++++++++++++++++
 5 files changed, 841 insertions(+)
 create mode 100644 board/technexion/tao3530/Makefile
 create mode 100644 board/technexion/tao3530/tao3530.c
 create mode 100644 board/technexion/tao3530/tao3530.h
 create mode 100644 include/configs/tao3530.h
board/technexion/tao3530/Makefile new file +5 -0
new file mode 100644
index 0000000..2aff383
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	:= tao3530.o
board/technexion/tao3530/tao3530.c new file +170 -0

170 lines not on this page · raw message

board/technexion/tao3530/tao3530.h new file +364 -0

364 lines not on this page · raw message

boards.cfg +1 -0
index 114cc86..a00d499 100644
@@ -325,6 +325,7 @@ Active  arm         armv7          omap3       logicpd         zoom1
 Active  arm         armv7          omap3       logicpd         zoom2               omap3_zoom2                          -                                                                                                                                 Tom Rix <[email protected]>
 Active  arm         armv7          omap3       matrix_vision   mvblx               omap3_mvblx                          -                                                                                                                                 Michael Jones <[email protected]>
 Active  arm         armv7          omap3       nokia           rx51                nokia_rx51                           -                                                                                                                                 Pali Roh?r <[email protected]>
+Active  arm         armv7          omap3       technexion      tao3530             tao3530                              -                                                                                                                                 Tapani Utriainen <[email protected]>
 Active  arm         armv7          omap3       technexion      twister             twister                              -                                                                                                                                 Stefano Babic <[email protected]>
 Active  arm         armv7          omap3       teejet          mt_ventoux          mt_ventoux                           -                                                                                                                                 Stefano Babic <[email protected]>
 Active  arm         armv7          omap3       ti              am3517crane         am3517_crane                         -                                                                                                                                 Nagendra T S  <[email protected]>
include/configs/tao3530.h new file +301 -0

301 lines not on this page · raw message

Signature · 1 line
1.8.4.4
#1 lore raw

PATCH v2 2/5 arm: omap3: Add SPL support to tao3530

Add SPL support for the Technexion TAO3530 SOM to replace x-loader. Tested with the Thunder baseboard. Currently this is only tested with the TAO3530 SOM revision (Ax/Bx).

Tested by booting via MMC and NAND.

Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

---
v2:
- Added CONFIG_NAND_OMAP_ECCSCHEME

 board/technexion/tao3530/tao3530.c | 27 +++++++++++++++-
 include/configs/tao3530.h          | 65 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+), 1 deletion(-)
board/technexion/tao3530/tao3530.c +26 -1
index 0668c25..9268d38 100644
@@ -67,6 +67,31 @@ out:
 	return ret;
 }
 
+#ifdef CONFIG_SPL_BUILD
+/*
+ * Routine: get_board_mem_timings
+ * Description: If we use SPL then there is no x-loader nor config header
+ * so we have to setup the DDR timings ourself on both banks.
+ */
+void get_board_mem_timings(struct board_sdrc_timings *timings)
+{
+	if (tao3530_revision() < 3) {
+		/* 256MB / Bank */
+		timings->mcfg = MCFG(256 << 20, 14);	/* RAS-width 14 */
+		timings->ctrla = HYNIX_V_ACTIMA_165;
+		timings->ctrlb = HYNIX_V_ACTIMB_165;
+	} else {
+		/* 128MB / Bank */
+		timings->mcfg = MCFG(128 << 20, 13);	/* RAS-width 13 */
+		timings->ctrla = MICRON_V_ACTIMA_165;
+		timings->ctrlb = MICRON_V_ACTIMB_165;
+	}
+
+	timings->mr = MICRON_V_MR_165;
+	timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
+}
+#endif
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -134,7 +159,7 @@ void set_muxconf_regs(void)
 	MUX_TAO3530();
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
 	omap_mmc_init(0, 0, 0, -1, -1);
include/configs/tao3530.h +65 -0

75 lines not on this page · raw message

Signature · 1 line
1.8.4.4
#2 lore raw

PATCH v2 2/5 arm: omap3: Add SPL support to tao3530

Quoted 10 lines · Stefan Roese

Add SPL support for the Technexion TAO3530 SOM to replace x-loader. Tested with the Thunder baseboard. Currently this is only tested with the TAO3530 SOM revision (Ax/Bx).

Tested by booting via MMC and NAND.

Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131213/fd6e3015/attachment.pgp>
#3 lore raw

PATCH v2 3/5 arm: omap3: Remove bootargs mem_size handling

In reply to Stefan Roese

The memory size is autodetected and is passed to the Linux kernel either via ATAGs or device-tree (dtb). So there is no need to pass it via the bootargs.

Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

---
v2:
- No change

 board/technexion/tao3530/tao3530.c | 12 ------------
 include/configs/tao3530.h          |  3 ---
 2 files changed, 15 deletions(-)
board/technexion/tao3530/tao3530.c +0 -12
index 9268d38..814537b 100644
@@ -133,18 +133,6 @@ int misc_init_r(void)
 
 	dieid_num_r();
 
-	/* Set memory size environment variable, depending on revision */
-	switch (tao3530_revision()) {
-	case 0x2:  /* Rev C1 -- 256MB */
-		 setenv("mem_size", "mem=256M");
-		 break;
-	case 0x3: /* Rev A2/B2 -- 128MB */
-		 setenv("mem_size", "mem=128M");
-		 break;
-	default:
-		 printf("Warning: Unknown TAO3530 rev, setting mem=128M\n");
-	}
-
 	return 0;
 }
 
include/configs/tao3530.h +0 -3
index 81aa9cc..abbcc60 100644
@@ -146,21 +146,18 @@
 	"video_mode=omapdss.def_disp=lcd vram=6M omapfb.vram=0:2M,1:2M,2:2M\0" \
 	"lcd_mode=omapfb.mode=lcd:800x480 at 60 \0" \
 	"extra_options= \0" \
-	"mem_size=mem=128M \0" \
 	"mmcdev=0\0" \
 	"mmcroot=/dev/mmcblk0p2 rw\0" \
 	"mmcrootfstype=ext3 rootwait\0" \
 	"nandroot=ubi0:rootfs ubi.mtd=4\0" \
 	"nandrootfstype=ubifs\0" \
 	"mmcargs=setenv bootargs console=${console} " \
-		"${mem_size} " \
 		"mpurate=${mpurate} " \
 		"${video_mode} " \
 		"root=${mmcroot} " \
 		"rootfstype=${mmcrootfstype} " \
 		"${extra_options}\0" \
 	"nandargs=setenv bootargs console=${console} " \
-		"${mem_size} " \
 		"mpurate=${mpurate} " \
 		"${video_mode} " \
 		"${network_setting} " \
Signature · 1 line
1.8.4.4
#4 lore raw

PATCH v2 3/5 arm: omap3: Remove bootargs mem_size handling

Quoted 8 lines · Stefan Roese

The memory size is autodetected and is passed to the Linux kernel either via ATAGs or device-tree (dtb). So there is no need to pass it via the bootargs.

Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131213/daa5e8d8/attachment.pgp>
#5 lore raw

PATCH v2 4/5 arm: omap3: Add board revision output to tao3530

In reply to Stefan Roese
Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

---
v2:
- Use puts instead of printf when possible

 board/technexion/tao3530/tao3530.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
board/technexion/tao3530/tao3530.c +17 -0
index 814537b..5041eaf 100644
@@ -131,6 +131,23 @@ int misc_init_r(void)
 	writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
 	       GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
 
+	switch (tao3530_revision()) {
+	case 0:
+		puts("TAO-3530 REV Reserve 1\n");
+		break;
+	case 1:
+		puts("TAO-3530 REV Reserve 2\n");
+		break;
+	case 2:
+		puts("TAO-3530 REV Cx\n");
+		break;
+	case 3:
+		puts("TAO-3530 REV Ax/Bx\n");
+		break;
+	default:
+		puts("Unknown board revision\n");
+	}
+
 	dieid_num_r();
 
 	return 0;
Signature · 1 line
1.8.4.4
#6 lore raw

PATCH v2 4/5 arm: omap3: Add board revision output to tao3530

Quoted 11 lines · Stefan Roese
Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

---
v2:
- Use puts instead of printf when possible

 board/technexion/tao3530/tao3530.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131213/f483a651/attachment.pgp>
#7 lore raw

PATCH v2 5/5 arm: omap3: Add HEAD acoustics (HA) board variant omap3_ha to tao3530

In reply to Stefan Roese

The Head acoustics (HA) baseboard used the Technexion TAO3530 SOM and has only some minor differences to the Technexion Thunder baseboard. This patch adds support for this HA baseboard / TAO3530 as the "omap3_ha" build target.

Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

---
v2:
- Remove "\n" in sysinfo string

 board/technexion/tao3530/tao3530.c | 15 +++++++++++++++
 board/technexion/tao3530/tao3530.h |  7 +++++++
 boards.cfg                         |  1 +
 3 files changed, 23 insertions(+)
board/technexion/tao3530/tao3530.c +15 -0
index 5041eaf..44a8240 100644
@@ -75,6 +75,18 @@ out:
  */
 void get_board_mem_timings(struct board_sdrc_timings *timings)
 {
+#if defined(CONFIG_SYS_BOARD_OMAP3_HA)
+	/*
+	 * Switch baseboard LED to red upon power-on
+	 */
+	MUX_OMAP3_HA();
+
+	/* Request a gpio before using it */
+	gpio_request(111, "");
+	/* Sets the gpio as output and its value to 1, switch LED to red */
+	gpio_direction_output(111, 1);
+#endif
+
 	if (tao3530_revision() < 3) {
 		/* 256MB / Bank */
 		timings->mcfg = MCFG(256 << 20, 14);	/* RAS-width 14 */
@@ -162,6 +174,9 @@ int misc_init_r(void)
 void set_muxconf_regs(void)
 {
 	MUX_TAO3530();
+#if defined(CONFIG_SYS_BOARD_OMAP3_HA)
+	MUX_OMAP3_HA();
+#endif
 }
 
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
board/technexion/tao3530/tao3530.h +7 -0
index 1ea767d..daff109 100644
@@ -9,7 +9,11 @@
 
 const omap3_sysinfo sysinfo = {
 	DDR_STACKED,
+#if defined(CONFIG_SYS_BOARD_OMAP3_HA)
+	"HEAD acoustics OMAP3-HA",
+#else
 	"OMAP3 TAO-3530 board",
+#endif
 	"NAND",
 };
 
@@ -361,4 +365,7 @@ const omap3_sysinfo sysinfo = {
 	MUX_VAL(CP(SDRC_CKE0),	(IDIS | PTU | EN  | M0)) \
 	MUX_VAL(CP(SDRC_CKE1),	(IDIS | PTU | EN  | M0))
 
+#define MUX_OMAP3_HA() \
+	MUX_VAL(CP(CAM_XCLKB),	(IDIS | PTD | DIS | M4)) /* GPIO_111 */
+
 #endif
boards.cfg +1 -0
index a00d499..1ba2a53 100644
@@ -325,6 +325,7 @@ Active  arm         armv7          omap3       logicpd         zoom1
 Active  arm         armv7          omap3       logicpd         zoom2               omap3_zoom2                          -                                                                                                                                 Tom Rix <[email protected]>
 Active  arm         armv7          omap3       matrix_vision   mvblx               omap3_mvblx                          -                                                                                                                                 Michael Jones <[email protected]>
 Active  arm         armv7          omap3       nokia           rx51                nokia_rx51                           -                                                                                                                                 Pali Roh?r <[email protected]>
+Active  arm         armv7          omap3       technexion      tao3530             omap3_ha                             tao3530:SYS_BOARD_OMAP3_HA                                                                                                        Stefan Roese <[email protected]>
 Active  arm         armv7          omap3       technexion      tao3530             tao3530                              -                                                                                                                                 Tapani Utriainen <[email protected]>
 Active  arm         armv7          omap3       technexion      twister             twister                              -                                                                                                                                 Stefano Babic <[email protected]>
 Active  arm         armv7          omap3       teejet          mt_ventoux          mt_ventoux                           -                                                                                                                                 Stefano Babic <[email protected]>
Signature · 1 line
1.8.4.4
#8 lore raw

PATCH v2 5/5 arm: omap3: Add HEAD acoustics (HA) board variant omap3_ha to tao3530

Quoted 9 lines · Stefan Roese

The Head acoustics (HA) baseboard used the Technexion TAO3530 SOM and has only some minor differences to the Technexion Thunder baseboard. This patch adds support for this HA baseboard / TAO3530 as the "omap3_ha" build target.

Cc Tapani Utriainen <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131213/a46c0b7c/attachment.pgp>
#9 lore raw

PATCH v2 1/5 arm, omap3: Add support for TechNexion modules

In reply to Stefan Roese
Quoted 8 lines · Stefan Roese

From: Tapani Utriainen <[email protected]>

Add support for TechNexion TAO3530 SoM

This patch has been posted quite a long time ago. I ported it to the latest mainline U-Boot version. With some additional cleanup and enhancements.

Quoted 5 lines
CC Sandeep Paulraj <[email protected]>
Cc Thorsten Eisbein <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131213/fed0fde8/attachment.pgp>