diff options
author | Tom Rini <trini@konsulko.com> | 2023-11-12 16:36:22 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-11-12 16:36:52 -0500 |
commit | 92b27528d777ce85362af45e7d2974a6c856219b (patch) | |
tree | f0b13aa1e4334f308c46f6cbd9a25d5fc2a14633 /board/sunxi/board.c | |
parent | 17e9db18f17b6cad278694d4a61df95e96bdf4f5 (diff) | |
parent | 4b02f0120a4bb2a5d7081aef8cef6a4ca57e9db2 (diff) | |
download | u-boot-92b27528d777ce85362af45e7d2974a6c856219b.tar.gz u-boot-92b27528d777ce85362af45e7d2974a6c856219b.tar.bz2 u-boot-92b27528d777ce85362af45e7d2974a6c856219b.zip |
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
To quote Andre:
The first few patches are some easy refactorings and fixes, most of them
actually don't change the generated binaries at all. Then there is a
defconfig for a new board, for which we just gained the .dts file from
the last kernel DT sync.
On top there is support for a new PMIC (AXP313), and LPDDR4 support for
the Allwinner H616 SoC, both of which are needed to support new devices
that appeared lately, especially cheap TV boxes.
While those are technically new features, they don't affect existing
boards, for instance the LPDDR4 support code is guarded by a new DRAM
type Kconfig variable. So the risk for regressions is very slim.
Gitlab CI passed, and I booted that briefly on some boards, including an
H616 and an H618 one (with LPDDR4).
Diffstat (limited to 'board/sunxi/board.c')
-rw-r--r-- | board/sunxi/board.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 39ecbe988f..8c12c8dead 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -34,6 +34,7 @@ #include <asm/global_data.h> #include <linux/delay.h> #include <linux/printk.h> +#include <linux/types.h> #ifndef CONFIG_ARM64 #include <asm/armv7.h> #endif @@ -568,7 +569,8 @@ void sunxi_board_init(void) #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \ defined CONFIG_AXP221_POWER || defined CONFIG_AXP305_POWER || \ - defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER + defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER || \ + defined CONFIG_AXP313_POWER power_failed = axp_init(); if (IS_ENABLED(CONFIG_AXP_DISABLE_BOOT_ON_POWERON) && !power_failed) { @@ -581,50 +583,46 @@ void sunxi_board_init(void) } } -#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \ - defined CONFIG_AXP818_POWER +#ifdef CONFIG_AXP_DCDC1_VOLT power_failed |= axp_set_dcdc1(CONFIG_AXP_DCDC1_VOLT); + power_failed |= axp_set_dcdc5(CONFIG_AXP_DCDC5_VOLT); #endif -#if !defined(CONFIG_AXP305_POWER) +#ifdef CONFIG_AXP_DCDC2_VOLT power_failed |= axp_set_dcdc2(CONFIG_AXP_DCDC2_VOLT); power_failed |= axp_set_dcdc3(CONFIG_AXP_DCDC3_VOLT); #endif -#if !defined(CONFIG_AXP209_POWER) && !defined(CONFIG_AXP818_POWER) +#ifdef CONFIG_AXP_DCDC4_VOLT power_failed |= axp_set_dcdc4(CONFIG_AXP_DCDC4_VOLT); #endif -#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_AXP809_POWER || \ - defined CONFIG_AXP818_POWER +#ifdef CONFIG_AXP_ALDO1_VOLT power_failed |= axp_set_aldo1(CONFIG_AXP_ALDO1_VOLT); #endif -#if !defined(CONFIG_AXP305_POWER) +#ifdef CONFIG_AXP_ALDO2_VOLT power_failed |= axp_set_aldo2(CONFIG_AXP_ALDO2_VOLT); #endif -#if !defined(CONFIG_AXP152_POWER) && !defined(CONFIG_AXP305_POWER) +#ifdef CONFIG_AXP_ALDO3_VOLT power_failed |= axp_set_aldo3(CONFIG_AXP_ALDO3_VOLT); #endif -#ifdef CONFIG_AXP209_POWER +#ifdef CONFIG_AXP_ALDO4_VOLT power_failed |= axp_set_aldo4(CONFIG_AXP_ALDO4_VOLT); #endif -#if defined(CONFIG_AXP221_POWER) || defined(CONFIG_AXP809_POWER) || \ - defined(CONFIG_AXP818_POWER) +#ifdef CONFIG_AXP_DLDO1_VOLT 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 +#endif +#ifdef CONFIG_AXP_DLDO3_VOLT power_failed |= axp_set_dldo(3, CONFIG_AXP_DLDO3_VOLT); power_failed |= axp_set_dldo(4, CONFIG_AXP_DLDO4_VOLT); #endif +#ifdef CONFIG_AXP_ELDO1_VOLT 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); #endif -#ifdef CONFIG_AXP818_POWER +#ifdef CONFIG_AXP_FLDO1_VOLT 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); @@ -633,7 +631,7 @@ void sunxi_board_init(void) #if defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER power_failed |= axp_set_sw(IS_ENABLED(CONFIG_AXP_SW_ON)); #endif -#endif +#endif /* CONFIG_AXPxxx_POWER */ printf("DRAM:"); gd->ram_size = sunxi_dram_init(); printf(" %d MiB\n", (int)(gd->ram_size >> 20)); @@ -941,7 +939,7 @@ int board_fit_config_name_match(const char *name) #ifdef CONFIG_PINE64_DT_SELECTION if (strstr(best_dt_name, "-pine64-plus")) { /* Differentiate the Pine A64 boards by their DRAM size. */ - if ((gd->ram_size == 512 * 1024 * 1024)) + if (gd->ram_size == SZ_512M) best_dt_name = "sun50i-a64-pine64"; } #endif |