sbela Posted October 14, 2022 Share Posted October 14, 2022 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. 0 Quote Link to comment Share on other sites More sharing options...
sbela Posted October 15, 2022 Author Share Posted October 15, 2022 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 0 Quote Link to comment Share on other sites More sharing options...
Igor Posted October 15, 2022 Share Posted October 15, 2022 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. 0 Quote Link to comment Share on other sites More sharing options...
sbela Posted October 16, 2022 Author Share Posted October 16, 2022 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 ... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.