[Letux-kernel] gadget after suspend
Andreas Kemnade
andreas at kemnade.info
Thu Jan 25 20:01:45 CET 2018
On Tue, 16 Jan 2018 15:47:46 +0100
H. Nikolaus Schaller <hns at goldelico.com> wrote:
[...]
>
> >> Then I also have to ifdown usb0; ifup usb0 to make it work.
> >>
> > ifdown usb0/ifup usb0 does rmmod/modprobe at your setup?
>
> yes
>
> > That is why I was doing just ifconfig down/up
>
> this does not suffice for me to get a connection.
>
Also
echo peripheral > /sys/bus/platform/devices/musb-hdrc*/mode
seems to help. I do not know why yet.
> >
> >> Exactly the same networking setup works on AM335x so this allows
> >> to isolate that issue to musb and twl4030-phy.
> >>
> > Why? gta04 = musb + omap2430 glue + twl4030-phy
> > am335x = musb + am35xx glue + ?
>
> different musb version?
>
> Maybe the "?" is the reason...
> Not unlikely.
>
Well, interesting would be the combination musb + omap2430 glue + not
twl4030-phy.
> It is just called "TI PHY" on am33xx and has some control registers.
>
> Well, what also could play a role is USB power detection
> (sequence) and signalling (twl interrupt handling).
Hmm, musb talking with twl is hidden. turning on DEBUG in musb_core.c
and phy-twl4030.c did not show up anything interesting.
But now I found out something interesting:
Setting MUSB_POWER_SOFTCONN and MUSB_DEVCTL_SESSION via devmem2 seems
to enable gadget. MUSB seems to know that there is vbus.
Normally these things should be reset in
musb_restore_context()
if they are set before suspend in the call to
musb_save_context().
So there are enough interersting things to debug and
I know where to dig further.
Regards,
Andreas
More information about the Letux-kernel
mailing list