[Letux-kernel] Kobolino: rc5t619 adc

H. Nikolaus Schaller hns at goldelico.com
Sat Dec 21 09:05:49 CET 2019


Hi,

> Am 20.12.2019 um 21:15 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> Hi,
> 
> in the branch
> letux/kobolino/rtc-v5

Fine. I have prepared to merge it into letux-5.5-rc3.

> there is also support for the adc in the pmic.

Cool!

> You can display
> e.g. USB voltage and battery voltage.
> So you have with usb attached:
> 
> root at akepd:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage*input
> 4117000
> 1232000
> 4906000
> 4336000
> 1394000
> 2499000
> 0
> 
> and without:
> root at akepd:~# sleep 5 ; cat /sys/bus/iio/devices/iio\:device0/in_voltage*input
> 4184000
> 0
> 0
> 4181000
> 1402000
> 2500000
> 2500000
> root at akepd:~# 
> root at akepd:~# 

I think I we can then also add something to the Letux/root/charger and Letux/root/batt scripts.

BTW, I there a table mapping voltage channels like this one for twl6037/Palmas?

# channels
# 0 battery type (source current 0, 5, 15, 20 uA)
# 1 battery NTC
# 2 audio accessory/GP
# 3 temp with ext. diode
# 4 GP
# 5 GP
# 6 VBAT_SENSE
# 7 VCC_SENSE
# 8 Backup Battery
# 9 external charger (VCHG)
# 10 VBUS
# 11 DC-DC current probe (how does this work?)
# 12 internal die temp
# 13 internal die temp
# 14 USB ID line voltage
# 15 test network

> 
> What is unkown is the calculation of LIMMON:
> /sys/bus/iio/devices/iio\:device0/in_current0_raw
> it corresponds to the current going from VUSB to VSYS,
> measured by a shunt between ILP and ILM. Any ideas? For the
> voltages things are quite clear from the datasheet.

There is a similar "current" sensor in the twl chips.
Also not with much information how it relates to hardware... 
See #11 :)

BR,
Nikolaus



More information about the Letux-kernel mailing list