cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
trimble_pome
Visitor
Visitor
7,399 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
Reply
1 Solution

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

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 {

    };

};

 

View solution in original post

5 Replies
ibaie
Xilinx Employee
Xilinx Employee
7,345 Views
Registered: ‎10-06-2016

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
Reply
trimble_pome
Visitor
Visitor
7,328 Views
Registered: ‎11-24-2015

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
Reply
trimble_pome
Visitor
Visitor
12,157 Views
Registered: ‎11-24-2015

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 {

    };

};

 

View solution in original post

sylvain.ellisys
Observer
Observer
7,075 Views
Registered: ‎04-10-2015

Hello @ibaie,

 

Thanks for your message.

 

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

0 Kudos
Reply
ibaie
Xilinx Employee
Xilinx Employee
7,072 Views
Registered: ‎10-06-2016

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.