diff --git a/plat/mediatek/lib/system_reset/reset_cros.c b/plat/mediatek/lib/system_reset/reset_cros.c index 40e68ba9f..5f976501a 100644 --- a/plat/mediatek/lib/system_reset/reset_cros.c +++ b/plat/mediatek/lib/system_reset/reset_cros.c @@ -1,18 +1,25 @@ /* - * Copyright (c) 2022, MediaTek Inc. All rights reserved. + * Copyright (c) 2022-2025, MediaTek Inc. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include + #include #include +#include #include +#if CONFIG_MTK_PMIC_SHUTDOWN_CFG +#include +#endif #include #include #include +#if !CONFIG_MTK_PMIC_SHUTDOWN_CFG #include #include +#endif static void __dead2 mtk_system_reset_cros(void) { @@ -31,8 +38,13 @@ static void __dead2 mtk_system_off_cros(void) { INFO("MTK System Off\n"); +#if CONFIG_MTK_PMIC_SHUTDOWN_CFG + platform_power_hold(false); + mdelay(1000); +#else rtc_power_off_sequence(); pmic_power_off(); +#endif wfi(); ERROR("MTK System Off: operation not handled.\n"); diff --git a/plat/mediatek/mt8196/include/platform_def.h b/plat/mediatek/mt8196/include/platform_def.h index 72d83e64b..83370d6c5 100644 --- a/plat/mediatek/mt8196/include/platform_def.h +++ b/plat/mediatek/mt8196/include/platform_def.h @@ -87,7 +87,7 @@ * GPIO related constants ******************************************************************************/ #define GPIO_BASE (IO_PHYS + 0x0002D000) -#define RGU_BASE (IO_PHYS + 0x0C00B000) +#define RGU_BASE (IO_PHYS + 0x0C010000) #define DRM_BASE (IO_PHYS + 0x0000D000) #define IOCFG_RT_BASE (IO_PHYS + 0x02000000) #define IOCFG_RM1_BASE (IO_PHYS + 0x02020000) diff --git a/plat/mediatek/mt8196/platform.mk b/plat/mediatek/mt8196/platform.mk index 50508093a..520771dfa 100644 --- a/plat/mediatek/mt8196/platform.mk +++ b/plat/mediatek/mt8196/platform.mk @@ -41,6 +41,7 @@ MODULES-y += $(MTK_PLAT)/common MODULES-y += $(MTK_PLAT)/common/lpm_v2 MODULES-y += $(MTK_PLAT)/lib/mtk_init MODULES-y += $(MTK_PLAT)/lib/pm +MODULES-y += $(MTK_PLAT)/lib/system_reset MODULES-y += $(MTK_PLAT)/drivers/apusys MODULES-y += $(MTK_PLAT)/drivers/cirq MODULES-y += $(MTK_PLAT)/drivers/dp