I am testing different RTC modules on RPi 4 running on Bullseye.

On testing DS3231, I add the module to /boot/config.txt


I can read the clock from it wihtout a problem. But when checking on the kernel log, why is it shown as ds1307?

[    9.280219] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    9.280653] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    9.281041] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[    9.281404] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[    9.281787] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[   10.398647] rtc-ds1307 1-0068: registered as rtc0
[   10.401252] rtc-ds1307 1-0068: setting system clock to 2022-05-10T07:21:12 UTC (1652167272)

The same happens when testing MCP7940 with the following configuration:

''' dtoverlay=i2c-rtc,mcp7940x


Like when testing ds3231, the kernel log shows ds1307 instead of mcp7940x. But RTC is not feeding time and not registered at boot time. When accessing the RTC time, it returns an error:

''' hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument' '''

Has anyone encountered the same problem?

  • Does it work? What is the problem?
    – Milliways
    Commented May 10, 2022 at 8:34
  • Well, ds3231 and ds1307 are cousins, sharing the same driver.
    – tlfong01
    Commented May 11, 2022 at 2:07

1 Answer 1


By convention kernel messages start with the name of the kernel module that is printing the message. In this case, kernel module (device driver) rtc-ds1307 is printing the RTC messages because module rtc-ds1307 is the device driver for the ds3231 RTC.

The two messages report that kernel module rtc-ds1307 has found and configured an RTC as rtc0 and set the system clock from it. The messages do not report the specific RTC hardware type that rtc-ds1307 found and configured.

The kernel message says it was able to read the RTC and set system time from it. To understand your Include the command and output that is

In Bullseye, this driver supports 18 different RTC chips: ds1307, ds1308, ds1337, ds1338, ds1339, ds1388, ds1340, ds1341, ds3231, m41t0, m41t00, m41t11, mcp7940x, mcp7941x, pt7c4338, rx8025, isl12057, and rx8130.

This driver, rtc-ds1307, was written in 2006 to provide a driver for ds1307 and "similar chips" that conformed to the "RTC framework" and to replace the existing ds1337 driver.

The kernel reports setting system date/time (by reading the RTC successfully). Please provide more information such as command and resulting output or your source code with the ioctl.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.