Jump to content

Recommended Posts

Posted

I am unable to get any RTC installed on a C2 with current Armbian.  i2cdetect sees the device ID but no joy getting anything to talk to it.   Yes, I know these are very old but they were donated to a non-profit and I am trying to help set them up for a project.  Current Armbian runs great and perfect for our need.  I need an RTC.  I have tried both the Odroid PCF8563 (0x51 seen) and DS3231.  I have tried all the online blog posts, rebuilt the Device Tree, etc. but can't seem to get things to work.  Any pointers would be much appreciate.

 

LInux odroidc2 6.12.56-current-meson64 #1 SMP PREEMPT Wed. Oct 29 13:09:02 UTC 2025

 

Thanks,

 

Scott

Posted

Hi @Scott Ksander,

`i2cdetect` will just detect stuff on the I2C bus, you would not need a DT overlay for the device for that to work. For the kernel to detect the device and load the appropriate kernel module for it, you do have to make sure the device is known in the DT.

 

I'm not sure about your board, but for a PCF8523 (different RTC) my Nanopi Neo3 I had to add or adjust an existing user overlay to make the PFC known to the kernel. 

 

/dts-v1/;
/plugin/;

/ {
  compatible = "rockchip,rk3328";

  fragment@1 {
    target = <&i2c0>;
    __overlay__ {
        #address-cells = <1>;
        #size-cells = <0>;
        pcf8523@68 {
            compatible = "nxp,pcf8523";
            reg = <0x68>;
            status = "okay";
        };
    };
  };
};

&rk805 {
  rk808-rtc {
    status = "disabled";
  };
};

 

For a DS3231 I also had to add a user overlay that would tell the kernel that it can use the DS3232 driver for a DS3231 device. You most likely already found all the information on this already on the interwebs.

 

You will have to adjust the compatible entry to your board, you might even try without that line completely.

 

Add the file to `/boot/overlay-user/` and then compile and add to `armbianEnv.txt` using `armbian-add-overlay`.

 

Groetjes,

Posted

Some more info, I found a lot of DT entries for the PCF8563 in a recent codebase for some of the Amlogic SoCS, but not the C2. What is shown are:

  • HC4
  • M2

Perhaps you can check if those overlays are compatible with the C2 and experiment a bit?

Groetjes,

 

Posted

Hi @Scott Ksander,

Can you share on which I2C bus the RTC was detected? On my Nanopi Neo3 it was on i2c0, but I see in the meson DTs that RTC is on i2c2.

 

Perhaps you can start with a barebones overlay and add until it starts to work.

 

/dts-v1/;
/plugin/;

/ {
  fragment@1 {
    target = <&i2c2>;
    __overlay__ {
        #address-cells = <1>;
        #size-cells = <0>;
        pcf8563@51 {
            compatible = "nxp,pcf8563";
            reg = <0x51>;
            status = "okay";
        };
    };
  };
};

 

Groetjes,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines