How to enter USB serial download mode in software

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

How to enter USB serial download mode in software

ソリューションへジャンプ
6,945件の閲覧回数
patrickwood
Contributor II

We have a DualLite board that won't be easily accessible where we may need to put it into serial download mode for software upgrades.  Is there any way to do this through software?  There's a recovery button on the board, but we'd like the upgrades to be automated (also access to this button requires taking off a cover).

ラベル(2)
1 解決策
4,020件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Hi Patrick,

If you are able to get into the U-boot prompt then you can do:

=> bmode usb

resetting ...

(USB download mode is entered).

You can then load u-boot.imx via USB using imx_usb_loader:

On the PC host: sudo ./imx_usb u-boot.imx

Then you will see U-boot messages on console.

Regards,

Fabio Estevam

元の投稿で解決策を見る

0 件の賞賛
9 返答(返信)
4,020件の閲覧回数
dav1
Contributor V

Waking up this old thread. I'd like to see this functionallity on the imx8 mini's as well.

Any plans to add support in u-boot for this? 

4,021件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Hi Patrick,

If you are able to get into the U-boot prompt then you can do:

=> bmode usb

resetting ...

(USB download mode is entered).

You can then load u-boot.imx via USB using imx_usb_loader:

On the PC host: sudo ./imx_usb u-boot.imx

Then you will see U-boot messages on console.

Regards,

Fabio Estevam

0 件の賞賛
4,021件の閲覧回数
joëlesponde
Contributor III

FYI, this command is broken within the mainline U-Boot if a bootable qspi flash is connected to the SOC since the version 2016.11.

The CFG1 value is now equal to 0x10 (QSPI boot) instead of 0x01:

git.denx.de Git - u-boot.git/blob - arch/arm/cpu/armv7/mx6/soc.c 

0 件の賞賛
4,021件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Hi Joel,

Which SoC are you using? 

Are you able to determine which commit broke bmode in your usecase?

Does 2017.05 work for you?

Thanks,

Fabio Estevam

0 件の賞賛
4,020件の閲覧回数
joëlesponde
Contributor III

Hi,

I am using the SOC iMX6UL.

The commit that broke this feature is this one:

http://git.denx.de/?p=u-boot.git;a=commit;h=81c4eccb55ccbe4a7bb4016b23738c3c57dc364d

I reverted back to the value 0x01 and it works well.

2017.05 and 2017.07 have the same code for bmode usb.

0 件の賞賛
4,021件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Hi Joel,

Could you please report this problem to the U-Boot list (u-boot@lists.denx.de ) with the folks of the offending commit on Cc?

Thanks

0 件の賞賛
4,021件の閲覧回数
patrickwood
Contributor II

Just to elaborate, I found this code in arch/arm/cpu/armv7/mx6/soc.c:

void boot_mode_apply(unsigned cfg_val)

{

    unsigned reg;

    struct src *psrc = (struct src *)SRC_BASE_ADDR;

    writel(cfg_val, &psrc->gpr9);

    reg = readl(&psrc->gpr10);

    if (cfg_val)

        reg |= 1 << 28;

    else

        reg &= ~(1 << 28);

    writel(reg, &psrc->gpr10);

}

/*

* cfg_val will be used for

* Boot_cfg4[7:0]:Boot_cfg3[7:0]:Boot_cfg2[7:0]:Boot_cfg1[7:0]

* After reset, if GPR10[28] is 1, ROM will copy GPR9[25:0]

* to SBMR1, which will determine the boot device.

*/

cfg_val is 0x01 in the case of "bmode usb".  None of these bits are documented in the RM, BTW.

0 件の賞賛
4,021件の閲覧回数
patrickwood
Contributor II

And on android, via the "reboot download" command in the shell.

0 件の賞賛
4,021件の閲覧回数
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Patrick

one can look at SDK file system_util.c:

/* enter the ROM Serial Download Protocol */

    hab_rvt_failsafe();

"MX6_PLATFORM_SDK "

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&nodeId=018rH3ZrDRB24A&fpsp=1&t...

Best regards

igor

0 件の賞賛