I am trying to attached a console to the second serial port ttyS1. The second serial port will be used by another device, a touch panel, to configure and monitor the router. This what I've done so far:

1. I've enabled  uart@500 in the device tree and rearranged the device tree so that uart@500 preceeds uart@c00. I've also added pinctrls for uartf

    uart@500 {
            status = "okay";

            pinctrl-names = "default";
            pinctrl-0 = <&uartf_pins>;
        };

2. I've configured the console for MT7620

CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_RT288X=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_8250_RALINK=y
#
#Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y

3. bootargs

console=ttyS0,57600n8 console=ttyS1,57600n8 rootfstype=squashfs,jffs2

4. inittab

root@OpenWrt:/# cat /etc/inittab 
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
::askconsole:/bin/ash --login
ttyS1::askfirst:/bin/sh
::restart:init

I am basically trying to figure out how to get this kernel log message for ttyS1. it appears to be a simple linux configuration to get it to work, without much driver support, apparently not. As far as I can tell, everything points to the fact that it is configuredAny insight will be greatly appreciated.

console [ttyS1] enabled   #this is what I hope to get if its configured and working right
root@OpenWrt:/# dmesg | grep ttyS
[    0.000000] Kernel command line: console=ttyS0,57600n8 console=ttyS1,57600n8 rootfstype=squashfs,jffs2
[    0.710000] console [ttyS0] disabled
[    0.720000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    1.440000] console [ttyS0] enabled
[    1.460000] 10000500.uart: ttyS1 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a 16550A
root@OpenWrt:/# 

ps

root@OpenWrt:/# ps
  PID USER       VSZ STAT COMMAND
    1 root      1572 S    /sbin/procd
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [kworker/0:0]
    5 root         0 SW<  [kworker/0:0H]
    6 root         0 SW   [kworker/u2:0]
    7 root         0 SW<  [khelper]
   71 root         0 SW<  [writeback]
   72 root         0 SW<  [crypto]
   75 root         0 SW<  [bioset]
   77 root         0 SW<  [kblockd]
   79 root         0 SW   [kswapd0]
   80 root         0 SW   [kworker/0:1]
  111 root         0 SW   [fsnotify_mark]
  172 root         0 SW   [spi32766]
  240 root         0 SW<  [ipv6_addrconf]
  255 root         0 SW<  [deferwq]
  305 root         0 SWN  [jffs2_gcd_mtd6]
  367 root      1204 S    /sbin/ubusd
  368 root      1332 S    /bin/ash --login
  369 root       896 S    /sbin/askfirst /bin/sh
  502 root         0 SW<  [cfg80211]
  567 root         0 SW   [kworker/u2:2]
  643 root      1200 S    /sbin/logd -S 16
  676 root      1704 S    /sbin/netifd
  688 root      1320 S    /usr/sbin/odhcpd
  731 root      1048 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p
  749 root      1052 S    /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -
  795 root      1332 S    /usr/sbin/ntpd -n -S /usr/sbin/ntpd-hotplug -p 0.ope
  863 root      1332 S    udhcpc -p /var/run/udhcpc-eth0.2.pid -s /lib/netifd/
  868 root       932 S    odhcp6c -s /lib/netifd/dhcpv6.script -P0 -t120 eth0.
  923 nobody    1100 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k -x /va
 1024 root      1332 R    ps

/proc/devices

root@OpenWrt:/# cat /proc/devices 
Character devices:
  1 mem
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 90 mtd
108 ppp
128 ptm
136 pts
254 watchdog

Block devices:
259 blkext
 31 mtdblock

/proc/interrupt

root@OpenWrt:/# cat /proc/interrupts 
           CPU0       
  5:        424      MIPS   5  10100000.ethernet
  7:     113209      MIPS   7  systick
  9:          0      INTC   1  10000100.timer
 13:          3      INTC   5  serial
 20:       1254      INTC  12  serial
 25:          3      INTC  17  gsw
ERR:          0

pinctrl for uartlite and uartf

 pinctrl core: add 1 pinmux maps
[    0.710000] rt2880-pinmux pinctrl: found group selector 3 for uartlite
[    0.710000] rt2880-pinmux pinctrl: request pin 15 (io15) for 10000c00.uartlite
[    0.710000] rt2880-pinmux pinctrl: request pin 16 (io16) for 10000c00.uartlite
[    0.710000] console [ttyS0] disabled
[    0.720000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    1.440000] console [ttyS0] enabled
[    1.460000] pinctrl core: add 1 pinmux maps
[    1.460000] rt2880-pinmux pinctrl: found group selector 1 for uartf
[    1.460000] rt2880-pinmux pinctrl: request pin 7 (io7) for 10000500.uart
[    1.460000] rt2880-pinmux pinctrl: request pin 8 (io8) for 10000500.uart
[    1.460000] rt2880-pinmux pinctrl: request pin 9 (io9) for 10000500.uart
[    1.460000] rt2880-pinmux pinctrl: request pin 10 (io10) for 10000500.uart
[    1.460000] rt2880-pinmux pinctrl: request pin 11 (io11) for 10000500.uart
[    1.460000] rt2880-pinmux pinctrl: request pin 12 (io12) for 10000500.uart
[    1.460000] rt2880-pinmux pinctrl: request pin 13 (io13) for 10000500.uart
[    1.460000] rt2880-pinmux pinctrl: request pin 14 (io14) for 10000500.uart
[    1.460000] 10000500.uart: ttyS1 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a 16550A

