On Thu, 13 November 2014 Michal Suchanek <hramr...@gmail.com> wrote:
> On 13 November 2014 18:18, Bruno Prémont <bonb...@linux-vserver.org> wrote:
> > On Thu, 13 November 2014 Michal Suchanek <hramr...@gmail.com> wrote:
> >> I tried several Y cables with two A13 tablets.
> >>
> >> eg. OTG cable + mini-USB Y cable for powering USB disk from 2 ports +
> >> mini USB hub
> >>      OTG Y cable with extra power connector + micro USB cable + micro USB 
> >> hub
> >>
> >> First tablet would crash the moment the other end of the Y cable is
> >> connected to a power source but one of 3 hubs would configure when
> >> powered from the tablet. Micro USB hub would not configure (although
> >> it works with PC) and other mini USB hub would also cause tablet
> >> crash.
> >>
> >> Second tablet would not crash with the second mini USB hub but would
> >> not configure it either nor would it configure the micro USB hub. I
> >> left the tablet running with the working mini USB hub connected and
> >> the other end of the Y cable connected to PC and sure enough the
> >> tablet would eventually enter reboot loop.
> >>
> >> I cannot read battery level from Linux - it says somewhere on the wiki
> >> that AXP driver does ACPI emulation but there is no acpi tool for
> >> armhf and when you install acpi:i386 it helpfully tells you
> >>
> >> # acpi
> >> Battery 0: Charging, 0%,  until charged
> >
> > With what kernel are your performing these tests?
> 
> 3.4.104+

Ok, would have to re-read AXP code to see if/how it reacts to corresponding
events (though I never tried OTG in either device or host mode, just on
basic USB power supply).

> > sunxi-3.4 does implement power_supply driver for the main battery.
> > I don't know how it works with regard to OTG mode switches.
> >
> > For mainline I'm working on power_supply driver. According to AXP
> > datasheet AXP is at least partially involved in the OTG mode game.
> >
> > Probably you should make sure AXP and USB port are consistently
> > configured regarding the port's mode as to avoid incorrect power
> > routing.
> 
> The problem here is that the routing should depend not only on the OTG
> mode but also on power on the OTG port. When the tablet is powered by
> OTG and an OTG is to transfer to host mode the tablet should *remain*
> powered by OTG port.

Being powered over OTG but having OTG in host mode? Is that allowed?

As long as power comes in via OTG mode should be either "none" (tristate,
charging) or slave I would say.
When something gets connected that does not provide power switch to
host mode.

> This kind of does not solve the problem of connecting power after the
> fact, unfortunately.

AXP detects when power gets connected and OTG mode should get switched at
that point. AXP can send driver an interrupt to inform it that power
supply has been connected to OTG. Probably before USB negotiation AXP
should also limit its power drawing to 100mA until remote side has
confirmed it can do more (be it passive charger via some resistor on
data lines or remote host via USB negotiation).

USB states that 100mA are always available to slave device while max
of 500mA only under some conditions.

Thanks,
Bruno

Attachment: signature.asc
Description: PGP signature

Reply via email to