From 8b0c3dc8770bdd7ac2532ea78463e88c7a0d1860 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Sun, 1 Jun 2014 18:47:14 +0000 Subject: uboot-sunxi: add bananapi support Signed-off-by: Zoltan HERPAI git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40899 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/boot/uboot-sunxi/Makefile | 6 +- .../boot/uboot-sunxi/patches/003-bananapi.patch | 91 ++++++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 package/boot/uboot-sunxi/patches/003-bananapi.patch (limited to 'package/boot/uboot-sunxi') 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 +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 +--- + 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 ++#include ++ ++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 + -- cgit v1.2.3