From: Andre Przywara <andre.przywara@arm.com>
To: John Watts <contact@jookia.org>
Cc: Sam Edwards <cfsworks@gmail.com>,
u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>,
Marek Vasut <marex@denx.de>
Subject: Re: [PATCH v2 2/2] usb: musb-new: sunxi: make compatible with UDC/DM gadget model
Date: Sun, 14 Jul 2024 23:23:02 +0100 [thread overview]
Message-ID: <20240714232302.46020b84@minigeek.lan> (raw)
In-Reply-To: <Zn7jNspTDhqJtZp9@titan>
On Sat, 29 Jun 2024 02:22:14 +1000
John Watts <contact@jookia.org> wrote:
Hi,
> On Fri, Jun 28, 2024 at 04:17:27PM +0100, Andre Przywara wrote:
> > > I do not know if this patch is still a
> > > necessity; though if John is nudging about it, it probably is.
> >
> > Yes apparently he needs it, though I am not entirely sure why.
> > USB gadget has worked for ages in sunxi, without DM_USB_GADGET support,
> > that's why I was a bit puzzled why this patch seems so important.
> >
> > And secondly I was put off by John's initial reply that it would trigger
> > many USB errors for him. He later rectified it, but I must have missed
> > that message.
>
> This patch is necessary for gadget to work on the T113 board I have.
> Without it I get this error during fastboot:
>
> Controller uninitialized
> g_dnl_register: failed!, error: -6
So I dug into this, and this is what I think is going on:
If you add "CONFIG_USB_MUSB_GADGET=y" to your *defconfig*, it should
work. If you just enable it via menuconfig or by editing .config, it
will not. Adding CONFIG_USB_ETHER to the mix should fix this.
This symbol is automatically selected in Kconfig when it sees
USB_MUSB_GADGET, but apparently only during a defconfig run, it's not
selected during the other methods. Not sure what causes this difference
in behaviour, but I have seen this in U-Boot before.
That being said: this is of course not a proper solution, the DM
support proposed in that patch is the right way to go, but it should
explain why it works for me, but not for you.
As for this patch: the problem is where the Ethernet gadget code
apparently grabs the UDC device, without actually using it already. This
prevents other gadgets like ums to be used, without unbinding the
Ethernet gadget with a non-obvious command first.
So I think we need a solution for this first, otherwise the user
experience would suffer.
Cheers,
Andre
next prev parent reply other threads:[~2024-07-14 22:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 19:56 [PATCH v2 0/2] sunxi, usb: UDC/DM gadget model support Sam Edwards
2023-06-08 19:56 ` [PATCH v2 1/2] usb: musb-new: sunxi: remove unwanted printfs Sam Edwards
2023-06-08 19:56 ` [PATCH v2 2/2] usb: musb-new: sunxi: make compatible with UDC/DM gadget model Sam Edwards
2024-06-27 15:06 ` Andre Przywara
2024-06-27 23:25 ` Sam Edwards
2024-06-28 15:17 ` Andre Przywara
2024-06-28 16:22 ` John Watts
2024-07-14 22:23 ` Andre Przywara [this message]
2024-04-11 6:45 ` [PATCH v2 0/2] sunxi, usb: UDC/DM gadget model support John Watts
[not found] ` <CAH5Ym4gEJi693VRtrdgQAUmqQuQCCmQ1ASYJofQw92M6nBHyXA@mail.gmail.com>
[not found] ` <ZheThnKWQJ3Zah-t@titan>
2024-04-11 21:53 ` Sam Edwards
2024-04-11 23:34 ` John Watts
2024-04-16 12:46 ` John Watts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240714232302.46020b84@minigeek.lan \
--to=andre.przywara@arm.com \
--cc=cfsworks@gmail.com \
--cc=contact@jookia.org \
--cc=jagan@amarulasolutions.com \
--cc=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox