2023-09-25 19:41:01

by Pavel Machek

[permalink] [raw]
Subject: droid4 -- weird behaviour when attempting to use usb host

Hi!

I'm having some fun with usb host. Good news is it works with
externally powered hub... after a while. I get some error messages
about inability to go host mode, but with enough patience it
eventually does enter host mode and I see my keyboard/mouse.

And usually in that process, one of my cpu cores disappear. top no
longer shows 2 cores, and I was wondering for a while if d4 is
single-core system. It is not, my two cores are back after reboot.

That's with 6.1.9 kernel from leste. Ideas how to debug this would be
welcome. (Do you use usb host?)

Best regards,
Pavel
--


2023-09-26 07:18:24

by Tony Lindgren

[permalink] [raw]
Subject: Re: droid4 -- weird behaviour when attempting to use usb host

* Pavel Machek <[email protected]> [230925 14:36]:
> Hi!
>
> I'm having some fun with usb host. Good news is it works with
> externally powered hub... after a while. I get some error messages
> about inability to go host mode, but with enough patience it
> eventually does enter host mode and I see my keyboard/mouse.
>
> And usually in that process, one of my cpu cores disappear. top no
> longer shows 2 cores, and I was wondering for a while if d4 is
> single-core system. It is not, my two cores are back after reboot.
>
> That's with 6.1.9 kernel from leste. Ideas how to debug this would be
> welcome. (Do you use usb host?)

You are using a "proper" non-standard usb micro-b cable that grounds
the id pin, right?

If not, try with one of those as it allows the hardware to do what it's
supposed to do.

And presumably you don't have a hacked usb hub that feeds back the
vbus to your phone, right?

If you have, that should not be used as the pmic can feed vbus.

Regards,

Tony

2023-09-27 18:32:07

by Pavel Machek

[permalink] [raw]
Subject: Re: droid4 -- weird behaviour when attempting to use usb host

Hi!

> > I'm having some fun with usb host. Good news is it works with
> > externally powered hub... after a while. I get some error messages
> > about inability to go host mode, but with enough patience it
> > eventually does enter host mode and I see my keyboard/mouse.
> >
> > And usually in that process, one of my cpu cores disappear. top no
> > longer shows 2 cores, and I was wondering for a while if d4 is
> > single-core system. It is not, my two cores are back after reboot.
> >
> > That's with 6.1.9 kernel from leste. Ideas how to debug this would be
> > welcome. (Do you use usb host?)
>
> You are using a "proper" non-standard usb micro-b cable that grounds
> the id pin, right?

Yes.

> If not, try with one of those as it allows the hardware to do what it's
> supposed to do.
>
> And presumably you don't have a hacked usb hub that feeds back the
> vbus to your phone, right?

Do have hacked hub. Or more precisely, have device that needs external
power (spinning rust), and hub passes it back to the device.

I'll retry with a keyboard... but I recall it behaved funny with that, too.

> If you have, that should not be used as the pmic can feed vbus.

Well, my plan was to use it as a desktop, and external power is useful
that as Droid battery is not that big.

Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.


Attachments:
(No filename) (1.39 kB)
signature.asc (201.00 B)
Download all attachments

2023-09-27 18:56:22

by Unknown

[permalink] [raw]
Subject: Re: droid4 -- weird behaviour when attempting to use usb host

On Wed, 2023-09-27 at 17:52 +0200, Pavel Machek wrote:
> Hi!
>
> > > I'm having some fun with usb host. Good news is it works with
> > > externally powered hub... after a while. I get some error
> > > messages
> > > about inability to go host mode, but with enough patience it
> > > eventually does enter host mode and I see my keyboard/mouse.
> > >
> > > And usually in that process, one of my cpu cores disappear. top
> > > no
> > > longer shows 2 cores, and I was wondering for a while if d4 is
> > > single-core system. It is not, my two cores are back after
> > > reboot.
> > >
> > > That's with 6.1.9 kernel from leste. Ideas how to debug this
> > > would be
> > > welcome. (Do you use usb host?)
> >
> > You are using a "proper" non-standard usb micro-b cable that
> > grounds
> > the id pin, right?
>
> Yes.
>
> > If not, try with one of those as it allows the hardware to do what
> > it's
> > supposed to do.
> >
> > And presumably you don't have a hacked usb hub that feeds back the
> > vbus to your phone, right?
>
> Do have hacked hub. Or more precisely, have device that needs
> external
> power (spinning rust), and hub passes it back to the device.
>
> I'll retry with a keyboard... but I recall it behaved funny with
> that, too.
>
> > If you have, that should not be used as the pmic can feed vbus.
>
> Well, my plan was to use it as a desktop, and external power is
> useful
> that as Droid battery is not that big.
>
> Best regards,
>                                                                 Pavel

I use usb host quite a bit with xt875, mostly to have a keyboard.
I have noted that several hubs i have don't work reliably, im not sure
why. Its possible that they use or request too mutch power from the
port as cpcap has a pretty small vbus out limit.

All my regular otg adapters work fine however.

I also have a powered hub that works quite well, its item 373697032160
on ebay