[U-Boot] Newbie SPL question for socfpga_sockit
George Broz
brozgeo at gmail.com
Thu Mar 3 07:49:04 CET 2016
On 1 March 2016 at 19:49, Phil Reid <preid at electromag.com.au> wrote:
> On 2/03/2016 10:40 AM, George Broz wrote:
>
>> Sorry for the delayed response - got called away, but am back to this
>> now. I patched
>> socfpga_common.h and re-built the project. I picked up
>> spl/u-boot-spl-dtb.sfp and
>> u-boot-dtb.img and transferred them to the SD card with:
>>
>> dd if=u-boot-spl-dtb.sfp of=/dev/sdf3 bs=64k seek=0
>> dd if=u-boot-dtb.img of=/dev/sdf3 bs=64k seek=4
>>
>> Tried this with both the original DT set (socfpga.dtsi,
>> socfpga_cyclone.dtsi,
>> socfpga_cyclone5_sockit.dts) that came with the u-boot v2016.01 download
>> and
>> also an Altera-patched DT set that I've used to boot into Linux numerous
>> times.
>>
>> When I start up the board I get:
>>
>> U-Boot SPL 2016.01 (Mar 01 2016 - 17:28:14)
>> drivers/ddr/altera/sequencer.c: Preparing to start memory calibration
>> drivers/ddr/altera/sequencer.c: CALIBRATION FAILED
>> drivers/ddr/altera/sequencer.c: Calibration complete
>> SDRAM calibration failed.
>> ### ERROR ### Please RESET the board ###
>>
>> I'm not a Quartus user, so I haven't done anything with the
>> qts-filter.sh script you
>> mentioned. Do I need to? I don't have any custom FPGA logic - it's
>> just the Terasic
>> board out of the box.
>>
>> Thanks for any help!
>>
>
> Even without the custom FPGA logic the files generated from qts-filter.sh
> need to match your board.
> Sets up PLL and SDRAM parameters.
> I'm not familiar with the Terasic dev board ( I do have the altera devkit,
> but haven't used it for awhile).
> I'd hope the files in the git repo are correct for your board.
> Without the corresponding qsys project it's hard to be sure.
>
Hi Phil,
So as my next attempt, there was a Quartus/Qsys example that came
with the Terasic board (specific to my Rev. of the board).
* I took the contents of the 'handoff folder', .sof, and .sopcinfo file.
* launched an "Embedded Command Shell" from EDS 15.0 and then the BSP editor GUI
* pointed the BSP editor to the "handoff folder", and hit "Generate"
to produce iocsr, pinmux, pll, etc. files
* applied qts-filter.sh to these files, the output of which I then
dropped into the u-boot source @ ../board/terasic/sockit/qts
* rebuilt uboot spl & image, but got a similar result:
U-Boot SPL 2016.01 (Mar 02 2016 - 22:13:31)
drivers/ddr/altera/sequencer.c: Preparing to start memory calibration
drivers/ddr/altera/sequencer.c: CALIBRATION FAILED
drivers/ddr/altera/sequencer.c: Calibration complete
SDRAM calibration failed.
### ERROR ### Please RESET the board ###
Except now it repeats four times, whereas before it only printed out once.
It that essentially the correct procedure? Is it now a matter of
looking through
the include files that where generated by qts-filter.sh to find a
setting that is "off"?
(BTW - my first attempt was to use EDS 13.0, but that resulted in
several undefined macros when it
came time to compile u-boot with the qts-filter-generated code. How
does one know which tool version to use?)
Thanks,
--George
> The sd card write commands look correct.
> I just used a dts files in the uboot source but modified a couple of things.
> Update Mem size and serial port speeds to match our requirements.
>
> I also modified a few debug statements so the spl outputs a bit more info by
> default.
> Output is alot closer to the altera supplied uboot tree.
>
> My spl bootup is:
>
> U-Boot SPL 2016.01-00003-g40d1cd2 (Mar 01 2016 - 15:29:44)
> CLOCK: MPU 800000 kHz
> CLOCK: DDR 400000 kHz
> CLOCK: EOSC1 50000 kHz
> CLOCK: EOSC2 50000 kHz
> CLOCK: F2S_SDR_REF 0 kHz
> CLOCK: F2S_PER_REF 0 kHz
> CLOCK: MMC 50000 kHz
> CLOCK: QSPI 400000 kHz
> CLOCK: UART 100000 kHz
> CLOCK: SPI 200000 kHz
> INFO: Changing address order to 2 (row, chip, bank, column)
> SDRAM: Calibrating PHY
> SDRAM: Preparing to start memory calibration
> SDRAM: CALIBRATION PASSED
> SDRAM: Calibration complete
> SDRAM: 2048 MiB
> Trying to boot from MMC
>
>
> U-Boot 2016.01-00003-g40d1cd2 (Mar 01 2016 - 15:29:44 +0800)
>
>
> Marek who committed the terasic config may be able to help.
> It most likely a mismatch in the qts config vs hardware.
>
>
> --
> Regards
> Phil Reid
>
> ElectroMagnetic Imaging Technology Pty Ltd
> Development of Geophysical Instrumentation & Software
> www.electromag.com.au
>
> 3 The Avenue, Midland WA 6056, AUSTRALIA
> Ph: +61 8 9250 8100
> Fax: +61 8 9250 7100
> Email: preid at electromag.com.au
More information about the U-Boot
mailing list