Jump to content

how to enable UART on Nano Pi K2?


jimg

Recommended Posts

How do you enable the UART GPIO serial port (i.e., the one on pins 8 & 10) on a Nano Pi K2? The only active serial port I see from `dmesg | grep serial` is ttyAML0, which I'm assuming is the serial port on the debugging pins.  FWIW,  I'm using the 4.14.69-meson64 kernel on a Nano Pi K2.

Link to comment
Share on other sites

Basically the UART needs enabled in the device tree.  I haven't checked it, but

 

image.png.d9b32157513fc55f4271384dd5113617.png

 

UART C, it looks like.  Since this is a Pi-factor board, I'll look into enabling that.

 

[edit] I also see the bluetooth uart is disabled, it's in the device tree but not enabled by default.  :huh:

Link to comment
Share on other sites

Thanks!  Would it have been possible to resolve this as a DT overlay?  I found an overlay that enabled UART_C on the nano pi k2, so I tried:

armbian-add-overlay uart_c_on.dts

I first got the error"Overlays are supported only on A10, A20, H3, H5 and A64 based boards", so I commented out the test for the sunxi boards in the scirpt.

I then got the error "Overlays are supported only on mainline kernel based images".  I thought I had a mainline kernel, so I commenented that test out, too.

The final error was "Error: dtc does not support compiling overlays".  I don't know how to get an overlay-compatible device tree compiler, so I gave up.:(

Link to comment
Share on other sites

Overlays are not on enabled on these boards yet, it's quite a bit of work that I haven't gotten into. 

 

I have tried to enable it (and the bluetooth uart) the most straightforward way on a  fresh build, however it only added an error about the bluetooth uart, it is not working yet.  I'm not deep enough to see what's going on, so the probing failed, but nothing else showed up.  I don't know if @Neil Armstrong has any input on why the uart C isn't coming up, in the meantime I'll take another look.

 

 

 

Link to comment
Share on other sites

Thanks for all your work.  I really appreciate it.  FWIW, I need uart C more than I need BT.  

 

I don't suppose using the newer 4.17 kernel instead of 4.14 would help, would it?

 

I'm currently using the UART on an Odroid C2 (different board but same SoC), but that's using the legacy kernel.  I really like the features and performance (and cost!) of the Nano Pi K2 better.

Link to comment
Share on other sites

@TonyMac32 If you remember, I was working on UARTC overlay 2 days ago, I figured out why the overlay wasn't loading : simply that Main DT didn't have an alias predefined for it.

But, although the overlay was then loading fine, the UART loopback test didn't work ... :( Trying to dig the issue, I've discovered this thread ...

 

@Neil Armstrong Seeing this patch, I gave it a try, it worked ! :rolleyes:

Do you know why this patch isn't in Mainline yet, although this patch exist since June, and those previous faulty pins exist since more than 2 years ?

 

@jimg If you build you own image for DEV NanoPi-K2, you will get it working ... Otherwise, wait any offical DEV build.

Link to comment
Share on other sites

Just now, martinayotte said:

Especially when driving ... :lol:

 

:lol: I get yelled at by my wife because I don't answer the phone when driving unless my car is sync'd over Bluetooth...  In reality though I should set up some kind of task list, @jimg isn't the first person who's issue went unresolved for way longer than it should have...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines