Skip to contentSkip to conversation

imx: mx7: Add support for USB boot mode

PATCH New Eric Nelson 2 participants 5 messages Aug 27, 2017 – Aug 30, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx: mx7: Add support for USB boot mode

This adds support for USB boot mode on the i.MX7D SoC, which is most useful when doing U-Boot development on this chip.

i.e., it enables you to enter the ROM boot loader's serial download protocol using the command:

=> bmode usb

---
 arch/arm/mach-imx/mx7/soc.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-imx/mx7/soc.c +2 -0
index 87bf105..63ee59f 100644
@@ -372,6 +372,8 @@ void set_wdog_reset(struct wdog_regs *wdog)
  * to SBMR1, which will determine the boot device.
  */
 const struct boot_mode soc_boot_modes[] = {
+	{"usb",		MAKE_CFGVAL(0x01, 0x00, 0x00, 0x00)},
+
 	{"ecspi1:0",	MAKE_CFGVAL(0x00, 0x60, 0x00, 0x00)},
 	{"ecspi1:1",	MAKE_CFGVAL(0x40, 0x62, 0x00, 0x00)},
 	{"ecspi1:2",	MAKE_CFGVAL(0x80, 0x64, 0x00, 0x00)},
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 imx: mx7: Add support for USB boot mode

Quoted 18 lines · Eric Nelson

This adds support for USB boot mode on the i.MX7D SoC, which is most useful when doing U-Boot development on this chip.

i.e., it enables you to enter the ROM boot loader's serial download protocol using the command:

=> bmode usb

---
 arch/arm/mach-imx/mx7/soc.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-imx/mx7/soc.c +0 -0
index 87bf105..63ee59f 100644

arch/arm/mach-imx/mx7/soc.c void set_wdog_reset(struct wdog_regs *wdog) · line 374

Quoted 3 lines
arch/arm/mach-imx/mx7/soc.c +0 -0
@@ -372,6 +372,8 @@ void set_wdog_reset(struct wdog_regs *wdog)
  * to SBMR1, which will determine the boot device.
  */
 const struct boot_mode soc_boot_modes[] = {

You might want to add

+ {"normal", MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},

while you're at it, to undo with "bmode normal"

arch/arm/mach-imx/mx7/soc.c void set_wdog_reset(struct wdog_regs *wdog) · line 379

Quoted 6 lines
arch/arm/mach-imx/mx7/soc.c +2 -0
+	{"usb",		MAKE_CFGVAL(0x01, 0x00, 0x00, 0x00)},
+
 	{"ecspi1:0",	MAKE_CFGVAL(0x00, 0x60, 0x00, 0x00)},
 	{"ecspi1:1",	MAKE_CFGVAL(0x40, 0x62, 0x00, 0x00)},
 	{"ecspi1:2",	MAKE_CFGVAL(0x80, 0x64, 0x00, 0x00)},
#2 lore raw

PATCH 1/1 imx: mx7: Add support for USB boot mode

Hi Troy,

Quoted 25 lines · Troy Kisky
Quoted 18 lines · Eric Nelson

This adds support for USB boot mode on the i.MX7D SoC, which is most useful when doing U-Boot development on this chip.

i.e., it enables you to enter the ROM boot loader's serial download protocol using the command:

=> bmode usb

---
  arch/arm/mach-imx/mx7/soc.c | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/mach-imx/mx7/soc.c +0 -0
index 87bf105..63ee59f 100644

arch/arm/mach-imx/mx7/soc.c void set_wdog_reset(struct wdog_regs *wdog) · line 374

Quoted 3 lines
arch/arm/mach-imx/mx7/soc.c +0 -0
@@ -372,6 +372,8 @@ void set_wdog_reset(struct wdog_regs *wdog)
   * to SBMR1, which will determine the boot device.
   */
  const struct boot_mode soc_boot_modes[] = {

You might want to add

Quoted 5 lines

+ {"normal", MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},

while you're at it, to undo with "bmode normal"

Normal, meaning "don't override"?

Why would you want to do this?

Please advise,

Eric

#3 lore raw

PATCH 1/1 imx: mx7: Add support for USB boot mode

Quoted 31 lines · Eric Nelson

Hi Troy,

Quoted 28 lines · Troy Kisky
Quoted 18 lines · Eric Nelson

This adds support for USB boot mode on the i.MX7D SoC, which is most useful when doing U-Boot development on this chip.

i.e., it enables you to enter the ROM boot loader's serial download protocol using the command:

=> bmode usb

---
  arch/arm/mach-imx/mx7/soc.c | 2 ++

  1 file changed, 2 insertions(+)
arch/arm/mach-imx/mx7/soc.c +0 -0
index 87bf105..63ee59f 100644

arch/arm/mach-imx/mx7/soc.c void set_wdog_reset(struct wdog_regs *wdog) · line 374

Quoted 3 lines
arch/arm/mach-imx/mx7/soc.c +0 -0
@@ -372,6 +372,8 @@ void set_wdog_reset(struct wdog_regs *wdog)
    * to SBMR1, which will determine the boot device.
    */
   const struct boot_mode soc_boot_modes[] = {

You might want to add

+       {"normal",      MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},

Quoted 8 lines
Quoted 2 lines

while you're at it, to undo with "bmode normal"

Normal, meaning "don't override"?

Why would you want to do this?

Please advise,

Hi Eric!

If you do "bmode usb" and then use "imx_usb" to load a new u-boot. You may want to do "bmode normal", so that a watchdog reset from the linux kernel or from u-boot will work as expected, instead of starting the ROM USB downloader again.

BR

Troy

#4 lore raw

PATCH 1/1 imx: mx7: Add support for USB boot mode

Hi Troy,

Quoted 41 lines · Troy Kisky
Quoted 31 lines · Eric Nelson

Hi Troy,

Quoted 28 lines · Troy Kisky
Quoted 18 lines · Eric Nelson

This adds support for USB boot mode on the i.MX7D SoC, which is most useful when doing U-Boot development on this chip.

i.e., it enables you to enter the ROM boot loader's serial download protocol using the command:

=> bmode usb

---
   arch/arm/mach-imx/mx7/soc.c | 2 ++
   1 file changed, 2 insertions(+)
arch/arm/mach-imx/mx7/soc.c +0 -0
index 87bf105..63ee59f 100644

arch/arm/mach-imx/mx7/soc.c void set_wdog_reset(struct wdog_regs *wdog) · line 374

Quoted 3 lines
arch/arm/mach-imx/mx7/soc.c +0 -0
@@ -372,6 +372,8 @@ void set_wdog_reset(struct wdog_regs *wdog)
    * to SBMR1, which will determine the boot device.
    */
   const struct boot_mode soc_boot_modes[] = {

You might want to add

+ {"normal", MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},

Quoted 8 lines
Quoted 2 lines

while you're at it, to undo with "bmode normal"

Normal, meaning "don't override"?

Why would you want to do this?

Please advise,

Quoted 8 lines

Hi Eric!

If you do "bmode usb" and then use "imx_usb" to load a new u-boot. You may want to do "bmode normal", so that a watchdog reset from the linux kernel or from u-boot will work as expected, instead of starting the ROM USB downloader again.

Got it.

It keeps you from reaching for the power or reset button after using "bmode usb" or somesuch.

I'll ship a V2 momentarily.

Regards,

Eric