Patchwork [U-Boot,5/5] Armada100: Add Board Support for Marvell Aspenite-DB

login
register
mail settings
Submitter Prafulla Wadaskar
Date Oct. 27, 2010, 1:53 p.m.
Message ID <1288187604-3371-6-git-send-email-prafulla@marvell.com>
Download mbox | patch
Permalink /patch/71945/
State Superseded
Headers show

Comments

Prafulla Wadaskar - Oct. 27, 2010, 1:53 p.m.
From: Prafulla WADASKAR <prafulla@marvell.com>

Aspenite is a Development Board for ASPEN/ARMADA168 (88AP168) Processor upto 1.2GHz with
        * Parallel 1Gb x8 DDR2-1066 MHz
        * 16 Mb x16 NOR, 4Gb x8 SLC NAND, footprint for SPI NOR
        * Footprints for eMMC/eSD NAND & MMC x8 card
        * 4-in-1 card reader (xD, MMC/SD/MS Pro), CF True IDE socket
        * SEAF memory board, subset of PISMO2
    With Peripherals:
        * 4.3” WVGA 24-bit LCD
        * Audio codecs (AC97 & I2S), TSI
        * VGA camera
        * Video in via 3 RCA jacks, and HDMI type C out
        * Marvell 88W8688 802.11bg/BT module
        * GPS RF IC
        * Dual analog mics & speakers, headset jack, LED, ambient light sensor
        * USB2.0 HS host  (A), OTG (micro AB)
        * FE PHY, PCIE Mini Card  slot
        * GPIO, GPIO expander with DIP switches for easier selection UART serial over USB, CIR

This patch adds basic board support with DRAM and UART functionality
The patch is tested for boot from DRAM using XDB

Signed-off-by: Mahavir Jain <mjain@marvell.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
---
 MAINTAINERS                       |    1 +
 MAKEALL                           |    1 +
 board/Marvell/aspenite/Makefile   |   52 ++++++++++++++
 board/Marvell/aspenite/aspenite.c |   53 +++++++++++++++
 board/Marvell/aspenite/config.mk  |   26 +++++++
 boards.cfg                        |    1 +
 include/configs/aspenite.h        |  133 +++++++++++++++++++++++++++++++++++++
 7 files changed, 267 insertions(+), 0 deletions(-)
 create mode 100644 board/Marvell/aspenite/Makefile
 create mode 100644 board/Marvell/aspenite/aspenite.c
 create mode 100644 board/Marvell/aspenite/config.mk
 create mode 100644 include/configs/aspenite.h
Wolfgang Denk - Oct. 27, 2010, 6:29 p.m.
Dear Prafulla Wadaskar,

In message <1288187604-3371-6-git-send-email-prafulla@marvell.com> you wrote:
...
> ---
>  MAINTAINERS                       |    1 +
>  MAKEALL                           |    1 +
>  board/Marvell/aspenite/Makefile   |   52 ++++++++++++++
>  board/Marvell/aspenite/aspenite.c |   53 +++++++++++++++
>  board/Marvell/aspenite/config.mk  |   26 +++++++
>  boards.cfg                        |    1 +
>  include/configs/aspenite.h        |  133 +++++++++++++++++++++++++++++++++++++
>  7 files changed, 267 insertions(+), 0 deletions(-)
>  create mode 100644 board/Marvell/aspenite/Makefile
>  create mode 100644 board/Marvell/aspenite/aspenite.c
>  create mode 100644 board/Marvell/aspenite/config.mk
>  create mode 100644 include/configs/aspenite.h

Please don't create a config.mk file any more (move
CONFIG_SYS_TEXT_BASE setting to board config file), and please also
do not create an entry to MAKEALL (gets auto-generated from
boards.cfg).

Thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 2f61776..ea4121b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -831,6 +831,7 @@  Matt Waddel <matt.waddel@linaro.org>
 
 Prafulla Wadaskar <prafulla@marvell.com>
 
