I have an embedded Linux distribution (Boot2Qt) compiled using Yocto for an apalis iMX8QP processor running on an ixora carrier board, and it’s working great. Now, I would like to replace the current DS1307 RTC on my carrier board with an RV-8803-C7 RTC (the hardware is kind of junky but for testing purposes it will be fine). Could anyone please guide me on the steps I need to follow to accomplish this?
Specifically, I would like to know how to configure Yocto to include support for the RV-8803-C7 RTC, including creating or adding the necessary recipe (I already have a custom meta-layer), configuring kernel options, and any other relevant details. I appreciate any advice, recommendations, or documentation references that can help me in this process.
Thank you in advance for your support!
(edit)
Please correct me if I am wrong.
I have added a rtc.cfg file in recipes-kernel/linux and in reciped-kernel/linux%.bbappend I have added
So, after a lot of research, I finally managed to do something.
Here is the patch I had to create:
diff --git a/imx8-apalis-eval.dtsi b/imx8-apalis-eval_new.dtsi
index 0a4fe3898993..4cf48567d0e6 100644
--- a/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi
@@ -210,10 +210,10 @@
status = "disabled";
};
- /* M41T0M6 real time clock on carrier board */
- rtc_i2c: rtc@68 {
- compatible = "st,m41t0";
- reg = <0x68>;
+ /* RV-8803 real time clock on carrier board */
+ rtc_i2c: rtc@32 {
+ compatible = "microcrystal,rv8803";
+ reg = <0x32>;
};
};
I still have some warning in dmesg though:
[ 2.506157] rtc-rv8803 4-0032: Voltage low, temperature compensation stopped.
[ 2.513320] rtc-rv8803 4-0032: Voltage low, data loss detected.
[ 2.519999] rtc-rv8803 4-0032: Voltage low, data is invalid.
[ 2.525791] rtc-rv8803 4-0032: registered as rtc0
[ 3.767131] rtc-rv8803 4-0032: Voltage low, data is invalid.
[ 3.781584] rtc-rv8803 4-0032: hctosys: unable to read the hardware clock
Hello @Romain.Donze ,
I have no experience with RV-8803-C7, but here are my quick research findings.
These warnings seem to be related to the V2F flag being set
Here is the source code of the driver
For example:
if (flags & RV8803_FLAG_V1F)
dev_warn(&client->dev, "Voltage low, temperature compensation stopped.\n");
Looking for references to V1F in the application manual
Section 3.7 describes the flag register where V1F is located, and it says: The flag is also automatically set to 1 at power on reset (POR) and has to be cleared by writing a 0 to the bit.
This happens when the function rv8803_set_time is called.