diff --git a/packages/tools/atf/package.mk b/packages/tools/atf/package.mk index d0798a3ad5..fd50f771fe 100644 --- a/packages/tools/atf/package.mk +++ b/packages/tools/atf/package.mk @@ -2,8 +2,8 @@ # Copyright (C) 2018-present Team LibreELEC PKG_NAME="atf" -PKG_VERSION="2.4" -PKG_SHA256="4bfda9fdbe5022f2e88ad3344165f7d38a8ae4a0e2d91d44d9a1603425cc642d" +PKG_VERSION="2.7" +PKG_SHA256="327c65b1bc231608a7a808b068b00c1a22310e9fc86158813cd10a9711d5725e" PKG_ARCH="arm aarch64" PKG_LICENSE="BSD-3c" PKG_SITE="https://github.com/ARM-software/arm-trusted-firmware" diff --git a/projects/Allwinner/patches/atf/0001-sunxi-Don-t-enable-referenced-regulators.patch b/projects/Allwinner/patches/atf/0001-sunxi-Don-t-enable-referenced-regulators.patch index 62c24133e8..2de0cda61c 100644 --- a/projects/Allwinner/patches/atf/0001-sunxi-Don-t-enable-referenced-regulators.patch +++ b/projects/Allwinner/patches/atf/0001-sunxi-Don-t-enable-referenced-regulators.patch @@ -5,22 +5,18 @@ Subject: [PATCH] sunxi: Don't enable referenced regulators This break certain devices which need appropriate power on sequence. --- - drivers/allwinner/axp/common.c | 2 -- - 1 file changed, 2 deletions(-) + drivers/allwinner/axp/common.c | 3 --- + 1 file changed, 3 deletions(-) -diff --git a/drivers/allwinner/axp/common.c b/drivers/allwinner/axp/common.c -index e98b16fdb2ec..45c6507e0e23 100644 --- a/drivers/allwinner/axp/common.c +++ b/drivers/allwinner/axp/common.c -@@ -98,8 +98,6 @@ static int setup_regulator(const void *fdt, int node, - - static bool should_enable_regulator(const void *fdt, int node) - { -- if (fdt_getprop(fdt, node, "phandle", NULL) != NULL) +@@ -112,9 +112,6 @@ static bool should_enable_regulator(const void *fdt, + if (is_node_disabled(fdt, node)) { + return false; + } +- if (fdt_getprop(fdt, node, "phandle", NULL) != NULL) { - return true; - if (fdt_getprop(fdt, node, "regulator-always-on", NULL) != NULL) +- } + if (fdt_getprop(fdt, node, "regulator-always-on", NULL) != NULL) { return true; - return false; --- -2.30.0 - + } diff --git a/projects/Allwinner/patches/atf/0002-allwinner-psci-Improve-system-shutdown-reset-sequenc.patch b/projects/Allwinner/patches/atf/0002-allwinner-psci-Improve-system-shutdown-reset-sequenc.patch deleted file mode 100644 index ddf94e8077..0000000000 --- a/projects/Allwinner/patches/atf/0002-allwinner-psci-Improve-system-shutdown-reset-sequenc.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Sat, 16 Jan 2021 01:58:22 -0600 -Subject: [PATCH] allwinner: psci: Improve system shutdown/reset sequence - -- When the SCPI shutdown/reset command returns success, the SCPI - implementation is still waiting for the CPU to enter WFI. Do that. -- Peform board-level poweroff before CPU poweroff. If there is a PMIC - available, it will turn everything off including the CPUs, so doing - CPU poweroff first is a waste of cycles. -- During poweroff, attempt to turn off the local CPU using the ARISC. - This should use slightly less power than just an infinite WFI. -- Drop the WFI in the reset failure path. The panic will hang anyway. - -Change-Id: I897efecb3fe4e77a56041b97dd273156ec51ef8e -Signed-off-by: Samuel Holland ---- - plat/allwinner/common/sunxi_pm.c | 26 ++++++++++++++++---------- - 1 file changed, 16 insertions(+), 10 deletions(-) - -diff --git a/plat/allwinner/common/sunxi_pm.c b/plat/allwinner/common/sunxi_pm.c -index 03985f40be55..038f2b7edb2f 100644 ---- a/plat/allwinner/common/sunxi_pm.c -+++ b/plat/allwinner/common/sunxi_pm.c -@@ -125,24 +125,29 @@ static void sunxi_pwr_domain_on_finish(const psci_power_state_t *target_state) - - static void __dead2 sunxi_system_off(void) - { -+ u_register_t mpidr = read_mpidr(); -+ - gicv2_cpuif_disable(); - - if (scpi_available) { - /* Send the power down request to the SCP */ - uint32_t ret = scpi_sys_power_state(scpi_system_shutdown); - -- if (ret != SCP_OK) -- ERROR("PSCI: SCPI %s failed: %d\n", "shutdown", ret); -+ if (ret == SCP_OK) -+ wfi(); -+ -+ ERROR("PSCI: SCPI %s failed: %d\n", "shutdown", ret); - } - -- /* Turn off all secondary CPUs */ -- sunxi_disable_secondary_cpus(read_mpidr()); -- -+ /* Attempt to power down the board (may not return) */ - sunxi_power_down(); - -- udelay(1000); -+ /* Turn off all CPUs */ -+ sunxi_disable_secondary_cpus(mpidr); -+ sunxi_cpu_off(mpidr); -+ wfi(); -+ - ERROR("PSCI: Cannot turn off system, halting\n"); -- wfi(); - panic(); - } - -@@ -154,8 +159,10 @@ static void __dead2 sunxi_system_reset(void) - /* Send the system reset request to the SCP */ - uint32_t ret = scpi_sys_power_state(scpi_system_reboot); - -- if (ret != SCP_OK) -- ERROR("PSCI: SCPI %s failed: %d\n", "reboot", ret); -+ if (ret == SCP_OK) -+ wfi(); -+ -+ ERROR("PSCI: SCPI %s failed: %d\n", "reboot", ret); - } - - /* Reset the whole system when the watchdog times out */ -@@ -166,7 +173,6 @@ static void __dead2 sunxi_system_reset(void) - mdelay(1000); - - ERROR("PSCI: System reset failed\n"); -- wfi(); - panic(); - } -