UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant imuguruza
Participant
104 Views
Registered: ‎03-22-2017

unable to set uartlite up

Jump to solution

Hi there,

 

I'm trying to use three UARTLITE ipcores in my Zynq7000-based board, but I'm not able to see the under /dev.

 

In Vivado, I have placed the IPCores and connect the interrupt to the PS interrupt port:

 

blck.png

 

uart.pngps.png

 

axi_addr.png

I have checked the address for adding it in the device tree.

I have configured the kernel to support UARTLITEs, having support for 3,and compiled the kernel.

Finally, I have added the next entries in the device tree:

 

uartlite_0@42C00000 {                                                                                                                               
        compatible = "xlnx,axi-uartlite-1.02.a";                                                                                                    
        status = "okay";                                                                                                                            
        reg = <0x42c00000 0x10000>;                                                                                                                 
        interrupt-parent = <0x4>;                                                                                                                 
        interrupts = <0 87 1>;                                                                                                                      
        clock = <0x5f5e100>;                                                                                                                        
};                                                                                                                                                  
                                                                                                                                                    
uartlite_1@42C10000 {                                                                                                                               
        compatible = "xlnx,axi-uartlite-1.02.a";                                                                                                    
        status = "okay";                                                                                                                            
        reg = <0x42c10000 0x10000>;                                                                                                                 
        interrupt-parent = <0x4>;                                                                                                                   
        interrupts = <0 87 1>;                                                                                                                
        clock = <0x5f5e100>;                                                                                                                        
};                                                                                                                                                  
                                                                                                                                                    
 uartlite_2@42C20000 {                                                                                                               
         compatible = "xlnx,axi-uartlite-1.02.a";                                                                                    
         status = "okay";                                                                                                            
         reg = <0x42c20000 0x10000>;                                                                                                 
         interrupt-parent = <0x4>;                                                                                                   
         interrupts = <0 87 1>;                                                                                                 
         clock = <0x5f5e100>;                                                                                                       }; 

In interrupt field I have added 87 as the ORed interrups are attached to the 4th position in the concatenate blok of the Block Design of Vivado and selected interrupt type 1, as the AXI UART Lite datasheet states that the interrupts are rising edge.

 

I'm not 100% sure if the interrupt assignment is correct...

 

 

Unfortunately, once I start the board, I don't see any traces of the UARTLITE IPCores, typing dmesg |grep uart:

 

dmesg |grep uart
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 27, base_baud = 3125000) is a xuartps
e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 28, base_baud = 3125000) is a xuartps

Does anybody knows which could be the reason why the Kernel is not taking them?

 

I'm using Vivado 2018.1 and Yocto to build the kernel

Thanks in advance,

 

imuguruza

0 Kudos
1 Solution

Accepted Solutions
Participant imuguruza
Participant
61 Views
Registered: ‎03-22-2017

Re: unable to set uartlite up

Jump to solution

Finally, I've got it. It was a DTB problem. I have found this page and followed the dtb suggested there.

 

The dtb looks like this, in case someone faces the same problem:

 

                serial@42C00000 {                         
                        compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a","xlnx,axi-uartlite-1.02.a";
                        reg = <0x42c00000 0x10000>;                                                                 
                        interrupt-parent = <0x4>;                                                                   
                        interrupts = <0x0 0x21 0x1>;                                                                
                        device_type = "serial";                                                                     
                        port-number = <0>;                                                                          
                        xlnx,baudrate = <0x1C200>;                                                                  
                        xlnx,data-bits = <0x8>;                                                                     
                        xlnx,odd-parity = <0x0>;                                                                    
                        xlnx,s-axi-aclk-freq-hz-d = <0x64>;                                                         
                        xlnx,use-parity = <0x0>;                                                                    
                };                                                                                                  
                                                                                                                    
                serial@42C10000 {                                                                                   
                        compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a","xlnx,axi-uartlite-1.02.a";
                        reg = <0x42c10000 0x10000>;                                                                 
                        interrupt-parent = <0x4>;                                                                   
                        interrupts = <0x0 0x22 0x4>;                                                                
                        current-speed = <115200>;                                                                   
                        device_type = "serial";                                                                     
                        port-number = <1>;                                                                          
                        xlnx,baudrate = <0xe1000>;                                                                  
                        xlnx,data-bits = <0x8>;                                                                     
                        xlnx,odd-parity = <0x0>;                                                                    
                        xlnx,s-axi-aclk-freq-hz-d = <0x64>;                                                         
                        xlnx,use-parity = <0x0>;                                                                    
                       } ;                                                                                          
                                                                                                                    
                                                                                                                    
                                                                                                                    
                serial@42C20000 {                          
                        compatible = "xlnx,axi-uartlite-2.0","xlnx,xps-uartlite-1.00.a", "xlnx,axi-uartlite-1.02.a";
                        reg = <0x42c20000 0x10000>;                                                                 
                        interrupt-parent = <0x4>;                                                                   
                        interrupts = <0x0 0x23 0x4>;                                                                
                        clock = <0x5f5e100>;                                                                        
                        clock-frequency = <100000000>;                         
                        current-speed = <115200>;       
                        device_type = "serial";           
                        port-number = <2>;           
                        xlnx,baudrate = <0xe1000>;       
                        xlnx,data-bits = <0x8>;         
                        xlnx,odd-parity = <0x0>;  
                        xlnx,s-axi-aclk-freq-hz-d = <0x64>;      
                        xlnx,use-parity = <0x0>;                             
                };                                

