i.MX8MM QSPI booting and partition

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX8MM QSPI booting and partition

ソリューションへジャンプ
2,583件の閲覧回数
vignesh-baskaran
Contributor III

Hi,

We having Custom board based on iMX8MM-EVk,

We replaced Qspi memory chip mt25qu02g. No issues in detecting in u-boot and linux.

 

 

We were trying to do porting Images and booting from QSPI, Please refer below images.

 



0 件の賞賛
返信
1 解決策
2,459件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @vignesh-baskaran,

I hope you are doing well.

One can follow below-mentioned steps to load images in QSPI Flash in u-boot.

1. Load Image and dtb in RAM using fatload command.

#fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}

#fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}

2. Flash the Image and dtb in flash using sf write.

#sf write ${loadaddr} <offset> <len>
# sf write ${fdt_addr_r} <offset> <len>

 - Please make sure to use correct offset and length while writing Image and dtb to flash & make sure that they don't overwrite each other.

  One can find the correct length (size) using the below command

# fatls mmc ${mmcdev}:${mmcpart}

 Please share the output of the above command.

Please try after erasing flash memory.

Thanks & Regards,
Dhruvit Vasavada

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
2,534件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @vignesh-baskaran,

I hope you are doing well.

Errors in the attached image suggest that the device tree is not loaded correctly. Please make sure that you have used the correct offset and size.

Instead of using dd , one can flash Image and fdt using the sf write command in u-boot.

Please provide me with an output of the printenv command.

Please share the output of  the below-mentioned commands after loading device tree (using sf read )

=>  fdt addr ${fdt_addr_r} 

=>  fdt print 

Thanks & Regards,
Dhruvit Vasavada

 

0 件の賞賛
返信
2,524件の閲覧回数
vignesh-baskaran
Contributor III

Hi @Dhruvit,

1) Please refer the attachment for printenv .

 

2)

u-boot=>  fdt addr ${fdt_addr_r} 
libfdt fdt_check_header(): FDT_ERR_BADMAGIC

u-boot=> fdt print               
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!

 

3)

Instead of using dd , one can flash Image and fdt using the sf write command in u-boot.

You suggested Sf write for writing to qspi,

Let assume i have images from SD card and want to copy to  QSPi, How can i do that?

 

Please let us know how to do it. it will be helpful. 

 

 

Thanks

0 件の賞賛
返信
2,460件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @vignesh-baskaran,

I hope you are doing well.

One can follow below-mentioned steps to load images in QSPI Flash in u-boot.

1. Load Image and dtb in RAM using fatload command.

#fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}

#fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}

2. Flash the Image and dtb in flash using sf write.

#sf write ${loadaddr} <offset> <len>
# sf write ${fdt_addr_r} <offset> <len>

 - Please make sure to use correct offset and length while writing Image and dtb to flash & make sure that they don't overwrite each other.

  One can find the correct length (size) using the below command

# fatls mmc ${mmcdev}:${mmcpart}

 Please share the output of the above command.

Please try after erasing flash memory.

Thanks & Regards,
Dhruvit Vasavada

0 件の賞賛
返信
2,413件の閲覧回数
vignesh-baskaran
Contributor III

Hi @Dhruvit ,

 

Thanks for the input. its working for us.

 

if Anyone facing same issue. This is because of the SPI mode selecting during Sf probe.

 

 

Thanks.

 

0 件の賞賛
返信
2,257件の閲覧回数
vignesh-baskaran
Contributor III

Hi @Dhruvit 

 

Thanks for the support.

0 件の賞賛
返信
2,265件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @vignesh-baskaran,

I hope you are doing well.

Glad to know that issue is resolved.

Can I mark this case as close?

Thanks & Regards,
Dhruvit Vasavada

0 件の賞賛
返信
2,443件の閲覧回数
vignesh-baskaran
Contributor III

Hi @Dhruvit,

 

We believe somehow sf read and sf write is not working as we expected. 

 

We load the image from SD to RAM and check 

=> fdt addr ${fdt_addr}
=> fdt print ${fdt_addr}.

it is working perfectly.

But when We try to load from QSPI to RAM 

We getting error.

libfdt fdt_check_header(): FDT_ERR_BADMAGIC

 

We thought this could be issue with size we loading. We cross verified it, its not the issue. 

 

Note: We tried erase operation before the sf write. 

 

 

Can you please let us know about the issue?

0 件の賞賛
返信
2,558件の閲覧回数
vignesh-baskaran
Contributor III

Hi,

 

Can anyone please look into this?

タグ(1)
0 件の賞賛
返信