summaryrefslogtreecommitdiff
path: root/board/sunxi
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2015-01-23 10:22:29 -0500
committerTom Rini <trini@ti.com>2015-01-23 10:22:29 -0500
commit3b95288a2ae8146ca4915250f815c1218b1706fa (patch)
tree6c690f6bcbee74f0c495d7ca646b93fde6be5262 /board/sunxi
parentec0cc98f2cb7fa217ed0a1a54978e2d8f2fbc20c (diff)
parent4e7c892d15e2aa98086aaacdb979821d011b7db2 (diff)
downloadu-boot-imx-3b95288a2ae8146ca4915250f815c1218b1706fa.zip
u-boot-imx-3b95288a2ae8146ca4915250f815c1218b1706fa.tar.gz
u-boot-imx-3b95288a2ae8146ca4915250f815c1218b1706fa.tar.bz2
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
Diffstat (limited to 'board/sunxi')
-rw-r--r--board/sunxi/Kconfig132
-rw-r--r--board/sunxi/MAINTAINERS22
-rw-r--r--board/sunxi/Makefile23
-rw-r--r--board/sunxi/board.c26
-rw-r--r--board/sunxi/dram_a10_olinuxino_l.c31
-rw-r--r--board/sunxi/dram_a20_olinuxino_l.c31
-rw-r--r--board/sunxi/dram_cubieboard.c31
-rw-r--r--board/sunxi/dram_cubieboard2.c31
-rw-r--r--board/sunxi/dram_cubietruck.c31
-rw-r--r--board/sunxi/dram_linksprite_pcduino3.c31
-rw-r--r--board/sunxi/dram_sun4i_360_1024_iow16.c31
-rw-r--r--board/sunxi/dram_sun4i_360_1024_iow8.c31
-rw-r--r--board/sunxi/dram_sun4i_384_1024_iow8.c31
-rw-r--r--board/sunxi/dram_sun4i_408_1024_iow8.c31
-rw-r--r--board/sunxi/dram_sun4i_auto.c (renamed from board/sunxi/dram_sun4i_360_512.c)16
-rw-r--r--board/sunxi/dram_sun5i_auto.c (renamed from board/sunxi/dram_a20_olinuxino_l2.c)16
-rw-r--r--board/sunxi/dram_sun7i_384_1024_iow16.c31
-rw-r--r--board/sunxi/dram_sun7i_384_512_busw16_iow16.c31
18 files changed, 123 insertions, 484 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 6a4d764..738b55e 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -33,21 +33,31 @@ config MACH_SUN8I
endchoice
-if MACH_SUN6I || MACH_SUN8I
-
config DRAM_CLK
- int "sun6i dram clock speed"
- default 312
+ int "sunxi dram clock speed"
+ default 312 if MACH_SUN6I || MACH_SUN8I
+ default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
---help---
Set the dram clock speed, valid range 240 - 480, must be a multiple
- of 24.
+ of 24. Note on sun4i / sun5i / sun7i this is only used by boards
+ which use dram autoconfig.
config DRAM_ZQ
- int "sun6i dram zq value"
- default 123
+ int "sunxi dram zq value"
+ default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I
+ default 127 if MACH_SUN7I
---help---
- Set the dram zq value.
-
+ Set the dram zq value. Note on sun4i / sun5i / sun7i this is only
+ used by boards which use dram autoconfig.
+
+if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
+config DRAM_EMR1
+ int "sunxi dram emr1 value"
+ default 0 if MACH_SUN4I
+ default 4 if MACH_SUN5I || MACH_SUN7I
+ ---help---
+ Set the dram controller emr1 value. Note this is only used by boards
+ which use dram autoconfig.
endif
config SYS_CONFIG_NAME
@@ -60,10 +70,6 @@ config SYS_CONFIG_NAME
choice
prompt "Board"
-config TARGET_A10_OLINUXINO_L
- bool "A10_OLINUXINO_L"
- depends on MACH_SUN4I
-
config TARGET_A10S_OLINUXINO_M
bool "A10S_OLINUXINO_M"
depends on MACH_SUN5I
@@ -100,61 +106,25 @@ config TARGET_BANANAPRO
bool "BANANAPRO"
depends on MACH_SUN7I
-config TARGET_COLOMBUS
- bool "COLOMBUS"
- depends on MACH_SUN6I
-
config TARGET_CUBIEBOARD2
bool "CUBIEBOARD2"
depends on MACH_SUN7I
-config TARGET_CUBIEBOARD
- bool "CUBIEBOARD"
- depends on MACH_SUN4I
-
config TARGET_CUBIETRUCK
bool "CUBIETRUCK"
depends on MACH_SUN7I
-config TARGET_HUMMINGBIRD_A31
- bool "HUMMINGBIRD_A31"
- depends on MACH_SUN6I
-
-config TARGET_IPPO_Q8H_V5
- bool "IPPO_Q8H_V5"
- depends on MACH_SUN8I
-
-config TARGET_PCDUINO
- bool "PCDUINO"
- depends on MACH_SUN4I
-
config TARGET_PCDUINO3
bool "PCDUINO3"
depends on MACH_SUN7I
-config TARGET_MELE_A1000G
- bool "MELE_A1000G"
- depends on MACH_SUN4I
-
-config TARGET_MELE_A1000
- bool "MELE_A1000"
- depends on MACH_SUN4I
-
config TARGET_MELE_M3
bool "MELE_M3"
depends on MACH_SUN7I
-config TARGET_MELE_M9
- bool "MELE_M9"
- depends on MACH_SUN6I
-
-config TARGET_MINI_X_1GB
- bool "MINI_X_1GB"
- depends on MACH_SUN4I
-
-config TARGET_MINI_X
- bool "MINI_X"
- depends on MACH_SUN4I
+config TARGET_MK802_A10S
+ bool "MK802_A10S"
+ depends on MACH_SUN5I
config TARGET_MSI_PRIMO73
bool "MSI Primo73 (7\" tablet)"
@@ -169,31 +139,10 @@ config TARGET_MSI_PRIMO73
OTG and 3.5mm headphone jack. More details are available at
http://linux-sunxi.org/MSI_Primo73
-config TARGET_MSI_PRIMO81
- bool "MSI Primo81 (7.85\" tablet)"
- depends on MACH_SUN6I
- ---help---
- The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND,
- 1024x768 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP
- rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer
- and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons
- (both volume buttons are also connected to the UBOOT_SEL pin). The
- external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB
- OTG and 3.5mm headphone jack. More details are available at
- http://linux-sunxi.org/MSI_Primo81
-
-config TARGET_BA10_TV_BOX
- bool "BA10_TV_BOX"
- depends on MACH_SUN4I
-
config TARGET_I12_TVBOX
bool "I12_TVBOX"
depends on MACH_SUN7I
-config TARGET_QT840A
- bool "QT840A"
- depends on MACH_SUN7I
-
config TARGET_R7DONGLE
bool "R7DONGLE"
depends on MACH_SUN5I
@@ -338,6 +287,13 @@ config VIDEO_LCD_MODE
This is in drivers/video/videomodes.c: video_get_params() format, e.g.
x:800,y:480,depth:18,pclk_khz:33000,le:16,ri:209,up:22,lo:22,hs:30,vs:1,sync:0,vmode:0
+config VIDEO_LCD_DCLK_PHASE
+ int "LCD panel display clock phase"
+ depends on VIDEO
+ default 1
+ ---help---
+ Select LCD panel display clock phase shift, range 0-3.
+
config VIDEO_LCD_POWER
string "LCD panel power enable pin"
depends on VIDEO
@@ -363,6 +319,13 @@ config VIDEO_LCD_BL_PWM
Set the backlight pwm pin for the LCD panel. This takes a string in the
format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
+config VIDEO_LCD_BL_PWM_ACTIVE_LOW
+ bool "LCD panel backlight pwm is inverted"
+ depends on VIDEO
+ default y
+ ---help---
+ Set this if the backlight pwm output is active low.
+
# Note only one of these may be selected at a time! But hidden choices are
# not supported by Kconfig
@@ -387,9 +350,32 @@ config VIDEO_LCD_PANEL_LVDS
bool "Generic lvds interface LCD panel"
select VIDEO_LCD_IF_LVDS
+config VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828
+ bool "MIPI 4-lane, 513Mbps LCD panel via SSD2828 bridge chip"
+ select VIDEO_LCD_SSD2828
+ select VIDEO_LCD_IF_PARALLEL
+ ---help---
+ 7.85" 768x1024 LCD panels, such as LG LP079X01 or AUO B079XAN01.0
+
+config VIDEO_LCD_PANEL_HITACHI_TX18D42VM
+ bool "Hitachi tx18d42vm LCD panel"
+ select VIDEO_LCD_HITACHI_TX18D42VM
+ select VIDEO_LCD_IF_LVDS
+ ---help---
+ 7.85" 1024x768 Hitachi tx18d42vm LCD panel support
+
endchoice
+config USB_MUSB_SUNXI
+ bool "Enable sunxi OTG / DRC USB controller in host mode"
+ default n
+ ---help---
+ Say y here to enable support for the sunxi OTG / DRC USB controller
+ used on almost all sunxi boards. Note currently u-boot can only have
+ one usb host controller enabled at a time, so enabling this on boards
+ which also use the ehci host controller will result in build errors.
+
config USB_KEYBOARD
boolean "Enable USB keyboard support"
default y
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index 3a09be9..743e7f5 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -5,17 +5,20 @@ F: board/sunxi/
F: include/configs/sun4i.h
F: configs/A10-OLinuXino-Lime_defconfig
F: configs/ba10_tv_box_defconfig
+F: configs/Chuwi_V7_CW0825_defconfig
F: configs/Cubieboard_defconfig
+F: configs/Hyundai_A7HD_defconfig
F: configs/Mele_A1000_defconfig
-F: configs/Mele_A1000G_defconfig
F: configs/Mele_M3_defconfig
F: configs/Mini-X_defconfig
-F: configs/Mini-X-1Gb_defconfig
+F: configs/mk802_defconfig
+F: configs/mk802ii_defconfig
F: include/configs/sun5i.h
F: configs/A10s-OLinuXino-M_defconfig
F: configs/A13-OLinuXino_defconfig
F: configs/A13-OLinuXinoM_defconfig
F: configs/Auxtek-T004_defconfig
+F: configs/mk802_a10s_defconfig
F: configs/r7-tv-dongle_defconfig
F: include/configs/sun6i.h
F: configs/CSQ_CS908_defconfig
@@ -58,6 +61,11 @@ M: Maxime Ripard <maxime.ripard@free-electrons.com>
S: Maintained
F: configs/Colombus_defconfig
+GEMEI-G9 TABLET
+M: Priit Laes <plaes@plaes.org>
+S: Maintained
+F: configs/sunxi_Gemei_G9_defconfig
+
HUMMINIGBIRD-A31 BOARD
M: Chen-Yu Tsai <wens@csie.org>
S: Maintained
@@ -82,3 +90,13 @@ LINKSPRITE-PCDUINO BOARD
M: Zoltan Herpai <wigyori@uid0.hu>
S: Maintained
F: configs/Linksprite_pcDuino_defconfig
+
+MARSBOARD-A10 BOARD
+M: Aleksei Mamlin <mamlinav@gmail.com>
+S: Maintained
+F: configs/Marsboard_A10_defconfig
+
+MELE M5 BOARD
+M: Ian Campbell <ijc@hellion.org.uk>
+S: Maintained
+F: configs/Mele_M5_defconfig
diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index fab0877..71edb83 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -11,29 +11,12 @@
obj-y += board.o
obj-$(CONFIG_SUNXI_GMAC) += gmac.o
obj-$(CONFIG_SUNXI_AHCI) += ahci.o
-obj-$(CONFIG_TARGET_A10_OLINUXINO_L) += dram_a10_olinuxino_l.o
+obj-$(CONFIG_MACH_SUN4I) += dram_sun4i_auto.o
+obj-$(CONFIG_MACH_SUN7I) += dram_sun5i_auto.o
obj-$(CONFIG_TARGET_A10S_OLINUXINO_M) += dram_a10s_olinuxino_m.o
obj-$(CONFIG_TARGET_A13_OLINUXINO) += dram_a13_olinuxino.o
obj-$(CONFIG_TARGET_A13_OLINUXINOM) += dram_a13_oli_micro.o
-obj-$(CONFIG_TARGET_A20_OLINUXINO_L) += dram_a20_olinuxino_l.o
-obj-$(CONFIG_TARGET_A20_OLINUXINO_L2) += dram_a20_olinuxino_l2.o
-obj-$(CONFIG_TARGET_A20_OLINUXINO_M) += dram_sun7i_384_1024_iow16.o
# This is not a typo, uses the same mem settings as the a10s-olinuxino-m
obj-$(CONFIG_TARGET_AUXTEK_T004) += dram_a10s_olinuxino_m.o
-obj-$(CONFIG_TARGET_BA10_TV_BOX) += dram_sun4i_384_1024_iow8.o
-obj-$(CONFIG_TARGET_BANANAPI) += dram_bananapi.o
-obj-$(CONFIG_TARGET_BANANAPRO) += dram_bananapi.o
-obj-$(CONFIG_TARGET_CUBIEBOARD) += dram_cubieboard.o
-obj-$(CONFIG_TARGET_CUBIEBOARD2) += dram_cubieboard2.o
-obj-$(CONFIG_TARGET_CUBIETRUCK) += dram_cubietruck.o
-obj-$(CONFIG_TARGET_I12_TVBOX) += dram_sun7i_384_1024_iow16.o
-obj-$(CONFIG_TARGET_MELE_A1000) += dram_sun4i_360_512.o
-obj-$(CONFIG_TARGET_MELE_A1000G) += dram_sun4i_360_1024_iow8.o
-obj-$(CONFIG_TARGET_MELE_M3) += dram_sun7i_384_1024_iow16.o
-obj-$(CONFIG_TARGET_MINI_X) += dram_sun4i_360_512.o
-obj-$(CONFIG_TARGET_MINI_X_1GB) += dram_sun4i_360_1024_iow16.o
-obj-$(CONFIG_TARGET_MSI_PRIMO73) += dram_sun7i_384_1024_iow16.o
-obj-$(CONFIG_TARGET_PCDUINO) += dram_sun4i_408_1024_iow8.o
-obj-$(CONFIG_TARGET_PCDUINO3) += dram_linksprite_pcduino3.o
-obj-$(CONFIG_TARGET_QT840A) += dram_sun7i_384_512_busw16_iow16.o
+obj-$(CONFIG_TARGET_MK802_A10S) += dram_sun5i_auto.o
obj-$(CONFIG_TARGET_R7DONGLE) += dram_r7dongle.o
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 7d6d075..b70e00c 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -28,7 +28,9 @@
#include <asm/arch/dram.h>
#include <asm/arch/gpio.h>
#include <asm/arch/mmc.h>
+#include <asm/arch/usbc.h>
#include <asm/io.h>
+#include <linux/usb/musb.h>
#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -189,6 +191,7 @@ void sunxi_board_init(void)
power_failed |= axp221_set_aldo1(CONFIG_AXP221_ALDO1_VOLT);
power_failed |= axp221_set_aldo2(CONFIG_AXP221_ALDO2_VOLT);
power_failed |= axp221_set_aldo3(CONFIG_AXP221_ALDO3_VOLT);
+ power_failed |= axp221_set_eldo(3, CONFIG_AXP221_ELDO3_VOLT);
#endif
printf("DRAM:");
@@ -208,6 +211,26 @@ void sunxi_board_init(void)
}
#endif
+#if defined(CONFIG_MUSB_HOST) || defined(CONFIG_MUSB_GADGET)
+static struct musb_hdrc_config musb_config = {
+ .multipoint = 1,
+ .dyn_fifo = 1,
+ .num_eps = 6,
+ .ram_bits = 11,
+};
+
+static struct musb_hdrc_platform_data musb_plat = {
+#if defined(CONFIG_MUSB_HOST)
+ .mode = MUSB_HOST,
+#else
+ .mode = MUSB_PERIPHERAL,
+#endif
+ .config = &musb_config,
+ .power = 250,
+ .platform_ops = &sunxi_musb_ops,
+};
+#endif
+
#ifdef CONFIG_MISC_INIT_R
int misc_init_r(void)
{
@@ -227,6 +250,9 @@ int misc_init_r(void)
eth_setenv_enetaddr("ethaddr", mac_addr);
}
+#if defined(CONFIG_MUSB_HOST) || defined(CONFIG_MUSB_GADGET)
+ musb_register(&musb_plat, NULL, (void *)SUNXI_USB0_BASE);
+#endif
return 0;
}
#endif
diff --git a/board/sunxi/dram_a10_olinuxino_l.c b/board/sunxi/dram_a10_olinuxino_l.c
deleted file mode 100644
index 24a1bd9..0000000
--- a/board/sunxi/dram_a10_olinuxino_l.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 = 16,
- .cas = 6,
- .zq = 123,
- .odt_en = 0,
- .size = 512,
- .tpr0 = 0x30926692,
- .tpr1 = 0x1090,
- .tpr2 = 0x1a0c8,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0x4,
- .emr2 = 0,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_a20_olinuxino_l.c b/board/sunxi/dram_a20_olinuxino_l.c
deleted file mode 100644
index 2c74999..0000000
--- a/board/sunxi/dram_a20_olinuxino_l.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 = 16,
- .cas = 9,
- .zq = 0x7f,
- .odt_en = 0,
- .size = 512,
- .tpr0 = 0x42d899b7,
- .tpr1 = 0xa090,
- .tpr2 = 0x22a00,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0x4,
- .emr2 = 0x10,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_cubieboard.c b/board/sunxi/dram_cubieboard.c
deleted file mode 100644
index 399028c..0000000
--- a/board/sunxi/dram_cubieboard.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 = 6,
- .zq = 123,
- .odt_en = 0,
- .size = 1024,
- .tpr0 = 0x30926692,
- .tpr1 = 0x1090,
- .tpr2 = 0x1a0c8,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0,
- .emr2 = 0,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_cubieboard2.c b/board/sunxi/dram_cubieboard2.c
deleted file mode 100644
index 9e75367..0000000
--- a/board/sunxi/dram_cubieboard2.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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/board/sunxi/dram_cubietruck.c b/board/sunxi/dram_cubietruck.c
deleted file mode 100644
index fbcd687..0000000
--- a/board/sunxi/dram_cubietruck.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include <common.h>
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 432,
- .type = 3,
- .rank_num = 1,
- .density = 4096,
- .io_width = 8,
- .bus_width = 32,
- .cas = 9,
- .zq = 0x7f,
- .odt_en = 0,
- .size = 2048,
- .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/board/sunxi/dram_linksprite_pcduino3.c b/board/sunxi/dram_linksprite_pcduino3.c
deleted file mode 100644
index 9cc6e19..0000000
--- a/board/sunxi/dram_linksprite_pcduino3.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 = 0x7a,
- .odt_en = 0,
- .size = 1024,
- .tpr0 = 0x42d899b7,
- .tpr1 = 0xa090,
- .tpr2 = 0x22a00,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0x4,
- .emr2 = 0x10,
- .emr3 = 0x0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_360_1024_iow16.c b/board/sunxi/dram_sun4i_360_1024_iow16.c
deleted file mode 100644
index 3763713..0000000
--- a/board/sunxi/dram_sun4i_360_1024_iow16.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include <common.h>
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 360,
- .type = 3,
- .rank_num = 1,
- .density = 4096,
- .io_width = 16,
- .bus_width = 32,
- .cas = 6,
- .zq = 123,
- .odt_en = 0,
- .size = 1024,
- .tpr0 = 0x30926692,
- .tpr1 = 0x1090,
- .tpr2 = 0x1a0c8,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0,
- .emr2 = 0,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_360_1024_iow8.c b/board/sunxi/dram_sun4i_360_1024_iow8.c
deleted file mode 100644
index 2a5c9ed..0000000
--- a/board/sunxi/dram_sun4i_360_1024_iow8.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include <common.h>
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 360,
- .type = 3,
- .rank_num = 1,
- .density = 2048,
- .io_width = 8,
- .bus_width = 32,
- .cas = 6,
- .zq = 123,
- .odt_en = 0,
- .size = 1024,
- .tpr0 = 0x30926692,
- .tpr1 = 0x1090,
- .tpr2 = 0x1a0c8,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0,
- .emr2 = 0,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_384_1024_iow8.c b/board/sunxi/dram_sun4i_384_1024_iow8.c
deleted file mode 100644
index b0fcc55..0000000
--- a/board/sunxi/dram_sun4i_384_1024_iow8.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include <common.h>
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 384,
- .type = 3,
- .rank_num = 1,
- .density = 2048,
- .io_width = 8,
- .bus_width = 32,
- .cas = 6,
- .zq = 123,
- .odt_en = 0,
- .size = 1024,
- .tpr0 = 0x30926692,
- .tpr1 = 0x1090,
- .tpr2 = 0x1a0c8,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0x4,
- .emr2 = 0,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_408_1024_iow8.c b/board/sunxi/dram_sun4i_408_1024_iow8.c
deleted file mode 100644
index c6d87d2..0000000
--- a/board/sunxi/dram_sun4i_408_1024_iow8.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include <common.h>
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 408,
- .type = 3,
- .rank_num = 1,
- .density = 2048,
- .io_width = 8,
- .bus_width = 32,
- .cas = 6,
- .zq = 123,
- .odt_en = 0,
- .size = 1024,
- .tpr0 = 0x30926692,
- .tpr1 = 0x1090,
- .tpr2 = 0x1a0c8,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0,
- .emr2 = 0,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_360_512.c b/board/sunxi/dram_sun4i_auto.c
index 48aa6e2..826bacf 100644
--- a/board/sunxi/dram_sun4i_360_512.c
+++ b/board/sunxi/dram_sun4i_auto.c
@@ -1,26 +1,24 @@
-/* this file is generated, don't edit it yourself */
-
#include <common.h>
#include <asm/arch/dram.h>
static struct dram_para dram_para = {
- .clock = 360,
+ .clock = CONFIG_DRAM_CLK,
.type = 3,
.rank_num = 1,
- .density = 2048,
- .io_width = 16,
- .bus_width = 32,
+ .density = 0,
+ .io_width = 0,
+ .bus_width = 0,
.cas = 6,
- .zq = 123,
+ .zq = CONFIG_DRAM_ZQ,
.odt_en = 0,
- .size = 512,
+ .size = 0,
.tpr0 = 0x30926692,
.tpr1 = 0x1090,
.tpr2 = 0x1a0c8,
.tpr3 = 0,
.tpr4 = 0,
.tpr5 = 0,
- .emr1 = 0,
+ .emr1 = CONFIG_DRAM_EMR1,
.emr2 = 0,
.emr3 = 0,
};
diff --git a/board/sunxi/dram_a20_olinuxino_l2.c b/board/sunxi/dram_sun5i_auto.c
index 2115d37..e86b08e 100644
--- a/board/sunxi/dram_a20_olinuxino_l2.c
+++ b/board/sunxi/dram_sun5i_auto.c
@@ -1,26 +1,26 @@
-/* this file is generated, don't edit it yourself */
+/* DRAM parameters for auto dram configuration on sun5i and sun7i */
#include <common.h>
#include <asm/arch/dram.h>
static struct dram_para dram_para = {
- .clock = 480,
+ .clock = CONFIG_DRAM_CLK,
.type = 3,
.rank_num = 1,
- .density = 4096,
- .io_width = 16,
- .bus_width = 32,
+ .density = 0,
+ .io_width = 0,
+ .bus_width = 0,
.cas = 9,
- .zq = 0x7f,
+ .zq = CONFIG_DRAM_ZQ,
.odt_en = 0,
- .size = 1024,
+ .size = 0,
.tpr0 = 0x42d899b7,
.tpr1 = 0xa090,
.tpr2 = 0x22a00,
.tpr3 = 0,
.tpr4 = 0,
.tpr5 = 0,
- .emr1 = 0x4,
+ .emr1 = CONFIG_DRAM_EMR1,
.emr2 = 0x10,
.emr3 = 0,
};
diff --git a/board/sunxi/dram_sun7i_384_1024_iow16.c b/board/sunxi/dram_sun7i_384_1024_iow16.c
deleted file mode 100644
index 04e4b1e..0000000
--- a/board/sunxi/dram_sun7i_384_1024_iow16.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include "common.h"
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 384,
- .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 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0x4,
- .emr2 = 0x10,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun7i_384_512_busw16_iow16.c b/board/sunxi/dram_sun7i_384_512_busw16_iow16.c
deleted file mode 100644
index 2e36011..0000000
--- a/board/sunxi/dram_sun7i_384_512_busw16_iow16.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include "common.h"
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 384,
- .type = 3,
- .rank_num = 1,
- .density = 4096,
- .io_width = 16,
- .bus_width = 16,
- .cas = 9,
- .zq = 0x7f,
- .odt_en = 0,
- .size = 512,
- .tpr0 = 0x42d899b7,
- .tpr1 = 0xa090,
- .tpr2 = 0x22a00,
- .tpr3 = 0,
- .tpr4 = 0,
- .tpr5 = 0,
- .emr1 = 0x4,
- .emr2 = 0x10,
- .emr3 = 0,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}