How can I tune the debug port to THS0

Hi, We designed UART0 &UART1 on our carrier board. But we want to use UART0 or UART1 to printf the debug message of kernel boot which can choose the boot menus. I searched all the topics in the forum and couldn’t find the detailed configuration tutorial. I need some help, thanks.

  1. ** 1. kernel/dtb/tegra194-p3668-all-p3509-0000.dtb**
    We closed the combine-uart and change it.
chosen {
		bootargs ="console=ttyTHS0,115200";
combined-uart {
		status = "disabled";
  1. bootloader/t186ref/tegra194-a02-bpmp-p3668-a00.dtb
	serial {
		port = <0x1>;
  1. bootloader/t186ref/BCT/tegra194-mb1-bct-misc-l4t.cfg && bootloader/t186ref/BCT/tegra194-mb1-bct-misc-flash.cfg
enable_combined_uart = 0;
spe_uart_instance = 0xff;
  1. p3668.conf.common
    CMDLINE_ADD=“console=ttyTHS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0”;

And flash it.

It only has LK message, we also need others.

hello iyric,

please check /boot/extlinux/extlinux.conf, please remove the quiet variable in the configuration file for confirmation.
for example,

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet

Hi, JerryChang
We remove it, but it only login. Even the hdmi no kernel log.

welcome to lk
calling constructors
initializing heap
creating bootstrap completion thread
top of bootstrap2()
initializing platform
bpmp: platform_init
tag is e73a758761f0c6d24a1e69a2ac6b5035
tag_show initialized
dt initialized
mail initialized
chipid initialized
fuse initialized
sku initialized
speedo initialized
ec_get_ec_list: found 45 ecs
ec initialized
ec_mrq initialized
vmon_populate_monitors: found 3 monitors
vmon initialized
adc initialized
fmon_populate_monitors: found 73 monitors
fmon initialized
fmon_mrq initialized
reset initialized
nvhs initialized
uarta has invalid initial rate (1828571)
391 clocks registered
clk_mrq_init: mrq handler registered
clk initialized
nvlink initialized
io_dpd initialized
io_dpd initialized
thermal initialized
i2c5 controller initialized
initialized i2c mrq handling
i2c initialized
regulator initialized
avfs_clk_platform_init: bad clk id in clock@cluster1_avfs
avfs_clk_platform initialized
soctherm initialized
aotag initialized
powergate initialized
dvs initialized
pm initialized
pg_late initialized
strap initialized
tag initialized
emc initialized
clk_dt initialized
avfs_ccplex_platform initialized
tj_max: dt node not found
tj_init initialized
uphy_mrq_init: mrq handler registered
uphy_dt initialized
uphy initialized
safereg_init: period 80 ms
ec_late initialized
mrq initialized
WARNING: no registered clock for FMON_NAFLL_CLUSTER1 (id 281)
fmon_post initialized
clk_set_parent failed for clk i2c2, parent pll_aon (-22)
clk_set_parent failed for clk i2c8, parent pll_aon (-22)

Ubuntu 18.04.5 LTS nx ttyTHS0

nx login: 

What do you see from “cat /proc/cmdline”?

Thank you for your reply.
We see

console=ttyTHS0,115200 video=tegrafb earlycon=uart8250,mmio32,0x3110000 gpt rootfs.slot_suffix= tegra_fbmem=0x800000@0xa06b1000 lut_mem=0x2008@0xa06ae000 usbcore.old_scheme_first=1 tegraid= maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1    root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTHS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0

@JerryChang Hi, jerry, is there any way to solve this problem, we are in hurry. Thank you very much.

you cannot disable enable_combined_uart if you would like to have kernel logs, (i.e. $ dmesg).

Thank you for your reply.
So we need only change the cmdline?
We need all debug message in THS0, we need the boot menu to switch boot.

Hi, @JerryChang
We only change the p3668.conf.common and 2. bootloader/t186ref/tegra194-a02-bpmp-p3668-a00.dtb
It is nothing in THS0, even LK.

Dear @JerryChang
We just want to UART0 or UART1 change to debug uart like UART2(We use it to choose the boot), because we only has this two uart. Can you tell us the detailed steps. If it can’t do, please tell me.We spent a lot of time trying all kinds of ways, but all failed. Thank you very much.

hello iyric,

just to confirm you have enable_combined_uart=1, configure spe_uart_instance, and modify cmdline as console=ttyTHS0.
would you please also disable nvgetty for testing?
for example,

$ sudo systemctl stop nvgetty
$ sudo systemctl disable nvgetty

HI, We change to THS1. And It has dmesg and lk. But no mb1,2 and cboot log.

hello iyric,

it’ll register to different console interface; please also check the CBoot sources as following,
i.e. $public_source/cboot_src_t19x/bootloader/partner/t18x/cboot/platform/t194/platform.c

        if (boot_params->enable_combined_uart == 0U) {
                error = tegrabl_console_register(TEGRABL_CONSOLE_UART, boot_params->uart_instance, NULL);

        if (boot_params->enable_combined_uart == 1U) {
                error = tegrabl_console_register(TEGRABL_CONSOLE_COMB_UART, 0, &mailbox);

you may have a try to modify the code for UART instance registration,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.