From c2666fdab6f22914141e934cd06d967b91bbce10 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 26 Feb 2024 18:37:18 +0100 Subject: [PATCH 1/5] imx9: Fix OP-TEE support This fixes OP-TEE support by: - Adding tee.bin to container.cfg - Starting ELE RNG in SPL Signed-off-by: Mathieu Othacehe --- arch/arm/mach-imx/imx9/container.cfg | 3 ++- board/freescale/imx93_evk/spl.c | 7 +++++++ board/phytec/phycore_imx93/spl.c | 7 +++++++ board/variscite/imx93_var_som/spl.c | 6 ++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx9/container.cfg b/arch/arm/mach-imx/imx9/container.cfg index f268bc9eb2c..72fe791eae6 100644 --- a/arch/arm/mach-imx/imx9/container.cfg +++ b/arch/arm/mach-imx/imx9/container.cfg @@ -7,4 +7,5 @@ BOOT_FROM SD 0x400 SOC_TYPE IMX9 CONTAINER IMAGE A55 bl31.bin 0x204E0000 -IMAGE A55 u-boot.bin CONFIG_TEXT_BASE \ No newline at end of file +IMAGE A55 u-boot.bin CONFIG_TEXT_BASE +IMAGE A55 tee.bin 0x96000000 \ No newline at end of file diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c index a98ed69db88..2fd5559195e 100644 --- a/board/freescale/imx93_evk/spl.c +++ b/board/freescale/imx93_evk/spl.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,12 @@ int spl_board_boot_device(enum boot_device boot_dev_spl) void spl_board_init(void) { + int ret; + + ret = ele_start_rng(); + if (ret) + printf("Fail to start RNG: %d\n", ret); + puts("Normal Boot\n"); } diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c index dabc5316f33..16303fc187a 100644 --- a/board/phytec/phycore_imx93/spl.c +++ b/board/phytec/phycore_imx93/spl.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -34,6 +35,12 @@ int spl_board_boot_device(enum boot_device boot_dev_spl) void spl_board_init(void) { + int ret; + + ret = ele_start_rng(); + if (ret) + printf("Fail to start RNG: %d\n", ret); + puts("Normal Boot\n"); } diff --git a/board/variscite/imx93_var_som/spl.c b/board/variscite/imx93_var_som/spl.c index e6db4eb562b..36e17219d63 100644 --- a/board/variscite/imx93_var_som/spl.c +++ b/board/variscite/imx93_var_som/spl.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -47,9 +48,14 @@ int spl_board_boot_device(enum boot_device boot_dev_spl) void spl_board_init(void) { struct var_eeprom *ep = VAR_EEPROM_DATA; + int ret; puts("Normal Boot\n"); + ret = ele_start_rng(); + if (ret) + printf("Fail to start RNG: %d\n", ret); + /* Copy EEPROM contents to DRAM */ memcpy(ep, &eeprom, sizeof(*ep)); } From 867f97e1c4da2031fd485bf6fa89038c5739dfe4 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 26 Feb 2024 18:37:19 +0100 Subject: [PATCH 2/5] tools: imx9_image: Reword warning message. If the optional `tee.bin` OP-TEE binary is missing, the image will still be functional. Adapt the warning message accordingly. Signed-off-by: Mathieu Othacehe --- tools/imx9_image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/imx9_image.sh b/tools/imx9_image.sh index 88dfcfe606c..ca78a57a19a 100755 --- a/tools/imx9_image.sh +++ b/tools/imx9_image.sh @@ -19,7 +19,7 @@ for f in $blobs; do fi if [ ! -f $tmp ]; then - echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2 + echo "WARNING '$tmp' not found, resulting binary may be not-functional" >&2 # Comment-out the lines for un-existing files. This way, # mkimage can keep working. This allows CI tests to pass even From 71e2082010ffb6fa8a4c5d5620abf9cba0873cf1 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 26 Feb 2024 18:48:34 +0100 Subject: [PATCH 3/5] imx9: Update to mx93 A1 chip revision. Use the latest, mx93a1-ahab-container.img that is compatible with the i.MX93 A1 revision. Using mx93a1-ahab-container.img on an A0 chip and conversely causes a boot failure without any traces on the UART. Signed-off-by: Mathieu Othacehe --- arch/arm/mach-imx/imx9/imximage.cfg | 2 +- doc/board/nxp/imx93_11x11_evk.rst | 8 ++++---- doc/board/phytec/imx93-phyboard-segin.rst | 8 ++++---- doc/board/variscite/imx93_var_som.rst | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-imx/imx9/imximage.cfg b/arch/arm/mach-imx/imx9/imximage.cfg index 3e440465b23..d327d6a6ef4 100644 --- a/arch/arm/mach-imx/imx9/imximage.cfg +++ b/arch/arm/mach-imx/imx9/imximage.cfg @@ -5,6 +5,6 @@ BOOT_FROM SD 0x400 SOC_TYPE IMX9 -APPEND mx93a0-ahab-container.img +APPEND mx93a1-ahab-container.img CONTAINER IMAGE A55 u-boot-spl-ddr.bin 0x2049A000 \ No newline at end of file diff --git a/doc/board/nxp/imx93_11x11_evk.rst b/doc/board/nxp/imx93_11x11_evk.rst index fb0ecf8af58..171645ad06c 100644 --- a/doc/board/nxp/imx93_11x11_evk.rst +++ b/doc/board/nxp/imx93_11x11_evk.rst @@ -42,10 +42,10 @@ Get ahab-container.img .. code-block:: bash - $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.10.bin - $ chmod +x firmware-sentinel-0.10.bin - $ ./firmware-sentinel-0.10.bin - $ cp firmware-sentinel-0.10/mx93a0-ahab-container.img $(srctree) + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.11.bin + $ chmod +x firmware-sentinel-0.11.bin + $ ./firmware-sentinel-0.11.bin + $ cp firmware-sentinel-0.11/mx93a1-ahab-container.img $(srctree) Build U-Boot ------------ diff --git a/doc/board/phytec/imx93-phyboard-segin.rst b/doc/board/phytec/imx93-phyboard-segin.rst index da8772ecd5c..ce17fbec78d 100644 --- a/doc/board/phytec/imx93-phyboard-segin.rst +++ b/doc/board/phytec/imx93-phyboard-segin.rst @@ -41,10 +41,10 @@ Get ahab-container.img .. code-block:: bash - $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.10.bin - $ chmod +x firmware-sentinel-0.10.bin - $ ./firmware-sentinel-0.10.bin - $ cp firmware-sentinel-0.10/mx93a0-ahab-container.img $(srctree) + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.11.bin + $ chmod +x firmware-sentinel-0.11.bin + $ ./firmware-sentinel-0.11.bin + $ cp firmware-sentinel-0.11/mx93a1-ahab-container.img $(srctree) Build U-Boot ------------ diff --git a/doc/board/variscite/imx93_var_som.rst b/doc/board/variscite/imx93_var_som.rst index 4951afd2dad..02309f2ad87 100644 --- a/doc/board/variscite/imx93_var_som.rst +++ b/doc/board/variscite/imx93_var_som.rst @@ -42,10 +42,10 @@ Get ahab-container.img .. code-block:: bash - $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.10.bin - $ chmod +x firmware-sentinel-0.10.bin - $ ./firmware-sentinel-0.10.bin - $ cp firmware-sentinel-0.10/mx93a0-ahab-container.img $(srctree) + $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-sentinel-0.11.bin + $ chmod +x firmware-sentinel-0.11.bin + $ ./firmware-sentinel-0.11.bin + $ cp firmware-sentinel-0.11/mx93a1-ahab-container.img $(srctree) Build U-Boot ------------ From 64ca8db96e71a8170e5e5921ce2ea063f9e68c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Szymanski?= Date: Tue, 27 Feb 2024 16:40:01 +0100 Subject: [PATCH 4/5] opos6uldev: make the LCD work again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 5d7a95f49999 ("imx6ul/imx6ull: synchronise device trees with linux") removed the display timings from the board device tree whereas they are still needed by the mxsfb driver. Add the timings back (the correct ones) in the imx6ul-opos6uldev-u-boot.dtsi file and remove them from the opos6uldev.env file. Update the opos6uldev_defconfig file so that the LCD turns on at boot. Fixes: 5d7a95f49999 ("imx6ul/imx6ull: synchronise device trees with linux") Signed-off-by: Sébastien Szymanski --- arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi | 28 +++++++++++++++++----- board/armadeus/opos6uldev/opos6uldev.env | 1 - configs/opos6uldev_defconfig | 3 --- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi index aa88964f210..3b52d6bbd9b 100644 --- a/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi +++ b/arch/arm/dts/imx6ul-opos6uldev-u-boot.dtsi @@ -7,12 +7,6 @@ #include "imx6ul-opos6ul-u-boot.dtsi" -/ { - aliases { - display0 = &lcdif; - }; -}; - &aips1 { bootph-pre-ram; @@ -22,7 +16,29 @@ }; &lcdif { + display = <&display0>; bootph-some-ram; + + display0: display0 { + bits-per-pixel = <18>; + bus-width = <18>; + + display-timings { + timing0 { + clock-frequency = <33300000>; + hactive = <800>; + vactive = <480>; + hback-porch = <36>; + hfront-porch = <210>; + vback-porch = <13>; + vfront-porch = <22>; + hsync-len = <10>; + vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; + }; + }; + }; }; &pinctrl_uart1 { diff --git a/board/armadeus/opos6uldev/opos6uldev.env b/board/armadeus/opos6uldev/opos6uldev.env index f9002978710..2e7b65968d1 100644 --- a/board/armadeus/opos6uldev/opos6uldev.env +++ b/board/armadeus/opos6uldev/opos6uldev.env @@ -24,7 +24,6 @@ mmcrootfstype=ext4 rootwait kernelimg=opos6ul-linux.bin splashpos=0,0 splashimage=CONFIG_SYS_LOAD_ADDR -videomode=video=ctfb:x:800,y:480,depth:18,pclk:33033,le:96,ri:96,up:20,lo:21,hs:64,vs:4,sync:0,vmode:0 check_env=if test -n ${flash_env_version}; then env default env_version; else env set flash_env_version ${env_version}; env save; diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig index e1884df9dd2..7d21a6fe93c 100644 --- a/configs/opos6uldev_defconfig +++ b/configs/opos6uldev_defconfig @@ -115,13 +115,10 @@ CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_VIDEO=y CONFIG_VIDEO_LOGO=y -# CONFIG_VIDEO_BPP8 is not set -# CONFIG_VIDEO_BPP32 is not set CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y -CONFIG_SPLASH_SOURCE=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y From 9b9f022e7368cacafa368beaa7fadd931f2cfcdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Szymanski?= Date: Tue, 27 Feb 2024 16:40:02 +0100 Subject: [PATCH 5/5] video: mxsfb: add back imx6ul/imx6ull support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because of commit bf947d2a4b15 ("imx6ul: synchronise device tree with linux"), the compatible property of lcdif in imx6ul.dtsi went from compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif"; to compatible = "fsl,imx6ul-lcdif", "fsl,imx6sx-lcdif"; without updating the mxsfb driver to match that change. Add "fsl,imx6sx-lcdif" as a compatible id to fix that. Fixes: bf947d2a4b15 ("imx6ul: synchronise device tree with linux") Signed-off-by: Sébastien Szymanski --- drivers/video/mxsfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 10433949bb8..515363f6a49 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -387,6 +387,7 @@ static int mxs_video_remove(struct udevice *dev) static const struct udevice_id mxs_video_ids[] = { { .compatible = "fsl,imx23-lcdif" }, { .compatible = "fsl,imx28-lcdif" }, + { .compatible = "fsl,imx6sx-lcdif" }, { .compatible = "fsl,imx7ulp-lcdif" }, { .compatible = "fsl,imxrt-lcdif" }, { /* sentinel */ }