Enabling UART on Odroid N2

I couldn’t find any information how to enable UartA and UARTB (ttyS1 and ttyS2) on Odroid N2 image. I tried enable them via dietpi-config options but still no lucks. Any veterans inputs here would be appreciated.

dietpi@DietPi:~$ ls -al /dev/ttyS?
crw-rw---- 1 root dialout 4, 64 Jul 22 09:56 /dev/ttyS0
crw–w---- 1 root tty 4, 65 Jul 22 09:56 /dev/ttyS1
crw–w---- 1 root tty 4, 66 Jul 22 09:56 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Jul 22 09:56 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 Jul 22 09:56 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 Jul 22 09:56 /dev/ttyS5
crw-rw---- 1 root dialout 4, 70 Jul 22 09:56 /dev/ttyS6
crw-rw---- 1 root dialout 4, 71 Jul 22 09:56 /dev/ttyS7
dietpi@DietPi:~$ sudo stty -F /dev/ttyS1 115200
stty: /dev/ttyS1: Input/output error
dietpi@DietPi:~$ sudo stty -F /dev/ttyS2 115200
stty: /dev/ttyS2: Input/output error

If properly wired up in devicetree it is working for me as expected, but UartA and UartB are exposed as /dev/ttyAML1 and /dev/ttyAML2.

1 Like

Thanks for the hope. I tried to wire it but still no luck.
Would you mind sharing how you wired them? I appreciate your input.

Because I build my own kernels and don’t know what dietpi-config does for uart support, I wrote this dtso and applied it staticly for my investigating:

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/dts-v1/;
/plugin/;

/ {
<------>compatible = “hardkernel,odroid-n2-plus”;
};

&{/aliases} { // &aliases
<------>serial1 = “/soc/bus@ffd00000/serial@24000”; // &uart_A;
};

&{/soc/bus@ff600000/bus@34400/pinctrl@40} { // &periphs_pinctrl
<------>uart_a_pins: uart-a {
<------>};
};

&{/soc/bus@ffd00000/serial@24000} { // &uart_A
<------>status = “okay”;
<------>pinctrl-0 = <&uart_a_pins>;
<------>pinctrl-names = “default”;
};

Hello,
I have a problem that ttyAML1 isn’t in the dietpi-config.
How to enable ?

@MichaIng could you have a look pls. thx

I answered here: DietPi + Odroid n2+ UART not working - how to enable? - #7 by MichaIng