Dear Team,
In our custom board based on rzg2l RTC is not updating as it does not produce 32768 khz which it is supposed to do. It sets time but not updating. But in the development board we found that there is clock and it is updating. We are using the same pmic raa215300 but in the custom board is on/off version pmic ie, RAA215300A2GNP#HA1 and in evaluation module RAA215300A2GNP#HA0 Long Push button type. These are bascally same pmic other than on/off vs long push button. it is connected to i2c3 as shown in below.
&i2c3 { pinctrl-0 = <&i2c3_pins>; pinctrl-names = "default"; clock-frequency = <400000>; status = "okay"; pmic: raa215300@12 { compatible = "renesas,raa215300"; reg = <0x12>; rtc-enable; }; rtc: isl1208@6f { compatible = "isil,isl1208"; reg = <0x6f>; external-oscillator; }; };
why clock is updating in evaluation module but not in custom board? Please help
So same configuration as evk? Identical i2c configuration?
Try:
dmesg | grep -ri rtc
i2cdetect -y 3
timedatectl
hwclock -w -v
Already done it but the rtc sets time but it is not updating. Please look at below.
But in evaluation board it is updating. Why the time is not updating in custom board?
In your case RTCF is set.
REAL TIME CLOCK FAIL BIT (RTCF)This bit is set to a “1” after a total power failure. This is a readonly bit that is set by hardware (ISL1208 internally) when thedevice powers up after having lost all power to the device (bothVDD and VBAT go to 0V). The bit is set regardless of whetherVDD or VBAT is applied first. The loss of only one of thesupplies does not set the RTCF bit to “1”. On power-up after atotal power failure, all registers are set to their default statesand the clock will not increment until at least one byte is writtento the clock register. The first valid write to the RTC sectionafter a complete power failure resets the RTCF bit to “0”(writing one byte is sufficient).
rtc_time : 12:18:54rtc_date : 2023-09-22alrm_time : 00:00:00alrm_date : 2023-09-23alarm_IRQ : noalrm_pending : noupdate IRQ enabled : noperiodic IRQ enabled : noperiodic IRQ frequency : 1max user IRQ frequency : 6424hr : yesstatus_reg : XTOSCB (0x40)batt_status : okaydigital_trim : 0 ppmanalog_trim : 12.50 pFuser_data : 0x0000
Thanks for your reply
I applied the setting as you told me and it is not updating the clock . Following is the image of rtc after applying the settings as you told me. The 0x41 is not changing to 0x40.
Also below is the schematic of our pmic setup in our board.
ADRD-P042-SOM-RZ_G2LSomB-PMIC.pdf
Unbind RTC:
echo -n "3-006f" > /sys/bus/i2c/drivers/rtc-isl1208/unbind
Get SR:
i2cget -y 3 0x6f 0x7
Set one of the clock registers:
i2cset -y 3 0x6f 0x6 0
Get SR again:
Hello Eldhose,Did you resolve your issue? Is there anything else to assist you? Would you like to verify the suggested answer if it was resolved? Kind Regards.
Hi,
We got the rtc but it is slow? Can you please explain how can I do analog trimming?