From 1a5f0de08e86f2f127aaac928fee5ea0f2a9236e Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 2 May 2016 10:28:06 +0800 Subject: sunxi: make SoC variant choice mandatory The user should always select an SoC variant to support. Not choosing one doesn't make sense for a bootloader. Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/Kconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'board/sunxi') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index fa7872031b..95500a1bcd 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)" -- cgit v1.2.1 From a81b79950e16182862e31ad86a97b6a8a6891476 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 2 May 2016 10:28:07 +0800 Subject: sunxi: Sort SoC variants by family (sunXi) first, chip name second In most other places, we sort SoC descriptions by family (sunXi) first, then by the chip name (A20). Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/Kconfig | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'board/sunxi') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 95500a1bcd..49a937a8b6 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -67,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 @@ -76,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" -- cgit v1.2.1 From acdab175c0853ed1f389bca467765dc98f9e4bcb Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 2 May 2016 10:28:08 +0800 Subject: sunxi: Add default MMC0 card detect pin for A83T, H3 and A64 SoCs A83T, H3, and A64 have a dedicated pin for card detect on the PF pingroup. This is used in all designs. Set it as the default. Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'board/sunxi') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 49a937a8b6..a24d5c238d 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -260,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 -- cgit v1.2.1 From 5af116b560d8a6e0b11d6239b5a8f783f9ac6fd1 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 2 May 2016 10:28:09 +0800 Subject: sunxi: Disable VIDEO for SoCs without display support The newer chips use a newer display pipeline, which is not supported. Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/sunxi') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index a24d5c238d..059e9146cc 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -419,7 +419,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 -- cgit v1.2.1 From 15278ccb848dbcd8825874f943bc21afda987219 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 2 May 2016 10:28:12 +0800 Subject: sunxi: power: axp818: Add support for switch SW The AXP818 has a switchable output, SW. This is commonly used for controlling power to the LCD backlight. Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/board.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board/sunxi') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 3cf36147b2..6a0a8dbc4f 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -523,6 +523,7 @@ void sunxi_board_init(void) power_failed |= axp_set_fldo(1, CONFIG_AXP_FLDO1_VOLT); power_failed |= axp_set_fldo(2, CONFIG_AXP_FLDO2_VOLT); power_failed |= axp_set_fldo(3, CONFIG_AXP_FLDO3_VOLT); + power_failed |= axp_set_sw(IS_ENABLED(CONFIG_AXP_SW_ON)); #endif #endif printf("DRAM:"); -- cgit v1.2.1 From 795857df413aea278af95305d4b6ffc48089d6e8 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 2 May 2016 10:28:15 +0800 Subject: sunxi: power: add AXP809 support The A80 uses the AXP809 as its primary PMIC. Signed-off-by: Chen-Yu Tsai Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/board.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'board/sunxi') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 6a0a8dbc4f..103aafe14d 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -483,10 +483,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 +496,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 +513,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); @@ -523,6 +530,9 @@ void sunxi_board_init(void) power_failed |= axp_set_fldo(1, CONFIG_AXP_FLDO1_VOLT); 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 -- cgit v1.2.1 From 087504958a6c509b95e2967d7f78883728cf7b05 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Wed, 4 May 2016 22:15:30 +0100 Subject: Revert "sunxi: Reserve ATF memory space on A64" The ARM Trusted Firmware (ATF) code now lives in SRAM on the Pine64/A64, so we can claim the whole of DRAM for OS use. This reverts commit 3ffe39ed2b66af71c7271d0cef2a248b5bf7dfdb. Signed-off-by: Andre Przywara Acked-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/board.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'board/sunxi') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 103aafe14d..d09cf6dfb5 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) { -- cgit v1.2.1 From 0878a8a7dbb71fb5b1e10007cfc6203844b029c2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 15 May 2016 13:51:58 +0200 Subject: sunxi: Enable a bunch of commands by default on sunxi Recently a set of CONFIG_CMD_FOO defines was moved from being defined in config_distro_defaults to Kconfig, and added to all sunxi defconfigs to compensate. Instead of explictly selecting these in all sunxi defconfigs, simply always select these for sunxi boards. This makes the defconfigs simpler and ensures a consistent set of available commands across all sunxi boards. Signed-off-by: Hans de Goede --- board/sunxi/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'board/sunxi') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 059e9146cc..c1ae6f5d9e 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -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 @@ -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. -- cgit v1.2.1