diff options
author | Tom Rini <trini@konsulko.com> | 2022-01-31 01:12:34 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-31 01:12:34 +0300 |
commit | e267665a7420bddbfd5833573fdfc9d0930ff515 (patch) | |
tree | dd92172de357d0843012dcdc5a1a363ad31bffb9 /board | |
parent | c7d042f315d89ab2f0122920829f18a8f8897a05 (diff) | |
parent | 50d5c6428fc280c095b0edd1a612b3661b5db77d (diff) | |
download | u-boot-e267665a7420bddbfd5833573fdfc9d0930ff515.tar.xz |
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
a bit delayed, the first batch of the sunxi pull request for this cycle.
This is mostly collecting some patches that were lying around for a
while, plus some recent fixes. Nothing too exciting at this point, but
of course they should be merged nevertheless.
There is the much bigger F1C100s SoC support coming up, which I hope to
be able to send in the next few days, along with the removal of sunxi's
lowlevel_init usage.
Compile tested for all 159 sunxi boards, plus briefly tested on BananaPi
M1, OrangePi Zero, Pine64 and Pine-H64.
Diffstat (limited to 'board')
-rw-r--r-- | board/sunxi/board.c | 17 | ||||
-rw-r--r-- | board/sunxi/dram_sun4i_auto.c | 2 | ||||
-rw-r--r-- | board/sunxi/dram_sun5i_auto.c | 2 |
3 files changed, 17 insertions, 4 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 2790a0f9e8..91463009b0 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -28,6 +28,7 @@ #include <asm/arch/dram.h> #include <asm/arch/mmc.h> #include <asm/arch/prcm.h> +#include <asm/arch/pmic_bus.h> #include <asm/arch/spl.h> #include <asm/global_data.h> #include <linux/delay.h> @@ -602,6 +603,16 @@ void sunxi_board_init(void) defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER power_failed = axp_init(); + if (IS_ENABLED(CONFIG_AXP_DISABLE_BOOT_ON_POWERON) && !power_failed) { + u8 boot_reason; + + pmic_bus_read(AXP_POWER_STATUS, &boot_reason); + if (boot_reason & AXP_POWER_STATUS_ALDO_IN) { + printf("Power on by plug-in, shutting down.\n"); + pmic_bus_write(0x32, BIT(7)); + } + } + #if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \ defined CONFIG_AXP818_POWER power_failed |= axp_set_dcdc1(CONFIG_AXP_DCDC1_VOLT); @@ -912,10 +923,12 @@ int ft_board_setup(void *blob, struct bd_info *bd) int __maybe_unused r; /* - * Call setup_environment again in case the boot fdt has - * ethernet aliases the u-boot copy does not have. + * Call setup_environment and fdt_fixup_ethernet again + * in case the boot fdt has ethernet aliases the u-boot + * copy does not have. */ setup_environment(blob); + fdt_fixup_ethernet(blob); bluetooth_dt_fixup(blob); diff --git a/board/sunxi/dram_sun4i_auto.c b/board/sunxi/dram_sun4i_auto.c index e8bbee4ee5..547d1c0cb4 100644 --- a/board/sunxi/dram_sun4i_auto.c +++ b/board/sunxi/dram_sun4i_auto.c @@ -4,7 +4,7 @@ static struct dram_para dram_para = { .clock = CONFIG_DRAM_CLK, - .type = 3, + .type = DRAM_MEMORY_TYPE_DDR3, .rank_num = 1, .density = 0, .io_width = 0, diff --git a/board/sunxi/dram_sun5i_auto.c b/board/sunxi/dram_sun5i_auto.c index a5f4f8b743..517506ccc4 100644 --- a/board/sunxi/dram_sun5i_auto.c +++ b/board/sunxi/dram_sun5i_auto.c @@ -7,7 +7,7 @@ static struct dram_para dram_para = { .clock = CONFIG_DRAM_CLK, .mbus_clock = CONFIG_DRAM_MBUS_CLK, - .type = 3, + .type = DRAM_MEMORY_TYPE_DDR3, .rank_num = 1, .density = 0, .io_width = 0, |