Redirecting u-boot console to UARTB on colibri_t30

I have seen this question has been asked a couple of times, but never for the Colibri T30:

We have successfully set the console of our Linux to UART B, now we would like to do so for the u-boot console.
I tried to modify these two lines

/* Board-specific serial config */
#define CONFIG_TEGRA_ENABLE_UARTB
#define CONFIG_SYS_NS16550_COM1         NV_PA_APB_UARTB_BASE

in

include/configs/colibri_t30.h

At the moment we get no more u-boot console at all. What else needs to be modified? We are testing with Iris carrier boards.

Hi @CornStarch

Could you provide the version of the software of your module?

Which carrier board are you using?

Best regards,
Jaski

Hello @jaski.tx

We are using
ver=U-Boot 2016.11-00005-g2b0b47dac1-dirty
but we could pull changes from git if you recommend to do so.

We are using Iris V1.1B

kind reagrds

Hello @CornStarch,

We are trying to find a workaround approach to the issue. And we hope to get back to you soon. We thank you for your patience.

Best Regards,
Janani

Dear Janani,
Thanks a lot. I thought I am asking a stupid question :slight_smile:
If UARTC is easier, we could start with this.
kind regards

Hi @CornStarch

The easiest questions are always very difficult to solve ;).

So first of all you, the SOC (Nvidia) naming of UART is different than the module (Toradex) naming. Please have a look here for further information.

You need to do the following changes in u-boot:

   diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index 0d69785a74..39414a9395 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -24,8 +24,8 @@
 #define CONFIG_DISPLAY_BOARDINFO_LATE  /* Calls show_board_info() */
 
 /* Board-specific serial config */
-#define CONFIG_TEGRA_ENABLE_UARTA
-#define CONFIG_SYS_NS16550_COM1                NV_PA_APB_UARTA_BASE
+#define CONFIG_TEGRA_ENABLE_UARTD
+#define CONFIG_SYS_NS16550_COM1                NV_PA_APB_UARTD_BASE
 
 #define CONFIG_MACH_TYPE               MACH_TYPE_COLIBRI_T30
 
@@ -150,7 +150,7 @@
                "source ${loadaddr}\0" \
        "setup=setenv setupargs asix_mac=${ethaddr} " \
                "consoleblank=0 no_console_suspend=1 console=tty1 " \
-               "console=${console},${baudrate}n8 debug_uartport=lsport,0 " \
+               "console=${console},${baudrate}n8 debug_uartport=lsport,3 " \
                "vmalloc=128M mem=1012M@2048M fbmem=12M@3060M\0" \
        "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \
        "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \

After compiling and flashing the new U-Boot to the module, the u-boot console will be directed to UART_B.

Note: If you don’t have the console, you can also do an ssh connection to the module.

Best regards,
Jaski

Dear Jaski,

I did exactly what you suggested. However we have no sign of u-boot talking to any of the serial interfaces. We also have no communication on UARTA any more, so it seems we are modifying the correct setting.
We also tried set the defines to UARTB because that is my guess according to set the console to UART C. but nothing.
did this patch work in your lab?

kind regards

Hi CornStarch

I tested the patch on the Colibri Evaluation Board and it was working fine.
I will test this also on Iris and will come back to you.

Best regards,
Jaski

Dear Jaski,
Actually setting u-boot console to UART C would be more interesting for us. Thanks for having a look at this too.
kind regards

Most likely your current issue as perceived on Iris has to do with the transceiver’s force-off GPIO which you would need to set properly at pin muxing time as well. BTW: For having the Linux console moved to another UART instance setting resp. lsport index in debug_uartport would be enough.

http://git.toradex.com/cgit/u-boot-toradex.git/tree/include/configs/colibri_t30.h?h=2016.11-toradex#n153

It turns out to really be a transceiver force-off GPIO issue caused by an illegal SPI1 pin muxing. Just change SPI1 to RSVD4 on the following line and it works:

http://git.toradex.com/cgit/u-boot-toradex.git/tree/board/toradex/colibri_t30/pinmux-config-colibri_t30.h?h=2016.11-toradex#n284

I also sent a patchset upstream now:

https://patchwork.ozlabs.org/cover/1161448/

We were successful with this change. Thank you all.

Perfect that it works. Thanks for the feedback.