Serial ports and GPIO on the beaglebone

41 views
Skip to first unread message

Kristian Klausen

unread,
Oct 17, 2014, 10:34:32 AM10/17/14
to lsts-to...@googlegroups.com
Hi,

How do you configure the Beaglebone's device tree with Glued? For instance, in one of our applications we want to use Serial 1, 2 and 4, and in some others we need some basic GPIO.

Regards,
Kristian

Ricardo Martins

unread,
Oct 17, 2014, 10:43:32 AM10/17/14
to Kristian Klausen, lsts-to...@googlegroups.com
Hi Kristian,

Take a look at systems/lctr-b2xx/patches/linux/3.14.16/00-lctr-b2xx-dts.patch. We start with the standard am335x-boneblack.dts DTS file and configure one GPIO for PPS and enable UART1. If you tell me the pins that you want to use for UARTs and GPIOs I can create two DTS files for you.

--
You received this message because you are subscribed to the Google Groups "LSTS Toolchain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lsts-toolchai...@googlegroups.com.
Visit this group at http://groups.google.com/group/lsts-toolchain.
To view this discussion on the web visit https://groups.google.com/d/msgid/lsts-toolchain/9f9348bf-b178-45e4-acff-ea62e7e8ad05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kristian Klausen

unread,
Oct 17, 2014, 11:02:53 AM10/17/14
to lsts-to...@googlegroups.com, kkn...@gmail.com
Hi,

Thanks, that would be great.
1st application:

UART1 on pins 24 and 26, (P9), (should be the same as what's currently in use)
UART4 on pins 11 and 13, (P9), MODE6 afaict.
UART2 on pins 21 and 22, (P9), MODE1

2nd application:
UART1 on pins 24 and 26, (P9), (should be the same as what's currently in use)
UART4 on pins 11 and 13, (P9), MODE6 afaict.
GPIO on pins 21 and 22, (P9), MODE7:
Pin 21, GPIO 3, gpio0[3] OUTPUT
Pin 22, GPIO 2, gpio0[2] INPUT PULLDOWN

Source: http://elinux.org/Beagleboard:Cape_Expansion_Headers

So the difference is that pins 21 and 22 are UART 2 on one application, and GPIO on the other.

Regards,
Kristian

Kristian Klausen

unread,
Oct 23, 2014, 8:53:50 AM10/23/14
to lsts-to...@googlegroups.com, kkn...@gmail.com
I took a crack at this, resulting in https://github.com/krisklau/glued/commit/3870dea2d51191f994a1d6306ebb4edf0a555b92

This works fine, but I've discovered that having seperate device-tree files in glued is not the best idea in the current state. If I want to create Glued for, say, two vehicles that uses different DTBs, the build system does not copy the new device-tree file as that is done in linux/target_install. To get it to work, I have to manually force a re-install of linux. I see two solutions:
Either change Glued so that the device-tree file is always copied. This can be done by either a seperate rule that is always built, or add a special case to ./mksystem.
Or, I change my design to only use one device tree configurations.

Any thoughts?

Kristian Klausen

unread,
Oct 24, 2014, 3:15:22 AM10/24/14
to Ricardo Martins, lsts-to...@googlegroups.com
Hi,

Perfect, thank you :)

Kristian

2014-10-24 4:12 GMT+02:00 Ricardo Martins <ra...@lsts.pt>:
Hi,

Check commits 5951983d1e8edd85092003a979ef6762b6fc7dec and 45078ae86b1093878cb9d78e884615cae5ad4f7a they should take care of your problem.

Ricardo Martins

unread,
Oct 24, 2014, 12:54:12 PM10/24/14
to Kristian Klausen, lsts-to...@googlegroups.com
Hi,

Check commits 5951983d1e8edd85092003a979ef6762b6fc7dec and 45078ae86b1093878cb9d78e884615cae5ad4f7a they should take care of your problem.
Reply all
Reply to author
Forward
0 new messages