Skip to contentSkip to conversation

pico-imx6ul, pico-imx7d: Use eMMC user partition by default

PATCH New Otavio Salvador 3 participants 8 messages Sep 28, 2018 – Oct 9, 2018 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/4 pico-imx6ul, pico-imx7d: Use eMMC user partition by default

After discussing with TechNexion about how its default setting, it is better to install on the eMMC user partition by default, when using DFU, so it works out of box for majority of users.

---

Changes in v3: None
Changes in v2: None

 include/configs/pico-imx6ul.h | 4 ++--
 include/configs/pico-imx7d.h  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
include/configs/pico-imx6ul.h +2 -2
index 3d93205535..0fea2d65dd 100644
@@ -56,8 +56,8 @@
 
 #define CONFIG_DFU_ENV_SETTINGS \
 	"dfu_alt_info=" \
-		"spl raw 0x2 0x400 mmcpart 1;" \
-		"u-boot raw 0x8a 0x400 mmcpart 1;" \
+		"spl raw 0x2 0x400;" \
+		"u-boot raw 0x8a 0x400;" \
 		"/boot/zImage ext4 0 1;" \
 		"/boot/imx6ul-pico-hobbit.dtb ext4 0 1;" \
 		"/boot/imx6ul-pico-pi.dtb ext4 0 1;" \
include/configs/pico-imx7d.h +2 -2
index 0e770bf41f..614be99d93 100644
@@ -45,8 +45,8 @@
 
 #define CONFIG_DFU_ENV_SETTINGS \
 	"dfu_alt_info=" \
-		"spl raw 0x2 0x400 mmcpart 1;" \
-		"u-boot raw 0x8a 0x400 mmcpart 1;" \
+		"spl raw 0x2 0x400;" \
+		"u-boot raw 0x8a 0x400;" \
 		"/boot/zImage ext4 0 1;" \
 		"/boot/imx7d-pico-hobbit.dtb ext4 0 1;" \
 		"/boot/imx7d-pico-pi.dtb ext4 0 1;" \
Signature · 1 line
2.19.0
#1 lore raw

PATCH v3 2/4 pico-imx6ul, pico-imx7d: Enable USB and PXE boot support

This allow the use of a USB storage or PXE network booting as fallback, allowing for example for manufacturing installation of eMMC storage in an easy way.

---

Changes in v3: None
Changes in v2:
- improve commit log (fabio)

 include/configs/pico-imx6ul.h | 2 ++
 include/configs/pico-imx7d.h  | 2 ++
 2 files changed, 4 insertions(+)
include/configs/pico-imx6ul.h +2 -0
index 0fea2d65dd..8082b74c9c 100644
@@ -103,6 +103,8 @@
 
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 0) \
+	func(USB, usb, 0) \
+	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
include/configs/pico-imx7d.h +2 -0
index 614be99d93..2bc42a04a0 100644
@@ -92,6 +92,8 @@
 
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 0) \
+	func(USB, usb, 0) \
+	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
Signature · 1 line
2.19.0
#2 lore raw

PATCH v3 3/4 pico-imx7d: Make SPL binary fit into 64kB

In reply to Otavio Salvador

From: Fabio Estevam <[email protected]>

Currently SPL binary is larger than 64kB, which is larger than CONFIG_SPL_MAX_SIZE defined in imx7_spl.h.

This causes boot failure on the pico-mx7 targets.

Remove CONFIG_SPL_LIBDISK_SUPPORT option for now, so that the SPL binary can fit into the 64kB range.

---

Changes in v3:
- new patch

Changes in v2: None

 configs/pico-hobbit-imx7d_defconfig | 1 -
 configs/pico-imx7d_defconfig        | 1 -
 configs/pico-pi-imx7d_defconfig     | 1 -
 3 files changed, 3 deletions(-)
configs/pico-hobbit-imx7d_defconfig +0 -1
index 568fb11d59..b02cae5237 100644
@@ -8,7 +8,6 @@ CONFIG_TARGET_PICO_IMX7D=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
configs/pico-imx7d_defconfig +0 -1
index d6cfc2065e..f355f07be7 100644
@@ -8,7 +8,6 @@ CONFIG_TARGET_PICO_IMX7D=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
configs/pico-pi-imx7d_defconfig +0 -1
index 73800fc8eb..3a182dcb81 100644
@@ -8,7 +8,6 @@ CONFIG_TARGET_PICO_IMX7D=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
Signature · 1 line
2.19.0
#3 lore raw

