PINE64

Full Version: Unable to access other UART devices
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a SparkFun GPS module (https://www.sparkfun.com/products/11058) connected to my SOPINE board but I am unable to see any of the UART traffic.

I am running the latest mainline Arch kernel:
  Linux alarm 4.18.0-2-ARCH #1 SMP Fri Sep 14 15:51:33 PDT 2018 aarch64 GNU/Linux

I have tried connecting it to both UART2 and UART4 with no luck.

Does anyone have any ideas on getting this to work? I see traffic when connecting it to the HiKey 96board. It should be outputting 3.3V which should work with UART2.
Hi,

I'm using Ayufan's 3.40 kernel, and I find out that UART2 is disabled by default in data tree file. It's possibility that it's also disabled on anarsoul's kernel, so this is a way how to enable it:
PHP Code:
sudo apt-get install device-tree-compiler
sudo dtc 
-I dtb -O dts -o devicetree.dts /boot/pine64/sun50i-a64-pine64-sopine.dtb 
Now, open devicetree.dts in your favorite editor, search for [email protected], and there should be status = "disabled"; , replace "disabled" with "okay", and save (maybe you will have problems with permissions, so chown the file).

Then:
PHP Code:
sudo mv /boot/pine64/sun50i-a64-pine64-sopine.dtb /boot/pine64/sun50i-a64-pine64-sopine.o.dtb
sudo dtc 
-I dts -O dtb -/boot/pine64/sun50i-a64-pine64-sopine.dtb devicetree.dts 

Now, restart your SOPINE. You should get /dev/ttyS2 here, this is your UART2 :-) .


- gamiee
Thanks for the advice. All the locations aren't exactly the same on Arch, but I figured it out. I now have that serial enabled (it wasn't before).

$ cat /proc/device-tree/soc/serial\@1c28800/status
enabled

But I'm still not seeing anything on the serial:

$ sudo cat /dev/ttyS2
cat: /dev/ttyS2: Input/output error
Woops I changed status to "okay" and still no help
Some progress, I managed to see this in dmesg:
1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 25, base_baud = 1500000) is a U6_16550A

and now I can cat to the ttyS2, but I don't see anything coming up.
Hi,

I think you have different baud rate, the GPS module running on 9600, so you should set it.
for me, I connected my USB to UART converter, (i can send you image later), then installed screen (sudo apt-get install screen), written "screen /dev/ttyS2 9600" (9600 as baud rate), opened Putty on my host PC, set baud rate and com port of USB to UART converter , and it works!
Got it!

It turns out that the pin controller also needs to be set for the UART device. After that it works well.