Skip to contentSkip to conversation

imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

PATCH New Stefan Agner 4 participants 7 messages Jun 9, 2017 – Jun 29, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

From: Stefan Agner <[email protected]>

i.MX 6UL and 6ULL have different boot device capabilities and use therefor use a different boot device selection table than other i.MX 6 devices. Particularly, the value which has been used so far (b0001) is assigned to QSPI boot for these two devices.

There is no common reserved value for all i.MX 6devices. Use b0010 for i.MX 6UL and 6ULL via compile time ifdef.

---
 arch/arm/cpu/armv7/mx6/soc.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/cpu/armv7/mx6/soc.c +4 -0
index dd94797514..9416bb8947 100644
@@ -548,7 +548,11 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 const struct boot_mode soc_boot_modes[] = {
 	{"normal",	MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
 	/* reserved value should start rom usb */
+#if defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL)
+	{"usb",		MAKE_CFGVAL(0x20, 0x00, 0x00, 0x00)},
+#else
 	{"usb",		MAKE_CFGVAL(0x10, 0x00, 0x00, 0x00)},
+#endif
 	{"sata",	MAKE_CFGVAL(0x20, 0x00, 0x00, 0x00)},
 	{"ecspi1:0",	MAKE_CFGVAL(0x30, 0x00, 0x00, 0x08)},
 	{"ecspi1:1",	MAKE_CFGVAL(0x30, 0x00, 0x00, 0x18)},
Signature · 1 line
2.13.1
#1 lore raw

PATCH 1/1 imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

Quoted 8 lines · Stefan Agner

From: Stefan Agner <[email protected]>

i.MX 6UL and 6ULL have different boot device capabilities and use therefor use a different boot device selection table than other i.MX 6 devices. Particularly, the value which has been used so far (b0001) is assigned to QSPI boot for these two devices.

Quoted 5 lines

There is no common reserved value for all i.MX 6devices. Use b0010 for i.MX 6UL and 6ULL via compile time ifdef.

Thanks for the patch.

Joël, could you please test it and reply with your Tested-by?

Thanks

#5 lore raw

PATCH 1/1 imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

In reply to Stefan Agner
Quoted 8 lines · Stefan Agner

From: Stefan Agner <[email protected]>

i.MX 6UL and 6ULL have different boot device capabilities and use therefor use a different boot device selection table than other i.MX 6 devices. Particularly, the value which has been used so far (b0001) is assigned to QSPI boot for these two devices.

Quoted 5 lines

There is no common reserved value for all i.MX 6devices. Use b0010 for i.MX 6UL and 6ULL via compile time ifdef.

#2 lore raw

PATCH 1/1 imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

In reply to Fabio Estevam

Hi Stefan,

Why did you take the value 0x20 in the table entry instead of the value 0x00 as it is, for example, in the NXP U-Boot?

Is it because this boot mode does not exist in the iMX6UL SOC?

Joël Esponde
Honeywell | Safety and Productivity Solutions

Quoted 30 lines

-----Message d'origine-----
De : Fabio Estevam [mailto:festevam at gmail.com]
Envoyé : samedi 10 juin 2017 00:10
À : Stefan Agner <[email protected]>; Esponde, Joel <[email protected]>
Cc : Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Stefan Agner <[email protected]>; U- Boot-Denx <[email protected]>
Objet : Re: [U-Boot] [PATCH] imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

Quoted 7 lines · Stefan Agner

From: Stefan Agner <[email protected]>

i.MX 6UL and 6ULL have different boot device capabilities and use therefor use a different boot device selection table than other i.MX 6 devices. Particularly, the value which has been used so far (b0001) is assigned to QSPI boot for these two devices.

Quoted 5 lines

There is no common reserved value for all i.MX 6devices. Use b0010 for i.MX 6UL and 6ULL via compile time ifdef.

Thanks for the patch.

Joël, could you please test it and reply with your Tested-by?

Thanks

#4 lore raw

PATCH 1/1 imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

In reply to Fabio Estevam
Quoted 22 lines

-----Message d'origine-----
De : Fabio Estevam [mailto:festevam at gmail.com]
Envoyé : samedi 10 juin 2017 00:10
À : Stefan Agner <[email protected]>; Esponde, Joel <[email protected]>
Cc : Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Stefan Agner <[email protected]>; U- Boot-Denx <[email protected]>
Objet : Re: [U-Boot] [PATCH] imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

Quoted 10 lines · Stefan Agner

From: Stefan Agner <[email protected]>

i.MX 6UL and 6ULL have different boot device capabilities and use therefor use a different boot device selection table than other i.MX 6 devices. Particularly, the value which has been used so far (b0001) is assigned to QSPI boot for these two devices.

There is no common reserved value for all i.MX 6devices. Use b0010 for i.MX 6UL and 6ULL via compile time ifdef.

Quoted 8 lines
Quoted 2 lines

Thanks for the patch.

Joël, could you please test it and reply with your Tested-by?

Thanks

PS: I tested the patch with an iMX6UL and a QSPI flash.

#3 lore raw

PATCH 1/1 imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

In reply to Esponde
Quoted 4 lines · Joel

Hi Stefan,

Why did you take the value 0x20 in the table entry instead of the value 0x00 as it is, for example, in the NXP U-Boot?

0x00 would mean b0000, which is WEIM (OneNAND/NOR flash, which is probably a likely boot device).

0x20 is no defined boot device, and since it works, it will make sure that bmode usb works for all users of i.MX 6UL/ULL...

--
Stefan

Quoted 36 lines

Is it because this boot mode does not exist in the iMX6UL SOC?

Joël Esponde
Honeywell | Safety and Productivity Solutions

Quoted 30 lines

-----Message d'origine-----
De : Fabio Estevam [mailto:festevam at gmail.com]
Envoyé : samedi 10 juin 2017 00:10
À : Stefan Agner <[email protected]>; Esponde, Joel <[email protected]>
Cc : Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Stefan Agner <[email protected]>; U- Boot-Denx <[email protected]>
Objet : Re: [U-Boot] [PATCH] imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

Quoted 7 lines · Stefan Agner

From: Stefan Agner <[email protected]>

i.MX 6UL and 6ULL have different boot device capabilities and use therefor use a different boot device selection table than other i.MX 6 devices. Particularly, the value which has been used so far (b0001) is assigned to QSPI boot for these two devices.

Quoted 5 lines

There is no common reserved value for all i.MX 6devices. Use b0010 for i.MX 6UL and 6ULL via compile time ifdef.

Thanks for the patch.

Joël, could you please test it and reply with your Tested-by?

Thanks

#6 lore raw

PATCH 1/1 imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

In reply to Stefan Agner
Quoted 24 lines · Stefan Agner

From: Stefan Agner <[email protected]>

i.MX 6UL and 6ULL have different boot device capabilities and use therefor use a different boot device selection table than other i.MX 6 devices. Particularly, the value which has been used so far (b0001) is assigned to QSPI boot for these two devices.

There is no common reserved value for all i.MX 6devices. Use b0010 for i.MX 6UL and 6ULL via compile time ifdef.

---
 arch/arm/cpu/armv7/mx6/soc.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/cpu/armv7/mx6/soc.c +0 -0
index dd94797514..9416bb8947 100644
@@ -548,7 +548,11 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 const struct boot_mode soc_boot_modes[] = {

arch/arm/cpu/armv7/mx6/soc.c void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) · line 558

Quoted 10 lines
arch/arm/cpu/armv7/mx6/soc.c +4 -0
 	{"normal",	MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)},
 	/* reserved value should start rom usb */
+#if defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL)
+	{"usb",		MAKE_CFGVAL(0x20, 0x00, 0x00, 0x00)},
+#else
 	{"usb",		MAKE_CFGVAL(0x10, 0x00, 0x00, 0x00)},
+#endif
 	{"sata",	MAKE_CFGVAL(0x20, 0x00, 0x00, 0x00)},
 	{"ecspi1:0",	MAKE_CFGVAL(0x30, 0x00, 0x00, 0x08)},
 	{"ecspi1:1",	MAKE_CFGVAL(0x30, 0x00, 0x00, 0x18)},

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

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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
=====================================================================