Yu-Ping Wu has submitted this change. ( https://review.coreboot.org/c/coreboot/+/84025?usp=email )
Change subject: soc/mediatek/mt8196: Add unmask eint event for bootblock ......................................................................
soc/mediatek/mt8196: Add unmask eint event for bootblock
EINT event mask register is used to mask EINT wakeup source. All wakeup sources are masked by default. Since most MediaTek SoCs do not have this design, we can't modify the kernel EINT upstream driver to solve the issue "Can't wake using power button (cros_ec) or touchpad". So we add a driver here to unmask all wakeup sources.
TEST=write eint data successfully. BUG=b:317009620
Change-Id: I4bf3820a89172186b8f51591f8760787affbb7a3 Signed-off-by: Chhao Chang ot_chhao.chang@mediatek.corp-partner.google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/84025 Reviewed-by: Yidi Lin yidilin@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yu-Ping Wu yupingso@google.com --- M src/soc/mediatek/mt8196/Makefile.mk M src/soc/mediatek/mt8196/bootblock.c A src/soc/mediatek/mt8196/eint_event_info.c 3 files changed, 16 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved Yidi Lin: Looks good to me, approved
diff --git a/src/soc/mediatek/mt8196/Makefile.mk b/src/soc/mediatek/mt8196/Makefile.mk index 80dac20..0ef442f 100644 --- a/src/soc/mediatek/mt8196/Makefile.mk +++ b/src/soc/mediatek/mt8196/Makefile.mk @@ -15,6 +15,7 @@ bootblock-y += ../common/bootblock.c bootblock.c bootblock-y += cksys.c bootblock-y += ../common/early_init.c +bootblock-y += ../common/eint_event.c eint_event_info.c bootblock-y += ../common/lastbus_v2.c lastbus.c bootblock-y += mminfra.c bootblock-y += ../common/mmu_operations.c diff --git a/src/soc/mediatek/mt8196/bootblock.c b/src/soc/mediatek/mt8196/bootblock.c index bd3c418..891a195 100644 --- a/src/soc/mediatek/mt8196/bootblock.c +++ b/src/soc/mediatek/mt8196/bootblock.c @@ -4,6 +4,7 @@ #include <bootblock_common.h> #include <soc/cksys.h> #include <soc/early_init.h> +#include <soc/eint_event.h> #include <soc/lastbus_v2.h> #include <soc/mminfra.h> #include <soc/mmu_operations.h> @@ -26,4 +27,5 @@ mt_pll_post_init(); mtcmos_post_init(); early_init_clear(); + unmask_eint_event_mask(); } diff --git a/src/soc/mediatek/mt8196/eint_event_info.c b/src/soc/mediatek/mt8196/eint_event_info.c new file mode 100644 index 0000000..5917b76 --- /dev/null +++ b/src/soc/mediatek/mt8196/eint_event_info.c @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ + +#include <soc/addressmap.h> +#include <soc/eint_event.h> + +const struct eint_event_info eint_event[] = { + {EINT_E_BASE, 75}, + {EINT_S_BASE, 29}, + {EINT_W_BASE, 58}, + {EINT_N_BASE, 47}, + {EINT_C_BASE, 25}, + {}, +};