All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
@ 2017-08-30 22:13 Eric Nelson
  2017-08-30 22:29 ` Eric Nelson
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Eric Nelson @ 2017-08-30 22:13 UTC (permalink / raw)
  To: u-boot

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

1. "bmode usb" can be used to force the ROM boot loader's serial
2. "bmode normal" can be used to revert to the normal boot mode
   as specified by fuses and BOOT_MODE pins

Signed-off-by: Eric Nelson <eric@nelint.com>
---
V2 adds "normal" mode as suggested by Troy Kisky
 arch/arm/mach-imx/mx7/soc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 87bf105..15be42a 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -372,6 +372,9 @@ void set_wdog_reset(struct wdog_regs *wdog)
  * to SBMR1, which will determine the boot device.
  */
 const struct boot_mode soc_boot_modes[] = {
+	{"normal",	MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
+	{"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.7.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-30 22:13 [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes Eric Nelson
@ 2017-08-30 22:29 ` Eric Nelson
  2017-08-31 13:35 ` Fabio Estevam
  2017-10-02 13:21 ` Stefano Babic
  2 siblings, 0 replies; 17+ messages in thread
From: Eric Nelson @ 2017-08-30 22:29 UTC (permalink / raw)
  To: u-boot

Sorry for the spam.

I resent this by mistake.

