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.

AM3359想使用芯片的RTC功能,但是没有使用电源管理芯片,应该如何配置?

Other Parts Discussed in Thread: AM3359

最近在调试一块使用了AM3359的工控板,这里的硬件设计上是没有电源管理芯片的,想问一下论坛的工作人员以及各位工程师,我这里要使用rtc功能,应该做一些什么配置呢?开机能执行hwclock -w命令,但是一掉电之后,系统的时间就不对了。

[    1.090646] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    1.098334] i2c /dev entries driver
[    1.102992] pinctrl-single 44e10800.pinmux: pin 44e10960.0 already requested by 481a6000.serial; cannot claim for 48060000.mmc
[    1.114451] pinctrl-single 44e10800.pinmux: pin-88 (48060000.mmc) status -22
[    1.121535] pinctrl-single 44e10800.pinmux: could not request pin 88 (44e10960.0) from group mmc0_pins_default  on device pinctrl-single
[    1.133852] omap_hsmmc 48060000.mmc: Error applying setting, reverse things back
[    1.178863] NET: Registered protocol family 10
[    1.179442] omap_hsmmc 48060000.mmc: exceeding card's volts
[    1.193545] sit: IPv6 over IPv4 tunneling driver
[    1.199011] NET: Registered protocol family 17
[    1.203636] Key type dns_resolver registered
[    1.208126] omap_voltage_late_init: Voltage driver support not added
[    1.217550] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[    1.220476] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.222452] mmc0: new high speed SDHC card at address 0007
[    1.232563] mmcblk0: mmc0:0007 SD16G 14.5 GiB
[    1.235018]  mmcblk0: p1 p2
[    1.246070] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[    1.253808] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xdc
[    1.260194] nand: AMD/Spansion S34ML04G2
[    1.264138] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[    1.271859] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
[    1.277285] 10 ofpart partitions found on MTD device 8000000.nand
[    1.283408] Creating 10 MTD partitions on "8000000.nand":
[    1.288841] 0x000000000000-0x000000020000 : "NAND.SPL"
[    1.295476] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
[    1.302718] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
[    1.309850] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
[    1.316971] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
[    1.324359] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
[    1.331461] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
[    1.338600] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
[    1.346336] 0x000000200000-0x000000a00000 : "NAND.kernel"
[    1.356607] 0x000000a00000-0x000020000000 : "NAND.file-system"
[    1.590120] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    1.624514] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.632729] VFS: Mounted root (ext4 filesystem) on device 179:2.

ps:我看了一下原理图,RTC相关的引脚配置模式是Rtc-Only,其中标号VDD1V8_RTC是纽扣电池经过处理之后得到的电压:

  • 纽扣电池用上没? RTC相关供电有没有问题?
  • 板子断点后测试一下VDD1V8_RTC的实际电压为多少
  • 测试了是1.8V
  • 都测过了,1.8V是有的
  • 这里的论坛技术人员都是回复了一次就不管了吗?问题没解决也没人理会?
  • 最后还是自己摸索解决问题了,这里分享一下,方便后续其他人的查看:

    在没有PMIC的情况下,使用芯片的内部RTC模块,模式为RTC-only mode。

    引脚接法如下:

    VDDS_RTC--------Always on RTC 1.8 V power supply(接电池转换后的1.8V,持续供电VDD1V8_RTC)

    CAP_VDD_RTC--------1 uF decoupling capacitor to VSS(接1uF电容到地)

    RTC_KALDO_ENn--------VSS(接10k电阻到地)

    RTC_PWRONRSTn--------1.8 V RTC power on reset(接电池转换后的1.8V,保证不复位,VDD1V8_RTC)

    PMIC_POWER_EN--------PMIC power enable input(接板子转换后的1.8V,VDD1V8)

    EXT_WAKEUP--------1.8 V wakeup event signal(接电池转换后的1.8V,一直是唤醒状态,VDD1V8_RTC)

    设备树下屏蔽电源管理芯片的相关节点,增加rtc节点:

    &rtc {

    system-power-controller;

    clocks = <&clk_32768_ck>;

    clock-names = "ext-clk", "int-clk";

    status = "okay";

    };

    内核配置:

    Device Drivers  --->

    [*] Real Time Clock  --->

    [*]   Set system time from RTC on startup and resume (rtc0)  RTC used to set the system time

    [*]   /sys/class/rtc/rtcN (sysfs)                                                                        
    [*]   /proc/driver/rtc (procfs for rtcN)                                                                  
    [*]   /dev/rtcN (character devices)      

    <*>   TI OMAP Real Time Clock

x 出现错误。请重试或与管理员联系。