All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] imx8mm_evk: Add an entry for USB boot
@ 2022-09-20  0:20 Fabio Estevam
  2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Fabio Estevam @ 2022-09-20  0:20 UTC (permalink / raw)
  To: sbabic; +Cc: peng.fan, marex, u-boot, Fabio Estevam

Add an entry for USB boot so that U-Boot could be loaded via
the Serial Download Protocol.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 board/freescale/imx8mm_evk/spl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index e2eb1426c8..c827ed5546 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -33,6 +33,8 @@ DECLARE_GLOBAL_DATA_PTR;
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
+	case USB_BOOT:
+		return BOOT_DEVICE_BOARD;
 	case SD2_BOOT:
 	case MMC2_BOOT:
 		return BOOT_DEVICE_MMC1;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  0:20 [PATCH 1/2] imx8mm_evk: Add an entry for USB boot Fabio Estevam
@ 2022-09-20  0:20 ` Fabio Estevam
  2022-09-20  5:46   ` Michael Nazzareno Trimarchi
                     ` (3 more replies)
  2022-09-21  5:26 ` [PATCH 1/2] imx8mm_evk: Add an entry for USB boot Peng Fan
  2022-10-21 11:40 ` sbabic
  2 siblings, 4 replies; 13+ messages in thread
From: Fabio Estevam @ 2022-09-20  0:20 UTC (permalink / raw)
  To: sbabic; +Cc: peng.fan, marex, u-boot, Fabio Estevam

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>
---
 arch/arm/dts/imx8mm-evk-u-boot.dtsi | 16 ++++++++++++++++
 configs/imx8mm_evk_defconfig        | 21 +++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
index 36fbf56bc5..d82428f8fe 100644
--- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
@@ -20,6 +20,10 @@
 	};
 };
 
+&aips4 {
+	u-boot,dm-spl;
+};
+
 &reg_usdhc2_vmmc {
 	u-boot,off-on-delay-us = <20000>;
 };
@@ -84,6 +88,18 @@
 	u-boot,dm-spl;
 };
 
+&usbmisc1 {
+	u-boot,dm-spl;
+};
+
+&usbphynop1 {
+	u-boot,dm-spl;
+};
+
+&usbotg1 {
+	u-boot,dm-spl;
+};
+
 &usdhc1 {
 	u-boot,dm-spl;
 };
diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
index 7bcedcd51f..2dff26b3eb 100644
--- a/configs/imx8mm_evk_defconfig
+++ b/configs/imx8mm_evk_defconfig
@@ -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
@@ -38,6 +39,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
@@ -50,6 +54,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
@@ -80,9 +86,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
@@ -97,4 +107,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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
@ 2022-09-20  5:46   ` Michael Nazzareno Trimarchi
  2022-09-20  6:31     ` ZHIZHIKIN Andrey
  2022-09-20  6:56   ` Peng Fan
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-09-20  5:46 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: sbabic, peng.fan, marex, u-boot

Hi

On Tue, Sep 20, 2022 at 2:21 AM Fabio Estevam <festevam@denx.de> wrote:
>
> 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>
> ---
>  arch/arm/dts/imx8mm-evk-u-boot.dtsi | 16 ++++++++++++++++
>  configs/imx8mm_evk_defconfig        | 21 +++++++++++++++++++++
>  2 files changed, 37 insertions(+)
>
> diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> index 36fbf56bc5..d82428f8fe 100644
> --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> @@ -20,6 +20,10 @@
>         };
>  };
>
> +&aips4 {
> +       u-boot,dm-spl;
> +};
> +
>  &reg_usdhc2_vmmc {
>         u-boot,off-on-delay-us = <20000>;
>  };
> @@ -84,6 +88,18 @@
>         u-boot,dm-spl;
>  };
>
> +&usbmisc1 {
> +       u-boot,dm-spl;
> +};
> +
> +&usbphynop1 {
> +       u-boot,dm-spl;
> +};
> +
> +&usbotg1 {
> +       u-boot,dm-spl;
> +};
> +
>  &usdhc1 {
>         u-boot,dm-spl;
>  };
> diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
> index 7bcedcd51f..2dff26b3eb 100644
> --- a/configs/imx8mm_evk_defconfig
> +++ b/configs/imx8mm_evk_defconfig
> @@ -17,6 +17,7 @@ CONFIG_SPL_SERIAL=y
>  CONFIG_SPL_DRIVERS_MISC=y
>  CONFIG_SPL=y
>  CONFIG_SYS_LOAD_ADDR=0x40480000
> +CONFIG_LTO=y

