
Hi Marek,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream? Any plan on PTN5110 support?
Thanks, Peng.

On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Any plan on PTN5110 support?
I currently don't have hardware with USB-C , so not right now.
Do you plan to work on GADGET/OTG/USB-C ?

On 2022/5/4 20:53, Marek Vasut wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Any plan on PTN5110 support?
I currently don't have hardware with USB-C , so not right now.
Do you plan to work on GADGET/OTG/USB-C ?
Typec interface exists in almost all i.MX8M EVK boards. So I am thinking to enable gadget together with PTN5110 for uuu, but seems typec requires quite lot work if porting linux code or we reuse NXP U-Boot downstream ptn5110 code.
Thanks, Peng.

On 5/5/22 03:54, Peng Fan (OSS) wrote:
On 2022/5/4 20:53, Marek Vasut wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Any plan on PTN5110 support?
I currently don't have hardware with USB-C , so not right now.
Do you plan to work on GADGET/OTG/USB-C ?
Typec interface exists in almost all i.MX8M EVK boards. So I am thinking to enable gadget together with PTN5110 for uuu, but seems typec requires quite lot work if porting linux code or we reuse NXP U-Boot downstream ptn5110 code.
What's the problem with porting mainline Linux code ? (that would be the preferred approach, because then we could synchronize fixes from Linux)
If all you care about is mode switching between host/gadget, then a simpler driver might be preferred though.

On Wed, May 4, 2022 at 6:54 PM Peng Fan (OSS) peng.fan@oss.nxp.com wrote:
On 2022/5/4 20:53, Marek Vasut wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Any plan on PTN5110 support?
I currently don't have hardware with USB-C , so not right now.
Do you plan to work on GADGET/OTG/USB-C ?
Typec interface exists in almost all i.MX8M EVK boards. So I am thinking to enable gadget together with PTN5110 for uuu, but seems typec requires quite lot work if porting linux code or we reuse NXP U-Boot downstream ptn5110 code.
Thanks, Peng.
Peng,
The imx8mp-venice-gw74xx has a Type-C connector on it with USB3.0 as well (uses a TPS25821 source controller/power-switch which doesn't have any I2C interface thus no driver). Please cc me if you come up with a DWC3 OTG gadget driver and I can test it on this board.
Best Regards,
Tim

Hi Peng
On Thu, 2022-05-05 at 11:05 -0700, Tim Harvey wrote:
On Wed, May 4, 2022 at 6:54 PM Peng Fan (OSS) peng.fan@oss.nxp.com wrote:
On 2022/5/4 20:53, Marek Vasut wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Any plan on PTN5110 support?
I currently don't have hardware with USB-C , so not right now.
Do you plan to work on GADGET/OTG/USB-C ?
Typec interface exists in almost all i.MX8M EVK boards. So I am thinking to enable gadget together with PTN5110 for uuu, but seems typec requires quite lot work if porting linux code or we reuse NXP U-Boot downstream ptn5110 code.
Thanks, Peng.
Peng,
The imx8mp-venice-gw74xx has a Type-C connector on it with USB3.0 as well (uses a TPS25821 source controller/power-switch which doesn't have any I2C interface thus no driver). Please cc me if you come up with a DWC3 OTG gadget driver and I can test it on this board.
Verdin iMX8M Plus resp. it's two current carrier boards Dahlia and the Verdin Development Board both use a TUSB321AI Type-C Configuration Channel Logic and Port Control chip. We could also help testing on there once somebody tackles the DWC3 OTG stuff for the i.MX 8M Plus.
Talking about uuu, has anybody managed to get that going on the i.MX 8M Mini yet? Regular USB device/host functionality works great but last I tried gadget functionality in SPL it gave me quite some grief.
Best Regards,
Tim
Cheers
Marcel

Hi Marcel,
On 16/05/2022 12:41, Marcel Ziswiler wrote:
Talking about uuu, has anybody managed to get that going on the i.MX 8M Mini yet? Regular USB device/host functionality works great but last I tried gadget functionality in SPL it gave me quite some grief.
Please see this series: https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=*
I haven't had a chance to rework it. Feel free to work to submit it if you have a chance.
Tommaso has recently tested it: https://www.mail-archive.com/search?l=u-boot@lists.denx.de&q=subject:%22...
Someone needs to rework this series and resubmit it.
Regards,
Fabio Estevam

On Mon, May 16, 2022 at 12:50:34PM -0300, Fabio Estevam wrote:
Hi Marcel,
On 16/05/2022 12:41, Marcel Ziswiler wrote:
Talking about uuu, has anybody managed to get that going on the i.MX 8M Mini yet? Regular USB device/host functionality works great but last I tried gadget functionality in SPL it gave me quite some grief.
Please see this series: https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=*
I haven't had a chance to rework it. Feel free to work to submit it if you have a chance.
Tommaso has recently tested it: https://www.mail-archive.com/search?l=u-boot@lists.denx.de&q=subject:%22...
Someone needs to rework this series and resubmit it.
Hi All, Confirm that uuu works on iMX8MM U-Boot Mainline. I have locally a patchset suggested by Fabio that make uuu works on iMX8MM SOC.
Regards, Tommaso
Regards,
Fabio Estevam
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: festevam@denx.de

On 17.05.22 08:25, Tommaso Merciai wrote:
On Mon, May 16, 2022 at 12:50:34PM -0300, Fabio Estevam wrote:
Hi Marcel,
On 16/05/2022 12:41, Marcel Ziswiler wrote:
Talking about uuu, has anybody managed to get that going on the i.MX 8M Mini yet? Regular USB device/host functionality works great but last I tried gadget functionality in SPL it gave me quite some grief.
Please see this series: https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=*
I haven't had a chance to rework it. Feel free to work to submit it if you have a chance.
Tommaso has recently tested it: https://www.mail-archive.com/search?l=u-boot@lists.denx.de&q=subject:%22...
Someone needs to rework this series and resubmit it.
Hi All, Confirm that uuu works on iMX8MM U-Boot Mainline. I have locally a patchset suggested by Fabio that make uuu works on iMX8MM SOC.
Regards, Tommaso
Regards,
Fabio Estevam
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: festevam@denx.de
Hi Tommaso,
are you willing to share a parch that applies cleanly to 2022.07-rc2, I tried to collect all the patches spread on the mailing list since the end of 2020, but it seems that I'm missing some, because I still get references to non-exiting functions and such .
iMX8MM is now a "hot" MCU, that had the SPL SDP functionality working perfectly with the NXP tree, I still don't understand why a (maybe) not elegant implementation was removed without being replaced with, well, anything, and in the process the activation of DM_xxx and DM_SPL_xxx made a mess of everything and producing a series of misleading compilation errors.
Kindly please post the patch here if possible, so the poor souls that still need SPL SDP functionality for iMX8MM to be able to use it.
Many thanks and regards,
Mircea

On Mon, May 16, 2022 at 8:50 AM Fabio Estevam festevam@denx.de wrote:
Hi Marcel,
On 16/05/2022 12:41, Marcel Ziswiler wrote:
Talking about uuu, has anybody managed to get that going on the i.MX 8M Mini yet? Regular USB device/host functionality works great but last I tried gadget functionality in SPL it gave me quite some grief.
Please see this series: https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=*
I haven't had a chance to rework it. Feel free to work to submit it if you have a chance.
Tommaso has recently tested it: https://www.mail-archive.com/search?l=u-boot@lists.denx.de&q=subject:%22...
Someone needs to rework this series and resubmit it.
This keeps coming up and many of us are just carrying this patch series in downstream repos which is horrible.
The problem patch in this series [1] is 'imx8mm: Fix USB reg addresses for i.MX8MM' [2] as we all want to get hard-coded base addresses out of the drivers. The proposed solution is to get the controller base addresses from PLATDATA in the SPL (and DM/DT for U-Boot). Can anyone take this part on or provide some examples of how to use platdata/of-platdata?
Best Regards,
Tim [1] https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=* [2] https://patchwork.ozlabs.org/project/uboot/patch/20210703195837.28153-2-fest...

Hi Tim,
On Wed, May 18, 2022 at 1:26 PM Tim Harvey tharvey@gateworks.com wrote:
This keeps coming up and many of us are just carrying this patch series in downstream repos which is horrible.
The problem patch in this series [1] is 'imx8mm: Fix USB reg addresses for i.MX8MM' [2] as we all want to get hard-coded base addresses out of the drivers. The proposed solution is to get the controller base addresses from PLATDATA in the SPL (and DM/DT for U-Boot). Can anyone take this part on or provide some examples of how to use platdata/of-platdata?
Never used platdata myself, but this doc seems to explain it well: https://u-boot.readthedocs.io/en/latest/develop/driver-model/of-plat.html

On Mon, May 16, 2022 at 12:50:34PM -0300, Fabio Estevam wrote:
Hi Marcel,
On 16/05/2022 12:41, Marcel Ziswiler wrote:
Talking about uuu, has anybody managed to get that going on the i.MX 8M Mini yet? Regular USB device/host functionality works great but last I tried gadget functionality in SPL it gave me quite some grief.
Please see this series: https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=*
I haven't had a chance to rework it. Feel free to work to submit it if you have a chance.
Tommaso has recently tested it: https://www.mail-archive.com/search?l=u-boot@lists.denx.de&q=subject:%22...
Hi Fabio, I share here a more recent version of your series:
https://patchwork.amarulasolutions.com/project/linux-amarula/list/?series=37...
This series brings USB gadget support for i.MX8MM and allows the usage of the Serial Download Protocol, which is a convenient way for loading U-Boot via the 'uuu' tool and and flashing the eMMC via the U-Boot 'ums' command.
Tested on board based on iMX8MM SOC:
-------------------------------------------------------------------------------- U-Boot SPL 2022.04-00114-gd04ac0fd3a-dirty (May 20 2022 - 10:12:08 +0200)
DEBUG 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 2366576 to 0x40400000... done Jumping to header at 0x40400000 Header Tag is not an IMX image Found header at 0x4041e1a0 NOTICE: BL31: v2.2(release):android-11.0.0_1.2.0-rc2-0-gcb435ee78 NOTICE: BL31: Built : 16:43:13, Feb 1 2022
welcome to lk/MP
boot args 0x2000000 0xbe000000 0x2000 0x0 initializing trusty (Built: 12:13:25 Nov 19 2020) Initializing Trusted OS SMC handler avb: Initializing AVB App hwcrypto: Initializing caam_drv: 318: job failed (0x2000055b) trusty_gatekeeper: Initializing hwrng_caam: Init HWRNG service provider hwrng_srv: Start HWRNG service hwcrypto_caam: Init HWCRYPTO service provider hwcrypto_srv: Start HWCRYPTO service hwkey_caam: Init HWKEY service provider hwkey_caam: 183: Invalid magic, unpack key package fail. hwkey_srv: Start HWKEY service hwcrypto: enter main event loop
U-Boot 2022.04-00114-gd04ac0fd3a-dirty (May 20 2022 - 10:12:08 +0200)
CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz Reset cause: POR Model: FSL i.MX8MM EVK board DRAM: 2 GiB --------------------------------------------------------------------------------
References: - https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=* - https://www.mail-archive.com/u-boot@lists.denx.de/msg410536.html
Hope this could be helpfull.
Regards, Tommaso
Someone needs to rework this series and resubmit it.
Regards,
Fabio Estevam
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: festevam@denx.de

On Wed, May 4, 2022 at 5:53 AM Marek Vasut marex@denx.de wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Marek,
Do you still have IMX8MP USB host working on top of v2022.07-rc2, master, or imx-master? It worked for me previously at some point applying your dwc3 glue series [1] from a repo you pointed me to that I can no longer find but now I see an issue where device_probe fails:
u-boot=> usb start starting USB... Bus usb@38100000: probe failed, error -61 Bus usb@38200000: probe failed, error -61 No working controllers found
The failure is that dwc3_glue_probe fails to find 'usb3-phy' due to that being in the phy-names node of usb@38100000 and not its parent usb@32f10100
Am I missing a patch perhaps to dwc3_glue_probe in dwc3-generic.c?
Tim [1] https://patchwork.ozlabs.org/project/uboot/list/?series=293112

On Fri, May 20, 2022 at 10:08 AM Tim Harvey tharvey@gateworks.com wrote:
On Wed, May 4, 2022 at 5:53 AM Marek Vasut marex@denx.de wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Marek,
Do you still have IMX8MP USB host working on top of v2022.07-rc2, master, or imx-master? It worked for me previously at some point applying your dwc3 glue series [1] from a repo you pointed me to that I can no longer find but now I see an issue where device_probe fails:
u-boot=> usb start starting USB... Bus usb@38100000: probe failed, error -61 Bus usb@38200000: probe failed, error -61 No working controllers found
The failure is that dwc3_glue_probe fails to find 'usb3-phy' due to that being in the phy-names node of usb@38100000 and not its parent usb@32f10100
Am I missing a patch perhaps to dwc3_glue_probe in dwc3-generic.c?
Tim [1] https://patchwork.ozlabs.org/project/uboot/list/?series=293112
Marek,
I didn't explain that right. The failure is that dwc3_glue_probe gets passed usb3_0:usb@32f10100 USB (controller dev) and tries to find usb3-phy in the phy-names prop of that dev where-as the phy-name node is in the usb_dwc3_0:usb@38100000 phy child of the controller instead
However, I still wonder if I'm missing a patch that deals with this or if something just changed between testing your patch series and now.
Best Regards,
Tim

On 5/20/22 20:21, Tim Harvey wrote:
On Fri, May 20, 2022 at 10:08 AM Tim Harvey tharvey@gateworks.com wrote:
On Wed, May 4, 2022 at 5:53 AM Marek Vasut marex@denx.de wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Marek,
Do you still have IMX8MP USB host working on top of v2022.07-rc2, master, or imx-master? It worked for me previously at some point applying your dwc3 glue series [1] from a repo you pointed me to that I can no longer find but now I see an issue where device_probe fails:
u-boot=> usb start starting USB... Bus usb@38100000: probe failed, error -61 Bus usb@38200000: probe failed, error -61 No working controllers found
The failure is that dwc3_glue_probe fails to find 'usb3-phy' due to that being in the phy-names node of usb@38100000 and not its parent usb@32f10100
Am I missing a patch perhaps to dwc3_glue_probe in dwc3-generic.c?
Tim [1] https://patchwork.ozlabs.org/project/uboot/list/?series=293112
Marek,
I didn't explain that right. The failure is that dwc3_glue_probe gets passed usb3_0:usb@32f10100 USB (controller dev) and tries to find usb3-phy in the phy-names prop of that dev where-as the phy-name node is in the usb_dwc3_0:usb@38100000 phy child of the controller instead
However, I still wonder if I'm missing a patch that deals with this or if something just changed between testing your patch series and now.
There's already fix in u-boot-usb/master , see the topmost patch there.

On Fri, May 20, 2022 at 2:31 PM Marek Vasut marex@denx.de wrote:
On 5/20/22 20:21, Tim Harvey wrote:
On Fri, May 20, 2022 at 10:08 AM Tim Harvey tharvey@gateworks.com wrote:
On Wed, May 4, 2022 at 5:53 AM Marek Vasut marex@denx.de wrote:
On 5/4/22 14:26, Peng Fan wrote:
Hi Marek,
Hi,
Since you did some work on i.MX8MP USB, may I know the status? Does host/device mode both supported in upstream?
I only have HOST option available, so for me this is only HOST.
I did not test GADGET or OTG .
Marek,
Do you still have IMX8MP USB host working on top of v2022.07-rc2, master, or imx-master? It worked for me previously at some point applying your dwc3 glue series [1] from a repo you pointed me to that I can no longer find but now I see an issue where device_probe fails:
u-boot=> usb start starting USB... Bus usb@38100000: probe failed, error -61 Bus usb@38200000: probe failed, error -61 No working controllers found
The failure is that dwc3_glue_probe fails to find 'usb3-phy' due to that being in the phy-names node of usb@38100000 and not its parent usb@32f10100
Am I missing a patch perhaps to dwc3_glue_probe in dwc3-generic.c?
Tim [1] https://patchwork.ozlabs.org/project/uboot/list/?series=293112
Marek,
I didn't explain that right. The failure is that dwc3_glue_probe gets passed usb3_0:usb@32f10100 USB (controller dev) and tries to find usb3-phy in the phy-names prop of that dev where-as the phy-name node is in the usb_dwc3_0:usb@38100000 phy child of the controller instead
However, I still wonder if I'm missing a patch that deals with this or if something just changed between testing your patch series and now.
There's already fix in u-boot-usb/master , see the topmost patch there.
Yep, that was it.
Thanks,
Tim
participants (9)
-
Fabio Estevam
-
Fabio Estevam
-
Marcel Ziswiler
-
Marek Vasut
-
Mircea Ciocan
-
Peng Fan
-
Peng Fan (OSS)
-
Tim Harvey
-
Tommaso Merciai