mirror of
https://github.com/smaeul/u-boot.git
synced 2025-09-12 04:56:02 +01:00
Due to a bug in the H3 SoC, where the CPU 0 hotplug flag cannot be written, resuming CPU 0 requires using the "Super Standby" code path in the BROM instead of the hotplug path. This path requires jumping to an eGON image in SRAM. Add support to the build system to generate this eGON image and include it in the FIT, and add code to direct the BROM to its location in SRAM. Since the Super Standby code path in the BROM initializes the CPU and AHB1 clocks to 24 MHz, those registers need to be restored after control passes back to U-Boot. Furthermore, because the BROM lowers the AHB1 clock divider to /1 before switching to the lower-frequency parent, PLL_PERIPH0 must be bypassed to prevent AHB1 from temporarily running at 600 MHz. Otherwise, this locks up the SoC. Signed-off-by: Samuel Holland <samuel@sholland.org>
144 lines
2.4 KiB
Plaintext
144 lines
2.4 KiB
Plaintext
#include <config.h>
|
|
|
|
#ifdef CONFIG_ARM64
|
|
#define ARCH "arm64"
|
|
#else
|
|
#define ARCH "arm"
|
|
#endif
|
|
|
|
/ {
|
|
aliases {
|
|
mmc0 = &mmc0;
|
|
#if CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
|
|
mmc1 = &mmc2;
|
|
#endif
|
|
};
|
|
|
|
binman: binman {
|
|
multiple-images;
|
|
};
|
|
};
|
|
|
|
/* Let U-Boot be the firmware layer that controls the watchdog. */
|
|
#ifdef CONFIG_MACH_SUN8I_R528
|
|
&wdt {
|
|
status = "okay";
|
|
};
|
|
#endif
|
|
|
|
&binman {
|
|
u-boot-sunxi-with-spl {
|
|
filename = "u-boot-sunxi-with-spl.bin";
|
|
pad-byte = <0xff>;
|
|
|
|
blob {
|
|
/*
|
|
* This value matches SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
|
|
* and SYS_SPI_U_BOOT_OFFS if those are defined.
|
|
*/
|
|
min-size = <0x8000>;
|
|
filename = "spl/sunxi-spl.bin";
|
|
};
|
|
|
|
#ifdef CONFIG_SPL_LOAD_FIT
|
|
fit {
|
|
description = "Configuration to load U-Boot and firmware";
|
|
#address-cells = <1>;
|
|
fit,fdt-list = "of-list";
|
|
|
|
images {
|
|
uboot {
|
|
description = "U-Boot";
|
|
type = "standalone";
|
|
os = "u-boot";
|
|
arch = ARCH;
|
|
compression = "none";
|
|
load = <CONFIG_TEXT_BASE>;
|
|
entry = <CONFIG_TEXT_BASE>;
|
|
|
|
u-boot-nodtb {
|
|
};
|
|
};
|
|
|
|
#if CONFIG_SUNXI_BL31_BASE
|
|
atf {
|
|
description = "ARM Trusted Firmware";
|
|
type = "firmware";
|
|
os = "arm-trusted-firmware";
|
|
arch = ARCH;
|
|
compression = "none";
|
|
load = <CONFIG_SUNXI_BL31_BASE>;
|
|
entry = <CONFIG_SUNXI_BL31_BASE>;
|
|
|
|
atf-bl31 {
|
|
filename = "bl31.bin";
|
|
missing-msg = "atf-bl31-sunxi";
|
|
};
|
|
};
|
|
#endif
|
|
|
|
#if CONFIG_SUNXI_RESUME_BASE
|
|
resume {
|
|
description = "Super Standby resume image";
|
|
type = "standalone";
|
|
arch = ARCH;
|
|
compression = "none";
|
|
load = <CONFIG_SUNXI_RESUME_BASE>;
|
|
|
|
blob-ext {
|
|
filename = "u-boot-resume.img";
|
|
};
|
|
};
|
|
#endif
|
|
|
|
#if CONFIG_SUNXI_SCP_BASE
|
|
scp {
|
|
description = "SCP firmware";
|
|
type = "firmware";
|
|
arch = "or1k";
|
|
compression = "none";
|
|
load = <CONFIG_SUNXI_SCP_BASE>;
|
|
|
|
scp {
|
|
filename = "scp.bin";
|
|
missing-msg = "scp-sunxi";
|
|
};
|
|
};
|
|
#endif
|
|
|
|
@fdt-SEQ {
|
|
description = "NAME";
|
|
type = "flat_dt";
|
|
compression = "none";
|
|
};
|
|
};
|
|
|
|
configurations {
|
|
default = "@config-DEFAULT-SEQ";
|
|
|
|
@config-SEQ {
|
|
description = "NAME";
|
|
#if CONFIG_SUNXI_BL31_BASE
|
|
firmware = "atf";
|
|
#else
|
|
firmware = "uboot";
|
|
#endif
|
|
loadables =
|
|
#if CONFIG_SUNXI_RESUME_BASE
|
|
"resume",
|
|
#endif
|
|
#if CONFIG_SUNXI_SCP_BASE
|
|
"scp",
|
|
#endif
|
|
"uboot";
|
|
fdt = "fdt-SEQ";
|
|
};
|
|
};
|
|
};
|
|
#else
|
|
u-boot-img {
|
|
};
|
|
#endif
|
|
};
|
|
};
|