Why MT7621 UART3 does not work?

I have a board with MT7621 CPU and a bluetooth chip on the board, the bluetooth communication serial port is connected to MT7621 UART3.

I have implemented a dts based on mt7621.dtsi, where the uart related configuration is as follows:

&state_default {
        gpio {
                groups = "uart3", "wdt";
                function = "gpio";
        };
};

&xhci {
        status = "okay";
};

&sdhci {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&sdhci_pins>;
};

&uartlite {
        status = "okay";
};

&uartlite2 {
        status = "okay";
};

&uartlite3 {
        status = "okay";
};

After compiling openwrt and burning it to board flash, I see the ttyS0 / ttyS1 / ttyS2:

# ll /dev/tty*
crw-rw-rw-    1 root     root        5,   0 Jan  1  1970 /dev/tty
crw-------    1 root     root        4,  64 Oct 27 19:05 /dev/ttyS0
crw-rw----    1 root     dialout     4,  65 Jan  1  1970 /dev/ttyS1
crw-rw----    1 root     dialout     4,  66 Jan  1  1970 /dev/ttyS2

ttyS2 should correspond to MT7621 UART3, execute echo command to ttyS2:

# echo -n "+++" > /dev/ttyS2
ash: write error: I/O error

The prompt write error: I/O error, does it mean that uart3 is not working, is there something I missed to dts configure?

You don't need to declare a pingroup as gpio if you're not going to use it as GPIO.

1 Like

Thank you. I remove uart3 from gpio groups, the ttyS2 is work.

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