UART2 on A10 with debian Bullseye, maybe typo in sun41-a10-uart2.dts

Started by codezion, September 04, 2023, 01:47:44 PM

Previous topic - Next topic

codezion

sun41-a10-uart2.dts: serial2 = "/soc/serial@1c28800";
sun41-a10-uart3.dts: serial3 = "/soc@1c00000/serial@1c28c00";
sun41-a10-uart4.dts: serial4 = "/soc@1c00000/serial@1c29000";
..

Can not get uart2 working. Could it be that potentially missing @1c00000 in the overlay? I also neet to use CTS/RTS for uart2.

We have been using that hardware for years with older images, but now need to upgrade to the latest and our products are designed to use uart2 so can not use other uarts.

I used olinuxino-overlay for the configuration and disabled all but uart2.

Is the uart2 problem possible to fix so that it will come through apt or how can I try to make it myself if that is going to take long time?

LubOlimex

The good news is that the hardware pins required seem free. So there should be no hardware problem to use UART2's four data pins. The bad news is that it appears that the software is not perfected when it comes to UART2.

It seems there is some issue with the software related to UART2 indeed. It should probably have soc@1c00000 indeed. This is irrelevant, even if we change that it doesn't seem to work. I believe there is some bigger issue here. Since I can't open UART2 at all, I get some IRQ duplication error.

Looking at the overlay source, it doesn't seem that CTS and RTS are enabled at all, the overlay is here:

https://github.com/OLIMEX/olinuxino-overlays/blob/master/sun4i-a10/sun4i-a10-uart2.dts

As you can see only RX and TX are defined. Now as you figured out UART2 can have RTS and CTS and these can be enabled but you need to edit the overlay. Maybe use similar overlays as basis:

https://github.com/armbian/sunxi-DT-overlays/blob/master/sun7i-a20/sun7i-a20-uart3.dts

Not sure if everything required for CTS and RTS in u-boot is enabled (if there is any).

Now that I checked most of our boards only have data UART enabled in the software, even if the hardware allows for RTS and CTS.
Technical support and documentation manager at Olimex