[U-Boot] [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.
Reviewed-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br ---
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(-)
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h index 3d93205535..0fea2d65dd 100644 --- a/include/configs/pico-imx6ul.h +++ b/include/configs/pico-imx6ul.h @@ -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;" \ diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 0e770bf41f..614be99d93 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -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;" \

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.
Reviewed-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br ---
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(+)
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h index 0fea2d65dd..8082b74c9c 100644 --- a/include/configs/pico-imx6ul.h +++ b/include/configs/pico-imx6ul.h @@ -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> diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 614be99d93..2bc42a04a0 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -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>

From: Fabio Estevam festevam@gmail.com
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.
Signed-off-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br ---
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(-)
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index 568fb11d59..b02cae5237 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -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 diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index d6cfc2065e..f355f07be7 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -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 diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 73800fc8eb..3a182dcb81 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -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

On 28/09/2018 16:22, Otavio Salvador wrote:
From: Fabio Estevam festevam@gmail.com
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 !
Signed-off-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br
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(-)
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index 568fb11d59..b02cae5237 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -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 diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index d6cfc2065e..f355f07be7 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -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 diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 73800fc8eb..3a182dcb81 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -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

From: Fabio Estevam festevam@gmail.com
USB OTG2 port is connected to the USB host connector.
Add support for it.
Signed-off-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br ---
Changes in v3: - new patch
Changes in v2: None
board/technexion/pico-imx7d/pico-imx7d.c | 29 +++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 0767d0462f..53e14693a5 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -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; }

On Fri, Sep 28, 2018 at 11:23 AM Otavio Salvador otavio@ossystems.com.br wrote:
From: Fabio Estevam festevam@gmail.com
USB OTG2 port is connected to the USB host connector.
Add support for it.
Signed-off-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br
I think the serie wasn't Cced for you, by mistake. Do you mind to take a look?

On 08/10/2018 21:36, Otavio Salvador wrote:
On Fri, Sep 28, 2018 at 11:23 AM Otavio Salvador otavio@ossystems.com.br wrote:
From: Fabio Estevam festevam@gmail.com
USB OTG2 port is connected to the USB host connector.
Add support for it.
Signed-off-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br
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

Hello Stefano,
I forgot to add you to Cc list
On Fri, Sep 28, 2018 at 11:22 AM Otavio Salvador otavio@ossystems.com.br wrote:
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.
Reviewed-by: Fabio Estevam festevam@gmail.com Signed-off-by: Otavio Salvador otavio@ossystems.com.br
participants (3)
-
Otavio Salvador
-
Otavio Salvador
-
Stefano Babic