From: Phil Reid <preid@electromag.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot] Newbie SPL question for socfpga_sockit
Date: Thu, 18 Feb 2016 10:45:45 +0800 [thread overview]
Message-ID: <56C53059.4020505@electromag.com.au> (raw)
In-Reply-To: <CAMcKmiESgmx7HjTWOuK2ohN8NnETj-6pYjJo3mPKZ2NrMkAkqw@mail.gmail.com>
G'day George
On 18/02/2016 5:54 AM, George Broz wrote:
> Hello,
>
> Sorry for the newbie question...
>
> I have an Altera/Terasic board (socfpga_sockit) that has issues recognizing
> USB storage devices (roughly 60% good / 40% bad):
>
> SOCFPGA_CYCLONE5 # usb start
> (Re)start USB...
> USB0: scanning bus 0 for devices... DW_USB: Transfer completion
> interrupt timeout
> Timed out waiting for channel to disable
> 1 USB Device(s) found
> scanning usb for storage devices... 0 Storage Device(s) found
>
>
> The pre-made U-Boot SPL & image that come with the board have version:
> U-Boot 2013.01.01 (Aug 08 2014 - 10:46:23)
>
> (Old!)
>
> I need to rebuild U-Boot for this board to add md5sum and hopefully fix the
> USB issues. When I've rebuilt the u-boot.img from the 2013.01.01 branch
> of the (Altera maintained) source, U-boot boots, but the USB problems
> get worse (100% bad):
>
> USB0: Core Release: 2.93a
> dwc_otg_core_host_init: Unable to clear halt on channel 1 (timeout
> HCCHAR 0xC0000000 @ffb40520)
> dwc_otg_core_host_init: Unable to clear halt on channel 2 (timeout
> HCCHAR 0xC0000000 @ffb40540
>
> (I've confirmed that CONFIG_CMD_USB and CONFIG_USB_STORAGE are
> defined and have tried turning on and off 'dcache' as suggested elsewhere
> to no avail).
>
> If I try a later release (e.g. v2016.01 which seems to support the Terasic
> board explicitly) the boot process stops just after loading the SPL.
>
> At this point I have only been changing the u-boot.img component, not the
> SPL (in the a2 partition of the MMC).
>
> The documentation from Altera about generating the SPL seems to require
> using Qsys/Quartus tools which I'd really like to avoid.
>
> I can produce u-boot-spl.bin / u-boot.img from
> make socfpga_sockit_defconfig; make all.
>
> My newbie question ... should be I able to use directly the u-boot-spl.bin
> generated by the build to replace the SPL on the board?
>
> (I'm hoping the USB issues resolve themselves when I'm able to get
> the later version of U-Boot running...)
>
I've just gone thru the process (this week) of getting uboot 2016.01 to boot on our custom socfpga board.
There where a few issues in getting things going.
If your using the sd card to boot then the current memory layout is not per the altera documentation.
I had to make the changes below to config to match the altera docs. Otherwise it hangs just after the SPL.
You also need to use the -dtb image versions with 2016.01 for things to work.
Again you may need to make sure the uboot device trees match your hardware.
Not all uboot drivers appear to be using the DT as yet.
Note the SPL is tightly coupled to the board design and potentially the FPGA image.
If you using bridges or routing HPS resources (eg i2c etc) to the fpga the SPL configures the muxes.
There's a script in uboot src at arch\arm\mach-socfpga\qts-filter.sh
That will generate the qts files for you arch.
I haven't tried the USB stuff as yet.
There are some issues witht eh altera USB port trigger an Over Current event on device insertation.
They've modified the linux kenerl driver to use external OV current detection to get around the problem.
My intial workaround was to insert USB device prior to power on.
I haven't looked at the uboot USB driver yet to see what's in there.
--
Regards
Phil Reid
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index a09e906..3a1b59b 100644 (file)
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -357,13 +357,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
/* SPL SDMMC boot support */
#ifdef CONFIG_SPL_MMC_SUPPORT
+#define CONFIG_SPL_LIBDISK_SUPPORT
#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 2
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img"
-#define CONFIG_SPL_LIBDISK_SUPPORT
#else
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 3
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xa00 /* offset 2560 sect (1M+256k) */
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */
#endif
#endif
next prev parent reply other threads:[~2016-02-18 2:45 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 21:54 [U-Boot] Newbie SPL question for socfpga_sockit George Broz
2016-02-18 2:45 ` Phil Reid [this message]
2016-03-02 2:40 ` George Broz
2016-03-02 3:49 ` Phil Reid
2016-03-03 6:49 ` George Broz
2016-03-03 7:11 ` Phil Reid
2016-03-03 14:57 ` George Broz
2016-03-09 1:42 ` Phil Reid
2016-03-09 10:55 ` Marek Vasut
2016-03-09 16:06 ` George Broz
2016-03-16 1:29 ` George Broz
2016-03-16 16:17 ` George Broz
2016-03-17 1:35 ` Marek Vasut
2016-03-18 18:59 ` George Broz
2016-03-18 19:32 ` Marek Vasut
2016-03-18 21:22 ` George Broz
2016-03-19 11:10 ` Phil Reid
2016-03-20 16:44 ` Marek Vasut
2016-03-20 16:49 ` Marek Vasut
2016-03-29 1:56 ` George Broz
2016-03-29 17:46 ` Marek Vasut
2016-03-20 15:55 ` Dinh Nguyen
2016-03-20 16:42 ` Marek Vasut
2016-03-22 17:06 ` Dinh Nguyen
2016-03-26 20:52 ` Marek Vasut
2016-04-05 8:33 ` Phil Reid
2016-04-05 22:03 ` Marek Vasut
2016-04-06 0:31 ` George Broz
2016-04-06 0:45 ` Marek Vasut
2016-04-06 1:17 ` George Broz
2016-04-06 10:43 ` Marek Vasut
2016-04-07 1:42 ` George Broz
2016-04-07 2:05 ` Marek Vasut
2016-04-07 13:14 ` George Broz
2016-04-07 20:39 ` Marek Vasut
2016-04-07 23:31 ` George Broz
2016-04-07 23:36 ` Marek Vasut
2016-04-07 23:51 ` George Broz
2016-04-08 5:16 ` Stefan Roese
2016-04-08 12:36 ` Marek Vasut
2016-04-08 22:40 ` George Broz
2016-04-10 17:47 ` Marek Vasut
2016-04-11 2:03 ` George Broz
2016-04-11 14:02 ` Marek Vasut
2016-04-12 15:53 ` Dinh Nguyen
2016-04-12 16:00 ` Marek Vasut
2016-04-12 16:08 ` Dinh Nguyen
2016-04-12 16:11 ` Marek Vasut
2016-04-13 9:25 ` Chin Liang See
2016-04-12 16:09 ` Stefan Roese
2016-04-13 11:09 ` Marek Vasut
2016-04-06 7:00 ` Phil Reid
2016-04-06 11:51 ` Marek Vasut
2016-04-06 15:04 ` Phil Reid
2016-04-06 20:38 ` Marek Vasut
2016-03-29 1:44 ` George Broz
2016-03-29 17:45 ` Marek Vasut
2016-03-03 21:16 ` George Broz
2016-03-02 22:54 ` Dinh Nguyen
2016-03-02 23:04 ` Marek Vasut
2016-03-02 23:08 ` Dinh Nguyen
2016-03-02 23:24 ` Marek Vasut
2016-03-03 14:48 ` Dinh Nguyen
2016-03-03 14:51 ` Marek Vasut
2016-03-03 22:00 ` George Broz
2016-03-03 22:09 ` Marek Vasut
[not found] ` <CAMcKmiG8OMmbZ262n8gL7eM=WAgaakaZ5rWzCC1vYu7yzGBYAA@mail.gmail.com>
[not found] ` <56D8BDD7.8070604@denx.de>
[not found] ` <CAMcKmiGrZ94sZKY85Y3aC1_fwgV8oJeAJ0O71bY=gMxUGBp=FQ@mail.gmail.com>
[not found] ` <56D8C3A0.9020204@denx.de>
2016-03-03 23:46 ` George Broz
2016-03-04 16:52 ` Dinh Nguyen
2016-03-04 16:06 ` Dinh Nguyen
2016-03-04 19:03 ` Marek Vasut
2016-03-21 14:05 ` Chin Liang See
2016-03-21 15:45 ` Chin Liang See
2016-03-23 15:00 ` Chin Liang See
2016-03-23 15:37 ` [U-Boot] SoCFPGA cache / S-bit problem - was " Stefan Roese
2016-04-06 16:35 ` Dinh Nguyen
2016-04-06 16:46 ` Marek Vasut
2016-04-06 16:51 ` Dinh Nguyen
2016-03-03 6:55 ` [U-Boot] " George Broz
2016-03-03 9:48 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C53059.4020505@electromag.com.au \
--to=preid@electromag.com.au \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox