Hi, our custom board will use the on-board battery backed RTC on the LS1020a processor. In the meantime, I'm trying to use that (on-chip) RTC on the LS1021ATWR dev board. Eventually I would like to configure it as RTC0 and link it to hwclock. I can't seem to get my system to link the driver and the device (if the device is even recognized).
Can anyone help me configure Linux to use the on-chip LP RTC as RTC0?
Here is what I've done:
- I enabled the snvs_rtc in the config file (using menuconfig)
- I added data to the device tree files ls1021a.dtsi and ls1021atwr.dts
- Build, load, run
To ls1021a.dtsi I added the following node under "soc":
sec_mon: sec_mon@1e90000 {
compatible = "fsl,sec-v4.0-mon";
#address-cells = <1>;
#size_cells = <1>;
ranges = <0 0x01e90000 0x10000>;
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
snvs_rtc: snvc_rtc_lp@34 {
compatible = "fsl, sec-v4.0-mon-rtc-lp";
reg = <0x34 0x58>;
};
};
To ls1021atwr.dts I added the following node at the end of the file:
&svns_rtc {
status = "okay";
};
--------------------------------------------------------------------------------
Now, when I load and run, I see:
- /proc/device-tree/soc/sec_mon@1e90000/snvs_rtc_lp@34
- /sys/bus/platform/drivers/snvs_rtc (containing only bind, unbind, uevent)
- /sys/bus/platfrom/devices/sec_mon.3
- /sys/devices/soc.2/sec_mon.3
But, the driver doesn't seem to be bound to the device. I actually tried:
echo -n "sec_mon.3" > /sys/bus/platform/drivers/snvs_rtc/bind
but the OS returned "No such device"
Some things I think might be wrong:
- device tree configuration not correct - should I put it under soc, as I did?
- In some support posts for this RTC on the imx6 platform, there is some discussion of having to blow a fuse. Is that required on this chip?
Thanks in advance.