[U-Boot] [PATCH 0/3] sunxi: Ippo_q8h: Enable OTG VBUS detection using AXP223

Chen-Yu Tsai wens at csie.org
Tue Mar 10 12:49:59 CET 2015


Hi,

On Tue, Mar 10, 2015 at 7:08 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> Hi,
>
> On 09-03-15 08:44, Chen-Yu Tsai wrote:
>>
>> Hi Hans,
>>
>> This series fixes otg support on the A23 q8h tablets. It adds support
>> for the AXP's (AXP221/223 for now) VBUS detection function.
>>
>> I've tested this with a USB wireless keyboard dongle, which works fine.
>> More importantly, I'm using this and your mainline kernel musb work plus
>> a few A23 dts patches to get musb working on my q8h tablet in host mode.
>> I have an ethernet dongle plugged in, which works reasonably well.
>
>
> Thanks for working on this, I've merged this into u-boot-sunxi/next
> and I plan to send a pull-req for this to get it into v2015.4-rc# soon,
> as this fixes a regression which I (deliberately) introduced.
>
> It would be cool if you do similar patches for the mainline kernel, for
> the mainline kernel I would really like to see the status bit exported
> as part of the gpio-chip which we still need to add to the axp2xx code for
> the axp2xx gpio pins, this way the existing kernel musb code can just use
> it.

Not sure this is going to fly with the maintainers. It is pretty much
a part of the power supply, which would have it's own driver.

Now I wanted to do the GPIOs, but then I went and did all the new
SoC stuff. Also the regular GPIOs are muxed with the GPIO regulators,
which is a bit nasty considering we might not have the driver core to
handle them. I haven't figured that part out yet. I suppose we could
just do kind of a hack where the pin is claimed by the regulator and
the regulator driver is free to change the mux.

I'll probably tackle this after AXP221 is merged and RSB is figured
out, and if no other things pop up.

> I also believe that Ian was right when he said that we should probably
> also make these bits special gpio-s in u-boot rather then using custom
> API-s for them. But this is something which we can fix later, for now
> this fixes the regression and as such is good enough.

I must have missed his comment. I do think a cleanup of the AXP code
is needed.

>> Note that U-Boot never calls musb_shutdown() to do proper cleanup, like
>> disabling VBUS, so the current state carries on into Linux.
>
>
> Hmm true, I guess that is not necessarily a problem, but something which
> we do need to keep in mind.

It's a bit like having regulators kept on for ethernet or simplefb, a
nice to have side-effect. :)


Regards
ChenYu


More information about the U-Boot mailing list