4 high speed serial lines possible on Odroid C4 ?

Post Reply
att2
Posts: 60
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english
ODROIDs: Odroid c2
Location: Graz, Austria, Europe
Has thanked: 6 times
Been thanked: 8 times
Contact:

4 high speed serial lines possible on Odroid C4 ?

Post by att2 »

Hello,
Since Odroid C2 is discontinued, I guess I have to ask again the same thing that I asked about the Odroid C2 : Are four high-speed serial ports possible ? If yes, do I have to change some Device Tree Blob file? If yes, what changes need to be done?

Thank you for your help and understanding,
Alex

crashoverride
Posts: 5372
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 452 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by crashoverride »

I took a quick look, and it does appear that 4 UARTs are available.

The datasheet indicates 5 UARTS are provided:
https://dn.odroid.com/S905X3/ODROID-C4/ ... kernel.pdf
p 1021

Cross referencing the GPIO headers with the datasheet MUX table (p23-27), it appears 3 UARTS can be configured on J2 and 1 UART on J7
https://wiki.odroid.com/odroid-c4/hardw ... connectors

J2
Pins 8,10 = UART_EE_A
Pins 33,15 = UART_EE_B
Pins 26,32 = UART_EE_C

J7
Pins 6,5 = UART_AO_B

They will likely need to be enabled in the device tree. Someone else will need to provide those details.

[edit]
The boot.ini should be able to add/modify/remove device tree entries. Its possible that a configuration option could be added there instead of modifying the device tree blob.

User avatar
odroid
Site Admin
Posts: 37412
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1798 times
Been thanked: 1145 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by odroid »

Our server for wiki, download, magazine is under maintenance now.
It will be live again several hours later.

Edit: the server is online now.
Since we've started to support the Device Tree Overlay feature several months ago, you can enable two UART ports on the 40pin header by editing config.ini file.
https://wiki.odroid.com/common/applicat ... ee_overlay
https://wiki.odroid.com/common/applicat ... _with_dtbo
We've tested two user UART ports on the C4 at least.
https://wiki.odroid.com/odroid-c4/appli ... /gpio/uart

To activate other UART ports, you probably need to edit/compile the device tree source code.

att2
Posts: 60
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english
ODROIDs: Odroid c2
Location: Graz, Austria, Europe
Has thanked: 6 times
Been thanked: 8 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by att2 »

odroid wrote:
Mon Mar 08, 2021 10:46 am
To activate other UART ports, you probably need to edit/compile the device tree source code.
Please post such complete solutions with proper DTB/DTS files to activate these extra UARTS. Thanks!!!

User avatar
odroid
Site Admin
Posts: 37412
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1798 times
Been thanked: 1145 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by odroid »

Are you going to use the J7 7-pin connector too?

att2
Posts: 60
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english
ODROIDs: Odroid c2
Location: Graz, Austria, Europe
Has thanked: 6 times
Been thanked: 8 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by att2 »

If we can use any pins from the J7 7-pin-row, it would surely be useful.
In the meantime, I changed the /media/boot/config.ini file so it displays:

Code: Select all

overlays="spi0 i2c0 i2c1 uart0 uart1 uart2" 
and this neatly seems to enable at least 3 more UARTS. Very nice.

By the way I also saw that the ubuntu 20.04 supports a power button - to which pins do I have to connect the power button ?

att2
Posts: 60
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english
ODROIDs: Odroid c2
Location: Graz, Austria, Europe
Has thanked: 6 times
Been thanked: 8 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by att2 »

(sorry for the rather long and strange status message)
Hmm... it's not as easy as I hoped...

First of all, the minimal ubuntu 20.04 image isn't as minimal as I needed to.... and when installing Gnome from Tasksel, it blows up to 7 GB....
so I am seeking for a really minimal and fast booting image with a tiny GUI, something like Openbox.

Second, I need three serial lines, preferably at Pin 8+10, Pin 33,15 and Pin 26,32 on the 40 Pin header, but additionally I need a real-time clock PCF8563.
Oddly, the PCF 8563 kernal module was not compiled, despite you can select it in the kernel compile menu (/usr/src/linux...) with "make menuconfig" -> rtc clock ->

My Odroid C4 system:

root@odroid:~# uname -a
Linux odroid 4.9.241-69 #1 SMP PREEMPT Tue Feb 16 03:06:52 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

Disk usage:
/dev/mmcblk0p2 7.0G 6.4G 540M 93% / -> far too much, and I only installed the absolute basic stuff -> please kindly suggest something that boots fast and is small; on the Odroid C2 I used "openbox"

Anyway I need the PCF8563 RTC clock, preferably between pins 7 (RTC input), pin 27 and pin 28 (i2c RTC) on the 40pin header so we won't have to change the layout :-)
If you can assist me here, I would greatly appreciate it.

I also tried to decompile the /media/boot/amlogic/meson64_odroidc4.dtb and do the same changes as I have done for the Odroid C2 in my previous posts.... ( viewtopic.php?f=139&t=36309&p=278318#p278318 ) -> the decompiled Device Tree Blob file looks totally different compared to a Odroid c2 DTB, and does not have any trace of a realtime clock "PCF 8563" , so any help here is greatly appreciated.

At the moment, I also just hope I have the 3 additional serial lines at these pins described (8+10, 33+15, 26+32). I yet have to try them out.

We also have our own shutdown mechanism in the Odroid C2 at pins 11 (shutdown input) , pin 13 (shutdown output to other devices who need to shutdown) ; how can I implement this ?

Any help is much appreciated.

User avatar
odroid
Site Admin
Posts: 37412
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1798 times
Been thanked: 1145 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by odroid »

For the PCF8563 RTC Shield configuration, this wiki page must be helpful.
https://wiki.odroid.com/accessory/add-o ... rtc_shield

We will try enable three UART ports on the 40pin header first by adding another DTBO file for UART2.
Let's try solving one by one.

joshua.yang
Posts: 507
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
Has thanked: 36 times
Been thanked: 149 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by joshua.yang »

Hi.

Finally, we have enabled all the four UART pins on the Odroid-C4 including the one from the 7-pin header.

The three of the UART DTBO files name as uart0.dtbo, uart1.dtbo, uart2.dtbo respectively, and the one from the 7-pin header names uart3.dtbo.
To get further information, please see the newly updated UART wiki page: https://wiki.odroid.com/common/applicat ... _odroid-c4

Code: Select all

$ ls -al /dev/ttyS?
crw--w---- 1 root tty     239, 0 Apr 26 05:45 /dev/ttyS0
crw-rw---- 1 root dialout 239, 1 Mar 17 21:36 /dev/ttyS1
crw-rw---- 1 root dialout 239, 2 Mar 17 21:36 /dev/ttyS2
crw-rw---- 1 root dialout 239, 3 Mar 17 21:36 /dev/ttyS3
crw-rw---- 1 root dialout 239, 4 Mar 17 21:36 /dev/ttyS4
Before using this you have to ensure your system is up to date.

Code: Select all

sudo apt update && sudo apt full-upgrade
Please let us know it works well or not. :)
These users thanked the author joshua.yang for the post (total 2):
odroid (Mon Apr 26, 2021 4:13 pm) • att2 (Fri Apr 30, 2021 4:56 am)

User avatar
rooted
Posts: 8517
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 345 times
Contact:

Re: 4 high speed serial lines possible on Odroid C4 ?

Post by rooted »

Do you know the maximum speed?

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests