Skip to content

Commit 9f4627a

Browse files
author
Ye Li
committed
MLK-18654-4 imx8mm_evk: Enable SPL SDP for iMX8MM EVK board
Enable the SPL SDP for iMX8MM EVK. So that when booting from USB serial download mode, the SPL will enter SDP to download FIT image from USB host (uuu tool) and boot into FIT image. The SDP driver needs larger malloc pool size, so extend the SPL malloc pool to 12KB and reduce the SPL BSS MAX to 4KB because BSS actual size is about 1KB. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit bd9cbf6) (cherry picked from commit f522348) (cherry picked from commit 1065a6a)
1 parent ebc757a commit 9f4627a

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

board/freescale/imx8mm_evk/spl.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
4848
return BOOT_DEVICE_NOR;
4949
case NAND_BOOT:
5050
return BOOT_DEVICE_NAND;
51+
case USB_BOOT:
52+
return BOOT_DEVICE_BOARD;
5153
default:
5254
return BOOT_DEVICE_NONE;
5355
}
@@ -270,6 +272,14 @@ void spl_board_init(void)
270272
if (sec_init())
271273
printf("\nsec_init failed!\n");
272274
}
275+
276+
#ifndef CONFIG_SPL_USB_SDP_SUPPORT
277+
/* Serial download mode */
278+
if (is_usb_boot()) {
279+
puts("Back to ROM, SDP\n");
280+
restore_boot_params();
281+
}
282+
#endif
273283
puts("Normal Boot\n");
274284
}
275285

configs/imx8mm_ddr4_evk_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL"
116116
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
117117
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
118118

119+
CONFIG_SPL_USB_HOST=y
120+
CONFIG_SPL_USB_GADGET=y
121+
CONFIG_SPL_USB_SDP_SUPPORT=y
122+
119123
CONFIG_CMD_NAND=y
120124
CONFIG_CMD_UBI=y
121125
CONFIG_MTD_RAW_NAND=y

configs/imx8mm_ddr4_evk_nand_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL"
116116
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
117117
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
118118

119+
CONFIG_SPL_USB_HOST=y
120+
CONFIG_SPL_USB_GADGET=y
121+
CONFIG_SPL_USB_SDP_SUPPORT=y
122+
119123
CONFIG_CMD_NAND=y
120124
CONFIG_CMD_UBI=y
121125
CONFIG_MTD_RAW_NAND=y

configs/imx8mm_evk_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,7 @@ CONFIG_USB_EHCI_HCD=y
129129
CONFIG_USB_GADGET_MANUFACTURER="FSL"
130130
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
131131
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
132+
133+
CONFIG_SPL_USB_HOST=y
134+
CONFIG_SPL_USB_GADGET=y
135+
CONFIG_SPL_USB_SDP_SUPPORT=y

configs/imx8mm_evk_fspi_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,7 @@ CONFIG_USB_EHCI_HCD=y
131131
CONFIG_USB_GADGET_MANUFACTURER="FSL"
132132
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
133133
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
134+
135+
CONFIG_SPL_USB_HOST=y
136+
CONFIG_SPL_USB_GADGET=y
137+
CONFIG_SPL_USB_SDP_SUPPORT=y

0 commit comments

Comments
 (0)