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.

AM4377: RTC not detected on startup

Part Number: AM4377

Hello,

I am working on a custom board using the AM4377, based on the IDK437x. I am using the SDK ti-processor-sdk-linux-rt-am437x-evm-08.02.00.24.

We have a RTC RV8803 installed on the bus I2C, at the address 0x65. When in u-boot, the chip can be detected:

=> i2c bus 0
Bus 0:  i2c@44e0b000  (active 0)
   65: cdce913@65, offset len 1, flags 0
   24: generic_24, offset len 1, flags 0

=> i2c dev 0
Setting bus to 0
=> i2c probe 0x65
Valid chip addresses:

In the DTB file of the kernel, the access to the chip is defined as:

&am43xx_pinmux {
	i2c0_pins_default: i2c0_pins_default {
		pinctrl-single,pins = <
			AM4372_IOPAD(0x988, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
			AM4372_IOPAD(0x98c, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_scl.i2c0_scl */
		>;
	};

	i2c0_pins_sleep: i2c0_pins_sleep {
		pinctrl-single,pins = <
			AM4372_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE7)
			AM4372_IOPAD(0x98c, PIN_INPUT_PULLDOWN | MUX_MODE7)
		>;
	};
(...)
};

&i2c0 {
	status = "okay";
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2c0_pins_default>;
	pinctrl-1 = <&i2c0_pins_sleep>;
	clock-frequency = <400000>;

	rv8803: rtc@65 {
		compatible = "microcrystal,rv8803";
		reg = <0x65>;
	};
(...)
};

I included the kernel driver for this RTC:

CONFIG_RTC_DRV_RV8803=m

I recompiled the driver and the dtb files and installed them on the custom platform.

But on start up, there is no trace about the RTC driver, nor any device /dev/rtc1 (/dev/rtc0 is defined as the internal rtc of the Sitara).

I tried to probe the i2c bus from the user space, but with inconclusive results:

root@am437x-evm:~# i2cdetect -y 0
Warning: Can't use SMBus Quick Write command, will skip some addresses
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:
10:
20:
30: -- -- 32 -- -- -- -- --
40:
50: 50 -- -- -- -- -- -- -- 58 -- -- -- -- -- -- --
60:
70:

My end goal is to have access to the RV8803 using /dev/rtc1. Do you have any clue what is missing on my system?

Thank you

Best regards,

Frederic.

  • Hello Frederic,

    Please keep in mind that on this forum, we can answer questions about TI hardware or TI software. We are not able to answer generic Linux questions about non-TI parts (i.e., "how to get this non-TI I2C device working with a Linux processor"). An example of a question we could support is "We think that the TI I2C peripheral or low-level driver has a bug, and this is why".

    If you are including the device in the devicetree, my next step would be to check the boot log to see if there is any mention of the RTC, and any helpful error codes.

    Regards,

    Nick