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.

AM3358: Disable RTC32K oscillator

Part Number: AM3358

Hi,

sdk:psdk-linux-6.03

Customer designed a board without RTC, so he want to disable RTC in SPL. He disable CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC as below.

#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
static void rtc32k_enable(void)
{
    struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE;
    rtc32k_unlock(rtc);
    /* Enable the RTC 32K OSC by setting bits 3 and 6. */
    writel((1 << 3) | (1 << 6), &rtc->osc);
}
#endif
And add # CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set in xxx_defconfig and make config.
But CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC still set to y in .config. So he disable SPL_AM33XX_ENABLE_RTC32K_OSC in common/spl/Kconfig and /drivers/bootcount/Kconfig and successful.
Why can't disable CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC in defconfig? Should we use the definition in defconfig as the standard? In his case, it seems that the definition of the macro in defconfig and Kconfig conflicted.
  • Hi Nancy,

    Nancy Wang said:
    Why can't disable CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC in defconfig? Should we use the definition in defconfig as the standard? In his case, it seems that the definition of the macro in defconfig and Kconfig conflicted.

    Due to Kconfig dependencies disabling the 32kHz oscillator is not as easy as changing a single line in the defconfig as you found. You should invoke 'make [...] menuconfig' and then search for and try to deactivate the symbol. Doing so you will discover (via 'help' on that CONFIG symbol) that there is CONFIG_BOOTCOUNT_AM33XX listed as a dependency, which you will need to deactivate first by switching it to a different mode such as CONFIG_BOOTCOUNT_GENERIC. If you would like to generate a new defconfig you can then use 'make [...] savedefconfig'.

    Regards, Andreas