[Letux-kernel] letux-4.7-rc7: charging & ethernet gadget

H. Nikolaus Schaller hns at goldelico.com
Mon Jul 18 08:41:18 CEST 2016

> 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.

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 26°C).

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 again...


More information about the Letux-kernel mailing list