From patchwork Wed Oct 27 13:53:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Prafulla Wadaskar X-Patchwork-Id: 71945 Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id C7BBA152451 for ; Wed, 27 Oct 2010 11:39:20 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id AE35C3364F87 for ; Wed, 27 Oct 2010 11:39:20 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Wed, 27 Oct 2010 11:39:20 +0200 (CEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Wed, 27 Oct 2010 11:37:30 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Wed, 27 Oct 2010 11:37:29 +0200 Received: from scanner-1.m-online.net (scanner-1.mail.m-online.net [192.168.8.165]) by mail.m-online.net (Postfix) with ESMTP id C58B71C002B2; Wed, 27 Oct 2010 11:37:29 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-1.m-online.net (Postfix) with ESMTP id 9515546C0AB; Wed, 27 Oct 2010 11:37:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 94E8B281BC; Wed, 27 Oct 2010 11:36:42 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R9-fwL1GPvja; Wed, 27 Oct 2010 11:36:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA4D128196; Wed, 27 Oct 2010 11:36:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D75AB28108 for ; Wed, 27 Oct 2010 11:36:08 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v34cu-gitz9Z for ; Wed, 27 Oct 2010 11:36:07 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from dakia2.marvell.com (dakia2.marvell.com [65.219.4.35]) by theia.denx.de (Postfix) with ESMTPS id C5EF128103 for ; Wed, 27 Oct 2010 11:35:59 +0200 (CEST) X-ASG-Debug-ID: 1288172157-0819347b0001-4l7tJC Received: from maili.marvell.com (maili.marvell.com [10.68.76.51]) by dakia2.marvell.com with ESMTP id ia6Dfot2SjBXPBUz for ; Wed, 27 Oct 2010 02:35:57 -0700 (PDT) X-Barracuda-Envelope-From: prafulla@localhost.localdomain Received: from localhost.localdomain (unknown [10.31.130.148]) by maili.marvell.com (Postfix) with ESMTP id 995398A001; Wed, 27 Oct 2010 02:35:56 -0700 (PDT) Received: from localhost.localdomain (pe-dt061 [127.0.0.1]) by localhost.localdomain (8.14.1/8.14.1) with ESMTP id o9RDrY51003406; Wed, 27 Oct 2010 19:23:34 +0530 Received: (from prafulla@localhost) by localhost.localdomain (8.14.1/8.14.1/Submit) id o9RDrXe1003405; Wed, 27 Oct 2010 19:23:33 +0530 From: Prafulla Wadaskar To: u-boot@lists.denx.de X-ASG-Orig-Subj: [PATCH 5/5] Armada100: Add Board Support for Marvell Aspenite-DB Date: Wed, 27 Oct 2010 19:23:24 +0530 X-ASG-Orig-Subj: [PATCH 5/5] Armada100: Add Board Support for Marvell Aspenite-DB Message-Id: <1288187604-3371-6-git-send-email-prafulla@marvell.com> X-Mailer: git-send-email 1.5.3.3 In-Reply-To: <1288187604-3371-5-git-send-email-prafulla@marvell.com> References: <1288187604-3371-1-git-send-email-prafulla@marvell.com> <1288187604-3371-2-git-send-email-prafulla@marvell.com> <1288187604-3371-3-git-send-email-prafulla@marvell.com> <1288187604-3371-4-git-send-email-prafulla@marvell.com> <1288187604-3371-5-git-send-email-prafulla@marvell.com> MIME-Version: 1.0 X-Barracuda-Connect: maili.marvell.com[10.68.76.51] X-Barracuda-Start-Time: 1288172157 X-Barracuda-URL: http://10.68.76.222:80/cgi-mod/mark.cgi X-Barracuda-Spam-Score: -1002.00 X-Barracuda-Spam-Status: No, SCORE=-1002.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 Cc: Manas Saksena , Lei Wen , Yu Tang , Eric Miao , Ashish Karkare , Kiran Vedere , Prabhanjan Sarnaik Subject: [U-Boot] [PATCH 5/5] Armada100: Add Board Support for Marvell Aspenite-DB X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net From: Prafulla WADASKAR 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 Signed-off-by: Prafulla Wadaskar --- 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 diff --git a/MAINTAINERS b/MAINTAINERS index 2f61776..ea4121b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -831,6 +831,7 @@ Matt Waddel Prafulla Wadaskar + 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 +# Written-by: Prafulla Wadaskar +# Contributor: Mahavir Jain +# +# 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 + * Written-by: Prafulla Wadaskar + * Contributor: Mahavir Jain + * + * 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 +#include +#include +#include + +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 +# Written-by: Prafulla Wadaskar +# Contributor: Mahavir Jain +# +# 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 + * Written-by: Prafulla Wadaskar + * Contributor: Mahavir Jain + * + * 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 +#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 */