[Letux-kernel] automatic charging working with 4.7
H. Nikolaus Schaller
hns at goldelico.com
Tue Jul 26 22:12:19 CEST 2016
> Am 26.07.2016 um 22:09 schrieb Andreas Kemnade <andreas at kemnade.info>:
>
> On Tue, 26 Jul 2016 21:07:30 +0200
> Andreas Kemnade <andreas at kemnade.info> wrote:
>
>> Hi,
>>
>> I finally took the advice given to us about in the UART slave
>> discussion:
>> Fix powermanagement issues in userspace ;-)
>> So I did:
>>
>> rmmod twl4030_charger
>> sleep 2
>> #USB PHY_CLK_CTRL
>> #seems to be already done
>> twl-i2c.sh USB w 0xFE 0x01
>> sleep 1
>> twl-i2c.sh USB r 0xFF
>> #should be 01
>>
>> #USB POWER_CTL_SET OTG_EN
>> twl-i2c.sh USB w 0xAD 0x20
>>
>
> modprobe twl4030_charger here seems to be enough here.
seems to prove that the problem is really in twl4030-phy.
> The further writes seem not to be necessary.
good to know! And thanks for finding out!
> This was with usb cable attached during boot.
> ethernet gadget seems to work reliably. after that.
>
> after replugging usb, to re-enable charging
> just a rmmod twl4030_charger ; modprobe twl4030_charger needs
> to be done.
>
>> sleep 1
>> # now we have sometimes a working usb gadget
>> #BCICTL1 (not needed)
>> #twl-i2c.sh MAIN_CHARGE w 0x23 0x1f
>>
>> #BCIMFSTS4
>> twl-i2c.sh MAIN_CHARGE w 0x10 0x74
>>
>> #BOOT_BCI
>> twl-i2c.sh PM_MASTER w 0x07 0x32
>> sleep 2
>>
>> #charging starts
>>
>> #to have the vbus and iusb sysnodes
>> in /sys/class/power_supply/twl4030_usb... modprobe twl4030_charger
>>
>> now we have even vbus measurement.
>> twl-i2c.sh is from
>> http://misc.andi.de1.cc/twl-i2c.sh
>>
>> Well, of course that is not the end solution, but maybe a step
>> backward to move two steps forward.
>>
> Regards,
> Andreas
> _______________________________________________
> http://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
More information about the Letux-kernel
mailing list