05-09-2017 04:07 PM
I am in the process of upgrading from 16.4 to 17.1 petalinux. I think I have figured out the new system-user.dtsi change that broke all of my existing device trees, but have run into a problem I don't understand.
I have two UARTs one of which is console and the other being used as an aux port and is disabled under linux and is being controlled via my baremetal CPU #1. Under the config in 16.4 everything worked perfectly. Under 17.1 when I try to boot I get nothing. After examining the device tree I find:
/dts-v1/;
/include/ "zynq-7000.dtsi"
/include/ "pl.dtsi"
/include/ "pcw.dtsi"
/ {
chosen {
bootargs = "earlycon";
stdout-path = "serial0:115200n8";
};
aliases {
ethernet0 = &gem0;
serial0 = &uart1;
serial1 = &uart0;
serial2 = &axi_uartlite_0;
spi0 = &qspi;
spi1 = &spi0;
spi2 = &spi1;
};
The default of serial 0 is what I have chosen in the menuconfig and looks right. What appears to be happening is that serial 1 and serial 0 are being swapped by the new 17.1 set of aliases. Is there a switch I have inadvertently set somewhere that is causing this ? Why the heck is the new alias in the system-top.dts flipping my UARTS ? Is it safe to just switch UARTs in the menuconfig and kernel args ? I would like to just switch them back, but as this new file is auto generated, I think it will overwrite my changes. Suggestions ?
05-10-2017 09:22 AM
The following at the top of the system-user.dtsi correctly reassigns my UARTS
/include/ "system-conf.dtsi"
/ {
chosen {
bootargs = "earlycon";
stdout-path = "serial0:115200n8";
};
aliases {
ethernet0 = &gem0;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &axi_uartlite_0;
spi0 = &qspi;
spi1 = &spi0;
spi2 = &spi1;
};
memory {
device_type = "memory";
reg = <0x0 0x20000000>;
};
cpus {
};
};
05-10-2017 06:41 AM
It looks like there is something wrong with the serial port handling in 2017.1 as there are a couple of posts related to the serial ports malfunction. Regarding how to fix your particular issue, you always can edit the system-user.dtsi file within the meta-user layer and override again the aliases just to fit your requirements.
05-10-2017 09:03 AM
I have tried several overrides in the system-user.dtsi file. For me, this results in either a syntax error or when I actually produce text the dtc will accept, a check of the compiled results with a dtc decompile shows the fix is not in place.
Would it be possible to provide a small sample code segment for a system-user.dtsi that correctly accomplishes the reassignment of the UART aliases ?
05-10-2017 09:22 AM
The following at the top of the system-user.dtsi correctly reassigns my UARTS
/include/ "system-conf.dtsi"
/ {
chosen {
bootargs = "earlycon";
stdout-path = "serial0:115200n8";
};
aliases {
ethernet0 = &gem0;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &axi_uartlite_0;
spi0 = &qspi;
spi1 = &spi0;
spi2 = &spi1;
};
memory {
device_type = "memory";
reg = <0x0 0x20000000>;
};
cpus {
};
};
05-17-2017 07:01 AM
Hello @ibaie,
Thanks for your message.
Is Xilinx going to release a patch / fix to correct this problem ?
05-17-2017 07:05 AM
Yes, the issue has been identified and the fix is going to be released in 2017.2 version. Hope we can address all the use cases and fix your issues.