Jump to content

uart3 overlay for cubietruck/bananapi stopped working on kernel 5+


1voud

Recommended Posts

Hi,

I'm using a cubietruck and bananapi board (both A20 devices) for a long time (They run very stable for many years). I'm using uart3 for interfacing with arduino boards using the kernel overlay.

When I upgrade the kernel to a version 5+ the overlay does not work anymore and ttyS3 is not working and missing in dmesg. The behaviour is the same on both boards.

 

Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3708 bytes read in 34 ms (106.4 KiB/s)
## Executing script at 43100000
U-boot loaded from SD
Boot script loaded from mmc
217 bytes read in 26 ms (7.8 KiB/s)
7343156 bytes read in 451 ms (15.5 MiB/s)
7744344 bytes read in 473 ms (15.6 MiB/s)
Found mainline kernel configuration
42183 bytes read in 70 ms (587.9 KiB/s)
1078 bytes read in 96 ms (10.7 KiB/s)
Applying kernel provided DT overlay sun7i-a20-uart3.dtbo
5845 bytes read in 82 ms (69.3 KiB/s)
Applying kernel provided DT fixup script (sun7i-a20-fixup.scr)
## Executing script at 44000000
## Loading init Ramdisk from Legacy Image at 43300000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7343092 Bytes = 7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Ramdisk to 498ff000, end 49fffbf4 ... OK
   reserving fdt memory region: addr=43000000 size=70000
   Loading Device Tree to 4988c000, end 498fefff ... OK

Starting kernel ...
root@bananapi:~# cat /proc/version
Linux version 5.4.20-sunxi (root@builder) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #20.02.1 SMP Mon Feb 17 02:09:41 CET 2020
root@bananapi:~# cat /boot/armbianEnv.txt 
verbosity=1
logo=disabled
console=both
disp_mode=1920x1080p60
overlay_prefix=sun7i-a20
rootdev=UUID=2a591b9c-5c95-34af-9d1a-a591d0134ad8
rootfstype=ext4
overlays=uart3
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

It looks like the overlay is loaded correct. Is there anything wrong in my setup, can I try something to make it work (4.19.104-sunxi is still working fine :)

 

Thank you!

 

 

Link to comment
Share on other sites

1 hour ago, 1voud said:

ttyS3 is not working and missing in dmesg

What "dmesg | grep tty" is reporting ?

1 hour ago, 1voud said:

It looks like the overlay is loaded correct.

Is "cat /proc/device-tree/soc/serial@1c28c00/status" reporting "okay" or "disabled" ?

 

Are you using PG6/PG7 or PH0/PH1 to connect to your arduino board ?

Because UART3 overlay if defaulted to PG6/PG7, except if you add "param_uart3_pins=b" to switch it to PH0/PH1.

Link to comment
Share on other sites

Thank you for the reply.

13 hours ago, martinayotte said:

What "dmesg | grep tty" is reporting ?

 

root@bananapi:/# dmesg |grep tty
[    0.000000] Kernel command line: root=UUID=2a591b9c-5c95-34af-9d1a-a591d0134ad8 rootwait rootfstype=ext4 console=tty1 console=ttyS0,115200 h1
[    0.001175] printk: console [tty1] enabled
[    2.868060] printk: console [ttyS0] disabled
[    2.888269] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 49, base_baud = 1500000) is a U6_16550A
[    2.888344] printk: console [ttyS0] enabled
[    2.911471] 1c28c00.serial: ttyS1 at MMIO 0x1c28c00 (irq = 50, base_baud = 1500000) is a U6_16550A
[    2.934678] 1c29c00.serial: ttyS2 at MMIO 0x1c29c00 (irq = 51, base_baud = 1500000) is a U6_16550A
[   11.321905] systemd[1]: Created slice system-getty.slice.

 

13 hours ago, martinayotte said:

Is "cat /proc/device-tree/soc/serial@1c28c00/status" reporting "okay" or "disabled" ?

root@bananapi:/# cat /proc/device-tree/soc/serial@1c28c00/status
okayroot@bananapi:/# 

 

13 hours ago, martinayotte said:

Are you using PG6/PG7 or PH0/PH1 to connect to your arduino board ?

Because UART3 overlay if defaulted to PG6/PG7, except if you add "param_uart3_pins=b" to switch it to PH0/PH1.

 

I'm using the PG6/PG7 pins.

Link to comment
Share on other sites

3 hours ago, 1voud said:

[ 2.911471] 1c28c00.serial: ttyS1 at MMIO 0x1c28c00 (irq = 50, base_baud = 1500000) is a U6_16550A

So, according to your "dmesg" output, UART3 came up into /dev/ttyS1 !

You can then try to communicate with your arduino board using that port ...

Link to comment
Share on other sites

2 hours ago, martinayotte said:

So, according to your "dmesg" output, UART3 came up into /dev/ttyS1 !

You can then try to communicate with your arduino board using that port ...

Sorry for wasting your time, it is really that simple. Now running happily on kernel 5.4.20.

Thank you for your help!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines