Help! Unable to activate second UART

Second UART is not working on VIM3. Debug UART works but we prefer to leave is for debugging.

On VIM 3 I try to add device
sudo fdtput -t s /dtb.img /serial@c81004e0 status okay
But get FDT_ERR_NOTFOUND error

Any ideas?
How to turn it on?

Hi
You are using PIN15/16 for the UART, right?

Which version OS you installed?

Yes, PIN15,16 and GND.

I use OS Linux Khadas 4.9.206 #13 SMP PREEMPT Tue Dec 31 CST 2019 aarch64 GNU/Linux

@numbqq will response you when he available.

u need Check & edit DTB

# decompile dtb -> dts
dtc kvim3_linux.dtb > kvim3_linux.dts

# CHECK &&  OPEN in editor
grep -e serial@ kvim3_linux.dts -A10 | grep -e serial -e disabled
			serial@3000 {
			serial@4000 {
				status = "disabled";
	serial@ffd24000 {
	serial@ffd23000 {
		status = "disabled";
	serial@ffd22000 {
		status = "disabled";
		serial0 = "/soc/aobus@ff800000/serial@3000";
		serial1 = "/serial@ffd24000";
		serial2 = "/serial@ffd23000";
		serial3 = "/serial@ffd22000";
		serial4 = "/soc/aobus@ff800000/serial@4000";
		uart_AO = "/soc/aobus@ff800000/serial@3000";
		uart_AO_B = "/soc/aobus@ff800000/serial@4000";
		uart_A = "/serial@ffd24000";
		uart_B = "/serial@ffd23000";
		uart_C = "/serial@ffd22000";

CHANGE from DISABLED to OKAY

status = "disabled";
status = "okay";

recompile dtb back

cp kvim3_linux.dtb kvim3_linux.dtb.old
dtc kvim3_linux.dts > kvim3_linux.dtb
4 Likes

Hyphop, great thanks that you don’t leave your customers )))
I did your advices and then

sudo fdtput -t s /dtb.img /serial@ffd22000 status okay
sudo fdtput -t s /dtb.img /serial@ffd23000 status okay
sudo fdtput -t s /dtb.img /serial@ffd24000 status okay

And it works! Thank you very much!
One funny thing - PIN 15 &16 correspond to ttyS3. Port ttyS1 create connection but not answering - unclear where are pins for it. And ttyS4 is not available in system.

Hello everyone,

I encountered the same problem with a khadas vim3 Pro, the same pins (15, 16 and GND), and the following ubuntu firmware: VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_SD-USB_V20191231.7z. I performed the change on the kvim3_linux.dtb file as described by switching the status from disabled to okay. But the UARTS still don’t work (I checked with minicom -D /dev/ttyS0 and minicom -D /dev/ttyS1, typed ctrl+a, z and then e while connecting the rx and tx pin to the same jumper to see If I am able to receive and send the same things).
@hyphop @numbqq @Frank
any suggestions?
thanks for the attention to this message

@dumahackerbit Please use the latest firmware. And you can follow this doc

Hello, Maybe try to switch the RX and TX leads around.

1 Like

Thanks for the fast reply, can I still use ubuntu 18.04 with the least firmware? Anyway, if I follow this document and I enable uart3 (by doing overlays=uart3) I still can’t see it in /dev/ttyS* after reboot. PIN15 and PIN16 still don’t work!

We don’t maintain Ubuntu 18.04 anymore, please use the latest Ubuntu 20.04 with Linux 4.9 kernel.

1 Like

@dumahackerbit If you need to use overlay with 18.04 . You need to build you self image with fenix .The least release firmware with 18.04 don’t support overlay. And it can’t upgrade