[U-Boot] [PATCH u-boot sunxi 10/12] sunxi: fast MBUS support on sun7i
Hans de Goede
hdegoede at redhat.com
Tue Mar 18 00:00:54 CET 2014
From: Emilio López <emilio at elopez.com.ar>
For qualifying hardware, we can run MBUS at 400MHz without risking
stability if we raise the DCDC3 voltage to 1.3V .
This is desirable since on A20 the MBUS is a significant bottle-neck
for some workloads.
This has been tested on 50 pieces of Cubieboard2 by Cubietech and no
issues of any kind were reported.
Signed-off-by: Emilio López <emilio at elopez.com.ar>
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
arch/arm/cpu/armv7/sunxi/dram.c | 6 +++++-
board/sunxi/board.c | 4 ++++
boards.cfg | 4 ++--
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/armv7/sunxi/dram.c b/arch/arm/cpu/armv7/sunxi/dram.c
index 781f9b5..9061f98 100644
--- a/arch/arm/cpu/armv7/sunxi/dram.c
+++ b/arch/arm/cpu/armv7/sunxi/dram.c
@@ -217,7 +217,11 @@ static void mctl_setup_dram_clock(u32 clk)
/* setup MBUS clock */
reg_val = CCM_MBUS_CTRL_GATE |
-#if defined(CONFIG_SUN7I)
+#if defined(CONFIG_SUN7I) && defined(CONFIG_FAST_MBUS)
+ CCM_MBUS_CTRL_CLK_SRC(CCM_MBUS_CTRL_CLK_SRC_PLL6) |
+ CCM_MBUS_CTRL_N(CCM_MBUS_CTRL_N_X(1)) |
+ CCM_MBUS_CTRL_M(CCM_MBUS_CTRL_M_X(3));
+#elif defined(CONFIG_SUN7I) && !defined(CONFIG_FAST_MBUS)
CCM_MBUS_CTRL_CLK_SRC(CCM_MBUS_CTRL_CLK_SRC_PLL6) |
CCM_MBUS_CTRL_N(CCM_MBUS_CTRL_N_X(2)) |
CCM_MBUS_CTRL_M(CCM_MBUS_CTRL_M_X(2));
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e9801b9..4dadf2b 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -84,7 +84,11 @@ void sunxi_board_init(void)
#ifdef CONFIG_AXP209_POWER
power_failed |= axp209_init();
power_failed |= axp209_set_dcdc2(1400);
+#ifdef CONFIG_FAST_MBUS
+ power_failed |= axp209_set_dcdc3(1300);
+#else
power_failed |= axp209_set_dcdc3(1250);
+#endif
power_failed |= axp209_set_ldo2(3000);
power_failed |= axp209_set_ldo3(2800);
power_failed |= axp209_set_ldo4(2800);
diff --git a/boards.cfg b/boards.cfg
index 20f7510..82d2c6a 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -355,8 +355,8 @@ Active arm armv7 s5pc1xx samsung smdkc100
Active arm armv7 socfpga altera socfpga socfpga_cyclone5 - -
Active arm armv7 sunxi - sunxi A10-OLinuXino-Lime sun4i:A10_OLINUXINO_L,AXP209_POWER,SPL -
Active arm armv7 sunxi - sunxi A10s-OLinuXino-M sun5i:A10S_OLINUXINO_M,AXP152_POWER,SPL -
-Active arm armv7 sunxi - sunxi Cubietruck sun7i:CUBIETRUCK,AXP209_POWER,SPL -
-Active arm armv7 sunxi - sunxi Cubietruck_FEL sun7i:CUBIETRUCK,AXP209_POWER,SPL_FEL -
+Active arm armv7 sunxi - sunxi Cubietruck sun7i:CUBIETRUCK,AXP209_POWER,FAST_MBUS,SPL -
+Active arm armv7 sunxi - sunxi Cubietruck_FEL sun7i:CUBIETRUCK,AXP209_POWER,FAST_MBUS,SPL_FEL -
Active arm armv7 u8500 st-ericsson snowball snowball - Mathieu Poirier <mathieu.poirier at linaro.org>
Active arm armv7 u8500 st-ericsson u8500 u8500_href - -
Active arm armv7 vf610 freescale vf610twr vf610twr vf610twr:IMX_CONFIG=board/freescale/vf610twr/imximage.cfg Alison Wang <b18965 at freescale.com>
--
1.9.0
More information about the U-Boot
mailing list