Now the TTYs are showing under /dev and dmesg:

 

$ dmesg |grep uart
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 27, base_baud = 3125000) is a xuartps
e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 28, base_baud = 3125000) is a xuartps
42c00000.serial: ttyUL0 at MMIO 0x42c00000 (irq = 63, base_baud = 0) is a uartlite
42c10000.serial: ttyUL1 at MMIO 0x42c10000 (irq = 55, base_baud = 0) is a uartlite
42c20000.serial: ttyUL2 at MMIO 0x42c20000 (irq = 64, base_baud = 0) is a uartlite
$ ls /dev/ |grep ttyUL
ttyUL0
ttyUL1
ttyUL2

imuguruza

0 Kudos
1 Reply
Participant imuguruza
Participant
62 Views
Registered: ‎03-22-2017

Re: unable to set uartlite up

Jump to solution

Finally, I've got it. It was a DTB problem. I have found this page and followed the dtb suggested there.

 

The dtb looks like this, in case someone faces the same problem:

 

                serial@42C00000 {                         
                        compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a","xlnx,axi-uartlite-1.02.a";
                        reg = <0x42c00000 0x10000>;                                                                 
                        interrupt-parent = <0x4>;                                                                   
                        interrupts = <0x0 0x21 0x1>;                                                                
                        device_type = "serial";                                                                     
                        port-number = <0>;                                                                          
                        xlnx,baudrate = <0x1C200>;                                                                  
                        xlnx,data-bits = <0x8>;                                                                     
                        xlnx,odd-parity = <0x0>;                                                                    
                        xlnx,s-axi-aclk-freq-hz-d = <0x64>;                                                         
                        xlnx,use-parity = <0x0>;                                                                    
                };                                                                                                  
                                                                                                                    
                serial@42C10000 {                                                                                   
                        compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a","xlnx,axi-uartlite-1.02.a";
                        reg = <0x42c10000 0x10000>;                                                                 
                        interrupt-parent = <0x4>;                                                                   
                        interrupts = <0x0 0x22 0x4>;                                                                
                        current-speed = <115200>;                                                                   
                        device_type = "serial";                                                                     
                        port-number = <1>;                                                                          
                        xlnx,baudrate = <0xe1000>;                                                                  
                        xlnx,data-bits = <0x8>;                                                                     
                        xlnx,odd-parity = <0x0>;                                                                    
                        xlnx,s-axi-aclk-freq-hz-d = <0x64>;                                                         
                        xlnx,use-parity = <0x0>;                                                                    
                       } ;                                                                                          
                                                                                                                    
                                                                                                                    
                                                                                                                    
                serial@42C20000 {                          
                        compatible = "xlnx,axi-uartlite-2.0","xlnx,xps-uartlite-1.00.a", "xlnx,axi-uartlite-1.02.a";
                        reg = <0x42c20000 0x10000>;                                                                 
                        interrupt-parent = <0x4>;                                                                   
                        interrupts = <0x0 0x23 0x4>;                                                                
                        clock = <0x5f5e100>;                                                                        
                        clock-frequency = <100000000>;                         
                        current-speed = <115200>;       
                        device_type = "serial";           
                        port-number = <2>;           
                        xlnx,baudrate = <0xe1000>;       
                        xlnx,data-bits = <0x8>;         
                        xlnx,odd-parity = <0x0>;  
                        xlnx,s-axi-aclk-freq-hz-d = <0x64>;      
                        xlnx,use-parity = <0x0>;                             
                };                                

Now the TTYs are showing under /dev and dmesg:

 

$ dmesg |grep uart
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 27, base_baud = 3125000) is a xuartps
e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 28, base_baud = 3125000) is a xuartps
42c00000.serial: ttyUL0 at MMIO 0x42c00000 (irq = 63, base_baud = 0) is a uartlite
42c10000.serial: ttyUL1 at MMIO 0x42c10000 (irq = 55, base_baud = 0) is a uartlite
42c20000.serial: ttyUL2 at MMIO 0x42c20000 (irq = 64, base_baud = 0) is a uartlite
$ ls /dev/ |grep ttyUL
ttyUL0
ttyUL1
ttyUL2

imuguruza

0 Kudos