I’m using LS1028a-rdb board which in its device tree defines the following aliases:
aliases: aliases {
crypto = &crypto;
serial0 = &duart0;
serial1 = &duart1;
mmc0 = &esdhc;
mmc1 = &esdhc1;
rtc1 = &ftm_alarm1;
};
I added my overlay which also adds one more alias to aliases node.
/dts-v1/;
/plugin/;
&aliases {
rtc2 = &rv3028;
};
&i2c0_mux {
rv3028: rtc@52 {
compatible = "microcrystal,rv3028";
reg = <0x52>;
/* trickle-resistor-ohms = <3000>; */
};
};
I added some prints to drivers/of/base.c
pr_err("adding DT alias:%s: stem=%s id=%i node=%pOFn",
ap->alias, ap->stem, ap->id, np);
Below is the output log from booting process:
[ 0.000000] OF: adding DT alias:serial0: stem=serial id=0 node=/soc/serial@21c0500
[ 0.000000] OF: adding DT alias:serial1: stem=serial id=1 node=/soc/serial@21c0600
[ 0.000000] OF: adding DT alias:mmc0: stem=mmc id=0 node=/soc/mmc@2140000
[ 0.000000] OF: adding DT alias:mmc1: stem=mmc id=1 node=/soc/mmc@2150000
[ 0.000000] OF: adding DT alias:rtc1: stem=rtc id=1 node=/soc/timer@2810000
As you can see there is nothing about rtc2 added in my overlay.
However things get more strange when I look at /proc/device-tree/aliases because there is the rtc2 entry with the following content:
/fragment@2/__overlay__/i2c@7/rtc@52
Why is that and how to fix it?