UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor trimble_pome
Visitor
6,486 Views
Registered: ‎11-24-2015

Petalinux v2017.1 device tree and serial ports

Jump to solution

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 ?

0 Kudos
1 Solution

Accepted Solutions
Visitor trimble_pome
Visitor
11,243 Views
Registered: ‎11-24-2015

Re: Petalinux v2017.1 device tree and serial ports

Jump to solution

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 {

    };

};

 

5 Replies
Moderator
Moderator
6,432 Views
Registered: ‎10-06-2016

Re: Petalinux v2017.1 device tree and serial ports

Jump to solution

Hi @trimble_pome

 

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.

 

 


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Visitor trimble_pome
Visitor
6,415 Views
Registered: ‎11-24-2015

Re: Petalinux v2017.1 device tree and serial ports

Jump to solution

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 ?

 

 

0 Kudos
Visitor trimble_pome
Visitor
11,244 Views
Registered: ‎11-24-2015

Re: Petalinux v2017.1 device tree and serial ports

Jump to solution

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 {

    };

};

 

6,162 Views
Registered: ‎04-10-2015

Re: Petalinux v2017.1 device tree and serial ports

Jump to solution

Hello @ibaie,

 

Thanks for your message.

 

Is Xilinx going to release a patch / fix to correct this problem ?

0 Kudos
Moderator
Moderator
6,159 Views
Registered: ‎10-06-2016

Re: Petalinux v2017.1 device tree and serial ports

Jump to solution

Hi @sylvain.ellisys

 

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.


Ibai
Don’t forget to reply, kudo, and accept as solution.