OBSOLETE: arm64/a64: Add support for Multiple UART Ports #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently only Port UART0 is supported for Allwinner A64. This PR adds support for all UART Ports: UART1 to UART4. (Except R-UART, which is a special low-power UART)
This is required for the upcoming LTE Modem Driver (Quectel EG25-G) for PINE64 PinePhone, which uses UART3. (Details here)
The code was adapted from the NuttX UART Driver for Allwinner A1X:
a1x_serial.c
Modified Files
arch/arm64/src/a64/a64_serial.c
: Added ports UART1 to UART4, based ona1x_serial.c
arch/arm64/src/a64/a64_serial.h
: Added IRQs for UART1 to UART4. Moved UART Base Addresses toa64_memorymap.h
arch/arm64/src/a64/hardware/a64_memorymap.h
: Added UART Base Addresses for UART0 to UART4arch/arm64/src/a64/Kconfig
: Added UART1 to UART4 to Allwinner A64 Peripheral Selection menuUpdated Documentation
Documentation/platforms/arm/a64/boards/pinephone/index.rst
: UART Driver now supports all UART PortsImpact
With this PR, Allwinner A64 will support UART1 to UART4. This is required for the upcoming LTE Modem Driver (Quectel EG25-G) for PINE64 PinePhone, which uses UART3. (Details here)
There is no impact to existing code, which uses only UART0.
Testing
We tested UART3 on PINE64 PinePhone. For Regression Testing, we tested UART0.
UART3 Test
We tested UART3 with the Build Configuration
pinephone:lvgl
tools/configure.sh pinephone:lvgl make menuconfig ## Enable Allwinner A64 > UART3
To activate serial comms on UART3, we started PinePhone's Quectel EG25-G LTE Modem in pinephone_bringup.c
(Explained here)
UART3 works correctly (for both runs) when we sent AT Commands for Phone Call and SMS:
Modem Test App (run twice): hello_main.c
(Explained here)
Modem Test Log
Regression Test
We tested UART0 with the Build Configuration
pinephone:nsh
UART0 works correctly as the Serial Console: