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

H. Nikolaus Schaller hns at goldelico.com
Wed Jul 20 12:08:21 CEST 2016


> Am 20.07.2016 um 11:17 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> Hi Andreas,
> 
>> 
>>> [   60.034973] twl4030 REG_BCICTL1 = 12
>>> [   60.046569] twl4030 REG_BCICTL2 = 00
>>> [   60.061920] twl4030 current = 10 uA
>>> [   60.074676] twl4030 res = 0 Ohm
>>> [   60.089141] twl4030 temp = 59 C
>>> temp: 56°C
>> 
>> This means ITHEN is disabled after boot! For whatever reasons. 
> 
> I can't even set the ITHEN bit!
> 
> [  279.510040] twl4030_madc_set_current_generator read regval = 12
> [  279.517547] twl4030_madc_set_current_generator write regval = 1a
> [  279.527343] twl4030_madc_set_current_generator read back regval = 12
> 
> manually:
> 
> root at letux:~# i2cget -f 0 0x4a 0x97 
> 0x12
> root at letux:~# i2cset -f 0 0x4a 0x97 0x1f 
> root at letux:~# i2cget -f 0 0x4a 0x97 
> 0x13
> root at letux:~# i2cset -f 0 0x4a 0x97 0x00 
> root at letux:~# i2cget -f 0 0x4a 0x97 
> 0x00
> root at letux:~# i2cset -f 0 0x4a 0x97 0xff
> root at letux:~# i2cget -f 0 0x4a 0x97 
> 0x13
> root at letux:~# 
> 
> So I can only toggle the TYPEN (ADCIN0), MESBAT, MESVAC bits
> in the state the twl4030 is initialized.
> 
> But not ITHEN (ADCIN1) or MESVBUS.
> 
> here we have a connection between VBUS and Temp measurements...
> 
> Description says:
> 
> MESVBUS  Connects resistive divider VBUS input
> Note: MESVBUS is enabled automatically when VBUSOVEN monitoring function is started.
> 
> This might also imply that it is automatically reset at some times.
> 
> But there is no note about automatic control of ITHEN.
> 
> Any ideas? Some background process resetting these bits instead of leaving them untouched?
> 
> Next, I think I will compare with the 4.3 kernel on the same device.

Here:

root at letux:~# i2cget -f 0 0x4a 0x97 
0x1b
root at letux:~# i2cset -f 0 0x4a 0x97 0xff
root at letux:~# i2cget -f 0 0x4a 0x97 
0x1b
root at letux:~# i2cset -f 0 0x4a 0x97 0x00
root at letux:~# i2cget -f 0 0x4a 0x97 
0x0b
root at letux:~# i2cset -f 0 0x4a 0x97 0xff
root at letux:~# i2cget -f 0 0x4a 0x97 
0x1b
root at letux:~# 

So it is more or less the same that not all bits can be changed and even only TYPEN.
But ITHEN is set and I get a 26C reading from ADCIN1.

I think we come closer to the core of the onion...

BR,
Nikolaus



More information about the Letux-kernel mailing list