public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] am335x: add initial AM335x IDK board support
@ 2012-11-02 13:35 Matthias Fuchs
  2012-11-02 17:06 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Fuchs @ 2012-11-02 13:35 UTC (permalink / raw)
  To: u-boot

This patch extends the am335x_evm board for the AM335x IDK.

The IDK board uses MII for the ethernet phy (same as
Beaglebone board) and MMC0 for storage (but without
card detect line).

The IDK uses UART3 for console. So u-boot must be build
with CONFIG_SERIAL4 and CONFIG_CONS_INDEX=4 or for
the am335x_evm_uart3 board configuration as introduced
by Andrew Bradfords recent patch series "am33xx: Enable
UART {1,2,3,4,5}...". When using the IDK with console on UART0,
those patches are not required. In this case the board 
slightly needs to be modified.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
---
Changes in v2:
- rebased because board.c had been moved

 board/ti/am335x/board.c |    7 ++++++-
 board/ti/am335x/mux.c   |   20 ++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 5d279ec..b1d9959 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -68,6 +68,11 @@ static inline int board_is_evm_sk(void)
 	return !strncmp("A335X_SK", header.name, HDR_NAME_LEN);
 }
 
+static inline int board_is_idk(void)
+{
+	return !strncmp(header.config, "SKU#02", 6);
+}
+
 /*
  * Read header information from EEPROM into global structure.
  */
@@ -361,7 +366,7 @@ int board_eth_init(bd_t *bis)
 			return -1;
 	}
 
-	if (board_is_bone() || board_is_bone_lt()) {
+	if (board_is_bone() || board_is_bone_lt() || board_is_idk()) {
 		writel(MII_MODE_ENABLE, &cdev->miisel);
 		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
 				PHY_INTERFACE_MODE_MII;
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index 2992979..cc0db7a 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -39,6 +39,17 @@ static struct module_pin_mux mmc0_pin_mux[] = {
 	{-1},
 };
 
+static struct module_pin_mux mmc0_no_cd_pin_mux[] = {
+	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
+	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
+	{OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT1 */
+	{OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT0 */
+	{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CLK */
+	{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CMD */
+	{OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)},		/* MMC0_WP */
+	{-1},
+};
+
 static struct module_pin_mux mmc0_pin_mux_sk_evm[] = {
 	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
 	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
@@ -196,6 +207,15 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header)
 			configure_module_pin_mux(mmc1_pin_mux);
 			configure_module_pin_mux(spi0_pin_mux);
 		}
+	} else if (!strncmp(header->config, "SKU#02", 6)) {
+		/*
+		 * Industrial Motor Control (IDK)
+		 * note: IDK console is on UART3 by default.
+		 *       So u-boot mus be build with CONFIG_SERIAL4 and
+		 *       CONFIG_CONS_INDEX=4
+		 */
+		configure_module_pin_mux(mii1_pin_mux);
+		configure_module_pin_mux(mmc0_no_cd_pin_mux);
 	} else if (!strncmp(header->name, "A335X_SK", HDR_NAME_LEN)) {
 		/* Starter Kit EVM */
 		configure_module_pin_mux(i2c1_pin_mux);
-- 
1.6.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH v2] am335x: add initial AM335x IDK board support
  2012-11-02 13:35 [U-Boot] [PATCH v2] am335x: add initial AM335x IDK board support Matthias Fuchs
@ 2012-11-02 17:06 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2012-11-02 17:06 UTC (permalink / raw)
  To: u-boot

On Fri, Nov 02, 2012 at 02:35:59PM +0100, Matthias Fuchs wrote:

> This patch extends the am335x_evm board for the AM335x IDK.
> 
> The IDK board uses MII for the ethernet phy (same as
> Beaglebone board) and MMC0 for storage (but without
> card detect line).
> 
> The IDK uses UART3 for console. So u-boot must be build
> with CONFIG_SERIAL4 and CONFIG_CONS_INDEX=4 or for
> the am335x_evm_uart3 board configuration as introduced
> by Andrew Bradfords recent patch series "am33xx: Enable
> UART {1,2,3,4,5}...". When using the IDK with console on UART0,
> those patches are not required. In this case the board 
> slightly needs to be modified.
> 
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
> ---
> Changes in v2:
> - rebased because board.c had been moved

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

-- 
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/20121102/e9f1c8aa/attachment.pgp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-02 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 13:35 [U-Boot] [PATCH v2] am335x: add initial AM335x IDK board support Matthias Fuchs
2012-11-02 17:06 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox