Skip to content

drivers: tty: serial: Add missing CONFIG_SERIAL_EARLYCON for ADI UART4#3243

Merged
gastmaier merged 1 commit intoanalogdevicesinc:adsp-6.12.0-yfrom
Brandon-Hurst:adsp-enable-earlycon
Apr 15, 2026
Merged

drivers: tty: serial: Add missing CONFIG_SERIAL_EARLYCON for ADI UART4#3243
gastmaier merged 1 commit intoanalogdevicesinc:adsp-6.12.0-yfrom
Brandon-Hurst:adsp-enable-earlycon

Conversation

@Brandon-Hurst
Copy link
Copy Markdown

PR Description

Enable early console support for ADI UART4. Currently it is included in the kernel command line arguments for ADSP Linux but not enabled via Kconfig.

This makes it so the ADI UART4 driver selects and enables earlycon support by default and will be available as an early console option during boot.

With or without earlycon/earlyprintk, the current 5.0.1 build does not actually set up an early console. I tested with the following kernel command-line:

# Default + initcall_debug + ignore_loglevel (for debugging)
setenv mmcargs 'setenv bootargs root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait earlyprintk=serial,uart0,115200 console=ttySC0,115200 vmalloc=512M printk.time=1 printk.synchronous=1 initcall_debug ignore_loglevel'

# Without earlyprintk
setenv mmcargs 'setenv bootargs root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait console=ttySC0,115200 vmalloc=512M printk.time=1 printk.synchronous=1 initcall_debug ignore_loglevel'

# With earlycon
setenv mmcargs 'setenv bootargs root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait console=ttySC0,115200 vmalloc=512M printk.time=1 printk.synchronous=1 earlycon=adi_uart,0x31003000 initcall_debug ignore_loglevel'

In all cases, without the fix in this PR, same result (dropped messages) since the print buffer fills before the regular console is setup.

Starting kernel ...

** 397 printk messages dropped **
[    0.157958] initcall iomem_init_inode+0x0/0x84 returned 0 after 0 usecs
[    0.158015] calling  clocksource_done_booting+0x0/0x44 @ 1

By adding CONFIG_SERIAL_EARLYCON, I can now get the early boot messages:

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 6.6.16-j951c-standard.amd8e-guede09148cdb (on-username-host) (arm-m41_glibc-linux-gnueabihf-gcc (GCC) 13.4.0, GNU ld (GNU Binutil) 2.4
2.20240223) #1 Fri Oct 31 14:13:37 UTC 2025
[    0.000000] Machine model: raspberrypi 4-model-b          RPI4ADVFM2370040000
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: reserved mem: 0x5000:8031
[    0.000000] OF: reserved mem: rte-data1@30000000
[    0.000000] OF: reserved mem: 0x14800000..0x14ffffff (8 kib) nomap non-reusable rta-1@14b00000
[    0.000000] earlycon: set_uart0 at MMIO 0x10100000 (options '')
[    0.000000] printk: legacy bootconsole [sci_uart0] enabled

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have compiled my changes, including the documentation
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly
  • I have provided links for the relevant upstream lore

@gastmaier
Copy link
Copy Markdown
Collaborator

please fix the whitespace, kconfig use leading tabs

Enable early console support for ADI UART4. Currently it
is included in the kernel command line arguments for
ADSP Linux but not enabled via Kconfig.

This makes it so the ADI UART4 driver selects and enables
earlycon support by default and will be available as an
early console option during boot.

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
@Brandon-Hurst Brandon-Hurst force-pushed the adsp-enable-earlycon branch from e119326 to a830731 Compare April 9, 2026 23:08
@Brandon-Hurst
Copy link
Copy Markdown
Author

Fixed whitespace issue (thanks).

Copy link
Copy Markdown
Collaborator

@gastmaier gastmaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes make sense.

Fortiguard is blocking every fetch to https://raw.githubusercontent.com/ , causing all CI/CD to fail. Trying to reach the personnel involved.

@Brandon-Hurst
Copy link
Copy Markdown
Author

Looks like CI/CD is passing now, thanks for sorting that out.

@gastmaier gastmaier merged commit f370f91 into analogdevicesinc:adsp-6.12.0-y Apr 15, 2026
21 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants