[Letux-kernel] letux-4.7-rc7: charging & ethernet gadget
andreas at kemnade.info
Mon Jul 18 19:42:20 CEST 2016
On Mon, 18 Jul 2016 08:41:18 +0200
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> > Am 18.07.2016 um 08:18 schrieb Andreas Kemnade
> > <andreas at kemnade.info>:
> > Hi,
> > On Mon, 18 Jul 2016 07:04:53 +0200
> > "Dr. H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >> Hi,
> >> charging seems to work if you do
> >> echo continuous > /sys/class/power_supply/twl4030_usb/mode
> > yep, fixed on kernel hacking workshop...
> Testing with discharged batteries is not that easy...
> So this is a good workaround.
> >> so only auto mode is completely broken on most devices.
> >> Ethernet gadget still does not work.
> > My suspect is that vbus measurement configuration in
> > the madc part of twl4030 seems to be broken.
> adc is shared between madc and bci. The madc part seems to
> work, although it reports 0V VBUS the other measurements appear
> to be ok.
hmm, vbus reports sometimes something != 0. So it behaves a bit like a
floating pin. But what should be "floating" there.
> Except the battery temperature NTC. That one reads as 56°C which is
> "above limit".
> But it is impossible to have 56°C since the GTA04 has no NTC but a
> fixed 10kOhm resistor. It should read ~23° (and 4.3 kenrel reports
I have 26C here with 4.7rc7.
i2cset -f 0 0x4a 0x97 0x1f (BCICTL1)
should enable proper measurement. It should also connect a voltage
divider so that madc channel 8 works.
> Ah, it could be something as simple as a disabled current source for
> the NTC. Then, BCI would not detect battery presence and will refuse
> to start charging...
> On the other hand I remember from earlier work that the 56°C is just a
> symptom because if the BCI is not charging, it will not measure
> temperature. So it could be just a consequence and not the reason of
> charging failure.
> > That causes many things
> > dependant on that to fail.
> Yes, that is the most common and therefore most likely component
> between charging & ethernet.
> And explains (at least a little) the strange thing that cable
> detection depends on which end is plugged in/out.
> > I am just back from my holiday trip
> wish you a nice tour!
> > so I have not investigated
> > further.
> > I guess just writing to a single register at the right place
> > should be a first fix.
> Yes :)
> But I could not find a single twl4030 related source file yet, that
> makes a difference. I had even tried to backport all twl4030 twl
> files (maybe not complete) from 4.3 with no difference. Will try
Well if there is no twl4030 change, then there is:
2. other kernel stuff which changes order in which things are done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Letux-kernel