Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

UART4 (ttyS2) on friendlycore with kernel 5.15

Featured Replies

I simply can not figure out why UART4 at GPIO1 header with the pins 19 (TX) and 21 (RX) not working at all.

I see that here (ttyS2) is running an agetty but there is no serial activity at any baudrate (9600, 115200).

Please help me.

  • Author

I have found out that there is a script serial-getty@.service which is starting agetty on ttyS2. But after i have removed this file still there is no send/receive on ttyS2 :(

I have also noticed this:

[    0.876663] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 44, base_baud = 1500000) is a 16550A

[    0.987061] printk: console [ttyS2] enabled

which makes me thinking that this is set by kernel command line (?) or where ?

[    0.000000] Kernel command line: storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal androidboot.dtbo_idx=0 swiotlb=1 coherent_pool=1m rw root=/dev/mmcblk2p8 rootfstype=ext4 data=/dev/mmcblk2p9 consoleblank=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

 

 

 

And it is also weird that the

gpio readall

 |   40 |  12 | GPIO1_B0 |  ALT |   | 19 || 20 |   |      | GND(0V)  |     |      |
 |   39 |  13 | GPIO1_A7 |  ALT |   | 21 || 22 | 0 | IN   | GPIO1_D0 | 6   |  56  |

shows ALT and GPIO1_B0 and GPIO1_A7 where should be UART4_TX and UART4_RX

 

I have found out that /dev/ttyS2 becomes the debug port so... I messed up..

But than how I enable the UART4 to ttyS4 ?

 

The emmc flasher SD card image has enabled the ttyS4 non UART4 and it works like it should be...Now just how to find out what is the difference between the installer image and the installed image :)

 

 

Ok! I found out :) I have to rebuild the kernel and reinstall it!

In the 5.15.y kernel the uart4 is disabled and you have to add the rk3399-nanopi4.dtsi the following:

&uart4 {

  status = "okay";

};

I have added this after the 'uart2' definition...

 

It will be nice if I do not have to rebuild the whole image, only the kernel...but after installing with dd the kernel.img and the resources.img the SDS card will not boot :(

47 minutes ago, sbela said:

but after installing with dd the kernel.img and the resources.img

 

This is Armbian forum. We have no idea how stock software is glued together.


Try to use Armbian. Hardware functions are enabled and disabled via armbian-config (if overlays exists). And all you need to do is - enable / disable + reboot. Or you can use DT editor and tackle with the DTS. No rebuild needed.

  • Author

I have tried Armbian and until now works out of the box :) Thank you very much for the suggestion! Now I will try to cross compile Qt5 ...

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.