Re: [PATCH v2 2/5] devicetree: power: Add docs for TI BQ24190 battery charger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




* Liam Breck <liam@xxxxxxxxxxxxxxxxx> [170812 12:00]:
> On Sat, Aug 12, 2017 at 9:42 AM, Sebastian Reichel <sre@xxxxxxxxxx> wrote:
> > On Fri, Aug 11, 2017 at 02:57:10PM -0700, Liam Breck wrote:
> >> >> +Other features:
> >> >> +- Use gpio-hog to set the OTG pin high to enable 500mA charge current on USB SDP port.
> >> >
> >> > Why doesn't the charger driver control this?
> >>
> >> This pin/gpio has to be high when USB is plugged in to make the
> >> charger chip negotiate 500mA from a SDP port. It should generally be
> >> configured that way even if the driver is not loaded, as the chip does
> >> not require a driver to function. Some boards may do that with a
> >> pull-up. Also the user may want to change this via sysfs and not have
> >> the driver "fix" it.
> >
> > drivers/power/supply/qcom_smbb.c exposes the otg feature as
> > regulator. I think in this case it could be exposed as
> > gpio-regulator.
> 
> Hans is doing that here:
> https://patchwork.kernel.org/patch/9883717/
> 
> The datasheet labels one pin "OTG" but that's misleading; it really
> enables negotiation of 500mA input current, but does not turn on OTG
> mode. If this pin is low, it only prevents the driver from starting
> OTG mode via I2C msg.

Yeah so before the device has enumerated this pin keeps the
max current at 100mA as required by the USB spec. This pin
should be only toggled after enumerating in bootloader or
by the kernel driver. I tink the USB PHY driver can also
be wired to control this line.

Probably best to set it up as just a GPIO that the bq24190
driver controls optionally.

Then later on we should have some Linux generic way for
USB gadget subsystem to tell the charger that we have
enumerated, and then bq24190 driver can toggle this GPIO
to enable higher charge rates.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux