Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: Rec_Bat on July 14, 2015, 08:16:04 AM

Title: min 2.6V Batt voltage
Post by: Rec_Bat on July 14, 2015, 08:16:04 AM
Hallo

I connected a 3V coin type battery to the BAT-pin. I found this site:

https://community.freescale.com/message/330541#330541 (https://community.freescale.com/message/330541#330541)

Now minimal voltage on BAT-pin for working RTC is 2.9 V. I found this hint inside imx23rm.pdf, how to allow 2.6 V:

"This requires software to program the RTC_PERSIST0_SPARE<31:28> bits."

How can I do that?

Regards,
Thomas

iMX233-OlinuXino-Nano, Kernel 3.12, 5V-Powered
Title: Re: min 2.6V Batt voltage
Post by: lambda on July 14, 2015, 12:26:12 PM
Hi Thomas,

there is currently no support for accessing persistent bits in
mainline linux. There are two approaches I can think of - short
of writing a proper kernel driver:

1) Access the register via /dev/mem

2) Set the register from the bootlets

About writing a kernel driver: I have some rtc/watchdog patches
in my queue, so I looked into it. There are some patches floating
around, but none got merged. I think the situation is still like
described in this thread:
https://lkml.org/lkml/2013/7/11/68

HTH,
Harald
Title: Re: min 2.6V Batt voltage
Post by: Rec_Bat on July 14, 2015, 05:45:01 PM
Hi Harald

thank you for your reply!

i am new on programming kernel drivers, i have to learn for that. I think setting this Register is only ones.

Maybe Yocto BSP support this settings?

Regards,
Thomas

Title: Re: min 2.6V Batt voltage
Post by: lambda on July 14, 2015, 09:02:44 PM
Yes, the BSP has a driver that exports persistent bits via sysfs to userspace.

But that's not a standardized ABI, so this driver probably can't be merged
upstream ...