Enable UART_E on Khadas VIM4

Hi all,

in the Khadas images for the VIM4 uart can be enabled via device tree overlay.
This enables the device /dev/ttyS4.
As far as I understood, Coreelec’s kernel does not support overlays, so I tried myself
by decompiling the device tree and enabling node serial@fe080000 by setting status = “okay”.
This did not work, and to be frank, I have no clue about what I am doing.

Can someone advice me what to change in the device tree to get up that additional serial connection?

Thanks in advance,

Christoph

You will need to add this to DT source:

&uart_E {
	status = "okay";
};

Or set status okay by fdtput on existing dtb.img.

The pins are default used for TSIN so I am not sure if there will be a issue.

Hi,

I tried
fdtput /flash/dtb.img "&uart_E" status "okay"
Not sure whether it is correct but it gives me
Error at '&uart_E': FDT_ERR_BADPATH
There is no node uart_E or &uart_E in the device tree. However, in the khadas device tree uart_E occurs in the __symbols__ section and refers to /soc/serial@fe080000. So I guess that uart_E is an alias
for that path.
I have already changed node serial@fe080000 to status = "okay" but that did not work.

Just to be sure: I compiled the device tree to /flash/dtb.img. Is that correct?

Christoph

Hi,

I somehow achieved it. Just in case someone else also needs it:
It involves two changes in the device tree:

In node uart_e change
groups = "uart_e_tx\0uart_e_rx\0uart_e_cts\0uart_e_rts";
to
groups = "uart_e_tx\0uart_e_rx";

In node serial@fe080000 change

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

The device /dev/ttyS4 appears then after reboot. I additionally had to configure it with

stty -F /dev/ttyS4 19200 sane

to make the arduino understand.

Christoph

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