Post Go back to editing

ADSP-SC589 console (ttySC0) not working after boot

Category: Software
Software Version: Linux


Custom Dunfell yocto build (not targeting devkit or ezkit).

After boot the /dev/ttySC0 is created, but console is not working (the earlycon gives however all kernel output to the point of getty starting)

When looking at /proc/drivers:

/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
ttyprintk            /dev/ttyprintk   5       3 console
adi-uart4            /dev/ttySC      4 64-67 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master

Devices console and ttySC0 are created (/dev/serial0 however is NOT created):

crw--w----    1 root     tty         4,  64 Jan  1 04:16 /dev/ttySC0
crw-------    1 root     root        5,   1 Jan  1 04:11 /dev/console

Config options, following are set:


We are starting the system in an initramfs file system, mounting emmc and loading up the real filesystem from emmc, doing switch_root to the real file system (as an overlay). All those parts work fine.

We have a similar setup on a sc598 64 bit, where the console works fine.

We can echo data successfully to /dev/printk.

cat /proc/devices gives:

root@sc598-devkit:~# cat /proc/devices

Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
4 ttySC
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
89 i2c
90 mtd
128 ptm
136 pts
248 rpmb
249 ttyLP
250 bsg
251 watchdog
252 rtc
253 tpm
254 gpiochip

Block devices:
7 loop
31 mtdblock
179 mmc
259 blkext

cat /proc/tty/driver/adi-uart4 gives:
serinfo:1.0 driver revision:
0: uart:ADI-UART4 mmio:0x00000000 irq:0 tx:0 rx:0 oe:2 RTS|CTS|DTR|DSR|CD

On the sc598 build (where console works) we get:

cat /proc/tty/driver/adi-uart4  
cat /proc/tty/driver/adi-uart4
serinfo:1.0 driver revision:
0: uart:ADI-UART4 mmio:0x00000000 irq:0 tx:2689 rx:65 RTS|CTS|DTR|DSR|CD
(we can tx and rx increments as it should)

The related boot messages for the uart we get are:

ADI serial driver
adi-uart4 31003000.uart: Serial probe
31003000.uart: ttySC0 at MMIO 0x0 (irq = 0, base_baud = 7031250) is a ADI-UART4

Kernel bootargs:
clkin_hz=25000000 earlycon=adi_uart,0x31003000 console=ttySC0,115200 ignore_loglevel mem=224M clkin_hz=25000000 earlyprintk=serial,uart0,115200 ignore_loglevel mem=224M console=ttySC0,115200

In our machine configuration:
SERIAL_CONSOLE ?= "115200 ttySC0"
SERIAL_CONSOLES ?= "115200;ttySC0"

In our inittab the getty is started as:

ttySC0::respawn:/sbin/getty 115200 ttySC0

Have tried lots of varying configuration options but running out of ideas. Can anyone please help or provide clues to what goes wrong?

If needed I can provide devicetree configuration.

correcting about the boot messages
[edited by: Larswad at 8:18 AM (GMT -5) on 17 Jan 2023]