ttyS2 doesn't work with 5.8.16 DT


Recommended Posts

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

Link to post
Share on other sites
Donate and support the project!

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

 

Link to post
Share on other sites
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

Link to post
Share on other sites
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

Link to post
Share on other sites

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

Link to post
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.

Guest
Reply to this topic...

×   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.

Loading...