Enabling UART on VIM4 using Ubuntu Desktop image doesn't work

Ubuntu Desktop

Khadas official

Please describe your issue below:

When trying to enable the available UART with this information UART | Khadas Documentation, no /dev/ttyS4 device file is being creating

After trying a couple of other possible obvious device files, I gave up.

Please can you provide me accurate information about what should work?

Thanks.

Manfred

Edit file /boot/dtb/amlogic/kvim4.dtb.overlay.env add uart_e to node fdt_overlays=, save and reboot.

You will find node /dev/ttyS4.

Thanks a lot Nick for the quick response. Works like a charm now.

I seem to be having the same issue, however, the solution did not work for me. I have a VIM4 running an ubuntu 20.04 server image.

$ cat /boot/dtb/amlogic/kvim4.dtb.overlay.env
fdt_overlays=uart_e

$ ls /dev/ttyS*
/dev/ttyS0  /dev/ttyS1

$ ls /boot/dtb/amlogic/
kvim4.dtb  kvim4.dtb.overlay.env

$ cat /boot/env.txt 
#############################DO NOT TOUCH THIS OPTION#############################
rootdev=UUID=f596e1cf-584c-4859-a026-91a919bda4b1
#############################DO NOT TOUCH THIS OPTION#############################

# Cooling FAN mode
# auto -  auto schedule the FAN speed depend on the CPU temperature
# low  -  FAN low speed
# mid  -  FAN middle speed
# high -  FAN high speed
fan_mode=auto

# DMA coherent_pool size
# Don't touch unless you know what you are doing
dma_size=2M

# HDMI resolution auto detection
# yes - auto detection
# no  - set HDMI resolution via 'hdmi' node
hdmi_autodetect=yes

# HDMI mode
# Resolution Configuration
#    Symbol             | Resolution
# ----------------------+-------------
#    "480x272p60hz"     | 480x272 Progressive 60Hz
#    "480x320p60hz"     | 480x320 Progressive 60Hz
#    "480p60hz"         | 720x480 Progressive 60Hz
#    "576p50hz"         | 720x576 Progressive 50Hz
#    "720p60hz"         | 1280x720 Progressive 60Hz
#    "720p50hz"         | 1280x720 Progressive 50Hz
#    "1080p60hz"        | 1920x1080 Progressive 60Hz
#    "1080p50hz"        | 1920x1080 Progressive 50Hz
#    "1080p30hz"        | 1920x1080 Progressive 30Hz
#    "1080p24hz"        | 1920x1080 Progressive 24Hz
#    "1080i60hz"        | 1920x1080 Interlaced 60Hz
#    "1080i50hz"        | 1920x1080 Interlaced 50Hz
#    "2160p60hz"        | 3840x2160 Progressive 60Hz
#    "2160p50hz"        | 3840x2160 Progressive 50Hz
#    "2160p30hz"        | 3840x2160 Progressive 30Hz
#    "2160p25hz"        | 3840x2160 Progressive 25Hz
#    "2160p24hz"        | 3840x2160 Progressive 24Hz
#    "smpte24hz"        | 3840x2160 Progressive 24Hz SMPTE
#    "2160p60hz420"     | 3840x2160 Progressive 60Hz YCbCr 4:2:0
#    "2160p50hz420"     | 3840x2160 Progressive 50Hz YCbCr 4:2:0
#    "640x480p60hz"     | 640x480 Progressive 60Hz
#    "800x480p60hz"     | 800x480 Progressive 60Hz
#    "800x600p60hz"     | 800x600 Progressive 60Hz
#    "1024x600p60hz"    | 1024x600 Progressive 60Hz
#    "1024x768p60hz"    | 1024x768 Progressive 60Hz
#    "1280x800p60hz"    | 1280x800 Progressive 60Hz
#    "1280x1024p60hz"   | 1280x1024 Progressive 60Hz
#    "1360x768p60hz"    | 1360x768 Progressive 60Hz
#    "1440x900p60hz"    | 1440x900 Progressive 60Hz
#    "1600x900p60hz"    | 1600x900 Progressive 60Hz
#    "1600x1200p60hz"   | 1600x1200 Progressive 60Hz
#    "1680x1050p60hz"   | 1680x1050 Progressive 60Hz
#    "1920x1200p60hz"   | 1920x1200 Progressive 60Hz
#    "2560x1080p60hz"   | 2560x1080 Progressive 60Hz
#    "2560x1440p60hz"   | 2560x1440 Progressive 60Hz
#    "2560x1600p60hz"   | 2560x1600 Progressive 60Hz
#    "3440x1440p60hz"   | 3440x1440 Progressive 60Hz
hdmi=720p60hz

# Specify the log level
# 2 - default, output both kernel logs & system logs
# 1 - only output system logs
# 0 - disable all output logs
loglevel=2

# Setup splash
# true  - enable splash
# false - disable splash
enable_splash=true

# User kernel args
# Add customer kernel args here
user_kernel_args=

# Framebuffer Rotate
# 0 - default
# 1 - clockwise, 90 degrees
# 2 - clockwise, 180 degrees
# 3 - clockwise, 270 degrees
fb_rotate=0

# Device Tree Overlays
#   uart3           -- Enable UART3 (uart_C, GPIO Header PIN15 & PIN16)
#   pwm_f           -- Enable PWM_F (GPIO Header PIN35)
#   i2c3            -- Enable i2c3 (GPIO Header PIN22 & PIN23)
#   spi1            -- Enable SPI1 (GPIO Header PIN15 & PIN16 & PIN35 & PIN37), pwm_f need to be removed
#   i2s             -- Enable I2S (GPIO Header PIN29 & PIN30 & PIN31 & PIN32 & PIN33)
#   os08a10         -- Enable OS08A10 Camera
#   onewire         -- Enable onewire bus (GPIO Header PIN15)
#   disable-ts050   -- Disable TS050 LCD
#   m2x-eth         -- Enable M2X 100M ethernet. Note: 1G ethernet will be disabled.
#   otg-device      -- Enable USB OTG Device
#   watchdog        -- Enable watchdog
#overlays=uart3 pwm_f i2c3 i2s os08a10 watchdog
overlays=uart4 disable-ts050

@nkhedekar the overlay name is wrong, its uart_e.

Also it must be applied in overlays/kvim4.dtb.overlay.env, not in boot/env.txt, Kernel arguments in vim4 are only read from uEnv.txt file.

please retry and check.

Hi @Electr1 , maybe I am missing something. I have already added fdt_overlays=uart_e in the /boot/dtb/amlogic/kvim4.dtb.overlay.env but that does not seem to work. Is there another file that needs to be modified? Also, where can one find the uEnv.txt file?
I also tried changing the last line of the /boot/env.txt to overlays=uart_e disable-ts050, but that did not have any effect either.

@nkhedekar maybe please check your OS installation and use newer version.

We don’t maintain ubuntu 20.04, please use the ubuntu 22.04 images.

Ah, ok, I’ll try to use some other interface then. Unfortunately switching to 22.04 is not feasible at the moment. Thank you @Electr1 @numbqq