On Wed, Apr 8, 2020 at 12:35 AM Schrempf Frieder
<frieder.schre...@kontron.de> wrote:
>
> Hi Tim,
>
> On 07.04.20 19:06, Tim Harvey wrote:
> > On Mon, Apr 6, 2020 at 2:43 AM Schrempf Frieder
> > <frieder.schre...@kontron.de> wrote:
> >>
> >> Hi Tim,
> >>
> >> On 01.04.20 19:55, Tim Harvey wrote:
> >>> Peng,
> >>>
> >>> It looks like IMX8MM USB support hasn't made it upstream yet. Is this
> >>> something your working on?
> >>>
> >>> I'm interested in booting an IMX8MM via SDP.
> >>
> >> If I remember correctly, the main issue is that the ci_udc driver is
> >> missing DM support. See here: [1].
> >>
> >> I have pulled some patches/hacks into our tree to make SDP work, at
> >> least without DM [2].
> >>
> >> If someone could come up with a proper solution for upstream that would
> >> be great and I would be happy to review/test.
> >>
> >> [1] 
> >> https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fu-boot.10912.n7.nabble.com%2FDM-for-ci-udc-td368249.html%23a370228&amp;data=02%7C01%7Cfrieder.schrempf%40kontron.de%7Cb62b33f13a5546ece4d508d7db16044c%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637218759927463384&amp;sdata=cSQl5z%2FRjvX4IKPWs71wOUhcc3ivvrq%2BObr7EeFbwCU%3D&amp;reserved=0
> >> [2] 
> >> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kontron-electronics.de%2Flinux%2Fu-boot%2F-%2Fcommits%2Fv2020.01-ktn&amp;data=02%7C01%7Cfrieder.schrempf%40kontron.de%7Cb62b33f13a5546ece4d508d7db16044c%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637218759927463384&amp;sdata=pgoX%2Bh0E%2FiY49ebT16RD3y8hKuzO0NtmdKvrXHjBnuA%3D&amp;reserved=0
> >>
> >
> > Frieder,
> >
> > Thanks - this was very helpful! After applying the patches adding
> > IMX8MM USB I can boot the EVK SPL via SDP and get it to transition
> > over to providing a gadget at 0525:c4a4 but when I try to load
> > u-boot.img to that it fails with a header not found error:
> >
> > sudo ../imx_usb_loader/imx_usb u-boot.imx; sleep 2; sudo
> > ../imx_usb_loader/imx_usb u-boot.img
> > config file <../imx_usb_loader//imx_usb.conf>
> > ...
> > vid=0x1fc9 pid=0x0134 file_name=mx8mm_usb_work.conf
> > ...
> > config file <../imx_usb_loader//mx8mm_usb_work.conf>
> > parse ../imx_usb_loader//mx8mm_usb_work.conf
> > Trying to open device vid=0x1fc9 pid=0x0134
> > Interface 0 claimed
> > HAB security state: development mode (0x56787856)
> > == work item
> > filename u-boot.imx
> > load_size 0 bytes
> > load_addr 0x00000000
> > dcd 1
> > clear_dcd 0
> > plug 1
> > jump_mode 3
> > jump_addr 0x00000000
> > == end work item
> > No DCD table
> >
> > loading binary file(u-boot.imx) to 007e0fc0, skip=0, fsize=37600 type=aa
> >
> > <<<226816, 226816 bytes>>>
> > succeeded (security 0x56787856, status 0x88888888)
> > jumping to 0x007e0fc0
> > config file <../imx_usb_loader//imx_usb.conf>
> > ...
> > config file <../imx_usb_loader//mx8mm_usb_sdp_spl.conf>
> > parse ../imx_usb_loader//mx8mm_usb_sdp_spl.conf
> > Trying to open device vid=0x0525 pid=0xc4a4
> > Interface 0 claimed
> > HAB security state: development mode (0x56787856)
> > == work item
> > filename u-boot.img
> > load_size 0 bytes
> > load_addr 0x00000000
> > dcd 1
> > clear_dcd 0
> > plug 1
> > jump_mode 3
> > jump_addr 0x00000000
> > == end work item
> > header not found 8400:91000694, 4000
> > do_download failed, err=-22
> > HAB security state: development mode (0x56787856)
> >
> > Note I had to add a line to imx_usb.conf to map 0525:c4a4 to
> > mx8mm_usb_sdp_spl.conf:
> > diff --git a/imx_usb.conf b/imx_usb.conf
> > index c7c00f6..4d89230 100644
> > --- a/imx_usb.conf
> > +++ b/imx_usb.conf
> > @@ -17,6 +17,7 @@
> >   0x066f:0x37ff, linux_gadget.conf
> >   0x1b67:0x4fff, mx6_usb_sdp_spl.conf
> >   0x0525:0xb4a4, mx6_usb_sdp_spl.conf
> > +0x0525:0xc4a4, mx8mm_usb_sdp_spl.conf
> >   0x1fc9:0x012b, mx8mq_usb_work.conf
> >   0x1fc9:0x0134, mx8mm_usb_work.conf
> >   0x1fc9:0x013e, mx8mn_usb_work.conf
> >
> > Do you know what's missing from u-boot.img?
>
> 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.

Thanks,

Tim

Reply via email to