Jump to content

RockPI 4 RK3399 Failed to register i2c client ds1307 at 0x68 (-16)


Recommended Posts

Posted (edited)

I am struggling to make an external RTC work. "i2cdetect -y 7" reports that RTC at address 68 is alive. 

I have added in the  following lines:

 

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-7/new_device
hwclock -f /dev/rtc -s

 

Could be a possible reason that hwclock is already linked with internal RTC? Is it possible that DS1307 is not recognised? If I do "modprobe ds-1307" I got the answer:

"modprobe: FATAL: Module rtc-ds1307 not found in directory /lib/modules/5.3.11-rockchip64"

 

Could this be the reason? The driver for ds-1307 doesn't exist? How can I get it?
 

P.S. :

 

The OS is  Armbian Buster with Linux 5.3.11-rockchip64
 

Before getting the /dev/i2c-7 I had to modify /boot/armbianEnv.txt and add:

 

overlays=spi-spidev i2c7
param_spidev_spi_bus=1
 

I had tested both I2C7 and SPI1.0 works as expected.

Edited by Marko Buršič
added post scriptum
Posted
39 minutes ago, Marko Buršič said:

"modprobe: FATAL: Module rtc-ds1307 not found in directory /lib/modules/5.3.11-rockchip64"

Rockchip64 kernel config doesn't enable DS1307 currently. You can confirm with "grep DS13 /boot/config*".

Feel free to do custom build with this enabled, and if working correctly, submit PR for future builds...

Posted

"grep DS13 /boot/config" as well "grep DS1307 /boot/config" as well "grep ds1307 /boot/config" gives "No such file or directory".

 

Also there is no config file in the directory /boot, rather /boot/config-5.3.11-rockchip64.

 

# I2C RTC drivers
#
# CONFIG_RTC_DRV_ABB5ZES3 is not set
# CONFIG_RTC_DRV_ABEOZ9 is not set
# CONFIG_RTC_DRV_ABX80X is not set
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_HYM8563 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
CONFIG_RTC_DRV_MAX77686=y
CONFIG_RTC_DRV_RK808=y
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
CONFIG_RTC_DRV_ISL12026=m
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF85063 is not set
# CONFIG_RTC_DRV_PCF85363 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BD70528 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8010 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
CONFIG_RTC_DRV_RV3028=m
# CONFIG_RTC_DRV_RV8803 is not set
CONFIG_RTC_DRV_S5M=y
CONFIG_RTC_DRV_SD3078=m
 

changed to

 

# I2C RTC drivers
#
# CONFIG_RTC_DRV_ABB5ZES3 is not set
# CONFIG_RTC_DRV_ABEOZ9 is not set
# CONFIG_RTC_DRV_ABX80X is not set
 CONFIG_RTC_DRV_DS1307=y
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_HYM8563 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_MAX77686=y
CONFIG_RTC_DRV_RK808=y
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
CONFIG_RTC_DRV_ISL12026=m
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF85063 is not set
# CONFIG_RTC_DRV_PCF85363 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BD70528 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8010 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
CONFIG_RTC_DRV_RV3028=m
# CONFIG_RTC_DRV_RV8803 is not set
CONFIG_RTC_DRV_S5M=y
CONFIG_RTC_DRV_SD3078=m
 

 

but no change.

Posted
25 minutes ago, Marko Buršič said:

"grep ds1307 /boot/config"

That is because you didn't put the star * on "/boot/config*"

So, if you change do custom build with those change and get it tested, you can submit a PullRequest ...

Posted
5 hours ago, martinayotte said:

That is because you didn't put the star * on "/boot/config*"

grep DS13 /boot/config*
CONFIG_RTC_DRV_DS1307=y
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1302 is not set
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1343 is not set
# CONFIG_RTC_DRV_DS1347 is not set
# CONFIG_RTC_DRV_DS1390 is not set
 

Sorry, I didn't see the star, this is the result after I have changed the conifg_xxxx file. 

 

 

5 hours ago, martinayotte said:

So, if you change do custom build with those change and get it tested, you can submit a PullRequest ...

 

You mean I have to build a kernel on my own?

Posted
1 hour ago, Marko Buršič said:

but it doesn't show the interactive window

As said in the issue, this is because "dialog" tool is missing. Install it using "apt-get install dialog" ...

Posted
5 hours ago, martinayotte said:

As said in the issue, this is because "dialog" tool is missing. Install it using "apt-get install dialog" ...

Yes, it works now. I had to "apt-get update" before doing "apt-get install dialog".  Perhaps I am going to make it, we'll see. 

Thank you  for your help, I don't know how would I find this missing step by myself, really helpful.

Posted

I ran out of disk error. I did the "vagrant plugin install vagrant-disksize", as mentione in the tutotial, but nowhere is mentioned that you also have to edit file Vargantfile and add:

 

config.disksize.size = '25GB' 

 

I put 25GB as minimal requirement from tutorial, we'll see, it seems consuming lots of CPU and memory to build this OS.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines