[Letux-kernel] Kobolino: rc5t619 adc

Andreas Kemnade andreas at kemnade.info
Sat Dec 21 09:26:27 CET 2019


On Sat, 21 Dec 2019 09:05:49 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:


> BTW, I there a table mapping voltage channels like this one for twl6037/Palmas?
> 
static const struct iio_chan_spec rn5t618_adc_iio_channels[] = {
        RN5T618_ADC_CHANNEL(0, IIO_CURRENT, "LIMMON"),
        RN5T618_ADC_CHANNEL(1, IIO_VOLTAGE, "VBAT"),
        RN5T618_ADC_CHANNEL(2, IIO_VOLTAGE, "VADP"),
        RN5T618_ADC_CHANNEL(3, IIO_VOLTAGE, "VUSB"),
        RN5T618_ADC_CHANNEL(4, IIO_VOLTAGE, "VSYS"),
        RN5T618_ADC_CHANNEL(5, IIO_VOLTAGE, "VTHM"),
        RN5T618_ADC_CHANNEL(6, IIO_VOLTAGE, "AIN1"),
        RN5T618_ADC_CHANNEL(7, IIO_VOLTAGE, "AIN0")
};


> # 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 :)
> 
https://www.e-devices.ricoh.co.jp/en/products/product_pmic/multiple-pmu/rc5t619/rc5t619.pdf

well, there is at least on page 15 a shunt
between ILM and ILP. So the only question is the amplify factor of that
current sensor. Relation to ADC is on page 19.

Regards,
Andreas


More information about the Letux-kernel mailing list