I have done some further research.  It seems that the tps65217.c mfd driver 
in the kernel sets the OFF bit (bit 7) in the PMIC STATUS register (offset 
0xA) in order to make sure it shuts down all output voltages (including the 
RTC 1.8V supply from LDO2) when the system executes a power-down.  This bit 
differentiates between OFF state and SLEEP state when the RTC in the main 
processor drives the POWER_EN signal low (the kernel sets the RTC alarm 
with a 1.5s timeout to disable POWER_EN as the final stage in powering 
down).

According to my reading of the TPS65217 spec it almost completely disables 
itself if OFF is set when POWER_EN is set low and this includes charging.  
If OFF is clear then it leaves the ability to charge enabled as well as 
keeping LDO2 enabled (to power the RTC).

I did some experimentation and verified this.  After booting I clear the 
OFF bit using i2cset and then power down.

  i2cset -y -f 0 0x24 0xa 0x00
  sudo shutdown now

The battery continues to charge after the system turns off (verified with 
an ammeter in series with the battery + lead).  However there is also an 
additional ~15 mA load that is left on the battery when it is done 
charging.  I see from the pocketbeagle schematic that a sn74lvc1g07 driver 
is taking power from the LDO2 output (VDD_RTC).  However this chip should 
take much less than 1 mA so there is something else is taking power.  I 
also notice that the OSD3358 SYS_VDD_3P3V (TL5209 regulator output) is also 
enabled.  It is not normally enabled if the system is shutdown with the OFF 
bit set.  I suspect circuitry in the Octavo module is consuming the extra 
power.

This high quiescent current in exchange for charging when the system has 
been shut down is clearly a problem for a battery powered device.  I will 
ask Octavo about this current as soon as my request for access to their 
forums is granted.

It will be unfortunate if the high quiescent current is unavoidable because 
of a design decision made by Octavo.   The decision to completely disable 
the PMIC on shut-down was clearly made to work around a bug in the version 
1 TI AM3358 silicon (Advisory 1.0.17  in the errata) as well as design 
decisions by the Beaglebone Black team that could cause a potentially 
chip-damaging situation if the RTC was powered but the rest of the system 
was off.  This is the "RTC-only mode" bug that you'll find documented, 
mainly on kernel threads.  However by my reading of TI's errata and 
understanding of the pocketbeagle design, it seems that this should be able 
to work (as well as the RTC-only sleep mode) with the pocketbeagle.  That 
would make the pocketbeagle even that much cooler.

Perhaps I've missed something and would love to hear from anyone with 
additional information.  Otherwise I guess this is just information for 
others in the future.

Additional FYI:

PMIC MFD Driver: 
https://github.com/beagleboard/linux/blob/7a920684860a790099061b67961d0b5ffa033fdf/drivers/mfd/tps65217.c

RTC Driver: 
https://github.com/torvalds/linux/blob/master/drivers/rtc/rtc-omap.c

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/4fd8d165-48fd-485d-ae12-3739efaae627%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to