USB gadget regression on i.MX7

Hi Marek,
I noticed that USB gadget does not work in U-Boot mainline on a warp7 board:
=> ums 0 mmc 0 UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0xe18000 g_dnl_register: failed!, error: -2 g_dnl_register failed
2021.04 works fine. I bisected and it pointed to:
4dcfa3bcbcbc5e0f7da145fff41e120392433062 is the first bad commit commit 4dcfa3bcbcbc5e0f7da145fff41e120392433062 Author: Marek Vasut marex@denx.de Date: Wed Mar 31 23:06:07 2021 +0200
usb: ehci-mx6: Parse USB PHY and MISC offsets from DT
In case DM and OF controler is enabled, but PHY support is disabled, parse USB PHY and MISC component addresses from DT manually. Those component addresses will be used in subsequent patches to access the ANATOP, PHY and MISC registers matching the controller and thus get rid of the ad-hoc controller sequence number mapping.
Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number") Signed-off-by: Marek Vasut marex@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: Peng Fan peng.fan@nxp.com Cc: Stefano Babic sbabic@denx.de Cc: Ye Li ye.li@nxp.com Cc: uboot-imx uboot-imx@nxp.com
fdtdec_get_alias_seq() fails inside mx6_parse_dt_addrs().
Any suggestions?
Thanks,
Fabio Estevam

On 6/18/21 3:42 PM, Fabio Estevam wrote:
Hi Marek,
Hi,
I noticed that USB gadget does not work in U-Boot mainline on a warp7 board:
=> ums 0 mmc 0 UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0xe18000 g_dnl_register: failed!, error: -2 g_dnl_register failed
2021.04 works fine. I bisected and it pointed to:
4dcfa3bcbcbc5e0f7da145fff41e120392433062 is the first bad commit commit 4dcfa3bcbcbc5e0f7da145fff41e120392433062 Author: Marek Vasut marex@denx.de Date: Wed Mar 31 23:06:07 2021 +0200
usb: ehci-mx6: Parse USB PHY and MISC offsets from DT In case DM and OF controler is enabled, but PHY support is disabled, parse USB PHY and MISC component addresses from DT manually. Those component addresses will be used in subsequent patches to access the ANATOP, PHY and MISC registers matching the controller and thus get rid of the ad-hoc controller sequence number mapping.
[...]
fdtdec_get_alias_seq() fails inside mx6_parse_dt_addrs().
Any suggestions?
There is no fdtdec_get_alias_seq() in the above commit , and in fact, there shouldn't be, since all the sub-device addresses and offsets should be parsed out of DT now. So the only suggestion I can offer is, look into your DT and see whether the parsing can find all the props there.

Hi Marek,
On Fri, Jun 18, 2021 at 7:55 PM Marek Vasut marex@denx.de wrote:
There is no fdtdec_get_alias_seq() in the above commit , and in fact, there shouldn't be, since all the sub-device addresses and offsets should be parsed out of DT now. So the only suggestion I can offer is, look into your DT and see whether the parsing can find all the props there.
I sent two fixes that allows me to use "ums 0 mmc 0" again on imx7s-warp.
Thanks

On 6/20/21 5:00 PM, Fabio Estevam wrote:
Hi,
[...]
There is no fdtdec_get_alias_seq() in the above commit , and in fact, there shouldn't be, since all the sub-device addresses and offsets should be parsed out of DT now. So the only suggestion I can offer is, look into your DT and see whether the parsing can find all the props there.
I sent two fixes that allows me to use "ums 0 mmc 0" again on imx7s-warp.
Thanks!
participants (2)
-
Fabio Estevam
-
Marek Vasut