Creating boot Image for ECSPI2 imx8mm-lpdrr4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating boot Image for ECSPI2 imx8mm-lpdrr4

534 Views
vignesh-baskaran
Contributor III

Hi @AldoG ,

 

This is continuity of Case imx8mm-lpdd4 eFUSE not booting  for ECSPI2 booting.

1) We were trying to create a bootable image for ECSPI2.

We tried the following command to create one,  but after porting it We were unable to see any messages at console.  

echo "UBOOT_CONFIG = \"fspi\"" >> conf/local.conf"

Can you please let us know the issue? 

2) We also trying to modify the yocto build for u-boot, 
We modified the u-boot source code  under tmp/work/imx8mmevk-poky-linux
We can able to see the u-boot binary get updated under tmp/deploy/images.
 
but final image "imx-boot-imx8mm-lpddr4-evk-sd.bin-flash_evk" (fspi in our case) didnt get updated.
 
Can you please let us know what command to invoke mkimage to get the final image get updated? 
$ bitbake-layers show-recipes | grep mkimage
imx-mkimage:
 
bitbake  imx-mkimage we tried to run this manually.
 
Since we were unable to modify the u-boot and create the final image with ECSPI2 enabled we were unable to move further.
 
Thanks,
Vignesh.

 

 

 

0 Kudos
4 Replies

513 Views
emmafrost1
Contributor I
  1. checked the log files to see if there are any errors or warnings related to creating the bootable image? Also, have you tutuapp verified that the output file was actually created and placed in the correct location?

  2. To update vidmate the final image with your modified u-boot source code, you need to re-run the build process using the updated source code. You can try the following steps:

  • Clean the build directory: bitbake -c cleanall u-boot-imx
  • Build u-boot: bitbake u-boot-imx
  • Build the final image: bitbake imx-boot -c populate_sdk

Make sure to update the u-boot-imx recipe to include your modifications before running these commands. Also, make sure that the imx-boot recipe is configured to include the fspi option for ECSPI2 booting.

If this doesn't work, you may need to provide more specific details about your setup and any error messages you are encountering.

471 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello @vignesh-baskaran,

Actually the answer provided by @emmafrost1 is perfect, thank you for your anser!

Please try it and let us know of the results.

Best regards,
Aldo.

0 Kudos

456 Views
vignesh-baskaran
Contributor III

Hi @AldoG,

Thanks for the reply @emmafrost1 .

 

We were trying the same with th command you suggested.

$ bitbake imx-boot -c populate_sdk

 

ERROR: Task do_populate_sdk does not exist for target imx-boot (/home/vignesh/imx-yocto-bsp/sources/meta-imx/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_1.0.bb:do_populate_sdk). Close matches:ETA:  0:00:00
  do_populate_lic
  do_populate_sysroot
ERROR: Command execution failed: 1

 

 

 

We also trying to enable the spi for spl.

 

$ make imx8mm_evk_fspi_defconfig

$ make menuconfig

SPL / TPL --->

          Support SPI drivers

$ make -j6

 

drivers/spi/nxp_fspi.c: In function 'nxp_fspi_supports_op':
drivers/spi/nxp_fspi.c:434:20: error: 'struct spi_slave' has no member named 'dev'
  434 |         bus = slave->dev->parent;
      |                    ^~
drivers/spi/nxp_fspi.c: In function 'nxp_fspi_exec_op':
drivers/spi/nxp_fspi.c:875:20: error: 'struct spi_slave' has no member named 'dev'
  875 |         bus = slave->dev->parent;
      |                    ^~
drivers/spi/nxp_fspi.c: In function 'nxp_fspi_adjust_op_size':
drivers/spi/nxp_fspi.c:919:20: error: 'struct spi_slave' has no member named 'dev'
  919 |         bus = slave->dev->parent;
      |                    ^~

 

 

 

0 Kudos

455 Views
vignesh-baskaran
Contributor III

Hi @AldoG,

 

in addition to the previous message. we tried you suggested in the mail chain

you may need to enable eCSPI to be detected in uboot with the following Uboot configs:
 
CONFIG_MXC_SPI=y
CONFIG_SPI_FLASH=y

We modified dts for it.

+&ecspi2 {
+   fsl,spi-num-chipselects = <1>;
+    cs-gpios = <0>;
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_ecspi2>;
+   status = "okay";
+};
+
 &iomuxc {
+
+	pinctrl_ecspi2: ecspi2grp {
+               fsl,pins = <
+                               MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x00000116
+                               MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x00000116
+                               MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x00001916
+                               MX8MM_IOMUXC_ECSPI2_SS0_ECSPI2_SS0 0x00000116
+               >;
+       };

 

When we try: 

u-boot=> sf probe                                                               
SF: Detected n25q256a with page size 256 Bytes, erase size 4 KiB, total 32 MiB

 

We only see the Qspi memory. we were unable to see the ECSPI2 memory in u-boot.

0 Kudos