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.

ttyS2 doesn't work with 5.8.16 DT

Featured Replies

Hi,

I'm using a CubieTruck running Armbian 5.8.16.  /dev/ttyS2 works fine if I use the 4.19.62 dtb but not when using the 5.8.16 dtb.  I am using the uart2 overlay and param_uart2_rtscts.

 

If I try to access the port with picocom it reports "Filedes is not a tty".  Commenting the param_uart2_rtscts line makes no difference.  It appears that uart2 isn't being setup as a serial port when using the 5.8.16 dtb (and overlays).  But the kernel must be okay because it works with the old dtb.

 

Does anybody have a solution here ?  Or can you tell me where the sources for the dtb and overlay are ?  The copies on github seem old.

 

Thanks,

Steven

16 hours ago, phelum said:

Does anybody have a solution here ?

I suggest to decompile both DTB into DTS and compare them with "meld" ...

 

16 hours ago, phelum said:

Or can you tell me where the sources for the dtb and overlay are ?  The copies on github seem old.

Overlays are added using this patch : https://github.com/armbian/build/blob/master/patch/kernel/sunxi-current/general-sunxi-overlays.patch

But looking at patches, I saw this patch, so maybe related : https://github.com/armbian/build/blob/master/patch/kernel/sunxi-current/board-cubietruck-enable-uart2.patch

 

  • Author
7 hours ago, martinayotte said:

I suggest to decompile both DTB into DTS and compare them with "meld" ...

 

Overlays are added using this patch : https://github.com/armbian/build/blob/master/patch/kernel/sunxi-current/general-sunxi-overlays.patch

But looking at patches, I saw this patch, so maybe related : https://github.com/armbian/build/blob/master/patch/kernel/sunxi-current/board-cubietruck-enable-uart2.patch

 

Thanks for the reply.  I decompiled and compared.  The newer DTB has a "bluetooth" stanza in the uart2 stanza.  I've now downloaded the current release (5.10) and the DTB from it has the uart2.bluetooth stanza and UART2 doesn't work.  But if I remove the stanza from the DTS then the resultant DTB does work.  I don't need the Armbian enable_uart2 overlay or the param_uart2_ctsrts.

 

I suppose the next step is to find out why the uart2.bluetooth stanza confuses the kernel so it doesn't create the device correctly.  Viewing /proc/interrupts and /sys/class/tty/ttyS2 shows things aren't quite right.

 

Thanks,

Steven

  • Author
On 11/3/2020 at 1:02 AM, martinayotte said:

Glad to see that you figured it out !

 

Well, only to an extent.  I can now load the firmware into the AP6210 but Bluetooth seems dead.  "hcitool dev" shows the hci0 device but "hcitool scan" won't detect any other bluetooth devices.  Also, "hcitool scan" on other devices dosen't detect this CT.

 

I've also played with linux-5.10.0 from kernel.org because the source is available.  But the HDMI display doesn't work (sun4i-drm can't open pipelines) and syslog is reporting that the build_platform code causes an error apparently trying to get the name for IRQ 0 (not a valid IRQ).  Bluetooth results are consistent with the 5.8.16 kernel (i.e. depends on which DTB I use).

 

Is the source for the 4.19.62-sunxi kernel available ?

 

Thanks,

Steven

  • Author

After my failed experiment with the 5.10 kernel I downloaded the source to the Armbian 5.8.16 kernel.  It works well and the extra for the AXP209 driver (charge RTC battery) is good.  I still can't get ttyS2 to work with the new DTB so I'm sticking to the 4.19.62 DTB for the moment.

 

Cheers,

Steven

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.