Anyone using the RTC Shield under the 5.3.x kernel?

Post Reply
User avatar
graysky
Posts: 143
Joined: Wed Jul 13, 2016 9:11 am
languages_spoken: english
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Anyone using the RTC Shield under the 5.3.x kernel?

Unread post by graysky » Sat Nov 09, 2019 5:15 pm

Anyone using the RTC Shield under the 5.3.x kernel? I do not see a configuration option for the needed module CONFIG_I2C_AML ...

joerg
Posts: 906
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 6 times
Been thanked: 21 times
Contact:

Re: Anyone using the RTC Shield under the 5.3.x kernel?

Unread post by joerg » Sat Nov 09, 2019 11:21 pm

I think on mainstream kernel you need to enable CONFIG_I2C_MESON=y. The one you refered to is from amlogic kernel.

User avatar
graysky
Posts: 143
Joined: Wed Jul 13, 2016 9:11 am
languages_spoken: english
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Anyone using the RTC Shield under the 5.3.x kernel?

Unread post by graysky » Sun Nov 10, 2019 1:07 am

@joerg - My kernel was compiled with that option enabled (not module). The dtb file is not provided by the kernel package since I am using 5.3.8 (aarch64) so I copied it from the linux-odroid-c2 kernel package. Interestingly, the fdtput command seems to complete without error:

Code: Select all

# modprobe rtc_pcf8563
# fdtput -t s /boot/dtbs/meson64_odroidc2.dtb /i2c@c1108500/pcf8563@51 status "okay"
# echo $?
0
Yet, hwclock fails to see the shield:

Code: Select all

# hwclock -s --verbose
hwclock from util-linux 2.34
System Time: 1573315508.601594
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

% lsmod | grep rtc
rtc_pcf8563            24576  0

% ls /dev/rtc*
zsh: no matches found: /dev/rtc*
Any thoughts are welcomed.

joerg
Posts: 906
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2
Location: Germany
Has thanked: 6 times
Been thanked: 21 times
Contact:

Re: Anyone using the RTC Shield under the 5.3.x kernel?

Unread post by joerg » Sun Nov 10, 2019 4:08 am

Have you tried to edit the dts directly like this?

Code: Select all

&i2c_A {
	status = "okay";
	pinctrl-0 = <&i2c_a_pins>;
	pinctrl-names = "default";
	pcf8563@51 {
		compatible = "nxp,pcf8563";
		reg = <0x51>;
		status = "okay";
	};
};
And do you have the /dev/i2c-0?
You could also install the i2c tools to scan with i2cdetect, if the 51 is there.

Oh, and I wonder which dtb you are using. I used so far the meson-gxbb-odroidc2 that comes with the mainline kernel.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 6 guests