aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZoltan Herpai <wigyori@uid0.hu>2014-06-01 18:47:14 +0000
committerZoltan Herpai <wigyori@uid0.hu>2014-06-01 18:47:14 +0000
commitd00f7b05c851eae8e5e3935ce51c4b4e34e00c0f (patch)
tree961c73ba234e623259493170de73fd259cbb93ef
parent1bd75f114f10fb04a691a9b71a939d690946463f (diff)
downloadupstream-d00f7b05c851eae8e5e3935ce51c4b4e34e00c0f.tar.gz
upstream-d00f7b05c851eae8e5e3935ce51c4b4e34e00c0f.tar.bz2
upstream-d00f7b05c851eae8e5e3935ce51c4b4e34e00c0f.zip
uboot-sunxi: add bananapi support
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> SVN-Revision: 40899
-rw-r--r--package/boot/uboot-sunxi/Makefile6
-rw-r--r--package/boot/uboot-sunxi/patches/003-bananapi.patch91
2 files changed, 96 insertions, 1 deletions
diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index 35b647e0d4..392c740695 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -36,6 +36,10 @@ define uboot/A20-OLinuXino_MICRO
TITLE:=U-Boot 2014.01-rc1 for A20 OLinuXino MICRO
endef
+define uboot/bananapi
+ TITLE:=U-Boot 2014.01-rc1 for BananaPi
+endef
+
define uboot/Cubieboard
TITLE:=U-Boot 2014.01-rc1 for Cubieboard
endef
@@ -60,7 +64,7 @@ define uboot/pcDuino3
TITLE:=U-Boot 2014.01-rc1 for pcDuino3
endef
-UBOOTS:=A10-OLinuXino-Lime A13-OLinuXino A20-OLinuXino_MICRO Cubieboard Cubieboard2 Cubietruck Hackberry pcDuino pcDuino3
+UBOOTS:=A10-OLinuXino-Lime A13-OLinuXino A20-OLinuXino_MICRO bananapi Cubieboard Cubieboard2 Cubietruck Hackberry pcDuino pcDuino3
define Package/uboot/template
define Package/uboot-sunxi-$(1)
diff --git a/package/boot/uboot-sunxi/patches/003-bananapi.patch b/package/boot/uboot-sunxi/patches/003-bananapi.patch
new file mode 100644
index 0000000000..fb6b2c2cfd
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/003-bananapi.patch
@@ -0,0 +1,91 @@
+From 600e61eed037eb27df6301db9e7dab0a86cc1012 Mon Sep 17 00:00:00 2001
+From: Bo Shen <voice.shen@gmail.com>
+Date: Sat, 12 Apr 2014 07:42:11 +0800
+Subject: [PATCH] bananapi: add bananapi board support
+
+BananaPi is A20 based board. More information:
+ www.banana-pi.org
+
+The bananapi.h is original from sun7i.h + sunxi-common.h
+The dram_bananapi.c is original from dram_cubieboard2.c
+
+Signed-off-by: Bo Shen <voice.shen@gmail.com>
+---
+ arch/arm/cpu/armv7/sunxi/board.c | 3 +
+ board/sunxi/Makefile | 1 +
+ board/sunxi/dram_bananapi.c | 31 +++
+ boards.cfg | 1 +
+ include/configs/bananapi.h | 432 +++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 468 insertions(+)
+ create mode 100644 board/sunxi/dram_bananapi.c
+ create mode 100644 include/configs/bananapi.h
+
+diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
+index 9b3d5a2..2df7704 100644
+diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
+index bed033b..bbe73f6 100644
+--- a/board/sunxi/Makefile
++++ b/board/sunxi/Makefile
+@@ -20,6 +20,7 @@ obj-$(CONFIG_AUXTEK_T003) += dram_auxtek_t003.o
+ # This is not a typo, uses the same mem settings as the a10s-olinuxino-m
+ obj-$(CONFIG_AUXTEK_T004) += dram_a10s_olinuxino_m.o
+ obj-$(CONFIG_BA10_TV_BOX) += dram_sun4i_384_1024_iow8.o
++obj-$(CONFIG_BANANAPI) += dram_bananapi.o
+ obj-$(CONFIG_COBY_MID7042) += dram_sun4i_408_1024_iow16.o
+ obj-$(CONFIG_COBY_MID8042) += dram_sun4i_360_1024_iow16.o
+ obj-$(CONFIG_COBY_MID9742) += dram_sun4i_408_1024_iow16.o
+diff --git a/board/sunxi/dram_bananapi.c b/board/sunxi/dram_bananapi.c
+new file mode 100644
+index 0000000..9e75367
+--- /dev/null
++++ b/board/sunxi/dram_bananapi.c
+@@ -0,0 +1,31 @@
++/* this file is generated, don't edit it yourself */
++
++#include <common.h>
++#include <asm/arch/dram.h>
++
++static struct dram_para dram_para = {
++ .clock = 480,
++ .type = 3,
++ .rank_num = 1,
++ .density = 4096,
++ .io_width = 16,
++ .bus_width = 32,
++ .cas = 9,
++ .zq = 0x7f,
++ .odt_en = 0,
++ .size = 1024,
++ .tpr0 = 0x42d899b7,
++ .tpr1 = 0xa090,
++ .tpr2 = 0x22a00,
++ .tpr3 = 0x0,
++ .tpr4 = 0x1,
++ .tpr5 = 0x0,
++ .emr1 = 0x4,
++ .emr2 = 0x10,
++ .emr3 = 0x0,
++};
++
++unsigned long sunxi_dram_init(void)
++{
++ return dramc_init(&dram_para);
++}
+diff --git a/boards.cfg b/boards.cfg
+index f1a5d07..5073644 100644
+--- a/boards.cfg
++++ b/boards.cfg
+@@ -381,6 +381,7 @@ Active arm armv7 sunxi - sunxi
+ Active arm armv7 sunxi - sunxi Auxtek-T003 sun5i:AUXTEK_T003,SPL,AXP152_POWER,STATUSLED=34 -
+ Active arm armv7 sunxi - sunxi Auxtek-T004 sun5i:AUXTEK_T004,SPL,AXP152_POWER,STATUSLED=34 -
+ Active arm armv7 sunxi - sunxi ba10_tv_box sun4i:BA10_TV_BOX,SPL,SUNXI_EMAC -
++Active arm armv7 sunxi - sunxi bananapi sun7i:BANANAPI,SPL,SUNXI_GMAC,STATUSLED=248 -
+ Active arm armv7 sunxi - sunxi Coby_MID7042 sun4i:COBY_MID7042,SPL -
+ Active arm armv7 sunxi - sunxi Coby_MID8042 sun4i:COBY_MID8042,SPL -
+ Active arm armv7 sunxi - sunxi Coby_MID9742 sun4i:COBY_MID9742,SPL -
+diff --git a/include/configs/bananapi.h b/include/configs/bananapi.h
+new file mode 100644
+index 0000000..5e70e63
+--
+1.9.3
+