AnsweredAssumed Answered

How to modify dts file to use ZYNQ 2 UARTs at the same time?

Question asked by opticslee on Sep 17, 2015
Latest reply on Sep 17, 2015 by larsc

Hi all,

     I have the zynq Linux kernel (provided by ADI) run on my custom zed-board to receive RF signal via AD9361, where the "UART1" is the output serial port. However, I also hope to use "UART0" at the same time, whose pins are connected to the pins of MIO-14 and MIO-15 in my board. So I enabled "UART0" in the "XPS" and used the corresponded pins to config it. I also remove the sentence "status = "disabled";" from the block of "uart@e0000000{...}" in DTS file and swapped the position of  block "uart@e0001000{...}" and block "uart@e0000000{...}" to make the kernel use "ttyPS0" to match "UART1" in that file. This DTS file (devicetree.dts) is come from ADI and can be found in directory of "zynq-zed-adv7511-ad9361-fmcomms2-3" in the SD card.

    After that we can get the output message as followed:

.........

io scheduler cfq registered (default)

dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208

dma-pl330 f8003000.ps7-dma:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16

xuartps e0001000.uart: clock name 'aper_clk' is deprecated.

xuartps e0001000.uart: clock name 'ref_clk' is deprecated.

e0001000.uart: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3125000) is a xuartps

console [ttyPS0] enabled

bootconsole [earlycon0] disabled

xuartps e0000000.uart: clock name 'aper_clk' is deprecated.

xuartps e0000000.uart: clock name 'ref_clk' is deprecated.

e0000000.uart: ttyPS1 at MMIO 0xe0000000 (irq = 59, base_baud = 3125000) is a xuartps

xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e081c000

[drm] Initialized drm 1.1.0 20060810

drivers/gpu/drm/adi_axi_hdmi/axi_hdmi_drv.c:axi_hdmi_platform_probe[175]

platform 70e00000.axi_hdmi: Driver axi-hdmi requests probe deferral

.........  

    According that, suppose kernel found and config the "UART0" correctly, I can find the device node "ttyPS1" from directory of "/dev". However, I can't find UART0's interrupts from "proc/interrupts".

.........

root@analog:~# cat /proc/interrupts

           CPU0       CPU1      

29:      22743      25399       GIC  29  twd

35:          0          0       GIC  35  f800c000.ps7-ocm

39:         43          0       GIC  39  f8007100.xadc

40:          0          0       GIC  40  f8007000.devcfg

43:      24290          0       GIC  43  ttc_clockevent

45:          0          0       GIC  45  f8003000.ps7-dma

46:          0          0       GIC  46  f8003000.ps7-dma

47:          0          0       GIC  47  f8003000.ps7-dma

48:          0          0       GIC  48  f8003000.ps7-dma

49:          0          0       GIC  49  f8003000.ps7-dma

53:          0          0       GIC  53  ehci_hcd:usb1

54:          1          0       GIC  54  eth0

56:       8426          0       GIC  56  mmc0

58:       5480          0       GIC  58  e0006000.spi

72:          0          0       GIC  72  f8003000.ps7-dma

73:          0          0       GIC  73  f8003000.ps7-dma

74:          0          0       GIC  74  f8003000.ps7-dma

75:          0          0       GIC  75  f8003000.ps7-dma

81:          6          0       GIC  81  e0007000.spi

82:        283          0       GIC  82  xuartps

87:          1          0       GIC  87  41620000.i2c

88:          0          0       GIC  88  7c420000.dma

89:          0          0       GIC  89  7c400000.dma

90:         98          0       GIC  90  41600000.i2c

91:          0          0       GIC  91  xilinx-dma-controller

IPI1:          0          0  Timer broadcast interrupts

IPI2:       6396      10224  Rescheduling interrupts

IPI3:          0          0  Function call interrupts

IPI4:         52         34  Single function call interrupts

IPI5:          0          0  CPU stop interrupts

IPI6:          0          0  IRQ work interrupts

IPI7:          0          0  completion interrupts

Err:          0

root@analog:~# ^C

...................

    I don't know how to fix it. Has any one can help me or give me any tips??

 

 

Thanks a lot!

Regards,

Lee

Outcomes