PATCH v3 3/4 pico-imx7d: Make SPL binary fit into 64kB

Quoted 9 lines · Otavio Salvador

From: Fabio Estevam <[email protected]>

Currently SPL binary is larger than 64kB, which is larger than CONFIG_SPL_MAX_SIZE defined in imx7_spl.h.

This causes boot failure on the pico-mx7 targets.

Remove CONFIG_SPL_LIBDISK_SUPPORT option for now, so that the SPL binary can fit into the 64kB range.

Agree !

Quoted 52 lines

---

Changes in v3:
- new patch

Changes in v2: None

 configs/pico-hobbit-imx7d_defconfig | 1 -
 configs/pico-imx7d_defconfig        | 1 -
 configs/pico-pi-imx7d_defconfig     | 1 -
 3 files changed, 3 deletions(-)
configs/pico-hobbit-imx7d_defconfig +0 -1
index 568fb11d59..b02cae5237 100644
@@ -8,7 +8,6 @@ CONFIG_TARGET_PICO_IMX7D=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
configs/pico-imx7d_defconfig +0 -1
index d6cfc2065e..f355f07be7 100644
@@ -8,7 +8,6 @@ CONFIG_TARGET_PICO_IMX7D=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
configs/pico-pi-imx7d_defconfig +0 -1
index 73800fc8eb..3a182dcb81 100644
@@ -8,7 +8,6 @@ CONFIG_TARGET_PICO_IMX7D=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
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
=====================================================================
#4 lore raw

PATCH v3 4/4 pico-imx7d: Add USB Host support

In reply to Otavio Salvador

From: Fabio Estevam <[email protected]>

USB OTG2 port is connected to the USB host connector.

Add support for it.

---

Changes in v3:
- new patch

Changes in v2: None

 board/technexion/pico-imx7d/pico-imx7d.c | 29 +++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)
board/technexion/pico-imx7d/pico-imx7d.c +28 -1
index 0767d0462f..53e14693a5 100644
@@ -282,7 +282,34 @@ int checkboard(void)
 	return 0;
 }
 
+static iomux_v3_cfg_t const usb_otg2_pads[] = {
+	MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
+};
+
+int board_ehci_hcd_init(int port)
+{
+	switch (port) {
+	case 0:
+		break;
+	case 1:
+		imx_iomux_v3_setup_multiple_pads(usb_otg2_pads,
+						 ARRAY_SIZE(usb_otg2_pads));
+		break;
+	default:
+		return -EINVAL;
+	}
+	return 0;
+}
+
 int board_usb_phy_mode(int port)
 {
-	return USB_INIT_DEVICE;
+	switch (port) {
+	case 0:
+		return USB_INIT_DEVICE;
+	case 1:
+		return USB_INIT_HOST;
+	default:
+		return -EINVAL;
+	}
+	return 0;
 }
Signature · 1 line
2.19.0
#5 lore raw

PATCH v3 4/4 pico-imx7d: Add USB Host support

Quoted 9 lines · Otavio Salvador

From: Fabio Estevam <[email protected]>

USB OTG2 port is connected to the USB host connector.

Add support for it.

I think the serie wasn't Cced for you, by mistake. Do you mind to take a look?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
#6 lore raw

PATCH v3 4/4 pico-imx7d: Add USB Host support

Quoted 5 lines · Otavio Salvador
Quoted 3 lines · Otavio Salvador

From: Fabio Estevam <[email protected]>

Quoted 9 lines
Quoted 6 lines

USB OTG2 port is connected to the USB host connector.

Add support for it.

I think the serie wasn't Cced for you, by mistake. Do you mind to take a look?

No worry, I will take a look tomorrow.

Regards,
Stefano

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
=====================================================================
#7 lore raw

PATCH v3 1/4 pico-imx6ul, pico-imx7d: Use eMMC user partition by default

In reply to Otavio Salvador

Hello Stefano,

I forgot to add you to Cc list

Quoted 7 lines · Otavio Salvador

After discussing with TechNexion about how its default setting, it is better to install on the eMMC user partition by default, when using DFU, so it works out of box for majority of users.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750