Hi,
I have a custome AM335x design based on the BeagleBone. I want to keep the RTC on the AM335x (PG2.1 silicon) working when the unit it shutdown. So I looked at the TPS65217B datasheet and decided that the PMIC needs to be in "SLEEP" mode, not "OFF" mode, so that we maintain RTC power out of LDO1 of the PMIC. I modified the Linux kernel (ti-sdk-05.07.00.00), drivers/mfd/tps65217.c:tps65217_probe() accordingly. [Don't set 'OFF' bit in 'STATUS' register, as we want to go to tps65217 'SLEEP' mode (Vrtc on), not 'OFF' mode (all supplies off).]
This works, when I use the "poweroff" Linux command the unit powers down and LDO1/RTC power is maintained. The problem is now wakeup.
It would appear that I need to enable EXT_WAKEUP in the am335x RTC_PMIC register (rtc_base + OMAP_RTC_PMIC_REG). This would allow the tps65217 wakeup signal to wakeup the am335x (and thus driver the PMIC_PWR_EN).
Does this seem right? No-one seems to have done this when I google it. What bits in RTC_PMIC should be set: there are 4 wake up bits, which corresponds to the EXT_WAKEUP pin on the AM335x?