Is the entry required? or part of the series. If so could you explain
in the commit message?

Michael

>  CONFIG_DISTRO_DEFAULTS=y
>  CONFIG_FIT=y
>  CONFIG_FIT_EXTERNAL_OFFSET=0x3000
> @@ -38,6 +39,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
> @@ -50,6 +54,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
> @@ -80,9 +86,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
> @@ -97,4 +107,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
> --
> 2.25.1
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  5:46   ` Michael Nazzareno Trimarchi
@ 2022-09-20  6:31     ` ZHIZHIKIN Andrey
  2022-09-20  6:33       ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 13+ messages in thread
From: ZHIZHIKIN Andrey @ 2022-09-20  6:31 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi, Fabio Estevam
  Cc: sbabic, peng.fan, marex, u-boot

Hello Michael,

> -----Original Message-----
> From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Michael Nazzareno
> Trimarchi
> Sent: Tuesday, September 20, 2022 7:46 AM
> To: Fabio Estevam <festevam@denx.de>
> Cc: sbabic@denx.de; peng.fan@nxp.com; marex@denx.de; u-boot@lists.denx.de
> Subject: Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
> 
> Hi
> 
> On Tue, Sep 20, 2022 at 2:21 AM Fabio Estevam <festevam@denx.de> wrote:
> >
> > 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>
> > ---
> >  arch/arm/dts/imx8mm-evk-u-boot.dtsi | 16 ++++++++++++++++
> >  configs/imx8mm_evk_defconfig        | 21 +++++++++++++++++++++
> >  2 files changed, 37 insertions(+)
> >
> > diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-
> boot.dtsi
> > index 36fbf56bc5..d82428f8fe 100644
> > --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> > +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> > @@ -20,6 +20,10 @@
> >         };
> >  };
> >
> > +&aips4 {
> > +       u-boot,dm-spl;
> > +};
> > +
> >  &reg_usdhc2_vmmc {
> >         u-boot,off-on-delay-us = <20000>;
> >  };
> > @@ -84,6 +88,18 @@
> >         u-boot,dm-spl;
> >  };
> >
> > +&usbmisc1 {
> > +       u-boot,dm-spl;
> > +};
> > +
> > +&usbphynop1 {
> > +       u-boot,dm-spl;
> > +};
> > +
> > +&usbotg1 {
> > +       u-boot,dm-spl;
> > +};
> > +
> >  &usdhc1 {
> >         u-boot,dm-spl;
> >  };
> > diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
> > index 7bcedcd51f..2dff26b3eb 100644
> > --- a/configs/imx8mm_evk_defconfig
> > +++ b/configs/imx8mm_evk_defconfig
> > @@ -17,6 +17,7 @@ CONFIG_SPL_SERIAL=y
> >  CONFIG_SPL_DRIVERS_MISC=y
> >  CONFIG_SPL=y
> >  CONFIG_SYS_LOAD_ADDR=0x40480000
> > +CONFIG_LTO=y
> 
> Is the entry required? or part of the series. If so could you explain
> in the commit message?

While not being strictly part of the series, Fabio did explained the
LTO enablement in the commit message above. This reduces the size of
SPL, which in turn allows it to fit into IRAM.

-- andrey

> 
> Michael
> 
> >  CONFIG_DISTRO_DEFAULTS=y
> >  CONFIG_FIT=y
> >  CONFIG_FIT_EXTERNAL_OFFSET=0x3000
> > @@ -38,6 +39,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
> > @@ -50,6 +54,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
> > @@ -80,9 +86,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
> > @@ -97,4 +107,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
> > --
> > 2.25.1
> >
> 
> 
> --
> Michael Nazzareno Trimarchi
> Co-Founder & Chief Executive Officer
> M. +39 347 913 2170
> michael@amarulasolutions.com
> __________________________________
> 
> Amarula Solutions BV
> Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> T. +31 (0)85 111 9172
> info@amarulasolutions.com
> www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  6:31     ` ZHIZHIKIN Andrey
@ 2022-09-20  6:33       ` Michael Nazzareno Trimarchi
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-09-20  6:33 UTC (permalink / raw)
  To: ZHIZHIKIN Andrey; +Cc: Fabio Estevam, sbabic, peng.fan, marex, u-boot

