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.

AM3354: RTC problem

Part Number: AM3354
Other Parts Discussed in Thread: TPS65910

Hi ,

SDK : ti-processor-sdk-linux-rt-am335x-evm-03.03.00.04-Linux-x86-Install.bin

main chip : am3354

Device Tree: am335x-boneblack.dtb

Profile: tisdk_am335x-evm-rt_defconfig

External clock chip : ISL12026

For ISL12026 we wrote the driver rtc-x1226.ko

Put rtc-x1226.ko into the board's /lib/modules/4.4.41-rt50-g968d071ce9/kernel/drivers/rtc directory.

But found rtc-omap.ko and rtc-x1226.ko load order can not be fixed, and sometimes load rtc-omap.ko sometimes load rtc-x1226.ko.

Excuse me, when starting the am3354 , how to acquiesce, first load rtc-omap.ko driver and then load rtc-x1226.ko ?

BR

  • The software team have been notified. They will respond here.
  • Hello andre,

    In this case the proper way would be to use the ioctl interface to find out which /dev/rtcN corresponds for rtc-x1226. Alternatively /sys/class/rtc/rtcN will provide you access to various rtc attributes without requiring the use of ioctls. Please, see Documentation/rtc.txt file for more details.

    Best regards,
    Kemal

  • I have a similar problem with using the RTC on the TPS65910 PMIC.  I found a workaround is to make the RTC driver you want to load first a built-in module, and the other, rtc_omap, a loadable module.  The built-in loads much earlier in the boot and also it eliminates a problem I had with time not syncing correctly from the RTC when both were loadable modules.

    This is working

    # dmesg | grep rtc
    [ 1.285058] vrtc: supplied by vbat
    [ 1.382157] tps65910-rtc tps65910-rtc: Enabling rtc-tps65910.
    [ 1.389681] rtc rtc0: tps65910-rtc: dev (253:0)
    [ 1.389701] tps65910-rtc tps65910-rtc: rtc core: registered tps65910-rtc as rtc0
    [ 1.422088] tps65910-rtc tps65910-rtc: setting system clock to 2018-01-29 05:05:02 UTC (1517202302)
    [ 6.356774] omap_rtc 44e3e000.rtc: already running
    [ 6.412659] omap_rtc 44e3e000.rtc: omap_rtc_probe: rtc is_pmic_controller
    [ 6.493127] rtc rtc1: 44e3e000.rtc: dev (253:1)
    [ 6.493144] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc1

    I was getting this (hctosys error) when both were modules:

    # dmesg | grep rtc 
    [ 1.285360] vrtc: supplied by vbat 
    [ 1.403947] hctosys: unable to open rtc device (rtc0) 
    [ 3.493050] tps65910-rtc tps65910-rtc: Enabling rtc-tps65910. 
    [ 3.501514] rtc rtc0: tps65910-rtc: dev (253:0) 
    [ 3.501557] tps65910-rtc tps65910-rtc: rtc core: registered tps65910-rtc as 0
    [ 6.331188] omap_rtc 44e3e000.rtc: omap_rtc_probe: rtc is_pmic_controller 
    [ 6.371432] rtc rtc1: 44e3e000.rtc: dev (253:1) 
    [ 6.371448] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc1