BBB/I2C: Read PMIC data
Warner Losh
imp at bsdimp.com
Fri May 2 15:30:22 UTC 2014
On May 2, 2014, at 8:24 AM, Winston Smith <smith.winston.101 at gmail.com> wrote:
> On Fri, May 2, 2014 at 1:59 AM, Sulev-Madis Silber (ketas)
> <madis555 at hot.ee> wrote:
>> Could you look into reading data from PMIC? I tried... there is all the
>> code that shows power status on boot... there are PMIC I2C specs...
>> there is your code... however I clearly can't write C enough to get that
>> one byte out of PMIC and displayed in human-readable form.
>
> Hmmm ... I'm reading reg 0x0 (CHIPID) and 0xA (STATUS) from the PMIC @
> address 0x24 on I2C0, but I get strange values:
>
> root at beaglebone:~ # ./bbb_pmic
> TPS65217 PMIC @ address 24:
> ChipID: 3D (Unknown) rev 1.13
> Status: 00
>
>
> 0x3D isn't a valid CHIPID according to the TPS65217 datasheet; and
> 0x00 doesn't look like a valid value for the status register (there
> should be some 1's in there to indicate the ACPWR or USBPWR).
>
> I wonder if the device has been "claimed" by the kernel and is inaccessible?
Only if the kernel is actively accessing them so your transactions are messed up.
In the kernel, all the bridge knows about is transactions of one flavor or another.
This may indicate a more fundamental issue going on, either in your belief that
it is at 24, or in the address (which is 7 bits) gets translated to 8 bits. Try a left
shift 1 bit.
Warner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20140502/0b300c95/attachment.sig>
More information about the freebsd-arm
mailing list