HI

On Tue, Sep 20, 2022 at 8:31 AM ZHIZHIKIN Andrey
<andrey.zhizhikin@leica-geosystems.com> wrote:
>
> Hello Michael,
>
> > -----Original Message-----
> > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Michael Nazzareno
> > Trimarchi
> > Sent: Tuesday, September 20, 2022 7:46 AM
> > To: Fabio Estevam <festevam@denx.de>
> > Cc: sbabic@denx.de; peng.fan@nxp.com; marex@denx.de; u-boot@lists.denx.de
> > Subject: Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
> >
> > Hi
> >
> > On Tue, Sep 20, 2022 at 2:21 AM Fabio Estevam <festevam@denx.de> wrote:
> > >
> > > 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>
> > > ---
> > >  arch/arm/dts/imx8mm-evk-u-boot.dtsi | 16 ++++++++++++++++
> > >  configs/imx8mm_evk_defconfig        | 21 +++++++++++++++++++++
> > >  2 files changed, 37 insertions(+)
> > >
> > > diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-
> > boot.dtsi
> > > index 36fbf56bc5..d82428f8fe 100644
> > > --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> > > +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> > > @@ -20,6 +20,10 @@
> > >         };
> > >  };
> > >
> > > +&aips4 {
> > > +       u-boot,dm-spl;
> > > +};
> > > +
> > >  &reg_usdhc2_vmmc {
> > >         u-boot,off-on-delay-us = <20000>;
> > >  };
> > > @@ -84,6 +88,18 @@
> > >         u-boot,dm-spl;
> > >  };
> > >
> > > +&usbmisc1 {
> > > +       u-boot,dm-spl;
> > > +};
> > > +
> > > +&usbphynop1 {
> > > +       u-boot,dm-spl;
> > > +};
> > > +
> > > +&usbotg1 {
> > > +       u-boot,dm-spl;
> > > +};
> > > +
> > >  &usdhc1 {
> > >         u-boot,dm-spl;
> > >  };
> > > diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
> > > index 7bcedcd51f..2dff26b3eb 100644
> > > --- a/configs/imx8mm_evk_defconfig
> > > +++ b/configs/imx8mm_evk_defconfig
> > > @@ -17,6 +17,7 @@ CONFIG_SPL_SERIAL=y
> > >  CONFIG_SPL_DRIVERS_MISC=y
> > >  CONFIG_SPL=y
> > >  CONFIG_SYS_LOAD_ADDR=0x40480000
> > > +CONFIG_LTO=y
> >
> > Is the entry required? or part of the series. If so could you explain
> > in the commit message?
>
> While not being strictly part of the series, Fabio did explained the
> LTO enablement in the commit message above. This reduces the size of
> SPL, which in turn allows it to fit into IRAM.
>

Sorry too early. I was thinking that I was read this comment in marek
review for other patch but was reported even here

Michael

