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.

AM3352 device tree settings for different RTC mode

Other Parts Discussed in Thread: TPS65218, AM3352, TPS65910

My board is AM3352 + TPS65218, using external RTC(i2c) but with "RTC timer functionality but no RTC-only mode"  HW connection. The SW SDK version is 7.0.

When I runs my Qt application, somehow the system time skipped about 5 mins. 

My question:

1.Is there any difference of device tree setting(dts) between "RTC-only", "RTC timer functionality but no RTC-only mode", and "RTC-disable" mode. My device tree setting is base on Starter Kit(HW is RTC-only).

2.Is there any risk when I use external RTC to update system time but the HW design is RTC timer functionality mode.

Thanks.

  • Hi,

    I will forward this to the Linux team. Note that response will be delayed due to the holidays.
  • Hi,

    Have in mind that RTC-only mode & RTC timer functionality are two different things.  They are set by different kernel sources. RTC-only mode is part of the power management, while RTC timer functionality is set by the rtc driver sources located in drivers/rtc.

    RTC-only mode is the lowest possible power mode. For more info have a look at PRCM chapter in am3352 TRM -> Table 8-13. Typical Power Modes.

    Regarding your questions:

    user4541791 said:
    1.Is there any difference of device tree setting(dts) between "RTC-only", "RTC timer functionality but no RTC-only mode", and "RTC-disable" mode. My device tree setting is base on Starter Kit(HW is RTC-only).

     

    There is no difference in the dts regarding this. The dts file configures the power supply for the RTC hw module in the AM335x SoC & perform basic setup like interrupts, compatible drivers, registers address space, however those settings are common among all of the above modes. 

    user4541791 said:
    2.Is there any risk when I use external RTC to update system time but the HW design is RTC timer functionality mode.

     

    No there should be no problem to use an external RTC (i.e. the rtc integrated in the PMIC). However you need to configure it properly within the i2c node of the i2c that communicates with it. 

    Hope this helps. 

    Best Regards, 
    Yordan

  • Dear Yordan, 

    Thanks for your reply.

    Another question:

    I've read about the document "Powering the AM335x/AM437x with TPS65218", this document is only about hardware connection.

    I'm searching for the right TPS65218 device tree setting of linux and correct initialized flow of uboot code.

    Attached files are my current uboot code(board.c) and linux dts file(am335x-evmsk.dts).

    Can you help me to check TPS65218 part, thank you.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/Archive.7z

  • Hi,

    I am not an expert on the PMICs, but you can take a reference from one of the existing dts files, i.e. am335x-evm.dts (the used TPS should be compatible with tps659218. Here you have the following settings :

    include "tps65910.dtsi"

    &i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins>;
    status = "okay";
    clock-frequency = <400000>;
    tps: tps@2d {
    reg = <0x2d>;
    };
    };

    &tps {
    vcc1-supply = <&vbat>;
    vcc2-supply = <&vbat>;
    vcc3-supply = <&vbat>;
    vcc4-supply = <&vbat>;
    vcc5-supply = <&vbat>;
    vcc6-supply = <&vbat>;
    vcc7-supply = <&vbat>;
    vccio-supply = <&vbat>;

    regulators {
    vrtc_reg: regulator@0 {
    regulator-always-on;
    };

    vio_reg: regulator@1 {
    regulator-always-on;
    };

    vdd1_reg: regulator@2 {
    /* VDD_MPU voltage limits 0.95V - 1.325V with +/-4% tolerance */
    regulator-name = "vdd_mpu";
    regulator-min-microvolt = <912500>;
    regulator-max-microvolt = <1378000>;
    regulator-boot-on;
    regulator-always-on;
    };

    vdd2_reg: regulator@3 {
    /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
    regulator-name = "vdd_core";
    regulator-min-microvolt = <912500>;
    regulator-max-microvolt = <1150000>;
    regulator-boot-on;
    regulator-always-on;
    };

    vdd3_reg: regulator@4 {
    regulator-always-on;
    };

    vdig1_reg: regulator@5 {
    regulator-always-on;
    };

    vdig2_reg: regulator@6 {
    regulator-always-on;
    };

    vpll_reg: regulator@7 {
    regulator-always-on;
    };

    vdac_reg: regulator@8 {
    regulator-always-on;
    };

    vaux1_reg: regulator@9 {
    regulator-always-on;
    };

    vaux2_reg: regulator@10 {
    regulator-always-on;
    };

    vaux33_reg: regulator@11 {
    regulator-always-on;
    };

    vmmc_reg: regulator@12 {
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    };
    };
    }

    The rest is handled by the corresponding driver drivers/mfd/tps65910.c or drivers/mfd/tps65218
    Best Regards,
    Yordan