Re: i.MX USB SDP broken on imx6q-sabresd

2020-11-12 Thread Heiko Schocher

Hello Fabio,

Am 12.11.2020 um 13:52 schrieb Fabio Estevam:

Hi Heiko,

On Thu, Nov 12, 2020 at 2:12 AM Heiko Schocher  wrote:


Hmm... just tried cuurent mainline on an imx6ull based board, works
fine for me, see log [1] ... Ok, I boot signed image: u-boot-ivt.img.signed


Thanks for your test.

I suppose your board does not use CONFIG_SPL_LOAD_FIT=y.


No ...


If you have a chance to try loading SPL and u-boot-dtb.img via
imx_usb_loader using a wandboard, I believe you will be able to
reproduce the problem.


I have here a wandboard which I have in my daily U-Boot mainline
testing:

http://xeidos.ddns.net/ubtestresults/home

But I boot from sd card ...


It looks like the issue I am having is the same as the one reported by Tim:
http://u-boot.10912.n7.nabble.com/iMX8MM-USB-support-td405349.html


Hmm... I can not say here more without trying out ... currently
it is hard to find some freetime ... I can just speculate now ...

your log:
"""
load_size 0 bytes
load_addr 0x
dcd 1
clear_dcd 0
plug 1
jump_mode 3
jump_addr 0x
== end work item
header not found 8400:2e77d044, 4000
do_download failed, err=-22
HAB security state: development mode (0x56787856)
"""

Hmm... there is no line:

loading binary file(/srv/tftpboot/imx6ull_pat_defconfig/20201016/u-boot-ivt.img.signed) to 84c0, 
skip=0, fsize=94960 type=aa


instead:

header not found 8400:2e77d044, 4000

So this seems to me failing in imx_usb_loader code ...

The "header not found" comes from imx_sdp.c

May you enable dbg_printf() in imx_usb_loader code ... it seems
to me, that there is a problem with missing some header in your
file you try to download  may you can compare with working one?

bye,
Heiko
--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: h...@denx.de


Re: i.MX USB SDP broken on imx6q-sabresd

2020-11-12 Thread Fabio Estevam
Hi Heiko,

On Thu, Nov 12, 2020 at 2:12 AM Heiko Schocher  wrote:

> Hmm... just tried cuurent mainline on an imx6ull based board, works
> fine for me, see log [1] ... Ok, I boot signed image: u-boot-ivt.img.signed

Thanks for your test.

I suppose your board does not use CONFIG_SPL_LOAD_FIT=y.

If you have a chance to try loading SPL and u-boot-dtb.img via
imx_usb_loader using a wandboard, I believe you will be able to
reproduce the problem.

It looks like the issue I am having is the same as the one reported by Tim:
http://u-boot.10912.n7.nabble.com/iMX8MM-USB-support-td405349.html

Thanks,

Fabio Estevam


Re: i.MX USB SDP broken on imx6q-sabresd

2020-11-11 Thread Heiko Schocher

Hello Fabio,

Am 12.11.2020 um 03:11 schrieb Fabio Estevam:

Hi,

I am trying to load SPL and u-boot-dtb.img via USB using the
imx_usb_loader tool.

Running the latest mainline U-Boot on a imx6q-sabresd I get:

$ sudo ./imx_usb SPL

On the console:

U-Boot SPL 2021.01-rc2-5-g832bfad7451e (Nov 11 2020 - 23:00:05 -0300)
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...

Then I try to load u-boot-dtb.img and the following is seen on the host PC:

$ sudo ./imx_usb  u-boot-dtb.img
config file 
vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0080 file_name=mx6_usb_work.conf
vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
vid=0x066f pid=0x37ff file_name=linux_gadget.conf
vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
config file 
parse /usr/etc/imx-loader.d//mx6_usb_sdp_spl.conf
Trying to open device vid=0x0525 pid=0xb4a4
Interface 0 claimed
HAB security state: development mode (0x56787856)
== work item
filename u-boot-dtb.img
load_size 0 bytes
load_addr 0x
dcd 1
clear_dcd 0
plug 1
jump_mode 3
jump_addr 0x
== end work item
header not found 8400:2e77d044, 4000
do_download failed, err=-22
HAB security state: development mode (0x56787856)

And nothing else appears in the console.

I tried to bisect, but the latest version I got this to run was
v2019.01, which was not using the driver model and prevents bisection.

Does anyone have any suggestions?


Hmm... just tried cuurent mainline on an imx6ull based board, works
fine for me, see log [1] ... Ok, I boot signed image: u-boot-ivt.img.signed

(Board is not yet in mainline ... but no special change regarding USB,
only dts and board code ...)

bye,
Heiko
[1] boot SPL/U-Boot with imx_usb_loader

$ tbot @argsk30rfdevboard-local interactive_uboot -f usbloader
tbot starting ...
├─Flags:
│ 'do_power', 'usbloader', 'local', 'threadripper-big-build'
├─Calling interactive_uboot ...
│   ├─[lab3] sudo ifconfig eth0 down 192.168.3.1 up
│   ├─[lab3] sudo ifconfig eth0 down 192.168.3.1 up
│   ├─[lab3] kermit /home/pi/kermrc_k30rf-devboard
│   ├─POWERON (k30rf-devboard)
│   ├─[lab3] sispmctl -D 01:01:5c:29:39 -o 2
│   │## Accessing Gembird #0 USB device 005
│   │## Switched outlet 2 on
│   ├─[lab3] sudo /home/pi/source/imx_usb_loader/imx_usb 
/srv/tftpboot/imx6ull_pat_defconfig/20201016/SPL.signed

│   │## config file 
│   │## vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
│   │## vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
│   │## vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
│   │## vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
│   │## vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
│   │## vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
│   │## vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
│   │## vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
│   │## vid=0x15a2 pid=0x0080 file_name=mx6ull_usb_work.conf
│   │## vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
│   │## vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
│   │## vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
│   │## vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
│   │## vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
│   │## vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
│   │## vid=0x066f pid=0x37ff file_name=linux_gadget.conf
│   │## vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
│   │## vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
│   │## vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
│   │## vid=0x1fc9 pid=0x0134 file_name=mx8mm_usb_work.conf
│   │## vid=0x1fc9 pid=0x013e file_name=mx8mn_usb_work.conf
│   │## vid=0x3016 pid=0x1001 file_name=mx8m_usb_sdp_spl.conf
│   │## config file 
│   │## parse /home/pi/source/imx_usb_loader//mx6ull_usb_work.conf
│   │## Trying to open device vid=0x15a2 pid=0x0080
│   │## Interface 0 claimed
│   │## HAB security state: development mode (0x56787856)
│   │## == work item
│   │## filename /srv/tftpboot/imx6ull_pat_defconfig/20201016/SPL.signed
│   │## load_size 0 bytes
│   │## load_addr 0x
│   │## dcd 1
│   │## clear_dcd 0
│   │## plug 1
│   │## jump_mode 3
│   │## jump_addr 

i.MX USB SDP broken on imx6q-sabresd

2020-11-11 Thread Fabio Estevam
Hi,

I am trying to load SPL and u-boot-dtb.img via USB using the
imx_usb_loader tool.

Running the latest mainline U-Boot on a imx6q-sabresd I get:

$ sudo ./imx_usb SPL

On the console:

U-Boot SPL 2021.01-rc2-5-g832bfad7451e (Nov 11 2020 - 23:00:05 -0300)
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...

Then I try to load u-boot-dtb.img and the following is seen on the host PC:

$ sudo ./imx_usb  u-boot-dtb.img
config file 
vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf
vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf
vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf
vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0080 file_name=mx6_usb_work.conf
vid=0x1fc9 pid=0x0128 file_name=mx6_usb_work.conf
vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf
vid=0x1fc9 pid=0x0126 file_name=mx7ulp_usb_work.conf
vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf
vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf
vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf
vid=0x066f pid=0x37ff file_name=linux_gadget.conf
vid=0x1b67 pid=0x4fff file_name=mx6_usb_sdp_spl.conf
vid=0x0525 pid=0xb4a4 file_name=mx6_usb_sdp_spl.conf
vid=0x1fc9 pid=0x012b file_name=mx8mq_usb_work.conf
config file 
parse /usr/etc/imx-loader.d//mx6_usb_sdp_spl.conf
Trying to open device vid=0x0525 pid=0xb4a4
Interface 0 claimed
HAB security state: development mode (0x56787856)
== work item
filename u-boot-dtb.img
load_size 0 bytes
load_addr 0x
dcd 1
clear_dcd 0
plug 1
jump_mode 3
jump_addr 0x
== end work item
header not found 8400:2e77d044, 4000
do_download failed, err=-22
HAB security state: development mode (0x56787856)

And nothing else appears in the console.

I tried to bisect, but the latest version I got this to run was
v2019.01, which was not using the driver model and prevents bisection.

Does anyone have any suggestions?

Thanks,

Fabio Estevam