stty outputs

root@OpenWrt:/# stty -F /dev/ttyS0
speed 57600 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-brkint -imaxbel

speed 9600 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-brkint -imaxbel

Funny (double) log kernel messages after adding ttyS1 to inittab

[    1.410000] console [ttyS0] enabled
[    1.410000] console [ttyS0] enabled
[    1.430000] 10000500.uart: ttyS1 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a 16550A
[    1.430000] 10000500.uart: ttyS1 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a 16550A
[    1.470000] m25p80 spi32766.0: found w25q128, expected en25q64
[    1.470000] m25p80 spi32766.0: found w25q128, expected en25q64
[    1.490000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    1.490000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    1.510000] 4 ofpart partitions found on MTD device spi32766.0
[    1.510000] 4 ofpart partitions found on MTD device spi32766.0
[    1.530000] Creating 4 MTD partitions on "spi32766.0":
[    1.530000] Creating 4 MTD partitions on "spi32766.0":
[    1.550000] 0x000000000000-0x000000030000 : "u-boot"
[    1.550000] 0x000000000000-0x000000030000 : "u-boot"
[    1.580000] 0x000000030000-0x000000040000 : "u-boot-env"
[    1.580000] 0x000000030000-0x000000040000 : "u-boot-env"
[    1.600000] 0x000000040000-0x000000050000 : "factory"
[    1.600000] 0x000000040000-0x000000050000 : "factory"
[    1.620000] 0x000000050000-0x000000800000 : "firmware"
[    1.620000] 0x000000050000-0x000000800000 : "firmware"
[    1.700000] 2 uimage-fw partitions found on MTD device firmware
[    1.700000] 2 uimage-fw partitions found on MTD device firmware
[    1.720000] 0x000000050000-0x00000017d393 : "kernel"
[    1.720000] 0x000000050000-0x00000017d393 : "kernel"
[    1.750000] 0x00000017d393-0x000000800000 : "rootfs"
[    1.750000] 0x00000017d393-0x000000800000 : "rootfs"
[    1.770000] mtd: device 5 (rootfs) set to be root filesystem
[    1.770000] mtd: device 5 (rootfs) set to be root filesystem
[    1.790000] 1 squashfs-split partitions found on MTD device rootfs
[    1.790000] 1 squashfs-split partitions found on MTD device rootfs
[    1.810000] 0x000000370000-0x000000800000 : "rootfs_data"
[    1.810000] 0x000000370000-0x000000800000 : "rootfs_data"
[    1.870000] ralink_soc_eth 10100000.ethernet: generated random MAC address 42:3f:79:e3:86:2a
[    1.870000] ralink_soc_eth 10100000.ethernet: generated random MAC address 42:3f:79:e3:86:2a
[    1.910000] libphy: mdio: probed
[    1.910000] libphy: mdio: probed
[    1.940000] ralink_soc_eth 10100000.ethernet: connected port 4 to PHY at mdio-bus:04 [uid=03a2940d, driver=Generic PHY]
[    1.940000] ralink_soc_eth 10100000.ethernet: connected port 4 to PHY at mdio-bus:04 [uid=03a2940d, driver=Generic PHY]
[    2.070000] ralink_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:05 [uid=0000ffff, driver=Generic PHY]
[    2.070000] ralink_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:05 [uid=0000ffff, driver=Generic PHY]
[    2.120000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver
[    2.120000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver
[    2.150000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    2.150000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    2.180000] rt2880_wdt 10000120.watchdog: Initialized
[    2.180000] rt2880_wdt 10000120.watchdog: Initialized
[    2.200000] TCP: cubic registered
[    2.200000] TCP: cubic registered
[    2.210000] NET: Registered protocol family 10
[    2.210000] NET: Registered protocol family 10
[    2.230000] NET: Registered protocol family 17
[    2.230000] NET: Registered protocol family 17
[    2.250000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.250000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.

Non OpenWrt Errors from touch panel not being able to get to the ttyS1

2109 1110664336 NetworkInterface                 INFO     Control-C the Network Module
2109 1110664336 NetworkInterface                 ERROR    Failed to get shell prompt - 
2109 1110664336 NetworkInterface                 INFO     Control-C the Network Module
2109 1110664336 NetworkInterface                 ERROR    Failed to get shell prompt - 
2109 1110664336 NetworkInterface                 INFO     Control-C the Network Module
2109 1110664336 NetworkInterface                 ERROR    Failed to get shell prompt -