]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx8mm_evk: Add Serial Download Protocol support
authorFabio Estevam <festevam@denx.de>
Tue, 20 Sep 2022 00:20:14 +0000 (21:20 -0300)
committerStefano Babic <sbabic@denx.de>
Fri, 21 Oct 2022 09:54:13 +0000 (11:54 +0200)
Add Serial Download Protocol support as it is a useful method to
load flash.bin to RAM and run it via 'uuu'.

With this patch, it is possible to start both U-Boot SPL and U-Boot
proper using the following 'uuu'command:

$ uuu -brun spl flash.bin

Based on a patch from Marek Vasut for the imx8mm-mx8menlo board.

Also, to fit the SPL binary into the internal RAM, select CONFIG_LTO
to reduce its size.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/dts/imx8mm-evk-u-boot.dtsi
configs/imx8mm_evk_defconfig

index 36fbf56bc559878ec0bf228124cf2d00c797f78f..d82428f8fe8e2088751341d0043ef6a16fde2761 100644 (file)
        };
 };
 
+&aips4 {
+       u-boot,dm-spl;
+};
+
 &reg_usdhc2_vmmc {
        u-boot,off-on-delay-us = <20000>;
 };
        u-boot,dm-spl;
 };
 
+&usbmisc1 {
+       u-boot,dm-spl;
+};
+
+&usbphynop1 {
+       u-boot,dm-spl;
+};
+
+&usbotg1 {
+       u-boot,dm-spl;
+};
+
 &usdhc1 {
        u-boot,dm-spl;
 };
index 58b5e468a58b4f51ed394d843c5a049794bd6f5e..0797739bb3ae9344a2d0bdadce9bd6ba3eea1864 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x40480000
+CONFIG_LTO=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
@@ -39,6 +40,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
 CONFIG_SPL_I2C=y
 CONFIG_SPL_POWER=y
+CONFIG_SPL_USB_HOST=y
+CONFIG_SPL_USB_GADGET=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_SPL_WATCHDOG=y
 CONFIG_SYS_MAXARGS=64
 CONFIG_SYS_CBSIZE=2048
@@ -51,6 +55,8 @@ CONFIG_CMD_FUSE=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_USB_SDP=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
@@ -81,9 +87,13 @@ CONFIG_PHY_ATHEROS=y
 CONFIG_PHY_GIGE=y
 CONFIG_FEC_MXC=y
 CONFIG_MII=y
+CONFIG_SPL_PHY=y
+CONFIG_SPL_NOP_PHY=y
 CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_IMX8M_POWER_DOMAIN=y
 CONFIG_DM_PMIC=y
 CONFIG_SPL_DM_PMIC_PCA9450=y
 CONFIG_DM_REGULATOR=y
@@ -98,4 +108,15 @@ CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
 CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_DM_THERMAL=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_MXC_USB_OTG_HACTIVE=y
+# CONFIG_USB_STORAGE is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x0525
+CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
+CONFIG_CI_UDC=y
+CONFIG_SDP_LOADADDR=0x40400000
+CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_IMX_WATCHDOG=y