This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux driver for TPS65930 RTC

Other Parts Discussed in Thread: TPS65930

Hi All,

I am planning to write linux driver for TPS6930 RTC. Looking into data manual for

TPS65930, I found following functionality of RTC module:

(http://focus.ti.com/lit/ds/symlink/tps65930.pdf)

  • Time info(secs/min/hrs) in BCD code
  • Calendar info(day/month/yr/week) in BCD code.
  • Interrupt generation (1 sec/ 1min/ 1 hr/ 1 day) or alarm func
  • I2C bus interface.

I also found below linux driver, which take care of all the above functionality.

http://lxr.linux.no/#linux+v2.6.30.4/drivers/rtc/rtc-twl4030.c  

Please let me know, if we can use twl4030 RTC driver to drive RTC in TPS65930.

The reason for asking this is because TI says that software of TWL4030 is compatible

with TPS65930 and in the mainline kernel source, the source file rtl_twl4030.c clears indicates

that rtc in twl4030 is supported, But in the TI OMAP 35x EVM PSP release notes-02.01.09.pdf 

for Mistral 3530 EVM board, it is mentioned (in 2.2.2) that "Supporting RTC on TWL 4030 requires modifications

to the OMAP3EVM and is not supported in this release"

 Why is this so? Is there any issues with running RTC on TPS65930?

Thanks & Regards,

-Subash


  • Hi Subash,

    The RTC does not work with Mistral hardware because MSECURE is not pulled high. MSECURE needs to be pulled up for RTC to work.

    If you need secure operation then you also need to connect MSECURE from TPS659xx to OMAP DRM_SECURE pin. Both these fixes will need hardware modifictions on the board.

     

    Regards,

    Gandhar.

     

  • Hi Gandhar,

    Thanks for pointing us this info.  We will take care of the same.

    I am currently looking into RTC compensation process for RTC to maintain accuracy.

    I am referring below link,

    http://focus.ti.com/lit/an/swca024/swca024.pdf

    I want to confirm if my understanding are correct for TPS6930 RTC to program the

    RTC_COMP(value between -32768 to +32767)

    RTC_COMP = 3600 * (32768 - f(32k_actual))

    actual count = no of counts of hf_clk inside actual 32kclk during sampling period.

    exact count = No of counts of hf_clk for a sampling period.

    Bit confused as to get f(32k_actual) value.  Please let me know how to get f(32k_actual)

    value.

     

    Thanks & Regards,

    -Subash

     

     

     

     

  • Hi Gandhar,

    Can you please let us know what is it functionality for SYS_DRM_SECURE pin in OMAP 

    and when it is used?

    Thanks & Regards,

    -Subash.

  • If you connect to SYS_DRM_MSECURE then I think OMAP can drive the TPS659xx MSECURE pin. This will be necessary if you have security etc with OMAP. If security is not used then you can simply have a pull-up on TPS659xx and it should be ok.

     

    Regards,

    Gandhar.