[U-Boot] Unable to boot from QSPI (u-boot 2016.11-rc1)

Hi all,
I have a custom board based on Altera Cyclone V SoC, when I tried to boot from QSPI, it stuck in a boot loop, I try to enable some debug message, and here it is:
U-Boot SPL 2016.09.01 (Oct 03 2016 - 18:14:42) drivers/ddr/altera/sequencer.c: Preparing to start memory calibration drivers/ddr/altera/sequencer.c: CALIBRATION PASSED drivers/ddr/altera/sequencer.c: Calibration complete bind node soc - found match at 'generic_simple_bus' bind node dwmmc0@ff704000 - found match at 'socfpga_dwmmc' Bound device dwmmc0@ff704000 to soc bind node spi@ff705000 - found match at 'cadence_spi' bind node n25q00@0 No match for node 'n25q00@0' Bound device spi@ff705000 to soc Bound device soc to root_driver Trying to boot from SPI Bound device spi_flash to spi@ff705000 SF: Got idcodes 00000000x: x x x x x .!.D
u-boot from Altera working fine, but I plan to use the mainline u-boot. Any idea why it does not work?

On Tue, Oct 4, 2016 at 1:10 PM, Teoh Choon Zone choon-zone.teoh@vie.com.my wrote:
Hi all,
I have a custom board based on Altera Cyclone V SoC, when I tried to boot from QSPI, it stuck in a boot loop, I try to enable some debug message, and here it is:
U-Boot SPL 2016.09.01 (Oct 03 2016 - 18:14:42) drivers/ddr/altera/sequencer.c: Preparing to start memory calibration drivers/ddr/altera/sequencer.c: CALIBRATION PASSED drivers/ddr/altera/sequencer.c: Calibration complete bind node soc
- found match at 'generic_simple_bus'
bind node dwmmc0@ff704000
- found match at 'socfpga_dwmmc'
Bound device dwmmc0@ff704000 to soc bind node spi@ff705000
- found match at 'cadence_spi'
bind node n25q00@0 No match for node 'n25q00@0' Bound device spi@ff705000 to soc Bound device soc to root_driver Trying to boot from SPI Bound device spi_flash to spi@ff705000 SF: Got idcodes 00000000x: x x x x x .!.D
u-boot from Altera working fine, but I plan to use the mainline u-boot. Any idea why it does not work?
Look like some controller init issue for getting RDID, try to probe in u-boot instead SPL.
thanks!

Hi,
Can you elaborate more on which file or function to look at? I am quite new to u-boot.
On Thu, Oct 6, 2016 at 11:31 PM, Jagan Teki jagannadh.teki@gmail.com wrote:
On Tue, Oct 4, 2016 at 1:10 PM, Teoh Choon Zone choon-zone.teoh@vie.com.my wrote:
Hi all,
I have a custom board based on Altera Cyclone V SoC, when I tried to boot from QSPI, it stuck in a boot loop, I try to enable some debug message,
and
here it is:
U-Boot SPL 2016.09.01 (Oct 03 2016 - 18:14:42) drivers/ddr/altera/sequencer.c: Preparing to start memory calibration drivers/ddr/altera/sequencer.c: CALIBRATION PASSED drivers/ddr/altera/sequencer.c: Calibration complete bind node soc
- found match at 'generic_simple_bus'
bind node dwmmc0@ff704000
- found match at 'socfpga_dwmmc'
Bound device dwmmc0@ff704000 to soc bind node spi@ff705000
- found match at 'cadence_spi'
bind node n25q00@0 No match for node 'n25q00@0' Bound device spi@ff705000 to soc Bound device soc to root_driver Trying to boot from SPI Bound device spi_flash to spi@ff705000 SF: Got idcodes 00000000x: x x x x x .!.D
u-boot from Altera working fine, but I plan to use the mainline u-boot.
Any
idea why it does not work?
Look like some controller init issue for getting RDID, try to probe in u-boot instead SPL.
thanks!
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.

On Fri, Oct 7, 2016 at 6:42 AM, Teoh Choon Zone choon-zone.teoh@vie.com.my wrote:
Hi,
Can you elaborate more on which file or function to look at? I am quite new to u-boot.
Try to boot with other boot sources(mmc or other) and 'sf probe' the flash on u-boot. this make sure no issue on with SPI controller or flash. otherwise need to check with cadence_spi_xfer.
thanks!

Hi,
On Tue, 4 Oct 2016 15:40:08 +0800 Teoh Choon Zone choon-zone.teoh@vie.com.my wrote: ..
u-boot from Altera working fine, but I plan to use the mainline u-boot. Any idea why it does not work?
Can you please revert commit dac3bf20 and try again? Does it solve the problem?
-- Anatolij

On Fri, Oct 7, 2016 at 2:11 PM, Anatolij Gustschin agust@denx.de wrote:
Hi,
On Tue, 4 Oct 2016 15:40:08 +0800 Teoh Choon Zone choon-zone.teoh@vie.com.my wrote: ..
u-boot from Altera working fine, but I plan to use the mainline u-boot. Any idea why it does not work?
Can you please revert commit dac3bf20 and try again? Does it solve the problem?
-- Anatolij
Bingo! By reverting this commit, I could get pass the boot loop. And one more thing for those who use n25q00 QSPI, if you encounter "### ERROR ### Please RESET the board ###", remember to add "spi-flash" in your DTS compatible string.
participants (3)
-
Anatolij Gustschin
-
Jagan Teki
-
Teoh Choon Zone