RTC issue on C4

I am looking at battery backup RTC issue since RTC is always reset to
1900-1-1 00:00:00 after power is off and
on again. This link http://e2e.ti.com/support/power_management/pmu/f/43/t/92666.aspx
gives me some clue. I checked C4 schematic. It seems TEST.RESET (T16)
is not grounded. If this is true, Why? how do I get it grounded? it
looks connected with other two pins.
This question may be right for Gerald Coley.

Do you have the battery installed on your board?

I just now managed to fix my kernel, that I custom compile for myself, so that the battery backed up clock can be written to with the hwclock command. Before I changed my kernel, the hwclock command operated but never changed the RTC.

I’m custom compiling so that I get one of the GPIO lines defined as a button for my usage, but here’s my diff if it is at all helpful.

diff linux-2.6.39/arch/arm/mach-omap2/board-omap3beagle.c linux-2.6.39.RFSAW/arch/arm/mach-omap2/board-omap3beagle.c
57a58,59

#define TWL4030_MSECURE_GPIO 22

518a521,526

{
.code = BTN_TOP,
.gpio = 130,
.desc = “GPIO-130-Button”,
.wakeup = 1,
},
679a688,692

Thanks! that is great job. I thought mSecure had been set somewhere.

This morning, I found hwclock is lost after one night's power-off.

Could it just be your battery? Could you confirm this with a good
battery and let us know?

Thanks,
Joel

That is a problem in the kernel.

See here:

http://www.spinics.net/lists/linux-omap/msg49596.html

Here is small patch for that:

http://www.spinics.net/lists/linux-omap/msg49620.html

But I've decided to use the following version, which also exports the GPIO so that the GPIO might be switched by root to disable modifications on the RTC.

The backup battery is 3V and the kernel is 2.6.32. But no joy.