+	aspenite	ARM926EJS (ARMADA100 88AP168 SoC)
 	mv88f6281gtw_ge	ARM926EJS (Kirkwood SoC)
 	rd6281a		ARM926EJS (Kirkwood SoC)
 	sheevaplug	ARM926EJS (Kirkwood SoC)
diff --git a/MAKEALL b/MAKEALL
index 51312dd..345aa3a 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -320,6 +320,7 @@  LIST_ARM9="			\
 	ap926ejs		\
 	ap946es			\
 	ap966			\
+	aspenite		\
 	cp920t			\
 	cp922_XA10		\
 	cp926ejs		\
diff --git a/board/Marvell/aspenite/Makefile b/board/Marvell/aspenite/Makefile
new file mode 100644
index 0000000..7ec7727
--- /dev/null
+++ b/board/Marvell/aspenite/Makefile
@@ -0,0 +1,52 @@ 
+#
+# (C) Copyright 2010
+# Marvell Semiconductor <www.marvell.com>
+# Written-by: Prafulla Wadaskar <prafulla@marvell.com>
+# Contributor: Mahavir Jain <mjain@marvell.com>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).a
+
+COBJS	:= aspenite.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/Marvell/aspenite/aspenite.c b/board/Marvell/aspenite/aspenite.c
new file mode 100644
index 0000000..e7bc3eb
--- /dev/null
+++ b/board/Marvell/aspenite/aspenite.c
@@ -0,0 +1,53 @@ 
+/*
+ * (C) Copyright 2010
+ * Marvell Semiconductor <www.marvell.com>
+ * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
+ * Contributor: Mahavir Jain <mjain@marvell.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * 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 Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include <common.h>
+#include <mfp.h>
+#include <asm/arch/mfp.h>
+#include <asm/arch/armada100.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+	u32 mfp_cfg[] = {
+		/* Enable Console on UART1 */
+		MFP107_UART1_RXD,
+		MFP108_UART1_TXD,
+		MFP_EOC		/*End of configureation*/
+	};
+	/* configure MFP's */
+	mfp_config(mfp_cfg);
+	return 0;
+}
+
+int board_init(void)
+{
+	/* arch number of Board */
+	gd->bd->bi_arch_number = MACH_TYPE_ASPENITE;
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = armd1_sdram_base(0) + 0x100;
+	return 0;
+}
diff --git a/board/Marvell/aspenite/config.mk b/board/Marvell/aspenite/config.mk
new file mode 100644
index 0000000..8c91984
--- /dev/null
+++ b/board/Marvell/aspenite/config.mk
@@ -0,0 +1,26 @@ 
+#
+# (C) Copyright 2010
+# Marvell Semiconductor <www.marvell.com>
+# Written-by: Prafulla Wadaskar <prafulla@marvell.com>
+# Contributor: Mahavir Jain <mjain@marvell.com>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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 Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+CONFIG_SYS_TEXT_BASE = 0x0600000
diff --git a/boards.cfg b/boards.cfg
index 0f3292f..82bdd19 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -373,6 +373,7 @@  davinci_sffsdr	arm	arm926ejs	sffsdr		davinci		davinci
 davinci_sonata	arm	arm926ejs	sonata		davinci		davinci
 da830evm	arm	arm926ejs	da8xxevm	davinci		davinci
 da850evm	arm	arm926ejs	da8xxevm	davinci		davinci
+aspenite	arm	arm926ejs	-		Marvell		armada100
 guruplug	arm	arm926ejs	-		Marvell		kirkwood
 mv88f6281gtw_ge	arm	arm926ejs	-		Marvell		kirkwood
 openrd_base	arm	arm926ejs	-		Marvell		kirkwood
