Author Topic: Xilinx Zynq UltraScale+ no tty created after connecting a serial device  (Read 439 times)

simon2022

  • Active Member
  • *
  • Posts: 3
Hello,

I need to plug in a serial device in the USB Port. If I plugged in the device this is printed to the console:
Code: [Select]
[  386.203432] usb 1-1: new full-speed USB device number 2 using xhci-hcd
[  386.356199] usb 1-1: New USB device found, idVendor=0b6a, idProduct=7531, bcdDevice= 1.00
[  386.364373] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  386.371510] usb 1-1: Product: CDC DEVICE
[  386.375427] usb 1-1: Manufacturer: mbed.org
[  386.379601] usb 1-1: SerialNumber: 0123456789

But there is no tty created...

If i run
Code: [Select]
dmesg | grep tty* this is returned:
Code: [Select]
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    1.500264] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    3.379560] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 44, base_baud = 6249999) is a xuartps
[    3.389438] console [ttyPS0] enabled
[   12.339637] Marvell 88E1510 ff0e0000.ethernet-ffffffff:01: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=ff0e0000.ethernet-ffffffff:01, irq=POLL)
[   12.637759] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:00:25 UTC (25)

This is what I use:
  • TE0802-02-2AEU2-A
  • PetaLinux 2019.2
  • Vivado 2019.2

I used the .xsa which is generated by the Example downloaded from the trenz website: https://shop.trenz-electronic.de/de/TE0802-02-2AEV2-A-MPSoC-Development-Board-mit-Xilinx-Zynq-UltraScale-ZU2-und-LPDDR4?path=Trenz_Electronic/Development_Boards/TE0802/Reference_Design

With this .xsa I create a petalinux project. The only part I change in the project is the boot option because I want to boot from SD-Card (EXT)
At the end I build the project and copied image.ub and BOOT.BIN to the SD-Cards Boot Partition.

Why I can't access the serial device over a tty Port?
(With a Raspberry Pi the device works fine)

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1921
Hi,
maybe drivers are missing. You can't just compare RPI with Xilinx. With Xilinx you have to configure a lot yourself, because it is a configurable system.

And for USB2 only you must also change device tree:
https://wiki.trenz-electronic.de/display/PD/TE0820+Test+Board#TE0820TestBoard-DeviceTree

Petalinux default one is not always correct.
br
John

simon2022

  • Active Member
  • *
  • Posts: 3
Tank you for your response. (The comparison with the RPI should only show that the serial device is working.)

I already replaced the device tree in PetaLinux. For this I used the device tree from the example downloaded from the product website. But I will try it with the device trees from your link, because they look a little bit different.

maybe drivers are missing.

Can you tell me which drivers I need to add to the kernel? I have no idea which one I need. Is there a description or tutorial that you can recommend?

Kind regards,
Simon

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1921
Hi,
this depends on your usb dongle and Xilinx petalinux kernel version. Check manufacturer pages for drivers (needed for ARM processors) or check if some general one works. if nothing is available, than you must write your own one or modify similar drivers....
Check one time this:
https://ez.analog.com/linux-software-drivers/f/q-a/103258/enable-usb-serial-converter-driver/307133
it looks like they have done what you need.
br
John

simon2022

  • Active Member
  • *
  • Posts: 3
Thank you for your fast response. I added the missing driver and now it works. :)

In case anyone else has the same problem. I found the missing driver with the following steps:
  • Connect the serial device to the Raspberry Pi
  • Look in the dmesg of the RPI for the driver that is used for the device
  • add this driver to my PetaLinux Kernel
This are the steps that worked for me.

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1921
Glad to hear it works now and thanks for sharing the solution.
br
John