[U-Boot] [PATCH] tb100 - add Abilis TB100 board

Alexey Brodkin Alexey.Brodkin at synopsys.com
Wed May 21 12:39:32 CEST 2014


Development board for headless gateway platform from Abilis Systems.
Initial commit with working UART and DW GMAC.

For now with generic Ethernet PHY due to problems in Realtek PHY driver.

Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>

Cc: Vineet Gupta <vgupta at synopsys.com>
Cc: Christian Ruppert <christian.ruppert at abilis.com>
Cc: Pierrick Hascoet <pierrick.hascoet at abilis.com>
---
 board/abilis/tb100/Makefile |   7 +++
 board/abilis/tb100/tb100.c  |  23 +++++++++
 boards.cfg                  |   1 +
 include/configs/tb100.h     | 123 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 154 insertions(+)
 create mode 100644 board/abilis/tb100/Makefile
 create mode 100644 board/abilis/tb100/tb100.c
 create mode 100644 include/configs/tb100.h

diff --git a/board/abilis/tb100/Makefile b/board/abilis/tb100/Makefile
new file mode 100644
index 0000000..4f273b3
--- /dev/null
+++ b/board/abilis/tb100/Makefile
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2014 Pierrick Hascoet, Abilis Systems
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	+= tb100.o
diff --git a/board/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c
new file mode 100644
index 0000000..ff3632f
--- /dev/null
+++ b/board/abilis/tb100/tb100.c
@@ -0,0 +1,23 @@
+/*
+ * (C) Copyright 2014 Pierrick Hascoet, Abilis Systems
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <netdev.h>
+#include <asm/io.h>
+
+void reset_cpu(ulong addr)
+{
+#define CRM_SWRESET	0xff101044
+	writel(0x1, (void *)CRM_SWRESET);
+}
+
+int board_eth_init(bd_t *bis)
+{
+	if (designware_initialize(ETH0_BASE_ADDRESS, 0) >= 0)
+		return 1;
+
+	return 0;
+}
diff --git a/boards.cfg b/boards.cfg
index 0497a91..64f3dca 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -47,6 +47,7 @@ Active  aarch64     armv8          -           armltd          vexpress64
 Active  arc         arc700         -           synopsys        -                   axs101                                -                                                                                                                                 Alexey Brodkin <abrodkin at synopsys.com>
 Active  arc         arc700         -           synopsys        <none>              arcangel4                             -                                                                                                                                 Alexey Brodkin <abrodkin at synopsys.com>
 Active  arc         arc700         -           synopsys        <none>              arcangel4-be                          -                                                                                                                                 Alexey Brodkin <abrodkin at synopsys.com>
+Active  arc         arc700         -           abilis          -                   tb100                                 -                                                                                                                                 Alexey Brodkin <abrodkin at synopsys.com>
 Active  arm         arm1136        -           armltd          integrator          integratorcp_cm1136                   integratorcp:CM1136                                                                                                               Linus Walleij <linus.walleij at linaro.org>
 Active  arm         arm1136        mx31        -               -                   imx31_phycore                         -                                                                                                                                 -
 Active  arm         arm1136        mx31        davedenx        -                   qong                                  -                                                                                                                                 Wolfgang Denk <wd at denx.de>
diff --git a/include/configs/tb100.h b/include/configs/tb100.h
new file mode 100644
index 0000000..8a861a8
--- /dev/null
+++ b/include/configs/tb100.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2011-2014 Pierrick Hascoet, Abilis Systems
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef _CONFIG_TB100_H_
+#define _CONFIG_TB100_H_
+
+#include <linux/sizes.h>
+
+/*
+ *  CPU configuration
+ */
+#define CONFIG_ARC700
+#define CONFIG_ARC_MMU_VER		3
+#define CONFIG_SYS_CACHELINE_SIZE	32
+#define CONFIG_SYS_CLK_FREQ		500000000
+#define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_CLK_FREQ
+
+/*
+ * Board configuration
+ */
+#define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_ARCH_EARLY_INIT_R
+
+/*
+ * Memory configuration
+ */
+#define CONFIG_SYS_TEXT_BASE		0x84000000
+#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
+
+#define CONFIG_SYS_DDR_SDRAM_BASE	0x80000000
+#define CONFIG_SYS_SDRAM_BASE		CONFIG_SYS_DDR_SDRAM_BASE
+#define CONFIG_SYS_SDRAM_SIZE		SZ_128M
+
+#define CONFIG_SYS_INIT_SP_ADDR		\
+	(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
+#define CONFIG_SYS_MALLOC_LEN		SZ_128K
+#define CONFIG_SYS_BOOTM_LEN		SZ_32M
+#define CONFIG_SYS_LOAD_ADDR		0x82000000
+
+#define CONFIG_SYS_NO_FLASH
+
+/*
+ * UART configuration
+ */
+#define CONFIG_CONS_INDEX		1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE	-4
+#define CONFIG_SYS_NS16550_CLK		166666666
+#define CONFIG_SYS_NS16550_COM1		0xFF100000
+#define CONFIG_SYS_NS16550_MEM32
+
+#define CONFIG_BAUDRATE			115200
+
+/*
+ * Ethernet PHY configuration
+ */
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_GIGE
+
+/*
+ * Even though the board houses Realtek RTL8211E PHY
+ * corresponding PHY driver (drivers/net/phy/realtek.c) behaves unexpectedly.
+ * In particular "parse_status" reports link is down.
+ *
+ * Until Realtek PHY driver is fixed fall back to generic PHY driver
+ * which implements all required functionality and behaves much more stable.
+ *
+ * #define CONFIG_PHY_REALTEK
+ *
+ */
+
+/*
+ * Ethernet configuration
+ */
+#define CONFIG_DESIGNWARE_ETH
+#define ETH0_BASE_ADDRESS		0xFE100000
+#define ETH1_BASE_ADDRESS		0xFE110000
+
+/*
+ * Command line configuration
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_PING
+
+#define CONFIG_OF_LIBFDT
+
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_MAXARGS		16
+
+/*
+ * Environment settings
+ */
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE			SZ_2K
+#define CONFIG_ENV_OFFSET		0
+
+/*
+ * Environment configuration
+ */
+#define CONFIG_BOOTDELAY		3
+#define CONFIG_BOOTFILE			"uImage"
+#define CONFIG_BOOTARGS			"console=ttyS0,115200n8"
+#define CONFIG_LOADADDR			CONFIG_SYS_LOAD_ADDR
+
+/*
+ * Console configuration
+ */
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_SYS_PROMPT		"[tb100]:~# "
+#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
+						sizeof(CONFIG_SYS_PROMPT) + 16)
+
+#endif /* _CONFIG_TB100_H_ */
-- 
1.9.0



More information about the U-Boot mailing list