diff --git a/include/configs/aspenite.h b/include/configs/aspenite.h
new file mode 100644
index 0000000..30b083c
--- /dev/null
+++ b/include/configs/aspenite.h
@@ -0,0 +1,133 @@ 
+/*
+ * (C) Copyright 2010
+ * Marvell Semiconductor <www.marvell.com>
+ * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
+ * Contributor: Mahavir Jain <mjain@marvell.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * 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 Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef __CONFIG_ASPENITE_H
+#define __CONFIG_ASPENITE_H
+
+/*
+ * Version number information
+ */
+#define CONFIG_IDENT_STRING	"\nMarvell-Aspenite DB"
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_MARVELL			1
+#define CONFIG_ARM926EJS		1	/* Basic Architecture */
+#define CONFIG_SHEEVA_88SV331xV5	1	/* CPU Core subversion */
+#define CONFIG_ARMADA100		1	/* SOC Family Name */
+#define CONFIG_ARMADA168		1	/* SOC Used on this Board */
+#define CONFIG_MACH_ASPENITE			/* Machine type */
+#define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
+#define CONFIG_BOARD_EARLY_INIT_F	/* Do mfp config in board_init_f */
+#define CONFIG_MFP			/* Enable MFP driver */
+
+/*
+ * CLKs configuration
+ */
+#define CONFIG_SYS_HZ		1000
+#define CONFIG_SYS_HZ_CLOCK	(3250000)	/* Timer Freq. 3.25MHZ */
+
+/*
+ * NS16550 Configuration
+ */
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_CLK		14745600
+#define CONFIG_SYS_NS16550_COM1		ARMD1_UART1_BASE
+#define CONFIG_SYS_NS16550_REG_SIZE	-4
+#define CONFIG_SYS_NS16550_SERIAL
+
+/*
+ * Serial Port configuration
+ * The following definitions let you select what serial you want to use
+ * for your console driver.
+ */
+#define CONFIG_CONS_INDEX	1	/*Console on UART3 */
+#define CONFIG_BAUDRATE		115200
+#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
+					115200, 230400, 460800, 921600 }
+/* auto boot */
+#define CONFIG_BOOTDELAY	3
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 8 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs  */
+#define CONFIG_INITRD_TAG	1	/* enable INITRD tag */
+#define CONFIG_SETUP_MEMORY_TAGS	1	/* enable memory tag */
+#define CONFIG_SYS_PROMPT	"Marvell>> "	/* Command Prompt */
+#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+#define CONFIG_SYS_CBSIZE	512	/* Console I/O Buff Size */
+#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE \
+		+sizeof(CONFIG_SYS_PROMPT) + 16)	/* Print Buff */
+
+/*
+ * Commands configuration
+ */
+#define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */
+#include <config_cmd_default.h>
+#define CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_NET
+
+/*
+ * Environment variables configurations
+ */
+#define CONFIG_ENV_IS_NOWHERE	1	/* if env in SDRAM */
+#define CONFIG_ENV_SIZE	0x20000	/* 64k */
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN	(1024 * 1024)	/* 1 MiB for malloc() */
+/* size in bytes reserved for initial data */
+#define CONFIG_SYS_GBL_DATA_SIZE	128
+
+/*
+ * Other required configurations
+ */
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_ARCH_CPU_INIT	/* call arch_cpu_init() */
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_CONSOLE_INFO_QUIET	/* some code reduction */
+
+#define CONFIG_DISPLAY_CPUINFO	/* Display cpu info */
+#define CONFIG_NR_DRAM_BANKS	1	/* we have 1 bank of DRAM */
+#define CONFIG_SYS_SDRAM_BASE		0x00000000
+/*
+ * There is no internal RAM in ARMADA100, using DRAM
+ * TBD: dcache to be used for this
+ */
+#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE - 0x00200000)
+
+#define CONFIG_STACKSIZE	0x00100000	/* _1M regular stack */
+#define CONFIG_SYS_LOAD_ADDR	0x00800000	/* default load address */
+#define CONFIG_SYS_MEMTEST_START	0x00800000	/* 8 MB */
+#define CONFIG_SYS_MEMTEST_END	0x00FFFFFF	/* 15 MB- 1 */
+#define CONFIG_SYS_MAXARGS	16	/* max number of command args */
+
+#endif	/* __CONFIG_ASPENITE_H */