> -- andrey
>
> >
> > Michael
> >
> > >  CONFIG_DISTRO_DEFAULTS=y
> > >  CONFIG_FIT=y
> > >  CONFIG_FIT_EXTERNAL_OFFSET=0x3000
> > > @@ -38,6 +39,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
> > > @@ -50,6 +54,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
> > > @@ -80,9 +86,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
> > > @@ -97,4 +107,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
> > > --
> > > 2.25.1
> > >
> >
> >
> > --
> > Michael Nazzareno Trimarchi
> > Co-Founder & Chief Executive Officer
> > M. +39 347 913 2170
> > michael@amarulasolutions.com
> > __________________________________
> >
> > Amarula Solutions BV
> > Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> > T. +31 (0)85 111 9172
> > info@amarulasolutions.com
> > www.amarulasolutions.com



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
  2022-09-20  5:46   ` Michael Nazzareno Trimarchi
@ 2022-09-20  6:56   ` Peng Fan
  2022-09-20 11:13     ` Fabio Estevam
  2022-09-21  5:26   ` Peng Fan
  2022-10-21 11:43   ` sbabic
  3 siblings, 1 reply; 13+ messages in thread
From: Peng Fan @ 2022-09-20  6:56 UTC (permalink / raw)
  To: Fabio Estevam, sbabic; +Cc: peng.fan, marex, u-boot

Hi Fabio,

Just have a question, the tcpci driver is not supported, so how
do you manage to make SDP work?

Regards,
Peng.

On 9/20/2022 8:20 AM, Fabio Estevam wrote:
> 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>
> ---
>   arch/arm/dts/imx8mm-evk-u-boot.dtsi | 16 ++++++++++++++++
>   configs/imx8mm_evk_defconfig        | 21 +++++++++++++++++++++
>   2 files changed, 37 insertions(+)
> 
> diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> index 36fbf56bc5..d82428f8fe 100644
> --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> @@ -20,6 +20,10 @@
>   	};
>   };
>   
> +&aips4 {
> +	u-boot,dm-spl;
> +};
> +
>   &reg_usdhc2_vmmc {
>   	u-boot,off-on-delay-us = <20000>;
>   };
> @@ -84,6 +88,18 @@
>   	u-boot,dm-spl;
>   };
>   
> +&usbmisc1 {
> +	u-boot,dm-spl;
> +};
> +
> +&usbphynop1 {
> +	u-boot,dm-spl;
> +};
> +
> +&usbotg1 {
> +	u-boot,dm-spl;
> +};
> +
>   &usdhc1 {
>   	u-boot,dm-spl;
>   };
> diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
> index 7bcedcd51f..2dff26b3eb 100644
> --- a/configs/imx8mm_evk_defconfig
> +++ b/configs/imx8mm_evk_defconfig
> @@ -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
> @@ -38,6 +39,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
> @@ -50,6 +54,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
> @@ -80,9 +86,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
> @@ -97,4 +107,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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  6:56   ` Peng Fan
@ 2022-09-20 11:13     ` Fabio Estevam
  2022-09-21  5:25       ` Peng Fan
  0 siblings, 1 reply; 13+ messages in thread
From: Fabio Estevam @ 2022-09-20 11:13 UTC (permalink / raw)
  To: Peng Fan; +Cc: Fabio Estevam, sbabic, peng.fan, marex, u-boot

Hi Peng,

On Tue, Sep 20, 2022 at 3:56 AM Peng Fan <peng.fan@oss.nxp.com> wrote:
>
> Hi Fabio,
>
> Just have a question, the tcpci driver is not supported, so how
> do you manage to make SDP work?

I understand that the tcpci driver is required when a USB role switch is needed.

I am only using the usbotg1 as a peripheral.

Here are the logs:

On the host PC:

$ sudo uuu -brun spl flash.bin

On the console:

U-Boot SPL 2022.10-rc5-00003-g9e02955991-dirty (Sep 19 2022 - 21:49:01 -0300)
No pmic
SEC0:  RNG instantiated
Normal Boot
WDT:   Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 885712 to 0x40400000... done
Jumping to header at 0x40400000
Header Tag is not an IMX image
Found header at 0x40420400
NOTICE:  BL31: v2.2(release):rel_imx_5.4.47_2.2.0-0-gc949a888e
NOTICE:  BL31: Built : 17:18:02, Sep 19 2022


U-Boot 2022.10-rc5-00003-g9e02955991-dirty (Sep 19 2022 - 21:49:01 -0300)

CPU:   Freescale i.MX8MMQ rev1.0 at 1200 MHz
Reset cause: POR
Model: FSL i.MX8MM EVK board
DRAM:  2 GiB
Core:  176 devices, 23 uclasses, devicetree: separate
WDT:   Started watchdog@30280000 with servicing (60s timeout)
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial@30890000
Out:   serial@30890000
Err:   serial@30890000
SEC0:  RNG instantiated
Net:   eth0: ethernet@30be0000
Hit any key to stop autoboot:  0
u-boot=>

One issue that I observed and haven't had a chance to debug yet is that
running 'ums 0 mmc 1' works only when issued for the first time.

If I interrupt with CRLC+C and then launch 'ums 0 mmc 1' again, it
does not work.

This is unrelated to SDP and happens when I boot from SD card as well.

