Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: TimB on March 18, 2014, 05:43:22 PM

Title: Enabling second uart on TE0720
Post by: TimB on March 18, 2014, 05:43:22 PM
Hi,

from our previous experience of using Zynqs, we assumed the presence of 2 uarts.  In the past we have enabled the second uart by editing the device tree and adding a second uart entry virtually identical to the existing uart entry, but using address e0001000 instead of e0000000.

However, adding this definition on our Trenz builds causes the boot to fail.

Can you explain how the second uart should be enabled?

Thanks, Tim
Title: Re: Enabling second uart on TE0720
Post by: Oleksandr Kiyenko on March 18, 2014, 05:47:04 PM
Hi Tim,

With controller base address you should also change interrupt definition.
You can found correct definition for UART in dts files for other zynq boards.

Best regards
Oleksandr Kiyenko
Title: Re: Enabling second uart on TE0720
Post by: TimB on March 18, 2014, 05:57:41 PM
Yes, we are aware we also need to change the interrupt address, and we have used settings that work on other Zynq boards, but I was hoping that Trenz might be able to provide details of something that definitively works on Trenz boards
Title: Re: Enabling second uart on TE0720
Post by: Oleksandr Kiyenko on March 19, 2014, 08:14:14 AM
Hi,

DTS for 2 UARTs should be something like that

        ps7_uart_0@e0000000 {
            compatible = "xlnx,ps7-uart-1.00.a";
            reg = <0xe0000000 0x1000>;
            interrupts = <0 27 4>;
            interrupt-parent = <&gic>;
            clock = <50000000>;
        };
        ps7_uart_1: serial@e0001000 {
            compatible = "xlnx,ps7-uart-1.00.a";
            reg = < 0xe0001000 0x1000 >;
            interrupts = < 0 50 4 >;
            interrupt-parent = <&gic>;
            clock = <50000000>;
        } ;

Best regards
Oleksandr Kiyenko
Title: Re: Enabling second uart on TE0720
Post by: TimB on March 19, 2014, 10:32:32 AM
The uart definitions I am using are equivalent to those, so I don't think that is where the problem lies for us.   When I use the additional uart definition, the boot hangs just after the `Starting kernel..' message. 

               uart@e0001000 {
         compatible = "xlnx,ps7-uart-1.00.a";
         reg = <0xe0001000 0x1000>;
         interrupts = < 0x0 0x32 0x4 >;
         interrupt-parent = <0x1>;
         clock = <0x2faf080>;
      };         

      uart@e0000000 {
         compatible = "xlnx,ps7-uart-1.00.a";
         reg = <0xe0000000 0x1000>;
         interrupts = <0x0 0x1b 0x4>;
         interrupt-parent = <0x1>;
         clock = <0x2faf080>;
      };
Title: Re: Enabling second uart on TE0720
Post by: TimB on March 19, 2014, 11:32:24 AM
It seems like the order of the uart definition is important, I have managed to bring the second uart up by defining e0000000 first and e00010000 second..

thanks for your help,

Tim