[U-Boot] u-boot 2018 SPI SPL

Dear Sir/Madam,
Hello,
We have developed an i.mx6dl board which is based on "MX6 Dual Lite SABRE AI CPU2 Card with AVB". I am using version u-boot-2018.01 with SPL. I am downloading SPL and u-boot.img with USB loader; downloaded kernel and device tree files and run them in nfs tftp search over ethernet..
Then I programmed the SPI NOR flash with u-boot with spi read/write commands for both u-boot.imx/and u-boot.img images with offset value of 0x400 in Flash address, set boot pins accordingly, saw signals at clock, CS and Data pins of flash after reset, but never see a boot (character at terminal) for last few weeks.
As I know, make command is generating code for SD card, and SPL code is waiting u-boot to be loaded from USB port. I searched many NXP/denx forums; i.mx6 linux kernel ref. Manuals for u-boot with SPL, I found NXP supports u-boot.imx images, but did not support SPL+u-boot.img.
So I would be very grateful, if any of you know which (and how) files, parameters (and/or make command) should be set for u-boot.img+SPL boot for SPI nor flash boot in u-boot 2018.1? Or give link to document(s), which explain the i.mx6dl SPL and u-boot.img boot process for SPI nor flash (except i.mx6 ref manual)..
Thanks and best regards.
Mehmet Ali Ipin

Hi Mehmet,
On Thu, Apr 12, 2018 at 10:17 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Sir/Madam,
Hello,
We have developed an i.mx6dl board which is based on "MX6 Dual Lite SABRE AI CPU2 Card with AVB". I am using version u-boot-2018.01 with SPL. I am downloading SPL and u-boot.img with USB loader; downloaded kernel and device tree files and run them in nfs tftp search over ethernet..
Then I programmed the SPI NOR flash with u-boot with spi read/write commands for both u-boot.imx/and u-boot.img images with offset value of 0x400 in Flash address, set boot pins accordingly, saw signals at clock, CS and Data pins of flash after reset, but never see a boot (character at terminal) for last few weeks.
As I know, make command is generating code for SD card, and SPL code is waiting u-boot to be loaded from USB port. I searched many NXP/denx forums; i.mx6 linux kernel ref. Manuals for u-boot with SPL, I found NXP supports u-boot.imx images, but did not support SPL+u-boot.img.
So I would be very grateful, if any of you know which (and how) files, parameters (and/or make command) should be set for u-boot.img+SPL boot for SPI nor flash boot in u-boot 2018.1? Or give link to document(s), which explain the i.mx6dl SPL and u-boot.img boot process for SPI nor flash (except i.mx6 ref manual)..
Take a look at board/congatec/cgtqmx6eval/README (2. Flashing U-Boot in the SPI NOR).
It explains how to flash SPL + u-boot.img into SPI NOR on a mx6 board.

Dear Fabio,
Thank you very much. I will check and inform you.
Best regards.
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Thursday, April 12, 2018 4:28 PM To: Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] u-boot 2018 SPI SPL
Hi Mehmet,
On Thu, Apr 12, 2018 at 10:17 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Sir/Madam,
Hello,
We have developed an i.mx6dl board which is based on "MX6 Dual Lite SABRE AI CPU2 Card with AVB". I am using version u-boot-2018.01 with SPL. I am downloading SPL and u-boot.img with USB loader; downloaded kernel and device tree files and run them in nfs tftp search over ethernet..
Then I programmed the SPI NOR flash with u-boot with spi read/write commands for both u-boot.imx/and u-boot.img images with offset value of 0x400 in Flash address, set boot pins accordingly, saw signals at clock, CS and Data pins of flash after reset, but never see a boot (character at terminal) for last few weeks.
As I know, make command is generating code for SD card, and SPL code is waiting u-boot to be loaded from USB port. I searched many NXP/denx forums; i.mx6 linux kernel ref. Manuals for u-boot with SPL, I found NXP supports u-boot.imx images, but did not support SPL+u-boot.img.
So I would be very grateful, if any of you know which (and how) files, parameters (and/or make command) should be set for u-boot.img+SPL boot for SPI nor flash boot in u-boot 2018.1? Or give link to document(s), which explain the i.mx6dl SPL and u-boot.img boot process for SPI nor flash (except i.mx6 ref manual)..
Take a look at board/congatec/cgtqmx6eval/README (2. Flashing U-Boot in the SPI NOR).
It explains how to flash SPL + u-boot.img into SPI NOR on a mx6 board.