If you have any ideas, please let me know.

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20 11:13     ` Fabio Estevam
@ 2022-09-21  5:25       ` Peng Fan
  2022-09-21 11:58         ` Fabio Estevam
  0 siblings, 1 reply; 13+ messages in thread
From: Peng Fan @ 2022-09-21  5:25 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, sbabic, peng.fan, marex, u-boot



On 9/20/2022 7:13 PM, Fabio Estevam wrote:
> Hi Peng,
> 
> On Tue, Sep 20, 2022 at 3:56 AM Peng Fan <peng.fan@oss.nxp.com> wrote:
>>
>> Hi Fabio,
>>
>> Just have a question, the tcpci driver is not supported, so how
>> do you manage to make SDP work?
> 
> I understand that the tcpci driver is required when a USB role switch is needed.
> 
> I am only using the usbotg1 as a peripheral.

ok, got it.

> 
> Here are the logs:
> 
> On the host PC:
> 
> $ sudo uuu -brun spl flash.bin
> 
> On the console:
> 
> U-Boot SPL 2022.10-rc5-00003-g9e02955991-dirty (Sep 19 2022 - 21:49:01 -0300)
> No pmic
> SEC0:  RNG instantiated
> Normal Boot
> WDT:   Started watchdog@30280000 with servicing (60s timeout)
> Trying to boot from USB SDP
> SDP: initialize...
> SDP: handle requests...
> Downloading file of size 885712 to 0x40400000... done
> Jumping to header at 0x40400000
> Header Tag is not an IMX image
> Found header at 0x40420400
> NOTICE:  BL31: v2.2(release):rel_imx_5.4.47_2.2.0-0-gc949a888e
> NOTICE:  BL31: Built : 17:18:02, Sep 19 2022
> 
> 
> U-Boot 2022.10-rc5-00003-g9e02955991-dirty (Sep 19 2022 - 21:49:01 -0300)
> 
> CPU:   Freescale i.MX8MMQ rev1.0 at 1200 MHz
> Reset cause: POR
> Model: FSL i.MX8MM EVK board
> DRAM:  2 GiB
> Core:  176 devices, 23 uclasses, devicetree: separate
> WDT:   Started watchdog@30280000 with servicing (60s timeout)
> MMC:   FSL_SDHC: 1, FSL_SDHC: 2
> Loading Environment from MMC... OK
> In:    serial@30890000
> Out:   serial@30890000
> Err:   serial@30890000
> SEC0:  RNG instantiated
> Net:   eth0: ethernet@30be0000
> Hit any key to stop autoboot:  0
> u-boot=>
> 
> One issue that I observed and haven't had a chance to debug yet is that
> running 'ums 0 mmc 1' works only when issued for the first time.
> 
> If I interrupt with CRLC+C and then launch 'ums 0 mmc 1' again, it
> does not work.
> 
> This is unrelated to SDP and happens when I boot from SD card as well.
> 
> If you have any ideas, please let me know.

I am not sure, the master branch has this issue? Any specific config
option required?

Thanks,
Peng.

> 
> Thanks,
> 
> Fabio Estevam

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/2] imx8mm_evk: Add an entry for USB boot
  2022-09-20  0:20 [PATCH 1/2] imx8mm_evk: Add an entry for USB boot Fabio Estevam
  2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
@ 2022-09-21  5:26 ` Peng Fan
  2022-10-21 11:40 ` sbabic
  2 siblings, 0 replies; 13+ messages in thread
From: Peng Fan @ 2022-09-21  5:26 UTC (permalink / raw)
  To: Fabio Estevam, sbabic; +Cc: peng.fan, marex, u-boot



On 9/20/2022 8:20 AM, Fabio Estevam wrote:
> Add an entry for USB boot so that U-Boot could be loaded via
> the Serial Download Protocol.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> ---
>   board/freescale/imx8mm_evk/spl.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
> index e2eb1426c8..c827ed5546 100644
> --- a/board/freescale/imx8mm_evk/spl.c
> +++ b/board/freescale/imx8mm_evk/spl.c
> @@ -33,6 +33,8 @@ DECLARE_GLOBAL_DATA_PTR;
>   int spl_board_boot_device(enum boot_device boot_dev_spl)
>   {
>   	switch (boot_dev_spl) {
> +	case USB_BOOT:
> +		return BOOT_DEVICE_BOARD;
>   	case SD2_BOOT:
>   	case MMC2_BOOT:
>   		return BOOT_DEVICE_MMC1;

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
  2022-09-20  5:46   ` Michael Nazzareno Trimarchi
  2022-09-20  6:56   ` Peng Fan
@ 2022-09-21  5:26   ` Peng Fan
  2022-10-21 11:43   ` sbabic
  3 siblings, 0 replies; 13+ messages in thread
From: Peng Fan @ 2022-09-21  5:26 UTC (permalink / raw)
  To: Fabio Estevam, sbabic; +Cc: peng.fan, marex, u-boot



On 9/20/2022 8:20 AM, Fabio Estevam wrote:
> 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 | 16 ++++++++++++++++
>   configs/imx8mm_evk_defconfig        | 21 +++++++++++++++++++++
>   2 files changed, 37 insertions(+)
> 
> diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> index 36fbf56bc5..d82428f8fe 100644
> --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
> @@ -20,6 +20,10 @@
>   	};
>   };
>   
> +&aips4 {
> +	u-boot,dm-spl;
> +};
> +
>   &reg_usdhc2_vmmc {
>   	u-boot,off-on-delay-us = <20000>;
>   };
> @@ -84,6 +88,18 @@
>   	u-boot,dm-spl;
>   };
>   
> +&usbmisc1 {
> +	u-boot,dm-spl;
> +};
> +
> +&usbphynop1 {
> +	u-boot,dm-spl;
> +};
> +
> +&usbotg1 {
> +	u-boot,dm-spl;
> +};
> +
>   &usdhc1 {
>   	u-boot,dm-spl;
>   };
> diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig
> index 7bcedcd51f..2dff26b3eb 100644
> --- a/configs/imx8mm_evk_defconfig
> +++ b/configs/imx8mm_evk_defconfig
> @@ -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
> @@ -38,6 +39,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
> @@ -50,6 +54,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
> @@ -80,9 +86,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
> @@ -97,4 +107,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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-21  5:25       ` Peng Fan
@ 2022-09-21 11:58         ` Fabio Estevam
  0 siblings, 0 replies; 13+ messages in thread
From: Fabio Estevam @ 2022-09-21 11:58 UTC (permalink / raw)
  To: Peng Fan; +Cc: Fabio Estevam, sbabic, peng.fan, marex, u-boot

Hi Peng,

On Wed, Sep 21, 2022 at 2:25 AM Peng Fan <peng.fan@oss.nxp.com> wrote:

> I am not sure, the master branch has this issue? Any specific config
> option required?

Yes, to reproduce this issue on U-Boot master, just need to apply this
series plus Marek's fix:
https://lore.kernel.org/u-boot/CAOMZO5Cid5eck=ahiowbAKOjaQNzOORNLU-PxadkMFSEnqvNmg@mail.gmail.com/T/#t

It looks like some clock-related issue:

u-boot=> ums 0 mmc 1
UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x3b72400
CTRL+C - Operation aborted
clk usb_bus already disabled

After issuing CTRL+C, dmesg on the host PC shows lots of USB failures.

If you have any suggestions, please let me know.

Thanks

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/2] imx8mm_evk: Add an entry for USB boot
  2022-09-20  0:20 [PATCH 1/2] imx8mm_evk: Add an entry for USB boot Fabio Estevam
  2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
  2022-09-21  5:26 ` [PATCH 1/2] imx8mm_evk: Add an entry for USB boot Peng Fan
@ 2022-10-21 11:40 ` sbabic
  2 siblings, 0 replies; 13+ messages in thread
From: sbabic @ 2022-10-21 11:40 UTC (permalink / raw)
  To: Fabio Estevam, u-boot

> Add an entry for USB boot so that U-Boot could be loaded via
> the Serial Download Protocol.
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support
  2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
                     ` (2 preceding siblings ...)
  2022-09-21  5:26   ` Peng Fan
@ 2022-10-21 11:43   ` sbabic
  3 siblings, 0 replies; 13+ messages in thread
From: sbabic @ 2022-10-21 11:43 UTC (permalink / raw)
  To: Fabio Estevam, u-boot

> 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>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-10-21 11:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  0:20 [PATCH 1/2] imx8mm_evk: Add an entry for USB boot Fabio Estevam
2022-09-20  0:20 ` [PATCH 2/2] imx8mm_evk: Add Serial Download Protocol support Fabio Estevam
2022-09-20  5:46   ` Michael Nazzareno Trimarchi
2022-09-20  6:31     ` ZHIZHIKIN Andrey
2022-09-20  6:33       ` Michael Nazzareno Trimarchi
2022-09-20  6:56   ` Peng Fan
2022-09-20 11:13     ` Fabio Estevam
2022-09-21  5:25       ` Peng Fan
2022-09-21 11:58         ` Fabio Estevam
2022-09-21  5:26   ` Peng Fan
2022-10-21 11:43   ` sbabic
2022-09-21  5:26 ` [PATCH 1/2] imx8mm_evk: Add an entry for USB boot Peng Fan
2022-10-21 11:40 ` sbabic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.