I have done some tweaking of Gigaset SX763 router (Lantiq-Danube) and discovered RX,TX pads for 2nd UART on the PCB (AFAIK nobody so far has been using both UARTs on this router in OpenWrt ).
I changed .dts file to enable both UARTs, I have checked that pinmux is set correctly, both UARTs are initialised on boot:
[ 9.584000] 1e100400.serial: ttyLTQ1 at MMIO 0x1e100400 (irq = 104) is a lantiq,asc
[ 9.596000] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112) is a lantiq,asc
Now, what happens when I try to use ttyLTQ1 is rather strange :
Sending characters (TX) on this 2nd port WORKS OK (checked it on all speeds up to 115200), but I get no characters on RX .
I'm pretty convinced that everything in hardware is ok, I even hardcoded in pinctrl init function the input/output settings for these two RX/TX pins (GPIO 11 and 12) to be 100% sure that the direction is set appropriately. Earlier I tried to test the input pin by exporting this RX pin as GPIO11, and it worked as the GPIO input flawlessly).
Another strange thing is , although it appears that initialisation has passed ok, there are no IRQs associated with asc driver for 2nd UART:
cat /proc/interrupts shows this :
104: 202 icu
105: 400 icu
106: 48 icu
112: 837 icu asc_tx
113: 332 icu asc_rx
114: 0 icu asc_err
So, for the 1st (default) UART (ttyLTQ0), everything is ok, IRQs 112,113,114 are used and the asc error IRQ count is 0
But, for 2nd UART which uses IRQs 104.105.106, nothing is listed in the third row, and there is a strange count of error-IRQs , 48 and it grows as it receives data
I studied a bit /drivers/tty/serial/lantiq.c code, even added some printk-s to figure out what happens during RX. I've found out that the function lqasc_rx_chars NEVER gets called when chars arrive on ttyLTQ1. And RX IRQ count in /proc/interrupts grows, so UART is obviously receiving chars, but it apears that the driver is not associated with IRQ. The error IRQs are probably caused by RX buffer overflow in the UART, since it never gets read.
Any ideas what to look for ? I'm not very familiar with kernel IRQ handling and association with the drivers, I'm hoping some kernel expert here could give a brief answer where to search .
(Last edited by kila on 10 Dec 2016, 17:42)