1 Reply Latest reply on Jul 17, 2020 11:59 AM by oleb0n

    Ultrazed (Petalinux 2018.2) does not boot with UART lite device as primary stdin/stdout console

    gatsuk86

      Hi,

       

      I am trying to use an external UART device as primary stdin/stdout console.

       

                         │ │                ( ) psu_uart_0                     │ │ 
                         │ │                ( ) axi_uart16550_0                │ │ 
                         │ │                (X) axi_uartlite_0                 │ │ 
                         │ │                ( ) manual      │ │

       

      If psu_uart_0 is selected as primary stdin/stdout consol, system boots from SD, eMMC... and I can interact throught serial console. When Linux Boots, the external UARTs are available:

       

       

      If the axi_uart16550_0 or axi_uartlite_0 devices is selected, Linux does not boot (even bitfile is not loaded).

       

          System: Avnet UltraZed-EG in IOCC board. Xilinx Zynq® UltraScale+™ MPSoC

          Petalinux version: 2012.2

          Vivado version: 2018.2

      I am doing anything wrong? I attach in this thread all the info I consider may be useful. If you need additional info please let me know.

      Is there any related issue with Petalinux?

       

      Thanks!

       

      The block design is:

       

       

       

       

      pl.dtsi:

       

       

          / {

              amba_pl: amba_pl@0 {

                  #address-cells = <2>;

                  #size-cells = <2>;

                  compatible = "simple-bus";

                  ranges ;

                  axi_dma_0: dma@80000000 {

                      #dma-cells = <1>;

                      clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";

                      clocks = <&clk 71>, <&clk 71>, <&clk 71>, <&clk 71>;

                      compatible = "xlnx,axi-dma-1.00.a";

                      interrupt-names = "mm2s_introut", "s2mm_introut";

                      interrupt-parent = <&gic>;

                      interrupts = <0 89 4 0 90 4>;

                      reg = <0x0 0x80000000 0x0 0x1000>;

                      xlnx,addrwidth = <0x20>;

                      xlnx,include-sg ;

                      xlnx,sg-length-width = <0x17>;

                      dma-channel@80000000 {

                          compatible = "xlnx,axi-dma-mm2s-channel";

                          dma-channels = <0x1>;

                          interrupts = <0 89 4>;

                          xlnx,datawidth = <0x20>;

                          xlnx,device-id = <0x0>;

                      };

                      dma-channel@80000030 {

                          compatible = "xlnx,axi-dma-s2mm-channel";

                          dma-channels = <0x1>;

                          interrupts = <0 90 4>;

                          xlnx,datawidth = <0x20>;

                          xlnx,device-id = <0x0>;

                      };

                  };

                  axi_uart16550_0: serial@80020000 {

                      clock-frequency = <99999000>;

                      clock-names = "s_axi_aclk";

                      clocks = <&clk 71>;

                      compatible = "xlnx,xps-uart16550-2.00.a", "ns16550a";

                      current-speed = <115200>;

                      device_type = "serial";

                      interrupt-names = "ip2intc_irpt";

                      interrupt-parent = <&gic>;

                      interrupts = <0 92 4>;

                      port-number = <1>;

                      reg = <0x0 0x80020000 0x0 0x10000>;

                      reg-offset = <0x1000>;

                      reg-shift = <2>;

                      xlnx,external-xin-clk-hz = <0x17d7840>;

                      xlnx,external-xin-clk-hz-d = <0x19>;

                      xlnx,has-external-rclk = <0x0>;

                      xlnx,has-external-xin = <0x0>;

                      xlnx,is-a-16550 = <0x1>;

                      xlnx,s-axi-aclk-freq-hz-d = "99.999";

                      xlnx,use-modem-ports = <0x1>;

                      xlnx,use-user-ports = <0x1>;

                  };

                  axi_uartlite_0: serial@80001000 {

                      clock-names = "s_axi_aclk";

                      clocks = <&clk 71>;

                      compatible = "xlnx,xps-uartlite-1.00.a";

                      current-speed = <115200>;

                      device_type = "serial";

                      interrupt-names = "interrupt";

                      interrupt-parent = <&gic>;

                      interrupts = <0 91 1>;

                      port-number = <0>;

                      reg = <0x0 0x80001000 0x0 0x1000>;

                      xlnx,baudrate = <0x1c200>;

                      xlnx,data-bits = <0x8>;

                      xlnx,odd-parity = <0x0>;

                      xlnx,s-axi-aclk-freq-hz-d = "99.999";

                      xlnx,use-parity = <0x0>;

                  };

                  psu_ctrl_ipi: PERIPHERAL@ff380000 {

                      compatible = "xlnx,PERIPHERAL-1.0";

                      reg = <0x0 0xff380000 0x0 0x80000>;

                  };

                  psu_message_buffers: PERIPHERAL@ff990000 {

                      compatible = "xlnx,PERIPHERAL-1.0";

                      reg = <0x0 0xff990000 0x0 0x10000>;

                  };

                  M00_AXI_ps: M00_AXI_ps@80010000 {

                      reg = <0x0 0x80010000 0x0 0x10000>;

                  };

              };

          };

       

      system-top.dtsi

       

          /dts-v1/;

          /include/ "zynqmp.dtsi"

          /include/ "zynqmp-clk-ccf.dtsi"

          /include/ "pl.dtsi"

          /include/ "pcw.dtsi"

          / {

              chosen {

                  bootargs = "earlycon clk_ignore_unused";

                  stdout-path = "serial0:115200n8";

              };

              aliases {

                  ethernet0 = &gem3;

                  i2c0 = &i2c1;

                  serial0 = &axi_uartlite_0;

                  serial1 = &axi_uart16550_0;

                  serial2 = &uart0;

                  spi0 = &qspi;

              };

              memory {

                  device_type = "memory";

                  reg = <0x0 0x0 0x0 0x7ff00000>;

              };

          };

          #include "system-user.dtsi"

       

      platform-auto.h

       

          /* uartlite - axi_uartlite_0 */

          #define XILINX_UARTLITE_BASEADDR    0x80001000

          #define CONFIG_BAUDRATE    115200

          #define TTYUL0    "ttyUL0=setenv stdout ttyUL0;setenv stdin ttyUL0\0"

          #define SERIAL_MULTI    "serial=setenv stdout serial;setenv stdin serial\0" "stdin=ttyUL0\0" "stdout=ttyUL0\0"

          #define CONSOLE_ARG "console=console=ttyUL0,115200\0"

          #define SERIAL_MULTI    "serial=setenv stdout serial;setenv stdin serial\0" "stdin=ttyUL0\0" "stdout=ttyUL0\0"

          #define CONSOLE_ARG "console=console=ttyUL0,115200\0"

         

              *

              *

              *

             

          /* Extra U-Boot Env settings */

          #define CONFIG_EXTRA_ENV_SETTINGS \

              SERIAL_MULTI \

              CONSOLE_ARG \

              DFU_ALT_INFO_RAM \

              DFU_ALT_INFO_MMC \

              TTYUL0 \

             

              *

              *

              *