summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-05-25 12:32:56 -0400
committerTom Rini <trini@konsulko.com>2016-05-25 12:32:56 -0400
commit82f2a144917d6cc5f8a9a49b1a1a15b0fb5742d5 (patch)
tree0b42c7680119067fd1d171f482d34ca0975f67a1 /board
parent1b80e79586b0b777afa6a905961000c8495828cc (diff)
parent0e6e34ac8dbb597a34e1eca4fb640c3eb5e52467 (diff)
downloadu-boot-imx-82f2a144917d6cc5f8a9a49b1a1a15b0fb5742d5.zip
u-boot-imx-82f2a144917d6cc5f8a9a49b1a1a15b0fb5742d5.tar.gz
u-boot-imx-82f2a144917d6cc5f8a9a49b1a1a15b0fb5742d5.tar.bz2
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/Kconfig33
-rw-r--r--board/sunxi/board.c30
2 files changed, 36 insertions, 27 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index fa78720..c1ae6f5 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -18,7 +18,6 @@ config SUNXI_GEN_SUN6I
choice
prompt "Sunxi SoC Variant"
- optional
config MACH_SUN4I
bool "sun4i (Allwinner A10)"
@@ -68,6 +67,12 @@ config MACH_SUN8I_A33
select SUPPORT_SPL
select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
+config MACH_SUN8I_A83T
+ bool "sun8i (Allwinner A83T)"
+ select CPU_V7
+ select SUNXI_GEN_SUN6I
+ select SUPPORT_SPL
+
config MACH_SUN8I_H3
bool "sun8i (Allwinner H3)"
select CPU_V7
@@ -77,22 +82,16 @@ config MACH_SUN8I_H3
select SUPPORT_SPL
select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
-config MACH_SUN50I
- bool "sun50i (Allwinner A64)"
- select ARM64
- select SUNXI_GEN_SUN6I
-
-config MACH_SUN8I_A83T
- bool "sun8i (Allwinner A83T)"
- select CPU_V7
- select SUNXI_GEN_SUN6I
- select SUPPORT_SPL
-
config MACH_SUN9I
bool "sun9i (Allwinner A80)"
select CPU_V7
select SUNXI_GEN_SUN6I
+config MACH_SUN50I
+ bool "sun50i (Allwinner A64)"
+ select ARM64
+ select SUNXI_GEN_SUN6I
+
endchoice
# The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33"
@@ -261,6 +260,7 @@ config MMC
config MMC0_CD_PIN
string "Card detect pin for mmc0"
+ default "PF6" if MACH_SUN8I_A83T || MACH_SUN8I_H3 || MACH_SUN50I
default ""
---help---
Set the card detect pin for mmc0, leave empty to not use cd. This
@@ -368,6 +368,7 @@ config I2C0_ENABLE
bool "Enable I2C/TWI controller 0"
default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
default n if MACH_SUN6I || MACH_SUN8I
+ select CMD_I2C
---help---
This allows enabling I2C/TWI controller 0 by muxing its pins, enabling
its clock and setting up the bus. This is especially useful on devices
@@ -377,12 +378,14 @@ config I2C0_ENABLE
config I2C1_ENABLE
bool "Enable I2C/TWI controller 1"
default n
+ select CMD_I2C
---help---
See I2C0_ENABLE help text.
config I2C2_ENABLE
bool "Enable I2C/TWI controller 2"
default n
+ select CMD_I2C
---help---
See I2C0_ENABLE help text.
@@ -390,6 +393,7 @@ if MACH_SUN6I || MACH_SUN7I
config I2C3_ENABLE
bool "Enable I2C/TWI controller 3"
default n
+ select CMD_I2C
---help---
See I2C0_ENABLE help text.
endif
@@ -399,6 +403,7 @@ config R_I2C_ENABLE
bool "Enable the PRCM I2C/TWI controller"
# This is used for the pmic on H3
default y if SY8106A_POWER
+ select CMD_I2C
---help---
Set this to y to enable the I2C controller which is part of the PRCM.
endif
@@ -407,6 +412,7 @@ if MACH_SUN7I
config I2C4_ENABLE
bool "Enable I2C/TWI controller 4"
default n
+ select CMD_I2C
---help---
See I2C0_ENABLE help text.
endif
@@ -419,7 +425,7 @@ config AXP_GPIO
config VIDEO
boolean "Enable graphical uboot console on HDMI, LCD or VGA"
- depends on !MACH_SUN8I_A83T
+ depends on !MACH_SUN8I_A83T && !MACH_SUN8I_H3 && !MACH_SUN9I && !MACH_SUN50I_A64
default y
---help---
Say Y here to add support for using a cfb console on the HDMI, LCD
@@ -535,6 +541,7 @@ config VIDEO_LCD_PANEL_I2C
bool "LCD panel needs to be configured via i2c"
depends on VIDEO
default n
+ select CMD_I2C
---help---
Say y here if the LCD panel needs to be configured via i2c. This
will add a bitbang i2c controller using gpios to talk to the LCD.
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 3cf3614..d09cf6d 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -133,15 +133,6 @@ int dram_init(void)
return 0;
}
-#ifdef CONFIG_MACH_SUN50I
-void dram_init_banksize(void)
-{
- /* We need to reserve the first 16MB of RAM for ATF */
- gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + (16 * 1024 * 1024);
- gd->bd->bi_dram[0].size = get_effective_memsize() - (16 * 1024 * 1024);
-}
-#endif
-
#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
static void nand_pinmux_setup(void)
{
@@ -483,10 +474,12 @@ void sunxi_board_init(void)
#endif
#if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \
- defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER
+ defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
+ defined CONFIG_AXP818_POWER
power_failed = axp_init();
-#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
+ defined CONFIG_AXP818_POWER
power_failed |= axp_set_dcdc1(CONFIG_AXP_DCDC1_VOLT);
#endif
power_failed |= axp_set_dcdc2(CONFIG_AXP_DCDC2_VOLT);
@@ -494,11 +487,13 @@ void sunxi_board_init(void)
#if !defined(CONFIG_AXP209_POWER) && !defined(CONFIG_AXP818_POWER)
power_failed |= axp_set_dcdc4(CONFIG_AXP_DCDC4_VOLT);
#endif
-#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
+ defined CONFIG_AXP818_POWER
power_failed |= axp_set_dcdc5(CONFIG_AXP_DCDC5_VOLT);
#endif
-#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \
+ defined CONFIG_AXP818_POWER
power_failed |= axp_set_aldo1(CONFIG_AXP_ALDO1_VOLT);
#endif
power_failed |= axp_set_aldo2(CONFIG_AXP_ALDO2_VOLT);
@@ -509,11 +504,14 @@ void sunxi_board_init(void)
power_failed |= axp_set_aldo4(CONFIG_AXP_ALDO4_VOLT);
#endif
-#if defined(CONFIG_AXP221_POWER) || defined(CONFIG_AXP818_POWER)
+#if defined(CONFIG_AXP221_POWER) || defined(CONFIG_AXP809_POWER) || \
+ defined(CONFIG_AXP818_POWER)
power_failed |= axp_set_dldo(1, CONFIG_AXP_DLDO1_VOLT);
power_failed |= axp_set_dldo(2, CONFIG_AXP_DLDO2_VOLT);
+#if !defined CONFIG_AXP809_POWER
power_failed |= axp_set_dldo(3, CONFIG_AXP_DLDO3_VOLT);
power_failed |= axp_set_dldo(4, CONFIG_AXP_DLDO4_VOLT);
+#endif
power_failed |= axp_set_eldo(1, CONFIG_AXP_ELDO1_VOLT);
power_failed |= axp_set_eldo(2, CONFIG_AXP_ELDO2_VOLT);
power_failed |= axp_set_eldo(3, CONFIG_AXP_ELDO3_VOLT);
@@ -524,6 +522,10 @@ void sunxi_board_init(void)
power_failed |= axp_set_fldo(2, CONFIG_AXP_FLDO2_VOLT);
power_failed |= axp_set_fldo(3, CONFIG_AXP_FLDO3_VOLT);
#endif
+
+#if defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER
+ power_failed |= axp_set_sw(IS_ENABLED(CONFIG_AXP_SW_ON));
+#endif
#endif
printf("DRAM:");
ramsize = sunxi_dram_init();