lupyuen opened a new pull request, #9243:
URL: https://github.com/apache/nuttx/pull/9243

   ## 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)](https://lupyuen.github.io/articles/lte2)
   
   The code was adapted from the NuttX UART Driver for Allwinner A1X: 
[`a1x_serial.c`](https://github.com/apache/nuttx/blob/master/arch/arm/src/a1x/a1x_serial.c)
   
   ### Modified Files
   
   `arch/arm64/src/a64/a64_serial.c`: Added ports UART1 to UART4, based on 
[`a1x_serial.c`](https://github.com/apache/nuttx/blob/master/arch/arm/src/a1x/a1x_serial.c)
   
   `arch/arm64/src/a64/a64_serial.h`: Added IRQs for UART1 to UART4. Moved UART 
Base Addresses to `a64_memorymap.h`
   
   `arch/arm64/src/a64/hardware/a64_memorymap.h`: Added UART Base Addresses for 
UART0 to UART4
   
   `arch/arm64/src/a64/Kconfig`: Added UART1 to UART4 to Allwinner A64 
Peripheral Selection menu
   
   ### Updated Documentation
   
   `Documentation/platforms/arm/a64/boards/pinephone/index.rst`: UART Driver 
now supports all UART Ports
   
   ## Impact
   
   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)](https://lupyuen.github.io/articles/lte2)
   
   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`
   
   ```bash
   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](https://github.com/lupyuen2/wip-pinephone-nuttx/blob/uart2/boards/arm64/a64/pinephone/src/pinephone_bringup.c#L208-L347)
   
   [(Explained here)](https://lupyuen.github.io/articles/lte#power-up-wth-nuttx)
   
   UART3 works correctly (for both runs) when we sent AT Commands for Phone 
Call and SMS:
   
   - Modem Test App (run twice): 
[hello_main.c](https://github.com/lupyuen2/wip-pinephone-nuttx-apps/blob/uart/examples/hello/hello_main.c)
   
     [(Explained 
here)](https://lupyuen.github.io/articles/lte2#outgoing-phone-call)
   
   - [Modem Test 
Log](https://gist.github.com/lupyuen/c6630b0a6e1616aada546143552fb113)
   
   ### Regression Test
   
   We tested UART0 with the Build Configuration `pinephone:nsh`
   
   ```bash
   tools/configure.sh pinephone:nsh
   ```
   
   UART0 works correctly as the Serial Console:
   
   - [Regression Test 
Log](https://gist.github.com/lupyuen/722e28f60d8311cccbd3031b0fe2c07f)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to