I’m trying to apply an rtc overlay to raspberry pi to connect a Real time clock, the device is connected and I can add the device in pi
echo rv3028 0x52 |tee /sys/class/i2c-adapter/i2c-1/new_device
However, when I try to do this via overlays, this does not do anything
hardware.deviceTree.overlays = [
{
name = "rtc-i2c";
dtsText = ''
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@0 {
target = <&i2cbus>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
rv3028@52 {
compatible = "microcrystal,rv3028";
reg = <0x52>;
};
};
};
fragment@1 {
target = <&i2c_arm>;
i2cbus: __overlay__ {
status = "okay";
};
};
};'';
}
];
I’ve other overlays that gets loaded and activated, which believes me to think, either my overlay is bad or i2c overlays are somehow special since I’m also using
hardware.raspberry-pi."4".i2c1.enable = true;
Any idea whats going on here?
Debugging I’ve done
Verified that the overlay gets compiled in, with dtc
$ dtc /run/current-system/dtbs/broadcom/bcm2711-rpi-4-b.dtb
...
rv3028@52 {
compatible = "microcrystal,rv3028";
reg = <0x52>;
};
};
...