You can check this. it should be simple. http://hipstercircuits.com/enable-serialuarttty-on-beaglebone-black/
There has been talk of having to rebuild Ångström in order to enable a serial port with the new kernel. That is not necessary. The Device Tree Compiler (DTC) came installed on my BBB, so the compilation was fairly painless (once I figured out that the oscilloscope was connected to the right BeagleBone..) UART4 in the BBB_SRM is UART5 in the device tree system and ttyO4 on the bone. The TXD (transmit as seen from the device) pin is P9_13 and the RXD (receive as seen from the device) pin is P9_11. Then you can make them talk, like in the above image or you can use one BeagleBone to see the debug messages from the other as it boots. Very good for debugging..
On your beaglebone, start nano:
nano enable-uart5.dts
Copy-paste the following into nano:
/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "uart5";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
pinctrl_uart5: pinctrl_uart5_pins {
pinctrl-single,pins = <
0x070 0x26 /* P9_11 = GPIO0_30 = GPMC_WAIT0 , MODE6 */
0x074 0x06 /* P9_13 = GPIO0_31 = GPMC_WPN, MODE6 */
>;
};
};
};
fragment@1{
target = <&uart5>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&ocp>;
__overlay__ {
test_helper: helper {
compatible = "bone-pinmux-helper";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart5>;
status = "okay";
};
};
};
};
Save the file(Ctrl-o)
Exit nano (Ctrl-x)
If you have a BeagleBone Black, you can compile firmware for device tree overlays without installing squat:
dtc -O dtb -o enable-uart5-00A0.dtbo -b 0 -@ enable-uart5.dts
You should now have a file named enable-uart5-00A0.dtbo.
Copy that file into the firmware directory:
cp enable-uart5-00A0.dtbo /lib/firmware/
Then enable the overlay:
echo enable-uart5 > /sys/devices/bone_capemgr.*/slots
You should now have a file in /dev called ttyO4. You can try to listen to it by catting it:
cat /dev/ttyO4
Or you can send something to it:
echo test > /dev/ttyO4
If you do not have the file /dev/ttyO4, check the kernel log:
dmesg
To check and make sure the pins have been muxed correctly, check the listings in the pin groups:
cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups
You should see a pin group for uart5.