Thank you so much for your reply. Your tips on how to debug serial port and GPIOs were extremely helpful.
Thanks to that I have found the reason it was not working. It was poorly soldered pin of bidirectional level shifter (the one for the driver enable pin).
You've pointed me in the right direction.
I will leave some information about my configuration and wiring, if someone would try the same thing.
Here is the pinout for NanoPi NEO.
PA1 on the board can be configured with
PG11 on the board can be configured with
See section 4.1. of board documentation to see more.
I use MAX485 module for RS485 and all wires for it (TX, RX, DE) are going through bi-directional level shifter (3.3V <-> 5V).
I am running Armbian 20.11 Bionic with Linux 5.8.16-sunxi on NanoPi NEO. I've tried latest one, but had some problems with accessing ports.