Unable to access other UART devices
#1
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.
#2
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 uart@01c28800, 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
Also known as gamiee
#3
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
#4
Woops I changed status to "okay" and still no help
#5
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.
#6
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!
#7
Got it!

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to change resolution and poor performance MaWalla 3 5,412 12-26-2017, 11:06 AM
Last Post: dkryder

Forum Jump:


Users browsing this thread: 1 Guest(s)