Dear Fabio,
I received the following message
U-Boot SPL 2018.01 (Jan 17 2018 - 05:49:34) SPL: Unsupported Boot Device! SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
I am searching the cause of error; but if you know answer please help me.
Thanks and best regards.
-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Mehmet Ali İPİN Sent: Thursday, April 12, 2018 4:36 PM To: Fabio Estevam festevam@gmail.com Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] u-boot 2018 SPI SPL
Dear Fabio,
Thank you very much. I will check and inform you.
Best regards.
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Thursday, April 12, 2018 4:28 PM To: Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] u-boot 2018 SPI SPL
Hi Mehmet,
On Thu, Apr 12, 2018 at 10:17 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Sir/Madam,
Hello,
We have developed an i.mx6dl board which is based on "MX6 Dual Lite SABRE AI CPU2 Card with AVB". I am using version u-boot-2018.01 with SPL. I am downloading SPL and u-boot.img with USB loader; downloaded kernel and device tree files and run them in nfs tftp search over ethernet..
Then I programmed the SPI NOR flash with u-boot with spi read/write commands for both u-boot.imx/and u-boot.img images with offset value of 0x400 in Flash address, set boot pins accordingly, saw signals at clock, CS and Data pins of flash after reset, but never see a boot (character at terminal) for last few weeks.
As I know, make command is generating code for SD card, and SPL code is waiting u-boot to be loaded from USB port. I searched many NXP/denx forums; i.mx6 linux kernel ref. Manuals for u-boot with SPL, I found NXP supports u-boot.imx images, but did not support SPL+u-boot.img.
So I would be very grateful, if any of you know which (and how) files, parameters (and/or make command) should be set for u-boot.img+SPL boot for SPI nor flash boot in u-boot 2018.1? Or give link to document(s), which explain the i.mx6dl SPL and u-boot.img boot process for SPI nor flash (except i.mx6 ref manual)..
Take a look at board/congatec/cgtqmx6eval/README (2. Flashing U-Boot in the SPI NOR).
It explains how to flash SPL + u-boot.img into SPI NOR on a mx6 board. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

On Fri, Apr 13, 2018 at 10:13 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio,
I received the following message
U-Boot SPL 2018.01 (Jan 17 2018 - 05:49:34)
Please use mainline 2018.03 or 2018.05-rc1 instead.

Dear Fabio,
Thank you for your helps..
I applied the procedure which is explained in board/congatec/cgtqmx6eval/README document. Upgraded u-boot to 1018.05-rc1, but as you will see below, I received same message;
I will compare my config/header files with congatec's, but I don't know which parameters/definitions (should be /should not be) used; There fore I will appreciate any help if you could..
Thanks and best regards.
=> setenv ipaddr 10.4.50.5 => setenv serverip 10.4.50.50 => ping 10.4.50.50 Using FEC device host 10.4.50.50 is alive => sf probe 0 SF: Detected M45PE16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB => tftp 0x12000000 SPL Using FEC device TFTP from server 10.4.50.50; our IP address is 10.4.50.5 Filename 'SPL'. Load address: 0x12000000 Loading: #### 3.2 MiB/s done Bytes transferred = 56320 (dc00 hex) => sf erase 0x0 0x10000 SF: 65536 bytes @ 0x0 Erased: OK => sf write 0x12000000 0x400 0x10000 device 0 offset 0x400, size 0x10000 SF: 65536 bytes @ 0x400 Written: OK => tftp 0x12000000 u-boot.img Using FEC device TFTP from server 10.4.50.50; our IP address is 10.4.50.5 Filename 'u-boot.img'. Load address: 0x12000000 Loading: ######################## 5.7 MiB/s done Bytes transferred = 349576 (55588 hex) => sf erase 0x10000 0x70000 SF: 458752 bytes @ 0x10000 Erased: OK => sf write 0x12000000 0x10000 0x70000 device 0 offset 0x10000, size 0x70000 SF: 458752 bytes @ 0x10000 Written: OK =>
U-Boot SPL 2018.05-rc1 (Apr 16 2018 - 00:31:02 -0700) SPL: Unsupported Boot Device! SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
On Fri, Apr 13, 2018 at 10:13 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio,
I received the following message
U-Boot SPL 2018.01 (Jan 17 2018 - 05:49:34)
Please use mainline 2018.03 or 2018.05-rc1 instead.

