Jump to content
  • 0

UART4 (ttyS2) on friendlycore with kernel 5.15



3 answers to this question

Recommended Posts

  • 1
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.

Link to comment
Share on other sites

Donate your old hardware to community. Start a giveaway Raffle!

  • 0

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 :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines