This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Changing uart console for linux kernel

Part Number: AM5728


Hello,

I am starting another thread, since the u-boot issue was resolved. I am trying to change the debug console from uart3 to uart8. I was successfully able to do that or u-boot, and the u-boot boots up until it says

"starting kernel" at which point it freezes. I understand that we have to change the console for uart3 to uart8 in the linux kernel as well. I have outlined below the changes that I have made. I am still not seeing the linux kernel boot up. I am using the ti-processor-sdk-linux-am57xx-evm-06.02.00.81 sdk. 

File: <ti-processor>/board-support/linux-4.19.79+gitAUTOINC+77dfab56c6-g77dfab56c6/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi

chosen {
- stdout-path = &uart3;
+ stdout-path = &uart8;
};

+&uart8 {
+ status = "okay";
+};

I changed the uart3 path to uart8, and added the uart8 node, the same way I did in u-boot.

File: <ti-processor>/board-support/linux-4.19.79+gitAUTOINC+77dfab56c6-g77dfab56c6/arch/arm/boot/dts/am57xx-idk-common.dtsi

diff --git a/arch/arm/boot/dts/am57xx-idk-common.dtsi b/arch/arm/boot/dts/am57xx-idk-common.dtsi
index d58c08419d..863ad52af7 100644
--- a/arch/arm/boot/dts/am57xx-idk-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-idk-common.dtsi
@@ -18,7 +18,7 @@
};

chosen {
- stdout-path = &uart1;
+ stdout-path = &uart8;
};

vmain: fixedregulator-vmain {
@@ -196,21 +196,6 @@
};
};

-&dra7_pmx_core {
- dcan1_pins_default: dcan1_pins_default {
- pinctrl-single,pins = <
- DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
- DRA7XX_CORE_IOPAD(0x37d4, PIN_INPUT_PULLUP | MUX_MODE0) /* dcan1_rx */
- >;
- };
-
- dcan1_pins_sleep: dcan1_pins_sleep {
- pinctrl-single,pins = <
- DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP) /* dcan1_tx.off */
- DRA7XX_CORE_IOPAD(0x37d4, MUX_MODE15 | PULL_UP) /* dcan1_rx.off */
- >;
- };
-};

&i2c1 {
status = "okay";
@@ -491,16 +476,14 @@
};
};

-&uart1 {
+&uart8 {
status = "okay";
- interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH
- &dra7_pmx_core 0x3e0>;
};

&rtc {
@@ -565,14 +548,6 @@
no-1-8-v;
};

-&dcan1 {
- status = "okay";
- pinctrl-names = "default", "sleep", "active";
- pinctrl-0 = <&dcan1_pins_sleep>;
- pinctrl-1 = <&dcan1_pins_sleep>;
- pinctrl-2 = <&dcan1_pins_default>;
-};

I changed the path from uart3 to uart8, added the uart8 nodes, and removed any dcan1 nodes that are the same pins used for uart8.

Are there clock definitions that I am missing? please let me know. 

Thank you,

Tia Basak

  • Hello Tia Basak,

    Have you changed the kernel bootargs to reflect the same uart, console=?

    Can you paste the bootargs for my reference and also the u-boot changes that you made
    or even the thread that describes the changes you did to get U-boot to UART8?

    Couple of things that i noticed in your changes:

    +&uart8 {
    status = "okay";
    - interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH
    - &dra7_pmx_core 0x3e0>;
    };

    I believe you are removing the interrupts-extended property in u-boot but linux will need it?
    Also did you add the pinmux changes for uart8 pins in Kernel dts? I do not see them in the change
    list. That should be same as used in u-boot.

    - Keerthy

  • Hello,

    I was able to resolve the kernel issue. I don't think I need the interrupts, because it worked without it. I was missing the correct console dev in the u-boot. In kernel changing the chosen path and adding the uart8 node, in both files listed above, is correct.

    File: uboot/include/environment/boot.h

    #define CONSOLEDEV "ttyS7"

    Changed the console dev from ttyS2 to ttyS7

    Also in the rootsf file, /etc/securetty I added ttyS7 so that I could log in.

    Tia