[PATCH v2] ARM: imx: Replace YModem with SDP on Data Modul i.MX8M Mini eDM SBC SPL
Marek Vasut
marex at denx.de
Fri Nov 29 03:41:47 CET 2024
The YModem support in SPL was never really used on this device,
the SDP support is much more convenient on i.MX8M Mini based
hardware. Replace the YModem support with SDP support.
The SDP can be utilized by forcing the board into SDP boot mode
by grounding test point right next to silkscreen label U30, and
then by using mfgtools 'uuu -brun spl flash.bin' once the device
enumerates on host system USB bus. The SDP capable USB port is
available on the USB micro-B port on the base board.
Signed-off-by: Marek Vasut <marex at denx.de>
---
NOTE: Would be nice to have in v2025.01
---
Cc: "NXP i.MX U-Boot Team" <uboot-imx at nxp.com>
Cc: Fabio Estevam <festevam at gmail.com>
Cc: Quentin Schulz <quentin.schulz at cherry.de>
Cc: Sean Anderson <seanga2 at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
V2: Drop the SPL YMODEM from defconfig
---
arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi | 9 +++++++++
board/data_modul/imx8mm_edm_sbc/spl.c | 6 ++++--
configs/imx8mm_data_modul_edm_sbc_defconfig | 7 ++++++-
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi b/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi
index fb6951026d9..f5e98bf7487 100644
--- a/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi
@@ -145,8 +145,17 @@
bootph-pre-ram;
};
+&usbmisc1 {
+ bootph-pre-ram;
+};
+
+&usbphynop1 {
+ bootph-pre-ram;
+};
+
&usbotg1 {
dr_mode = "peripheral";
+ bootph-pre-ram;
};
&usdhc2 {
diff --git a/board/data_modul/imx8mm_edm_sbc/spl.c b/board/data_modul/imx8mm_edm_sbc/spl.c
index 17aafd719c9..a9ef049652a 100644
--- a/board/data_modul/imx8mm_edm_sbc/spl.c
+++ b/board/data_modul/imx8mm_edm_sbc/spl.c
@@ -61,8 +61,10 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
{
if (boot_dev_spl == MMC3_BOOT)
return BOOT_DEVICE_MMC2; /* eMMC */
- else
+ else if (boot_dev_spl == MMC2_BOOT)
return BOOT_DEVICE_MMC1; /* SD */
+ else
+ return BOOT_DEVICE_BOARD;
}
void board_boot_order(u32 *spl_boot_list)
@@ -76,7 +78,7 @@ void board_boot_order(u32 *spl_boot_list)
else
spl_boot_list[1] = BOOT_DEVICE_MMC1; /* SD */
- spl_boot_list[2] = BOOT_DEVICE_UART; /* YModem */
+ spl_boot_list[2] = BOOT_DEVICE_BOARD; /* SDP */
spl_boot_list[3] = BOOT_DEVICE_NONE;
}
diff --git a/configs/imx8mm_data_modul_edm_sbc_defconfig b/configs/imx8mm_data_modul_edm_sbc_defconfig
index 7c9d4ee1844..518243e6513 100644
--- a/configs/imx8mm_data_modul_edm_sbc_defconfig
+++ b/configs/imx8mm_data_modul_edm_sbc_defconfig
@@ -12,17 +12,22 @@ CONFIG_DM_REGULATOR_BD71837=y
CONFIG_IMX_CONFIG="board/data_modul/imx8mm_edm_sbc/imximage.cfg"
CONFIG_PHYLIB=y
CONFIG_PREBOOT="run dmo_preboot"
+CONFIG_SDP_LOADADDR=0x60000000
CONFIG_SPL_BSS_MAX_SIZE=0x2000
CONFIG_SPL_BSS_START_ADDR=0x910000
+CONFIG_SPL_MAX_SIZE=0x30000
CONFIG_SPL_CLK_IMX8MM=y
CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000
CONFIG_SPL_DM_PMIC_BD71837=y
CONFIG_SPL_DM_REGULATOR_BD71837=y
+CONFIG_SPL_DM_USB=y
CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK=y
CONFIG_SPL_LEGACY_IMAGE_FORMAT=y
CONFIG_SPL_RAM_DEVICE=y
CONFIG_SPL_STACK=0x920000
CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000
CONFIG_SPL_TEXT_BASE=0x7E1000
-CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
+CONFIG_SPL_USB_HOST=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_SYS_LOAD_ADDR=0x60000000
--
2.45.2
More information about the U-Boot
mailing list