iMX8MM USB support?
Tim Harvey
tharvey at gateworks.com
Fri Apr 10 20:37:32 CEST 2020
On Thu, Apr 9, 2020 at 2:45 PM Tim Harvey <tharvey at gateworks.com> wrote:
>
> On Thu, Apr 9, 2020 at 3:02 AM Schrempf Frieder
> <frieder.schrempf at kontron.de> wrote:
> >
> > On 08.04.20 17:31, Tim Harvey wrote:
> > [...]
> > >>
> > >> In my case I'm loading a FIT image, so things are a bit different.
> > >> Where are you loading the image to?
> > >>
> > >> I have the following line in mx8mm_usb_sdp_spl.conf to load my FIT image
> > >> to DDR and jump to it:
> > >>
> > >> /path/to/image/u-boot.itb:load 0x40200000, jump_direct 0x40200000
> > >>
> > >
> > > Frieder,
> > >
> > > I was trying to load u-boot.img
> > >
> > > The SPL boots fine:
> > > U-Boot SPL 2020.01-00029-g5ad7797 (Apr 08 2020 - 08:16:53 -0700)
> > > read error from device: 9310b8 register: x!Normal Boot
> > > Trying to boot from USB SDP
> > > SDP: initialize...
> > > SDP: handle requests..
> > >
> > > But when I 'imx_usb u-boot.img' it complains there is no header on
> > > u-boot.img. I enabled FIT generation and attempted to 'imx_usb
> > > u-boot.itb' but imx_usb still complains about no header found.
> > >
> > > My mx8mm_usb_sdp_spl.conf loooks like this:
> > > mx8mm_spl_sdp
> > > #hid/bulk,[old_header,]max packet size, {ram start, ram size}(repeat
> > > valid ram areas)
> > > #In SPL, we typically load u-boot.img which has a U-boot header...
> > > hid,1024,0x910000,0x40000000,1G,0x00900000,0x40000
> > >
> > > #0x60000 - 0x8400 = 0x57c00, +0x3000=5ac00 (FIT image)
> > > ../u-boot-imx6/u-boot.bin:load 0x40200000
> > > ../u-boot-imx6/bl31-iMX8MM.bin:load 0x00920000,jump 0x920000
> > >
> > > What does your mx8mm_usb_sdp_spl.conf look like? I must admit I don't
> > > really understand how these are configured.
> >
> > It looks just like yours except that I have a single instruction as
> > already stated above:
> >
> > /path/to/image/u-boot.itb:load 0x40200000, jump_direct 0x40200000
> >
> > and I'm loading the FIT image by running './imx_usb' without arguments.
> >
> > As imx_usb_loader can't parse FIT image headers, I use 'jump_direct' to
> > jump to the raw image entry point and let SPL parse the FIT. I think in
> > that case imx_usb_loader shouldn't complain about a missing header.
>
> Frieder,
>
> Ok, I finally understand. Using 'imx_usb <file>' which is what I was
> doing is not the same as loading it via the conf file and was why it
> was looking for a header.
>
> So now that I'm using the imx_usb.conf files fully instead It's
> loading u-boot.itb and jumping but unfortunately I'm still not quite
> there.
>
> Here's what I'm seeing:
>
> U-Boot SPL 2020.01-00029-g6529a03-dirty (Apr 09 2020 - 13:02:21 -0700)
> Normal Boot
> Trying to boot from USB SDP
> SDP: initialize...
> SDP: handle requests...
> Downloading file of size 584020 to 0x40200000... done
> Jumping to header at 0x40200000
> Header Tag is not an IMX image
>
> Is the 'Header Tag' message normal? From adding some debugging it
> appears to matching the dts name in my board_fit_config_name_match and
> parsing the FIT image, loading the ATF and jumping but then I get
> nothing. What would I expect at this point and do you have any
> troubleshooting tips?
>
Frieder,
My issue was that I forgot to set ATF_LOAD_ADDR=0x920000!
So I'm running now, booting imx8mm-evk via SDP using your USB patches
and imx_usb configuration.
Thank you for your help!
Tim
More information about the U-Boot
mailing list