Hi Mehmet,
On Mon, Apr 16, 2018 at 8:36 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
U-Boot SPL 2018.05-rc1 (Apr 16 2018 - 00:31:02 -0700) SPL: Unsupported Boot Device!
You need to debug why you are getting this message when booting from SPI.

Dear Fabio,
I manually set spl_boot_list[] array with SPI, eMMCx, USB RAM etc. For SPI NOR flash loader = spl_ll_find_loader(spl_boot_list[i]) function (in spl.c) is returning a negative loader->boot_device number -442503140
May be there is a definition in u-boot/SPL config files to make file to generate SPI NOR flash boot code, instead of MMC, Which enable this SPL function to return positive correct value for SPI NOR Flash?
eMMC is working, but I did not put SPL and u-boot in eMMC; May be you can give me a link explaining how to SPL+u-boot.img to eMMC flash commands.
I added puts() messages to trace the execution;
These are the messages at terminal.
U-Boot SPL 2018.05-rc1 (Apr 17 2018 - 22:43:50 -0700) SPL set_bd() SPL DRAM initialized SPL Malloc; gd flags board boot order spl boot list spl_boot_list:8 spl_boot_list:8 Trying to boot from -442503140 SPL: Unsupported Boot Device! spl_boot_list:8 Trying to boot from 1 Trying to boot from MMC1
U-Boot SPL 2018.05-rc1 (Apr 17 2018 - 22:43:50 -0700) SPL set_bd() SPL DRAM initialized SPL Malloc; gd flags board boot order spl boot list spl_boot_list:12 spl_boot_list:12 Trying to boot from 12 Trying to boot from USB SDP SDP: initialize... SDP: handle requests... Downloading file of size 349576 to 0x177fffc0... done Jumping to header at 0x177fffc0 Header Tag is not an IMX image
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Monday, April 16, 2018 2:50 PM To: Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] u-boot 2018 SPI SPL
Hi Mehmet,
On Mon, Apr 16, 2018 at 8:36 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
U-Boot SPL 2018.05-rc1 (Apr 16 2018 - 00:31:02 -0700) SPL: Unsupported Boot Device!
You need to debug why you are getting this message when booting from SPI.

Hi Mehmet,
On Wed, Apr 18, 2018 at 3:56 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio,
I manually set spl_boot_list[] array with SPI, eMMCx, USB RAM etc. For SPI NOR flash loader = spl_ll_find_loader(spl_boot_list[i]) function (in spl.c) is returning a negative loader->boot_device number -442503140
May be there is a definition in u-boot/SPL config files to make file to generate SPI NOR flash boot code, instead of MMC, Which enable this SPL function to return positive correct value for SPI NOR Flash?
eMMC is working, but I did not put SPL and u-boot in eMMC; May be you can give me a link explaining how to SPL+u-boot.img to eMMC flash commands.
You can check board/warp7/README
I added puts() messages to trace the execution;
These are the messages at terminal.
U-Boot SPL 2018.05-rc1 (Apr 17 2018 - 22:43:50 -0700) SPL set_bd() SPL DRAM initialized SPL Malloc; gd flags board boot order spl boot list spl_boot_list:8 spl_boot_list:8 Trying to boot from -442503140
You need to debug why you are getting this.
Make sure your board is correctly configured to boot from SPI NOR via GPIO/fuses.

Dear Fabio
Thank you very much for your directives and helps.
I applied the steps in WARP board readme file, for the command
=> ums 0 mmc 2
I received Unknown command 'ums' - try 'help'
I compared with WARP7 defconfig and mx6sabresd_defconfig files added some definitions in WARP, but got error messages in make file. Therefore I would appreciate your helps/commends if you write me the definitions in config/defconfig files to enable u-boot to run this command?
Best regads.
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Wednesday, April 18, 2018 4:25 PM To: Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr Cc: u-boot@lists.denx.de; Kutsal ANIL kutsal.anil@pavotek.com.tr Subject: Re: [U-Boot] u-boot 2018 SPI SPL
Hi Mehmet,
On Wed, Apr 18, 2018 at 3:56 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio,
I manually set spl_boot_list[] array with SPI, eMMCx, USB RAM etc. For SPI NOR flash loader = spl_ll_find_loader(spl_boot_list[i]) function (in spl.c) is returning a negative loader->boot_device number -442503140
May be there is a definition in u-boot/SPL config files to make file to generate SPI NOR flash boot code, instead of MMC, Which enable this SPL function to return positive correct value for SPI NOR Flash?
eMMC is working, but I did not put SPL and u-boot in eMMC; May be you can give me a link explaining how to SPL+u-boot.img to eMMC flash commands.
You can check board/warp7/README
I added puts() messages to trace the execution;
These are the messages at terminal.
U-Boot SPL 2018.05-rc1 (Apr 17 2018 - 22:43:50 -0700) SPL set_bd() SPL DRAM initialized SPL Malloc; gd flags board boot order spl boot list spl_boot_list:8 spl_boot_list:8 Trying to boot from -442503140
You need to debug why you are getting this.
Make sure your board is correctly configured to boot from SPI NOR via GPIO/fuses.

On Fri, Apr 20, 2018 at 3:43 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio
Thank you very much for your directives and helps.
I applied the steps in WARP board readme file, for the command
=> ums 0 mmc 2
I received Unknown command 'ums' - try 'help'
I compared with WARP7 defconfig and mx6sabresd_defconfig files added some definitions in WARP, but got error messages in make file. Therefore I would appreciate your helps/commends if you write me the definitions in config/defconfig files to enable u-boot to run this command?
You can take a look at this commit for reference:
commit 506abdb4ee9664cc0d6d1321e96f7fb8dae72eb9 Author: Marek Vasut marex@denx.de Date: Sun Oct 22 10:22:40 2017 +0200
ARM: imx6: Enable UMS and DFU on DHCOM i.MX6 PDK
Enable UMS and DFU, so that the eMMC can be accessed via the USB gadget port on the board.
Signed-off-by: Marek Vasut marex@denx.de Cc: Stefano Babic sbabic@denx.de

Dear Fabio,
Windows 10 tried but could not load the device driver of our eMMC (micron tech MTFC4GLDDQ). Then
I programmed SPL and u-boot.img into eMMC with u-boot commands; even SPI flash based SPL see the MMC1(eMMC), u-boot did not run correctly.
As shown below, I put printf/puts messages in function entry and exit to debug SPL:
U-Boot SPL 2018.05-rc1 (Apr 27 2018 - 04:15:59 -0700) SPL set_bd() SPL Malloc; gd flags SPL init_i SPL init_exit boot mode bmode =32000001 boot mode reg =18080030 SPI serial mode return board boot order boot list spl_boot_list:8 spl_boot_list:8 SPL image loader boot device 8 boot device name:MMC1 boot device name:MMC1 boot device name:MMC1 boot device name:MMC1 SPL image loader Not Found Trying to boot from -442503140 SPL: Unsupported Boot Device! spl_boot_list:1 SPL image loader boot device 1 boot device name:MMC1 Trying to boot from 1 Trying to boot from MMC1 SPL load image
I disabled #CONFIG_SPL_OS_BOOT=y flag, to disable direct boot linux kernel code, changed boot from SD directives to spi, tested many other serial SPI boot config definitions, included all congatec cgtqmx_defconfig definitions;
İn my SPI SPL, SRC_SBMR1 read returns 0x18080030 which is exactly my spi nor flash register boot setting, and spl_boot _list:8 (SPI NOR Boot setting, (which is verified by my "SPI serial mode return" printf message), boot device name is always MMC1. Its always trying to boot from -442503140, and can not find SPL image loader finally..
Since they did not give all of their u-boot source and config files, It is impossible for me to know how congatec succeded from SPI boot of SPL+u-boot.img,
But my test of u-boot 2018.01/05 shows, even my DCD header in SPI is correct, even I proceeded congatech's SPI SPL u-boot.img flash loading sequences, after testing many configurations in 2/3 weeks I am sure there is a problem with SPL u-boot.img for SPI boot such that:
Even on chip ROM code detects correct boot register settings, jumps to spi flash, starts executing SPL codes, it always search MMC/SD card.
Since it is very important for us to bring this i.mx6 board, which several projects depend on it;
And since I did not see your name in SPL files, May I request your kind helps, if you can direct me to whom developing SPL codes for u-boot 2018 in list.denx.de group?
Thanks and best regards.
Mehmet Ali Ipin.
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Saturday, April 21, 2018 2:40 AM To: Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr Cc: u-boot@lists.denx.de; Kutsal ANIL kutsal.anil@pavotek.com.tr Subject: Re: [U-Boot] u-boot 2018 SPI SPL
On Fri, Apr 20, 2018 at 3:43 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio
Thank you very much for your directives and helps.
I applied the steps in WARP board readme file, for the command
=> ums 0 mmc 2
I received Unknown command 'ums' - try 'help'
I compared with WARP7 defconfig and mx6sabresd_defconfig files added some definitions in WARP, but got error messages in make file. Therefore I would appreciate your helps/commends if you write me the definitions in config/defconfig files to enable u-boot to run this command?
You can take a look at this commit for reference:
commit 506abdb4ee9664cc0d6d1321e96f7fb8dae72eb9 Author: Marek Vasut marex@denx.de Date: Sun Oct 22 10:22:40 2017 +0200
ARM: imx6: Enable UMS and DFU on DHCOM i.MX6 PDK
Enable UMS and DFU, so that the eMMC can be accessed via the USB gadget port on the board.
Signed-off-by: Marek Vasut marex@denx.de Cc: Stefano Babic sbabic@denx.de

Hi Mehmet,
On Mon, Apr 30, 2018 at 3:24 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio,
Windows 10 tried but could not load the device driver of our eMMC (micron tech MTFC4GLDDQ). Then
I programmed SPL and u-boot.img into eMMC with u-boot commands; even SPI flash based SPL see the MMC1(eMMC), u-boot did not run correctly.
I am a bit confused of what you are trying to achieve.
Is your end goal to be able to boot from SPI NOR using SPL on a mx6?
Are you able to boot from SPL from the eMMC or SD card?

Dear Fabio
Thank you very much for your helps.
Yes, my end goal is to be able to boot from SPI flash, with SPL. We are preparing another PCB to check if we can boot from eMMC/SD.
We received a service proposal from Otavio yesterday, evaluating it. But if exist, I wish to contact a person who is responsible from SPL in group as well.
Best regards.
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Wednesday, May 2, 2018 8:27 PM To: Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr Cc: u-boot@lists.denx.de; Kutsal ANIL kutsal.anil@pavotek.com.tr Subject: Re: [U-Boot] u-boot 2018 SPI SPL
Hi Mehmet,
On Mon, Apr 30, 2018 at 3:24 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio,
Windows 10 tried but could not load the device driver of our eMMC (micron tech MTFC4GLDDQ). Then
I programmed SPL and u-boot.img into eMMC with u-boot commands; even SPI flash based SPL see the MMC1(eMMC), u-boot did not run correctly.
I am a bit confused of what you are trying to achieve.
Is your end goal to be able to boot from SPI NOR using SPL on a mx6?
Are you able to boot from SPL from the eMMC or SD card?

Dear Fabio, Hello,
ROM code starts execution of the SPL code in SPI flash;
I traced and see that It jumped to MMC drivers/mmc.c file, as default DM_MMC is not defined, then SPL is calling empty weak "board_mmc_init and cpu_mmc_init" functions.
I also defined DM_MMC in defconfig file, but got "undefined reference compiling errors for USB etc.
Should I call u-boot MMC init functions within these functions? Or should I define DM_MMC in config file and try to solve compile errors?
Best regards.
-----Original Message----- From: Fabio Estevam [mailto:festevam@gmail.com] Sent: Wednesday, May 2, 2018 8:27 PM To: Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr Cc: u-boot@lists.denx.de; Kutsal ANIL kutsal.anil@pavotek.com.tr Subject: Re: [U-Boot] u-boot 2018 SPI SPL
Hi Mehmet,
On Mon, Apr 30, 2018 at 3:24 AM, Mehmet Ali İPİN mehmet.ipin@pavotek.com.tr wrote:
Dear Fabio,
Windows 10 tried but could not load the device driver of our eMMC (micron tech MTFC4GLDDQ). Then
I programmed SPL and u-boot.img into eMMC with u-boot commands; even SPI flash based SPL see the MMC1(eMMC), u-boot did not run correctly.
I am a bit confused of what you are trying to achieve.
Is your end goal to be able to boot from SPI NOR using SPL on a mx6?
Are you able to boot from SPL from the eMMC or SD card?
participants (2)
-
Fabio Estevam
-
Mehmet Ali İPİN