Linux support for GPIO Serial on VIM3


I tried using uart with gpio on pins 15 and 16. But in /dev the new device does not appear anything resembling ttyAMA0 or ttyACM0 or anything like that. And libraries like WiringPi, according to the description of their functions, only allows to read from a device, that is initialized in the system. I also tried using PySerial library (because I use Python 3.6 to program my device), but it doesn’t see any devices with available serial. How can I link a serial connected to gpio to a device in /dev or what I need to do to use GPIO serial?

I used an image VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_EMMC_V20191231 from website

1 Like

@knyazer You need to open it in dts , did you know how to use fenix ? You need to clone and edit dtb , then rebuild a image.

I found dts and dtb files in fenix/linux/arch/arm64/boot/dts/amlogic after I installed and started fenix. But I do not know what to edit in these files, and how to open .dtb file for editing , and most likely you did not mean these files. Sorry for the questions, I haven’t been working with linux for so long.

Open up kvim3_linux.dts and add these lines

&uart_C {
status = “okay”;

next to this block

&uart_A {
status = “okay”;

delete kvim3_linux.dtb

Recompile kernel and dtb using this command
$ make kernel-deb

@knyazer OK. Edit this file fenix/linux/arch/arm64/boot/dts/amlogic/ , and add it to you dts

&uart_C {
    status = "okay";

Then use this command to update

$ make kernel && make debs $$ make 

Final,use burn-tool to burn it .


Thanks, it worked on /dev/ttyS3