Re: 答复: 答复: [U-Boot] [PATCH 0/4] Make some changes to SDP

2019-12-12 Thread Fabio Estevam
Hi Sherry,

On Fri, Aug 9, 2019 at 3:21 AM Sherry Sun  wrote:

> Yes, I  have not used imx8mq-evk yet. I will try to test it later.

Have you managed to make any progress with regards to implementing UMS
support on imx8mq-evk?

Thanks


Re: [U-Boot] [PATCH 0/4] Make some changes to SDP

2019-08-19 Thread Sherry Sun
Hi Angus,

I have just finished the SDP test on imx8mq_evk and the SDP can work with some 
board configs.
I guess it may be two problems that lead your SDP can't work on imx8mq_evk. You 
can add
the follow two changes and test it again.

The first change:
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -262,6 +262,7 @@ struct usb_ep *usb_ep_autoconfig(
ep = find_ep(gadget, "ep1-bulk");
if (ep && ep_matches(gadget, ep, desc))
return ep;
+#ifndef CONFIG_SPL_BUILD
} else if (gadget_is_dwc3(gadget)) {
const char *name = NULL;
/*
@@ -284,6 +285,7 @@ struct usb_ep *usb_ep_autoconfig(
ep = find_ep(gadget, name);
if (ep && ep_matches(gadget, ep, desc))
return ep;
+#endif
}

The second change:
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -55,6 +55,13 @@ void enable_tzc380(void)
/* Enable TZASC and lock setting */
setbits_le32(>gpr[10], GPR_TZASC_EN);
setbits_le32(>gpr[10], GPR_TZASC_EN_LOCK);
+
+   /*
+* set Region 0 attribute to allow secure and non-secure read/write 
permission
+* Found some masters like usb dwc3 controllers can't work with secure 
memory.
+*/
+   writel(0xf000, TZASC_BASE_ADDR + 0x108);
+
}

If there is anything you don’t understand, you can also get my test patches at
https://github.com/sherrysun1/u-boot-imx.git. You just need check the first 
four patches  which I
used to test for imx8mq_evk.

And feel free to let me know if any problems.

Best regards
Sherry sun



Hi Sherry,

On Aug. 8, 2019 2:38 a.m., Sherry Sun 
mailto:sherry@nxp.com>> wrote:

Hi Angus,

Sorry for the late reply.

>
> Hi Peng,
>
> On 2019-08-01 18:01, Peng Fan wrote:
> > Angus,
> >
> >> Subject: Re: 答复: [U-Boot] [PATCH 0/4] Make some changes to SDP
> >>
> >> Hi Sherry,
> >>
> >> On 2019-07-31 19:56, Sherry Sun wrote:
> >> > Hi Angus
> >> >
> >> >>
> >> >> Hi Sherry,
> >> >>
> >> >> On 2019-07-17 18:40, sherry sun wrote:
> >> >> > From: Sherry Sun mailto:sherry@nxp.com>>
> >> >> >
> >> >> > This patchset adds:
> >> >> > 1. Add usb_gadget_initialize() and usb_gadget_release() to
> >> >> > initialize and release UDC during sdp download.
> >> >> > 2. Add high speed endpoint descriptor for sdp.
> >> >> > 3. Add a macro definition--CONFIG_SDP_LOADADDR as default sdp
> >> >> > load address while SDP_WRITE and SDP_JUMP command addr is zero.
> >> >> >
> >> >> > Sherry Sun (4):
> >> >> >   imx: spl: Change USB boot device type
> >> >> >   SDP: use CONFIG_SDP_LOADADDR as default load address
> >> >> >   SDP: fix wrong usb request size and add high speed endpoint
> >> >> > descriptor
> >> >> >   SDP: Call usb_gadget_initialize and usb_gadget_release to
> >> >> > support UDC
> >> >>
> >> >> These changes look like like they target SDP on imx8. For imx8mq
> >> >> is this all that is required to get SDP working with uuu or are
> >> >> there additional changes required ?
> >> >>
> >> >
> >> > The changes in patch 1/4 are target on both imx8 and imx8m.
> >> > The rest three patches are target on all boards which used SDP.
> >> > So for imx8mq, if your usb gadget driver is ready ,these changes
> >> > are enough to get SDP working with UUU.
> >> >
> >>
> >> I'm trying to use SDP on the imx8mq-evk but it doesn't look like it's
> >> enabled there. Do you have patches to enable SDP on the imx8mq-evk ,
> >> even if they aren't ready to go upstream ?
> >
> > You could try downstream code,
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour
> >
> ce.codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Fdata=02%7C01
> %7Cs
> >
> herry.sun%40nxp.com%7C6d63289fbb104168bce308d716f157c4%7C686ea1
> d3bc2b4
> >
> c6fa92cd99c5c301635%7C0%7C0%7C637003098143081621sdata=beh
> 08%2Fv3f
> > s8ZZPP29F1iVMfo3uNTWGf91SYYyak2GVU%3Dreserved=0
> > branch: imx_v2019.04_4.19.35_1.0.0
> >
>
> I already have SDP  working with the vendor u-boot. I'm trying to switch to
> mainline u-boot so I'm looking for mainline patches.
>

May I ask, is your usb gadget driver is working? 

Re: [U-Boot] [PATCH 0/4] Make some changes to SDP

2019-07-28 Thread Angus Ainslie

Hi Sherry,

On 2019-07-17 18:40, sherry sun wrote:

From: Sherry Sun 

This patchset adds:
1. Add usb_gadget_initialize() and usb_gadget_release() to initialize 
and

release UDC during sdp download.
2. Add high speed endpoint descriptor for sdp.
3. Add a macro definition--CONFIG_SDP_LOADADDR as default sdp load
address while SDP_WRITE and SDP_JUMP command addr is zero.

Sherry Sun (4):
  imx: spl: Change USB boot device type
  SDP: use CONFIG_SDP_LOADADDR as default load address
  SDP: fix wrong usb request size and add high speed endpoint 
descriptor

  SDP: Call usb_gadget_initialize and usb_gadget_release to support UDC


These changes look like like they target SDP on imx8. For imx8mq is this 
all that is required to get SDP working with uuu or are there additional 
changes required ?


Thanks
Angus



 arch/arm/mach-imx/spl.c|  2 +-
 common/spl/spl_sdp.c   |  4 
 drivers/usb/gadget/Kconfig |  4 
 drivers/usb/gadget/f_sdp.c | 39 +-
 4 files changed, 43 insertions(+), 6 deletions(-)

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 0/4] Make some changes to SDP

2019-07-17 Thread sherry sun
From: Sherry Sun 

This patchset adds:
1. Add usb_gadget_initialize() and usb_gadget_release() to initialize and
release UDC during sdp download.
2. Add high speed endpoint descriptor for sdp. 
3. Add a macro definition--CONFIG_SDP_LOADADDR as default sdp load
address while SDP_WRITE and SDP_JUMP command addr is zero.

Sherry Sun (4):
  imx: spl: Change USB boot device type
  SDP: use CONFIG_SDP_LOADADDR as default load address
  SDP: fix wrong usb request size and add high speed endpoint descriptor
  SDP: Call usb_gadget_initialize and usb_gadget_release to support UDC

 arch/arm/mach-imx/spl.c|  2 +-
 common/spl/spl_sdp.c   |  4 
 drivers/usb/gadget/Kconfig |  4 
 drivers/usb/gadget/f_sdp.c | 39 +-
 4 files changed, 43 insertions(+), 6 deletions(-)

-- 
2.17.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot