Verdin Am62 : using all the Main Uart in am62

Hi,

i am trying to bring up all the main uart available in AM625. as per the documents we have 7 uart, so i have enabled all in the device tree

below is my device tree:

/* Verdin UART_0, used as the Linux console */
	pinctrl_uart0: main-uart0-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x1c8, PIN_INPUT_PULLUP, 0) /* (D14) UART0_RXD */ /* SODIMM 147 */
			AM62X_IOPAD(0x1cc, PIN_OUTPUT,       0) /* (E14) UART0_TXD */ /* SODIMM 149 */
		>;
	};
		
		/* Verdin UART_4, used as the Linux console */
	pinctrl_uart4: main-uart4-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 3) /* (K22) GPMC0_CSn2.UART4_RXD */ /* SODIMM 53 */
			AM62X_IOPAD(0x00b4, PIN_OUTPUT, 3) /* (K24) GPMC0_CSn3.UART4_TXD */ /* SODIMM 55 */
		>;
	};
	
			/* Verdin UART_6, used as the Linux console */
	pinctrl_uart6: main-uart6-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x0194, PIN_INPUT_PULLUP, 3) /* (B19) MCASP0_AXR3.UART6_RXD */ /* SODIMM 21 */
			AM62X_IOPAD(0x0244, PIN_OUTPUT, 1) /* (C17) MMC1_SDWP.UART6_TXD */  /* SODIMM 21 */
		>;
	};
	
		/* Verdin UART_5, used as the Linux console */
	pinctrl_uart5: main-uart5-pins-default {
				pinctrl-single,pins = <
			AM62X_IOPAD(0x0074, PIN_INPUT_PULLUP, 2) /* (U25) GPMC0_AD14.UART5_RXD */ /* SODIMM 135 */
			AM62X_IOPAD(0x0078, PIN_OUTPUT, 2) /* (U24) GPMC0_AD15.UART5_TXD */ /* SODIMM 17 */
		>;
	};
	
	/* Verdin UART_2, used as the Linux console */
	pinctrl_uart2: main-uart2-pins-default {
				pinctrl-single,pins = <
			AM62X_IOPAD(0x0224, PIN_INPUT_PULLUP, 3) /* (D22) MMC1_DAT3.UART2_RXD */ /* SODIMM 70 */
			AM62X_IOPAD(0x0228, PIN_OUTPUT, 3) /* (C21) MMC1_DAT2.UART2_TXD *//* SODIMM 72 */
		>;
	};
	

		/* Verdin UART_3, used as the Linux console */
	pinctrl_uart3: main-uart3-pins-default {
	pinctrl-single,pins = <
			AM62X_IOPAD(0x0234, PIN_INPUT_PULLUP, 3) /* (B22) MMC1_CLK.UART3_RXD */ /* SODIMM 74 */
			AM62X_IOPAD(0x023c, PIN_OUTPUT, 3) /* (A21) MMC1_CMD.UART3_TXD */ /* SODIMM 78 */
		>;
	};

	/* Verdin UART_1 */
	pinctrl_uart1: main-uart1-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x01ac, PIN_INPUT_PULLUP, 2) /* (E19) MCASP0_AFSR.UART1_RXD  */ /* SODIMM 129 */
			AM62X_IOPAD(0x01b0, PIN_OUTPUT,       2) /* (A20) MCASP0_ACLKR.UART1_TXD */ /* SODIMM 131 */
		>;
	};

/* Verdin UART_3, used as the Linux console */
&main_uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart0>;
	status = "disabled";
};

/* Verdin UART_1 */
&main_uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	status = "disabled";
};

/* Verdin UART_4 */
&main_uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
	status = "disabled";
};

/* Verdin UART_4 */
&main_uart3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3>;
	status = "disabled";
};

/* Verdin UART_4 */
&main_uart4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart4>;
	status = "disabled";
};

/* Verdin UART_5 */
&main_uart5 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart5>;
	status = "disabled";
};

/* Verdin UART_3 */
&main_uart0 {
	dmas = <&main_pktdma 0x4400>, <&main_pktdma 0xc400>;
	dma-names = "rx", "tx";
	status = "okay";
};

/* Verdin UART_1, connector X50 through RS485 transceiver. */
&main_uart1 {
	linux,rs485-enabled-at-boot-time;
	rs485-rx-during-tx;
	dmas = <&main_pktdma 0x4401>, <&main_pktdma 0xc401>;
	dma-names = "rx", "tx";
	status = "okay";
};

&main_uart2 {
	status = "okay";
};

&main_uart3 {
	status = "okay";
};

&main_uart4 {
	status = "okay";
};

&main_uart5 {
	status = "okay";
};

&main_uart6 {
	status = "okay";
};

But once the board is booted, i can see only 5 uart listed from ttyS0 to ttyS4, is there anything i am missing, kindly check and reply!

thanks in advance

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


It looks like you are trying to enable all the UART interfaces on the Verdin AM62 module, but you are only seeing 5 UARTs listed after booting. Here are a few things to check and consider:

  1. Device Tree Consistency:

    • Ensure that the pinctrl settings and the UART nodes are correctly defined and consistent.
    • Verify that there are no conflicting pin assignments or incorrect pin configurations.
  2. Status Property:

    • Make sure that the status property for each UART node is set to "okay".
    • In your device tree, you have some UART nodes with status = "disabled"; and then later set to status = "okay";. Ensure that the final status is correctly set to "okay".
  3. DMA Configuration:

    • Ensure that the DMA settings are correctly configured for each UART that requires DMA.
    • Verify that the DMA channels are not conflicting with each other.
  4. Kernel Logs:

    • Check the kernel logs (dmesg) for any errors or warnings related to UART initialization. This can provide clues if there are issues with the device tree or driver initialization.
  5. UART Driver Support:

    • Ensure that the UART driver in the kernel supports all the UART instances you are trying to enable.
    • Verify that the driver is not limited to a certain number of UARTs.
  6. Pin Multiplexing:

    • Double-check the pin multiplexing settings to ensure that the pins are correctly configured for UART functionality and not being used by other peripherals.

Here is a revised version of your device tree snippet with some corrections:

/* Verdin UART_0, used as the Linux console */
pinctrl_uart0: main-uart0-pins-default {
    pinctrl-single,pins = <
        AM62X_IOPAD(0x1c8, PIN_INPUT_PULLUP, 0) /* (D14) UART0_RXD */ /* SODIMM 147 */
        AM62X_IOPAD(0x1cc, PIN_OUTPUT,       0) /* (E14) UART0_TXD */ /* SODIMM 149 */
    >;
};

/* Verdin UART_4 */
pinctrl_uart4: main-uart4-pins-default {
    pinctrl-single,pins = <
        AM62X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 3) /* (K22) GPMC0_CSn2.UART4_RXD */ /* SODIMM 53 */
        AM62X_IOPAD(0x00b4, PIN_OUTPUT, 3) /* (K24) GPMC0_CSn3.UART4_TXD */ /* SODIMM 55 */
    >;
};

/* Verdin UART_6 */
pinctrl_uart6: main-uart6-pins-default {
    pinctrl-single,pins = <
        AM62X_IOPAD(0x0194, PIN_INPUT_PULLUP, 3) /* (B19) MCASP0_AXR3.UART6_RXD */ /* SODIMM 21 */
        AM62X_IOPAD(0x0244, PIN_OUTPUT, 1) /* (C17) MMC1_SDWP.UART6_TXD */  /* SODIMM 21 */
    >;
};

/* Verdin UART_5 */
pinctrl_uart5: main-uart5-pins-default {
    pinctrl-single,pins = <
        AM62X_IOPAD(0x0074, PIN_INPUT_PULLUP, 2) /* (U25) GPMC0_AD14.UART5_RXD */ /* SODIMM 135 */
        AM62X_IOPAD(0x0078, PIN_OUTPUT, 2) /* (U24) GPMC0_AD15.UART5_TXD */ /* SODIMM 17 */
    >;
};

/* Verdin UART_2 */
pinctrl_uart2: main-uart2-pins-default {
    pinctrl-single,pins = <
        AM62X_IOPAD(0x0224, PIN_INPUT_PULLUP, 3) /* (D22) MMC1_DAT3.UART2_RXD */ /* SODIMM 70 */
        AM62X_IOPAD(0x0228, PIN_OUTPUT, 3) /* (C21) MMC1_DAT2.UART2_TXD *//* SODIMM 72 */
    >;
};

/* Verdin UART_3 */
pinctrl_uart3: main-uart3-pins-default {
    pinctrl-single,pins = <
        AM62X_IOPAD(0x0234, PIN_INPUT_PULLUP, 3) /* (B22) MMC1_CLK.UART3_RXD */ /* SODIMM 74 */
        AM62X_IOPAD(0x023c, PIN_OUTPUT, 3) /* (A21) MMC1_CMD.UART
            
Please, also check if these links can help you solve your problem:

https://developer.toradex.com/software/linux-resources/device-tree/

https://community.toradex.com/t/enable-uart-instead-of-verdin-can-1-on-verdin-am62/21882.

Hi @naveenkumar.muthusam ,

Apart from enabling the UART’s, make sure to free these pins if they are used somewhere else.
If you still face issue, please share the device tree changes in git diff format.

Hi,

Thanks for your reply. it seems that the no of instance is by default set to 6 in kernel menuconfig, i have changed it 8, Now all the UART works.