I’m trying to bring up rtc-rv3028 clock on my board through device tree overlays. My board is LS1028a-rdb. I need to alias my clock as rtc2
The board device tree has the following aliases:
aliases {
crypto = &crypto;
serial0 = &duart0;
serial1 = &duart1;
mmc0 = &esdhc;
mmc1 = &esdhc1;
rtc1 = &ftm_alarm1;
};
My devicetree looks overlay looks as follows:
/dts-v1/;
/plugin/;
&aliases {
rtc2 = &rv3028;
};
&i2c0 {
rv3028: rtc@52 {
compatible = "microcrystal,rv3028";
reg = <0x52>;
/* trickle-resistor-ohms = <3000>; */
};
};
The problem is that the linux still registers my rtc as rtc1 not rtc2 dev.
I also added some dumps to of_alias_get_id function (drivers/of/base.c)
and it gives me the following output:
1.135016] OF: alias: serial
[ 1.135020] OF: alias: serial
[ 1.135022] OF: alias: mmc
[ 1.135025] OF: alias: mmc
[ 1.135028] OF: alias: rtc
As you can see there is only one rtc alias.
On the other hand when I check /proc/device-tree/aliases
there is and rtc2 alias pointing to my rtc…
Any idea what goes wrong here?