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.

PROCESSOR-SDK-DRA8X-TDA4X: enabling RTC on Jacinto TDA4x EVM

Part Number: PROCESSOR-SDK-DRA8X-TDA4X

How can I enable RTC on Jacinto EVM?

I enabled following options in kernel configuration, however, rtc device is not available:

root@j7-evm:~# zcat /proc/config.gz | grep RTC | grep -v "^#"
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_SYSTOHC_DEVICE="rtc0"
CONFIG_RTC_NVMEM=y
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
CONFIG_RTC_DRV_DS1307=y
CONFIG_RTC_DRV_MAX77686=y
CONFIG_RTC_DRV_RK808=m
CONFIG_RTC_DRV_RX8581=m
CONFIG_RTC_DRV_S5M=y
CONFIG_RTC_I2C_AND_SPI=y
CONFIG_RTC_DRV_DS3232=y
CONFIG_RTC_DRV_DS3232_HWMON=y
CONFIG_RTC_DRV_CROS_EC=y
CONFIG_RTC_DRV_PL031=y
CONFIG_RTC_DRV_SNVS=m
root@j7-evm:~#

root@j7-evm:~# hwclock --verbose
hwclock from util-linux 2.35.1
System Time: 1592404519.256858
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
root@j7-evm:~#

Thanks,

Michael

  • Hi Michael,

    There is no on chip RTC on the j721e EVM. So even if you enable all the CONFIGs there is no support
    in hardware & hence to Device tree entry so in short there is no support.

    Best Regards,
    Keerthy

  • There is a battery socket on EVM.

    Do you mean that battery socket is assembled and RTC chip is not assembled?

    According to EVM User Guide (SPRUIS4A–December 2019–Revised May 2020), Para. 4.22 RTC Interface:

    > A real-time clock module Mfr. Part# MCP79410-I/SN is connected I2C0 interface of J721E SoC.

  • Hi MIchael,

    As i commented above i meant there is on no chip or on die RTC on the SoC(My bad I have told EVM).

    The compatible for MCP79410 is microchip,mcp7941x & the config that needs to be enabled is CONFIG_RTC_DRV_DS1307.
    However that alone is not sufficient you even need to add the dts node. This is not supported on the SDK 7.0.

    I  will get back with more details on this after checking internally. .

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Any details on required dts node?

  • Hi Michael,

    Can you try the below diff:

    diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
    index 6788a3611..9d642eb7a 100644
    --- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
    +++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
    @@ -593,6 +593,11 @@
                    #gpio-cells = <2>;
            };
    
    +       rtc@6f {
    +               compatible = "microchip,mcp7941x";
    +               reg = <0x6f>;
    +       };
    +
            exp2: gpio@22 {
                    compatible = "ti,tca6424";
                    reg = <0x22>;
    

    Best Regards,
    Keerthy

  • Thanks! It works.

    Best Regards,

    Michael

  • Hi Michael,

    Glad to know that it works. Can you please paste the working logs here for my reference.

    Also kindly press "resolved" on the response that actually resolved your issue and not your response.

    Thanks,
    Keerthy

  • root@j7-evm:~# /etc/init.d/hwclock.sh stop
    Saving the System Clock time to the Hardware Clock...
    Hardware Clock updated to Mon Nov 23 09:59:11 UTC 2020.
    root@j7-evm:~# /etc/init.d/hwclock.sh start
    System time was Mon Nov 23 09:59:17 UTC 2020.
    Setting the System Clock using the Hardware Clock as reference...
    System Clock set. System local time is now Mon Nov 23 09:59:18 UTC 2020.
    root@j7-evm:~# /etc/init.d/hwclock.sh reload
    Saving the System Clock time to the Hardware Clock...
    Hardware Clock updated to Mon Nov 23 09:59:24 UTC 2020.
    root@j7-evm:~# date
    Mon Nov 23 09:59:45 UTC 2020
    root@j7-evm:~#