NanoPi R2S how to enable UART1 in OpenWrt build

Hello! I'm using NanoPi R2S and OpenWRT. I found that is not possible to send data via ttyS1, I think that UART1 is disabled in the kernel. How do I create an OpenWRT with UART1 enabled ?

is it discovered during boot, in dmesg.

dmesg | grep uart

[    0.000000] earlycon: uart8250 at MMIO32 0x00000000ff130000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] Kernel command line: console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff130000 root=PARTUUID=5452574f-02 rw rootwait
[    0.062961] rockchip-pinctrl pinctrl: parse function(23): uart0
[    0.062974] rockchip-pinctrl pinctrl: group(0): uart0-xfer
[    0.063023] rockchip-pinctrl pinctrl: group(1): uart0-cts
[    0.063053] rockchip-pinctrl pinctrl: group(2): uart0-rts
[    0.063083] rockchip-pinctrl pinctrl: group(3): uart0-rts-gpio
[    0.063114] rockchip-pinctrl pinctrl: parse function(24): uart1
[    0.063126] rockchip-pinctrl pinctrl: group(0): uart1-xfer
[    0.063177] rockchip-pinctrl pinctrl: group(1): uart1-cts
[    0.063208] rockchip-pinctrl pinctrl: group(2): uart1-rts
[    0.063237] rockchip-pinctrl pinctrl: group(3): uart1-rts-gpio
[    0.063268] rockchip-pinctrl pinctrl: parse function(25): uart2-0
[    0.063279] rockchip-pinctrl pinctrl: group(0): uart2m0-xfer
[    0.063328] rockchip-pinctrl pinctrl: parse function(26): uart2-1
[    0.063339] rockchip-pinctrl pinctrl: group(0): uart2m1-xfer
[    0.152461] rockchip-pinctrl pinctrl: maps: function uart2-1 group uart2m1-xfer num 3
[    0.152509] rockchip-pinctrl pinctrl: found group selector 29 for uart2m1-xfer
[    0.152585] rockchip-pinctrl pinctrl: enable function uart2-1 group uart2m1-xfer
[    0.155299] printk: bootconsole [uart8250] disabled
[   10.146669] usbserial: USB Serial support registered for ch341-uart

it appears to be detecting two serial ports....

Thank you! How i can bind UART1 with ttyS1 ?
I trying to use minicom for send some data in /dev/ttyS1 , but i cant see anything on uart1-tx pin

There is still no idea how to use UART1? In armbian OS I am working with /dev/ttyS1 and it works

I solved my problem by rebuilding the kernel.
In the target / linux / rockchip / patches-5.4 / 001-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch file, I added a line:

+ & uart1 {
+ status = "okay";
+};

Now UART1 is working

1 Like

Hello! Now I need to disable DEBUG via UART2.
I have read the instructions from link and method w / o Kernel Rebuild is working.

But I would like to completely disable debug and tried the With Kernel Rebuild method, it did not work for RK3328. I changed openwrt / target / linux / rockchip / armv8 / config-5.4 according to the instructions and rebuilt the kernel. But Debug via UART2 is still enabled

I hope for your help and hints.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.