Part Number: TDA4VM
Hi team,
We made a custom board and try to bring up.
The port of Main_Uart0 is used to com with other chip.At first,the two wires of Main_Uart0 are connected out and the sdk is Ver 08_02
_00_03. It boot up successfully and log are printed out via Main_Uart0.Next we need to change the console port.
I follow the steps to change the default console Uart from Main_Uart0 to Main_Uart5:
Here is the HW design:

Here are the changes I made according the guide above:
diff --git a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
index 3542f5b371..df47ef32c7 100644
--- a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
@@ -7,7 +7,7 @@
/ {
chosen {
- stdout-path = "serial2:115200n8";
+ stdout-path = "serial7:115200n8";
tick-timer = &timer1;
};
@@ -15,6 +15,7 @@
ethernet0 = &cpsw_port1;
spi0 = &ospi0;
spi1 = &ospi1;
+ serial7 = &main_uart5;
remoteproc0 = &mcu_r5fss0_core0;
remoteproc1 = &mcu_r5fss0_core1;
remoteproc2 = &main_r5fss0_core0;
diff --git a/arch/arm/dts/k3-j721e-common-proc-board.dts b/arch/arm/dts/k3-j721e-common-proc-board.dts
index 482d4ee530..66902eeb73 100644
--- a/arch/arm/dts/k3-j721e-common-proc-board.dts
+++ b/arch/arm/dts/k3-j721e-common-proc-board.dts
@@ -13,8 +13,9 @@
/ {
chosen {
- stdout-path = "serial2:115200n8";
- bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
+ stdout-path = "serial7:115200n8";
+ /*bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";*/
+ bootargs = "console=ttyS7,115200n8 earlycon=ns16550a,mmio32,0x02850000";
};
gpio_keys: gpio-keys {
@@ -205,6 +206,12 @@
J721E_IOPAD(0x1a4, PIN_OUTPUT, 3) /* (W26) RGMII6_RXC.AUDIO_EXT_REFCLK2 */
>;
};
+ main_uart5_pins_default: main_uart5_pins_default {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x1a8, PIN_INPUT, 3) /* (Y29) RGMII6_RD3.UART5_RXD */
+ J721E_IOPAD(0x1ac, PIN_OUTPUT, 3) /* (Y27) RGMII6_RD2.UART5_TXD */
+ >;
+ };
};
&wkup_pmx0 {
@@ -258,7 +265,9 @@
};
&main_uart0 {
- power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
+ /* UART not brought out */
+ /*power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;*/
+ status = "disabled";
};
&main_uart3 {
@@ -267,8 +276,11 @@
};
&main_uart5 {
- /* UART not brought out */
- status = "disabled";
+ /* UART for Main debug console*/
+ /*pinctrl-names = "default";*/
+ /*pinctrl-0 = <&main_uart5_pins_default>;*/
+ power-domains = <&k3_pds 282 TI_SCI_PD_SHARED>;
+ status = "okay";
};
&main_uart6 {
diff --git a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
index d32a7c5683..15de663bd2 100644
--- a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
+++ b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
@@ -17,7 +17,7 @@
};
chosen {
- stdout-path = "serial2:115200n8";
+ stdout-path = "serial7:115200n8";
tick-timer = &timer1;
firmware-loader = &fs_loader0;
};
@@ -173,6 +173,14 @@
>;
};
+ main_uart5_pins_default: main_uart5_pins_default {
+ u-boot,dm-spl;
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x1a8, PIN_INPUT, 3) /* (Y29) RGMII6_RD3.UART5_RXD */
+ J721E_IOPAD(0x1ac, PIN_OUTPUT, 3) /* (Y27) RGMII6_RD2.UART5_TXD */
+ >;
+ };
+
main_usbss0_pins_default: main_usbss0_pins_default {
pinctrl-single,pins = <
J721E_IOPAD(0x290, PIN_OUTPUT, 0) /* (U6) USB0_DRVVBUS */
@@ -222,8 +230,16 @@
&main_uart0 {
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
- status = "okay";
power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
+ status = "disable";
+};
+
+&main_uart5 {
+ /*status = "disabled";*/
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart5_pins_default>;
+ power-domains = <&k3_pds 282 TI_SCI_PD_SHARED>;
+ status = "okay";
};
&main_sdhci0 {
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
index 614d032538..6dfd351e8f 100644
--- a/include/configs/j721e_evm.h
+++ b/include/configs/j721e_evm.h
@@ -85,7 +85,7 @@
"setenv name_fdt k3-j721e-sk.dtb; fi;" \
"setenv fdtfile ${name_fdt}\0" \
"name_kern=Image\0" \
- "console=ttyS2,115200n8\0" \
+ "console=ttyS7,115200n8\0" \
"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
"${mtdparts}\0" \
"run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index a4d22c56bd..f1b045a901 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -12,7 +12,7 @@ #include <linux/stringify.h> #ifndef CONSOLEDEV -#define CONSOLEDEV "ttyS2" +#define CONSOLEDEV "ttyS7" #endif #ifndef PARTS_DEFAULT
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
index 7e9490fcb..fa64d8eec 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
@@ -13,9 +13,9 @@
/ {
chosen {
- stdout-path = "serial2:115200n8";
+ stdout-path = "serial7:115200n8";
/*bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";*/
- bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait";
+ bootargs = "console=ttyS7,115200n8 earlycon=ns16550a,mmio32,0x02850000 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait";
};
gpio_keys: gpio-keys {
@@ -438,7 +438,9 @@
};
&main_uart0 {
- power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
+ /* UART not brought out */
+ /*power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;*/
+ status = "disable";
};
&main_uart3 {
@@ -448,7 +450,10 @@
&main_uart5 {
/* UART not brought out */
- status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart5_pins_default>;
+ power-domains = <&k3_pds 282 TI_SCI_PD_SHARED>;
+ status = "okay";
};
&main_uart6 {
diff --git a/plat/ti/k3/common/plat_common.mk b/plat/ti/k3/common/plat_common.mk index ab7366b7e..d28e63129 100644 --- a/plat/ti/k3/common/plat_common.mk +++ b/plat/ti/k3/common/plat_common.mk @@ -38,7 +38,7 @@ ENABLE_PIE := 1 TI_16550_MDR_QUIRK := 1 $(eval $(call add_define,TI_16550_MDR_QUIRK)) -K3_USART := 0 +K3_USART := 5 $(eval $(call add_define,K3_USART)) # Allow customizing the UART baud rate
After making the changes above,I follow the steps to remake the bl31.bin , u-boot and linux-dtbs and copy to the SD card.
It did not worked,Is there any other changes need to make?
Thanks!