On 08/30/2017 03:13 PM, Eric Nelson wrote:
> This adds support for two additional boot modes on the i.MX7D SoC, which
> is most useful when doing U-Boot development on this chip.
> 
> 1. "bmode usb" can be used to force the ROM boot loader's serial
> 2. "bmode normal" can be used to revert to the normal boot mode
>     as specified by fuses and BOOT_MODE pins
> 
> Signed-off-by: Eric Nelson <eric@nelint.com>
> ---
> V2 adds "normal" mode as suggested by Troy Kisky
>   arch/arm/mach-imx/mx7/soc.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
> index 87bf105..15be42a 100644
> --- a/arch/arm/mach-imx/mx7/soc.c
> +++ b/arch/arm/mach-imx/mx7/soc.c
> @@ -372,6 +372,9 @@ void set_wdog_reset(struct wdog_regs *wdog)
>    * to SBMR1, which will determine the boot device.
>    */
>   const struct boot_mode soc_boot_modes[] = {
> +	{"normal",	MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
> +	{"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)},
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-30 22:13 [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes Eric Nelson
  2017-08-30 22:29 ` Eric Nelson
@ 2017-08-31 13:35 ` Fabio Estevam
  2017-08-31 13:56   ` Fabio Estevam
  2017-10-02 13:21 ` Stefano Babic
  2 siblings, 1 reply; 17+ messages in thread
From: Fabio Estevam @ 2017-08-31 13:35 UTC (permalink / raw)
  To: u-boot

Hi Eric,

On Wed, Aug 30, 2017 at 7:13 PM, Eric Nelson <eric@nelint.com> wrote:
> This adds support for two additional boot modes on the i.MX7D SoC, which
> is most useful when doing U-Boot development on this chip.
>
> 1. "bmode usb" can be used to force the ROM boot loader's serial
> 2. "bmode normal" can be used to revert to the normal boot mode
>    as specified by fuses and BOOT_MODE pins
>
> Signed-off-by: Eric Nelson <eric@nelint.com>

I tried testing your patch on a imx7d sabresd, but it seems there is
an issue with bmode that is unrelated to your patch.

I also did:

diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
index 8f2e33a..c70fde8 100644
--- a/configs/mx7dsabresd_defconfig
+++ b/configs/mx7dsabresd_defconfig
@@ -5,7 +5,6 @@ CONFIG_VIDEO=y
 # CONFIG_ARMV7_VIRT is not set
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
-# CONFIG_CMD_BMODE is not set
 CONFIG_DEFAULT_DEVICE_TREE="imx7d-sdb"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg"
 CONFIG_BOOTDELAY=3

so that bmode command can be added.

However I am getting:

=> bmode usb
bmode - <NULL>

Usage:
bmode
=> bmode normal
bmode - <NULL>

Usage:
bmode
=>

Any ideas?

Thanks

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 13:35 ` Fabio Estevam
@ 2017-08-31 13:56   ` Fabio Estevam
  2017-08-31 14:20     ` Eric Nelson
  2017-08-31 21:28     ` Troy Kisky
  0 siblings, 2 replies; 17+ messages in thread
From: Fabio Estevam @ 2017-08-31 13:56 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 31, 2017 at 10:35 AM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Eric,
>
> On Wed, Aug 30, 2017 at 7:13 PM, Eric Nelson <eric@nelint.com> wrote:
>> This adds support for two additional boot modes on the i.MX7D SoC, which
>> is most useful when doing U-Boot development on this chip.
>>
>> 1. "bmode usb" can be used to force the ROM boot loader's serial
>> 2. "bmode normal" can be used to revert to the normal boot mode
>>    as specified by fuses and BOOT_MODE pins
>>
>> Signed-off-by: Eric Nelson <eric@nelint.com>
>
> I tried testing your patch on a imx7d sabresd, but it seems there is
> an issue with bmode that is unrelated to your patch.
>
> I also did:
>
> diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
> index 8f2e33a..c70fde8 100644
> --- a/configs/mx7dsabresd_defconfig
> +++ b/configs/mx7dsabresd_defconfig
> @@ -5,7 +5,6 @@ CONFIG_VIDEO=y
>  # CONFIG_ARMV7_VIRT is not set
>  CONFIG_IMX_RDC=y
>  CONFIG_IMX_BOOTAUX=y
> -# CONFIG_CMD_BMODE is not set
>  CONFIG_DEFAULT_DEVICE_TREE="imx7d-sdb"
>  CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg"
>  CONFIG_BOOTDELAY=3
>
> so that bmode command can be added.
>
> However I am getting:
>
> => bmode usb
> bmode - <NULL>

I missed to add 'add_board_boot_modes(board_boot_modes);'

Now I get:

=> bmode usb
resetting ...


U-Boot 2017.09-rc2-36996-g63af4b0-dirty (Aug 31 2017 - 10:53:12 -0300)

CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 41C
Reset cause: POR
Model: Freescale i.MX7 SabreSD Board
Board: i.MX7D SABRESD in non-secure mode
DRAM:  1 GiB
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC:
MMC Device 0 not found
*** Warning - No MMC card found, using default environment

Video: 480x272x24
In:    serial
Out:   serial
Err:   serial
Net:   FEC0
Hit any key to stop autoboot:  0
=>

So the board is resetting instead of going into serial download mode.

Any ideas?

Thanks

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 13:56   ` Fabio Estevam
@ 2017-08-31 14:20     ` Eric Nelson
  2017-08-31 21:28     ` Troy Kisky
  1 sibling, 0 replies; 17+ messages in thread
From: Eric Nelson @ 2017-08-31 14:20 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

On 08/31/2017 06:56 AM, Fabio Estevam wrote:
> On Thu, Aug 31, 2017 at 10:35 AM, Fabio Estevam <festevam@gmail.com> wrote:
>> Hi Eric,
>>
>> On Wed, Aug 30, 2017 at 7:13 PM, Eric Nelson <eric@nelint.com> wrote:
>>> This adds support for two additional boot modes on the i.MX7D SoC, which
>>> is most useful when doing U-Boot development on this chip.
>>>
>>> 1. "bmode usb" can be used to force the ROM boot loader's serial
>>> 2. "bmode normal" can be used to revert to the normal boot mode
>>>     as specified by fuses and BOOT_MODE pins
>>>
>>> Signed-off-by: Eric Nelson <eric@nelint.com>
>>
>> I tried testing your patch on a imx7d sabresd, but it seems there is
>> an issue with bmode that is unrelated to your patch.
>>
>> I also did:
>>
>> diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
>> index 8f2e33a..c70fde8 100644
>> --- a/configs/mx7dsabresd_defconfig
>> +++ b/configs/mx7dsabresd_defconfig
>> @@ -5,7 +5,6 @@ CONFIG_VIDEO=y
>>   # CONFIG_ARMV7_VIRT is not set
>>   CONFIG_IMX_RDC=y
>>   CONFIG_IMX_BOOTAUX=y
>> -# CONFIG_CMD_BMODE is not set
>>   CONFIG_DEFAULT_DEVICE_TREE="imx7d-sdb"
>>   CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg"
>>   CONFIG_BOOTDELAY=3
>>
>> so that bmode command can be added.
>>
>> However I am getting:
>>
>> => bmode usb
>> bmode - <NULL>
> 
> I missed to add 'add_board_boot_modes(board_boot_modes);'
> 
> Now I get:
> 
> => bmode usb
> resetting ...
> 
> 
> U-Boot 2017.09-rc2-36996-g63af4b0-dirty (Aug 31 2017 - 10:53:12 -0300)
> 
> CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
> CPU:   Commercial temperature grade (0C to 95C) at 41C
> Reset cause: POR
> Model: Freescale i.MX7 SabreSD Board
> Board: i.MX7D SABRESD in non-secure mode
> DRAM:  1 GiB
> PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
> MMC:
> MMC Device 0 not found
> *** Warning - No MMC card found, using default environment
> 
> Video: 480x272x24
> In:    serial
> Out:   serial
> Err:   serial
> Net:   FEC0
> Hit any key to stop autoboot:  0
> =>
> 
> So the board is resetting instead of going into serial download mode.
> 
> Any ideas?
> 

I'm not sure. Since I'm currently working with a board with no
fuses blown, I'm getting USB mode either way ;)...

I have an MX7 SABRE SD and I'll try it out there.

Regards,


Eric

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 13:56   ` Fabio Estevam
  2017-08-31 14:20     ` Eric Nelson
@ 2017-08-31 21:28     ` Troy Kisky
  2017-08-31 22:53       ` Troy Kisky
  2017-08-31 22:53       ` Eric Nelson
  1 sibling, 2 replies; 17+ messages in thread
From: Troy Kisky @ 2017-08-31 21:28 UTC (permalink / raw)
  To: u-boot

On 8/31/2017 6:56 AM, Fabio Estevam wrote:
> On Thu, Aug 31, 2017 at 10:35 AM, Fabio Estevam <festevam@gmail.com> wrote:
>> Hi Eric,
>>
>> On Wed, Aug 30, 2017 at 7:13 PM, Eric Nelson <eric@nelint.com> wrote:
>>> This adds support for two additional boot modes on the i.MX7D SoC, which
>>> is most useful when doing U-Boot development on this chip.
>>>
>>> 1. "bmode usb" can be used to force the ROM boot loader's serial
>>> 2. "bmode normal" can be used to revert to the normal boot mode
>>>    as specified by fuses and BOOT_MODE pins
>>>
>>> Signed-off-by: Eric Nelson <eric@nelint.com>
>>
>> I tried testing your patch on a imx7d sabresd, but it seems there is
>> an issue with bmode that is unrelated to your patch.
>>
>> I also did:
>>
>> diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
>> index 8f2e33a..c70fde8 100644
>> --- a/configs/mx7dsabresd_defconfig
>> +++ b/configs/mx7dsabresd_defconfig
>> @@ -5,7 +5,6 @@ CONFIG_VIDEO=y
>>  # CONFIG_ARMV7_VIRT is not set
>>  CONFIG_IMX_RDC=y
>>  CONFIG_IMX_BOOTAUX=y
>> -# CONFIG_CMD_BMODE is not set
>>  CONFIG_DEFAULT_DEVICE_TREE="imx7d-sdb"
>>  CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg"
>>  CONFIG_BOOTDELAY=3
>>
>> so that bmode command can be added.
>>
>> However I am getting:
>>
>> => bmode usb
>> bmode - <NULL>
> 
> I missed to add 'add_board_boot_modes(board_boot_modes);'
> 
> Now I get:
> 
> => bmode usb
> resetting ...
> 
> 
> U-Boot 2017.09-rc2-36996-g63af4b0-dirty (Aug 31 2017 - 10:53:12 -0300)
> 
> CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
> CPU:   Commercial temperature grade (0C to 95C) at 41C
> Reset cause: POR
> Model: Freescale i.MX7 SabreSD Board
> Board: i.MX7D SABRESD in non-secure mode
> DRAM:  1 GiB
> PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
> MMC:
> MMC Device 0 not found
> *** Warning - No MMC card found, using default environment
> 
> Video: 480x272x24
> In:    serial
> Out:   serial
> Err:   serial
> Net:   FEC0
> Hit any key to stop autoboot:  0
> =>
> 
> So the board is resetting instead of going into serial download mode.
> 
> Any ideas?
> 
>


I got this response from Peng when I asked him back in March of last year.


> For now, bmode does not work. Since bmode use warm reset, but we now use
> wdog to directly reset pmic. So bmode will not work.
>
> Please check your code to see whether your board connect WDOG_B to pmic reset pin and have wdog
pinmux settings.
>
> Thanks,
> Peng.



Maybe if you change the WDOG pinmux it might work ?


Troy

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 21:28     ` Troy Kisky
@ 2017-08-31 22:53       ` Troy Kisky
  2017-08-31 23:04         ` Eric Nelson
  2017-08-31 23:11         ` Fabio Estevam
  2017-08-31 22:53       ` Eric Nelson
  1 sibling, 2 replies; 17+ messages in thread
From: Troy Kisky @ 2017-08-31 22:53 UTC (permalink / raw)
  To: u-boot

On 8/31/2017 2:28 PM, Troy Kisky wrote:

> 
> Maybe if you change the WDOG pinmux it might work ?
> 
> 

Worked for me

=> mm.l 302c0000
302c0000: 00000003 ? 0
302c0004: 00000001 ? q
=> bmod usb
resetting ...

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 21:28     ` Troy Kisky
  2017-08-31 22:53       ` Troy Kisky
@ 2017-08-31 22:53       ` Eric Nelson
  1 sibling, 0 replies; 17+ messages in thread
From: Eric Nelson @ 2017-08-31 22:53 UTC (permalink / raw)
  To: u-boot

Thanks Troy (and Peng),

On 08/31/2017 02:28 PM, Troy Kisky wrote:
> On 8/31/2017 6:56 AM, Fabio Estevam wrote:
>> On Thu, Aug 31, 2017 at 10:35 AM, Fabio Estevam <festevam@gmail.com> wrote:
>>> On Wed, Aug 30, 2017 at 7:13 PM, Eric Nelson <eric@nelint.com> wrote:
>>>> This adds support for two additional boot modes on the i.MX7D SoC, which
>>>> is most useful when doing U-Boot development on this chip.
>>>>
>>>> 1. "bmode usb" can be used to force the ROM boot loader's serial
>>>> 2. "bmode normal" can be used to revert to the normal boot mode
>>>>     as specified by fuses and BOOT_MODE pins
>>>>
>>>> Signed-off-by: Eric Nelson <eric@nelint.com>
>>>
>>> I tried testing your patch on a imx7d sabresd, but it seems there is
>>> an issue with bmode that is unrelated to your patch.
>>>
>>> I also did:
>>>
>>> diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
>>> index 8f2e33a..c70fde8 100644
>>> --- a/configs/mx7dsabresd_defconfig
>>> +++ b/configs/mx7dsabresd_defconfig
>>> @@ -5,7 +5,6 @@ CONFIG_VIDEO=y
>>>   # CONFIG_ARMV7_VIRT is not set
>>>   CONFIG_IMX_RDC=y
>>>   CONFIG_IMX_BOOTAUX=y
>>> -# CONFIG_CMD_BMODE is not set
>>>   CONFIG_DEFAULT_DEVICE_TREE="imx7d-sdb"
>>>   CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg"
>>>   CONFIG_BOOTDELAY=3
>>>
>>> so that bmode command can be added.
>>>
>>> However I am getting:
>>>
>>> => bmode usb
>>> bmode - <NULL>
>>
>> I missed to add 'add_board_boot_modes(board_boot_modes);'
>>
>> Now I get:
>>
>> => bmode usb
>> resetting ...
>>
>>
>> U-Boot 2017.09-rc2-36996-g63af4b0-dirty (Aug 31 2017 - 10:53:12 -0300)
>>
>> CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
>> CPU:   Commercial temperature grade (0C to 95C) at 41C

Note the POR here (I would expect it to be WDOG).

>> Reset cause: POR
>> Model: Freescale i.MX7 SabreSD Board
>> Board: i.MX7D SABRESD in non-secure mode
>> DRAM:  1 GiB

<snip>

> 
> I got this response from Peng when I asked him back in March of last year.
> 
>> For now, bmode does not work. Since bmode use warm reset, but we now use
>> wdog to directly reset pmic. So bmode will not work.
>>
>> Please check your code to see whether your board connect WDOG_B to pmic reset pin and have wdog
> pinmux settings.
>>
>> Thanks,
>> Peng.
> 
> Maybe if you change the WDOG pinmux it might work ?
> 

The mx7dsabresd has GPIO1_IO00 configured for WDOG, and overriding it
does get rid of the POR.

Unfortunately, it also doesn't allow "bmode usb" to function.

=> mm 302c0000
302c0000: 00000003 ? 0
302c0004: 00000000 ? x
=> bmode usb
resetting ...

(crickets here)

Based on this:

Rejected-by: Eric Nelson <eric@nelint.com>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 22:53       ` Troy Kisky
@ 2017-08-31 23:04         ` Eric Nelson
  2017-08-31 23:13           ` Troy Kisky
  2017-08-31 23:11         ` Fabio Estevam
  1 sibling, 1 reply; 17+ messages in thread
From: Eric Nelson @ 2017-08-31 23:04 UTC (permalink / raw)
  To: u-boot

On 08/31/2017 03:53 PM, Troy Kisky wrote:
> On 8/31/2017 2:28 PM, Troy Kisky wrote:
> 
>>
>> Maybe if you change the WDOG pinmux it might work ?
>>
>>
> 
> Worked for me
> 
> => mm.l 302c0000
> 302c0000: 00000003 ? 0
> 302c0004: 00000001 ? q
> => bmod usb
> resetting ...
> 

Hmm...

On SABRE-SD or Nitrogen7?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 22:53       ` Troy Kisky
  2017-08-31 23:04         ` Eric Nelson
@ 2017-08-31 23:11         ` Fabio Estevam
  2017-08-31 23:12           ` Eric Nelson
  1 sibling, 1 reply; 17+ messages in thread
From: Fabio Estevam @ 2017-08-31 23:11 UTC (permalink / raw)
  To: u-boot

Troy,

On Thu, Aug 31, 2017 at 7:53 PM, Troy Kisky
<troy.kisky@boundarydevices.com> wrote:
> On 8/31/2017 2:28 PM, Troy Kisky wrote:
>
>>
>> Maybe if you change the WDOG pinmux it might work ?
>>
>>
>
> Worked for me
>
> => mm.l 302c0000
> 302c0000: 00000003 ? 0
> 302c0004: 00000001 ? q
> => bmod usb
> resetting ...
>

Ok, but did you manage to successfully transfer u-boot via imx_usb_loader?

It did not work for me.

Thanks

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 23:11         ` Fabio Estevam
@ 2017-08-31 23:12           ` Eric Nelson
  0 siblings, 0 replies; 17+ messages in thread
From: Eric Nelson @ 2017-08-31 23:12 UTC (permalink / raw)
  To: u-boot

On 08/31/2017 04:11 PM, Fabio Estevam wrote:
> Troy,
> 
> On Thu, Aug 31, 2017 at 7:53 PM, Troy Kisky
> <troy.kisky@boundarydevices.com> wrote:
>> On 8/31/2017 2:28 PM, Troy Kisky wrote:
>>
>>>
>>> Maybe if you change the WDOG pinmux it might work ?
>>>
>>>
>>
>> Worked for me
>>
>> => mm.l 302c0000
>> 302c0000: 00000003 ? 0
>> 302c0004: 00000001 ? q
>> => bmod usb
>> resetting ...
>>
> 
> Ok, but did you manage to successfully transfer u-boot via imx_usb_loader?
> 
> It did not work for me.
> 

Ditto here. The OTG port didn't re-enumerate.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 23:04         ` Eric Nelson
@ 2017-08-31 23:13           ` Troy Kisky
  2017-09-01 21:27             ` Troy Kisky
  0 siblings, 1 reply; 17+ messages in thread
From: Troy Kisky @ 2017-08-31 23:13 UTC (permalink / raw)
  To: u-boot

On 8/31/2017 4:04 PM, Eric Nelson wrote:
> On 08/31/2017 03:53 PM, Troy Kisky wrote:
>> On 8/31/2017 2:28 PM, Troy Kisky wrote:
>>
>>>
>>> Maybe if you change the WDOG pinmux it might work ?
>>>
>>>
>>
>> Worked for me
>>
>> => mm.l 302c0000
>> 302c0000: 00000003 ? 0
>> 302c0004: 00000001 ? q
>> => bmod usb
>> resetting ...
>>
> 
> Hmm...
> 
> On SABRE-SD or Nitrogen7?
> 

Nitrogen7,

It does show up in lsusb afterwards
Bus 003 Device 100: ID 15a2:0076 Freescale Semiconductor, Inc.

But imx_usb gets errors afterwards

== work item
filename /tftpboot/u-boot.nitrogen7
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 2
jump_addr 0x00000000
== end work item
loading DCD table @0x910000

<<<-564, 1024 bytes>>>
report 3 in err=-7, last_trans=0  c4 34 03 32
report 4 in err=-7, last_trans=0  c4 34 03 32
failed (status 0x320334c4)
________________


So, close but no cigar.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-31 23:13           ` Troy Kisky
@ 2017-09-01 21:27             ` Troy Kisky
  0 siblings, 0 replies; 17+ messages in thread
From: Troy Kisky @ 2017-09-01 21:27 UTC (permalink / raw)
  To: u-boot

On 8/31/2017 4:13 PM, Troy Kisky wrote:
> On 8/31/2017 4:04 PM, Eric Nelson wrote:
>> On 08/31/2017 03:53 PM, Troy Kisky wrote:
>>> On 8/31/2017 2:28 PM, Troy Kisky wrote:
>>>
>>>>
>>>> Maybe if you change the WDOG pinmux it might work ?
>>>>
>>>>
>>>
>>> Worked for me
>>>
>>> => mm.l 302c0000
>>> 302c0000: 00000003 ? 0
>>> 302c0004: 00000001 ? q
>>> => bmod usb
>>> resetting ...
>>>
>>
>> Hmm...
>>
>> On SABRE-SD or Nitrogen7?
>>
> 
> Nitrogen7,
> 
> It does show up in lsusb afterwards
> Bus 003 Device 100: ID 15a2:0076 Freescale Semiconductor, Inc.
> 
> But imx_usb gets errors afterwards
> 
> == work item
> filename /tftpboot/u-boot.nitrogen7
> load_size 0 bytes
> load_addr 0x00000000
> dcd 1
> clear_dcd 0
> plug 1
> jump_mode 2
> jump_addr 0x00000000
> == end work item
> loading DCD table @0x910000
> 
> <<<-564, 1024 bytes>>>
> report 3 in err=-7, last_trans=0  c4 34 03 32
> report 4 in err=-7, last_trans=0  c4 34 03 32
> failed (status 0x320334c4)
> ________________
> 
> 
> So, close but no cigar.
> 

FYI


=> mw.l 302c0000 0
=> reset
resetting ...
___________________

Also just hangs. So, it is not "bmode" specify.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-08-30 22:13 [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes Eric Nelson
  2017-08-30 22:29 ` Eric Nelson
  2017-08-31 13:35 ` Fabio Estevam
@ 2017-10-02 13:21 ` Stefano Babic
  2017-10-02 14:19   ` Eric Nelson
  2 siblings, 1 reply; 17+ messages in thread
From: Stefano Babic @ 2017-10-02 13:21 UTC (permalink / raw)
  To: u-boot

On 31/08/2017 00:13, Eric Nelson wrote:
> This adds support for two additional boot modes on the i.MX7D SoC, which
> is most useful when doing U-Boot development on this chip.
> 
> 1. "bmode usb" can be used to force the ROM boot loader's serial
> 2. "bmode normal" can be used to revert to the normal boot mode
>    as specified by fuses and BOOT_MODE pins
> 
> Signed-off-by: Eric Nelson <eric@nelint.com>
> ---
> V2 adds "normal" mode as suggested by Troy Kisky
>  arch/arm/mach-imx/mx7/soc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
> index 87bf105..15be42a 100644
> --- a/arch/arm/mach-imx/mx7/soc.c
> +++ b/arch/arm/mach-imx/mx7/soc.c
> @@ -372,6 +372,9 @@ void set_wdog_reset(struct wdog_regs *wdog)
>   * to SBMR1, which will determine the boot device.
>   */
>  const struct boot_mode soc_boot_modes[] = {
> +	{"normal",	MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
> +	{"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)},
> 

Sorry, it was for a long time in the queue - discussion in thread is
spreading away from the original review (I had errouneosly set it to
Changes requested).

Applied to u-boot-imx, -master, thanks !

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-10-02 13:21 ` Stefano Babic
@ 2017-10-02 14:19   ` Eric Nelson
  2017-10-02 14:27     ` Stefano Babic
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Nelson @ 2017-10-02 14:19 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On 10/02/2017 06:21 AM, Stefano Babic wrote:
> On 31/08/2017 00:13, Eric Nelson wrote:
>> This adds support for two additional boot modes on the i.MX7D SoC, which
>> is most useful when doing U-Boot development on this chip.
>>
>> 1. "bmode usb" can be used to force the ROM boot loader's serial
>> 2. "bmode normal" can be used to revert to the normal boot mode
>>     as specified by fuses and BOOT_MODE pins
>>
>> Signed-off-by: Eric Nelson <eric@nelint.com>
>> ---
>> V2 adds "normal" mode as suggested by Troy Kisky
>>   arch/arm/mach-imx/mx7/soc.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
>> index 87bf105..15be42a 100644
>> --- a/arch/arm/mach-imx/mx7/soc.c
>> +++ b/arch/arm/mach-imx/mx7/soc.c
>> @@ -372,6 +372,9 @@ void set_wdog_reset(struct wdog_regs *wdog)
>>    * to SBMR1, which will determine the boot device.
>>    */
>>   const struct boot_mode soc_boot_modes[] = {
>> +	{"normal",	MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
>> +	{"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)},
>>
> 
> Sorry, it was for a long time in the queue - discussion in thread is
> spreading away from the original review (I had errouneosly set it to
> Changes requested).
> 
> Applied to u-boot-imx, -master, thanks !
> 

Sorry, but we rejected this patch (because it doesn't work).

https://patchwork.ozlabs.org/patch/807934/

Regards,


Eric

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
  2017-10-02 14:19   ` Eric Nelson
@ 2017-10-02 14:27     ` Stefano Babic
  0 siblings, 0 replies; 17+ messages in thread
From: Stefano Babic @ 2017-10-02 14:27 UTC (permalink / raw)
  To: u-boot

On 02/10/2017 16:19, Eric Nelson wrote:
> Hi Stefano,
> 
> On 10/02/2017 06:21 AM, Stefano Babic wrote:
>> On 31/08/2017 00:13, Eric Nelson wrote:
>>> This adds support for two additional boot modes on the i.MX7D SoC, which
>>> is most useful when doing U-Boot development on this chip.
>>>
>>> 1. "bmode usb" can be used to force the ROM boot loader's serial
>>> 2. "bmode normal" can be used to revert to the normal boot mode
>>>     as specified by fuses and BOOT_MODE pins
>>>
>>> Signed-off-by: Eric Nelson <eric@nelint.com>
>>> ---
>>> V2 adds "normal" mode as suggested by Troy Kisky
>>>   arch/arm/mach-imx/mx7/soc.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
>>> index 87bf105..15be42a 100644
>>> --- a/arch/arm/mach-imx/mx7/soc.c
>>> +++ b/arch/arm/mach-imx/mx7/soc.c
>>> @@ -372,6 +372,9 @@ void set_wdog_reset(struct wdog_regs *wdog)
>>>    * to SBMR1, which will determine the boot device.
>>>    */
>>>   const struct boot_mode soc_boot_modes[] = {
>>> +    {"normal",    MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
>>> +    {"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)},
>>>
>>
>> Sorry, it was for a long time in the queue - discussion in thread is
>> spreading away from the original review (I had errouneosly set it to
>> Changes requested).
>>
>> Applied to u-boot-imx, -master, thanks !
>>
> 
> Sorry, but we rejected this patch (because it doesn't work).
> 
> https://patchwork.ozlabs.org/patch/807934/

Thanks, I have not seen it - I drop it.

Best regards,
Stefano



-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes
@ 2017-08-30 14:13 Eric Nelson
  0 siblings, 0 replies; 17+ messages in thread
From: Eric Nelson @ 2017-08-30 14:13 UTC (permalink / raw)
  To: u-boot

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

1. "bmode usb" can be used to force the ROM boot loader's serial
2. "bmode normal" can be used to revert to the normal boot mode
   as specified by fuses and BOOT_MODE pins

Signed-off-by: Eric Nelson <eric@nelint.com>
---
V2 adds "normal" mode as suggested by Troy Kisky
 arch/arm/mach-imx/mx7/soc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 87bf105..15be42a 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -372,6 +372,9 @@ void set_wdog_reset(struct wdog_regs *wdog)
  * to SBMR1, which will determine the boot device.
  */
 const struct boot_mode soc_boot_modes[] = {
+	{"normal",	MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
+	{"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.7.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-10-02 14:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 22:13 [U-Boot] [PATCH V2] imx: mx7: Add support for USB and normal boot modes Eric Nelson
2017-08-30 22:29 ` Eric Nelson
2017-08-31 13:35 ` Fabio Estevam
2017-08-31 13:56   ` Fabio Estevam
2017-08-31 14:20     ` Eric Nelson
2017-08-31 21:28     ` Troy Kisky
2017-08-31 22:53       ` Troy Kisky
2017-08-31 23:04         ` Eric Nelson
2017-08-31 23:13           ` Troy Kisky
2017-09-01 21:27             ` Troy Kisky
2017-08-31 23:11         ` Fabio Estevam
2017-08-31 23:12           ` Eric Nelson
2017-08-31 22:53       ` Eric Nelson
2017-10-02 13:21 ` Stefano Babic
2017-10-02 14:19   ` Eric Nelson
2017-10-02 14:27     ` Stefano Babic
  -- strict thread matches above, loose matches on Subject: below --
2017-08-30 14:13 Eric Nelson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.