Zephyr UARTLITE Driver Support
This page gives an overview of the UARTLITE Zephyr driver which is available as part of the zephyr-amd repo.
HW Features
AXI UART Lite controller
Design Notes
N/A
Implementation
N/A
Features Supported
Missing Features
TBA
Known Issues
N/A
Limitations
N/A
Kernel Configuration
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Device Tree
The uartlite device tree node:
uart0: serial@40600000 { compatible = "xlnx,xps-uartlite-1.00.a"; reg = <0x40600000 0x1000>; interrupt-parent = <&axi_intc>; interrupts = <1 2>; clocks = <&clk100>; current-speed = <115200>; };
Lopper support to generate UARTLITE node is added.
Driver Stack Size
uart_xlnx_uartlite.c (polled) - 0.4 KB
uart_xlnx_uartlite.c (interrupt) - 1.8 KB
Test Platform
zcu102 board
Test SoC Architecture
Testing Sequence
Build zephyr application for the zcu102 board
west build -p -b <board> <sample application path>
Run zephyr elf on board
Example Tests
Test Name |
Example Source |
Description |
|---|---|---|
hello world |
samples/hello_world/ |
Prints “Hello World” on uart console |
uart_basic_api |
tests/drivers/uart/uart_basic_api/ |
Performs Ztest which verifies basic uart driver APIs. |
Code Coverage
With uart ztest, Code Coverage was 83%
Performance Metric
NA
Mainline Status
The preceding features are mainlined as of 01-Oct-2024
Driver Source Path
drivers/serial/uart_xlnx_uartlite.c
Misra C Report
Per coding guidelines of zephyr (subset of Misra-C)
File |
Required |
Advisory |
|---|---|---|
uart_xlnx_uartlite.c |
49 |
24 |
Detailed Breakup
misra-c rule
(zephyr guideline)
|
Severity |
Actual File
Violations
|
Kernel Utility
Violations
|
|---|---|---|---|
Dir 4.6 |
Advisory |
18 |
0 |
Dir 4.8 |
Advisory |
0 |
10 |
Dir 4.9 |
Advisory |
0 |
2 |
Rule 1.2 |
Advisory |
1 |
11 |
Rule 2.7 |
Advisory |
2 |
0 |
Rule 10.1 |
Required |
16 |
1 |
Rule 10.3 |
Required |
11 |
0 |
Rule 10.4 |
Required |
13 |
0 |
Rule 11.9 |
Required |
3 |
0 |
Rule 12.1 |
Advisory |
1 |
0 |
Rule 12.2 |
Required |
0 |
1 |
Rule 13.3 |
Advisory |
2 |
0 |
Rule 13.5 |
Required |
1 |
0 |
Rule 14.4 |
Required |
5 |
0 |
Rule 20.7 |
Required |
0 |
1 |
Rule 21.2 |
Required |
0 |
3 |
Total violations |
73 |
29 |