From db746342347a78c679d58d57231113ecfb3442a9 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 24 Nov 2025 09:33:39 +0100 Subject: [PATCH] imx-atf: enable access to GPIO1 port on i.MX95 GPIO1 port access was not enabled on ATF because NXP reserved it to have exclusive access from the secure world on their EVK. Signed-off-by: Hector Palacios https://onedigi.atlassian.net/browse/DEL-9839 --- ...on-secure-non-privilege-access-to-GP.patch | 30 +++++++++++++++++++ .../recipes-bsp/imx-atf/imx-atf_%.bbappend | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf/0010-ccimx95-enable-non-secure-non-privilege-access-to-GP.patch diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf/0010-ccimx95-enable-non-secure-non-privilege-access-to-GP.patch b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf/0010-ccimx95-enable-non-secure-non-privilege-access-to-GP.patch new file mode 100644 index 000000000..4559040de --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf/0010-ccimx95-enable-non-secure-non-privilege-access-to-GP.patch @@ -0,0 +1,30 @@ +From: Hector Palacios +Date: Fri, 21 Nov 2025 11:30:35 +0100 +Subject: [PATCH] ccimx95: enable non-secure, non-privilege access to GPIO1 + +GPIO1 port is reserved on NXP EVK but we want to enable +full access to the port from the non-secure world. + +Signed-off-by: Hector Palacios + +https://onedigi.atlassian.net/browse/DEL-9839 +--- + plat/imx/imx95/imx95_bl31_setup.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plat/imx/imx95/imx95_bl31_setup.c b/plat/imx/imx95/imx95_bl31_setup.c +index 175a78a20021..fcf41a0ffa5b 100644 +--- a/plat/imx/imx95/imx95_bl31_setup.c ++++ b/plat/imx/imx95/imx95_bl31_setup.c +@@ -108,6 +108,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, + void bl31_plat_arch_setup(void) + { + /* Assign all the GPIO pins to non-secure world by default */ ++ mmio_write_32(GPIO1_BASE + 0x10, 0xffffffff); ++ mmio_write_32(GPIO1_BASE + 0x14, 0x3); ++ mmio_write_32(GPIO1_BASE + 0x18, 0xffffffff); ++ mmio_write_32(GPIO1_BASE + 0x1c, 0x3); ++ + mmio_write_32(GPIO2_BASE + 0x10, 0xffffffff); + mmio_write_32(GPIO2_BASE + 0x14, 0x3); + mmio_write_32(GPIO2_BASE + 0x18, 0xffffffff); diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf_%.bbappend b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf_%.bbappend index a3a5a7cb8..7522fda59 100644 --- a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf_%.bbappend +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-atf/imx-atf_%.bbappend @@ -12,6 +12,7 @@ SRC_URI:append:dey = " \ file://0007-imx93-bring-back-ELE-clock-workaround-for-soc-revisi.patch \ file://0008-ccimx91-use-UART6-for-the-default-console.patch \ file://0009-ccimx95-set-DVK-console-to-LPUART6.patch \ + file://0010-ccimx95-enable-non-secure-non-privilege-access-to-GP.patch \ " BOOT_TOOLS = "imx-boot-tools"