0
edits
Changes
no edit summary
{{Message/Information Message|title=TITLE|message=This How-To was tested under Kernel 2.6.35.y but content are valid for Kernel 2.6.37.y}}
= Overview =
This How-To is meant to be a starting point for people to learn to set up UART2 for IGEPv2 J990 connector as quickly and easily as possible. In this how-to, we use [http://releases.linaro.org/platform/linaro-m/headless/final/linaro-m-headless-tar-20101108-2.tar.gz Linaro Headless] with [[Linux Kernel 2.6.35.y|Kernel 2.6.35.y]]. This How-To is focused for revisions RC1/RC3/RC4/RC6 (WIFI/BT versions). <br>
More information about UART: [http://en.wikipedia.org/wiki/UART UARTUniversal_asynchronous_receiver/transmitter <span style="text-decoration: underline;">here</span>] and [[How to use UARTs|here]].'''<br>'''
There are three modes to configure UART2 in J990: via user space (fast modefirst way), editing only igep.ini (second way) or editing kernel source and compile it (slow modethird way) or editing only igep.ini '''NOTE: '''UART2 in j990 connector has CMOS voltages (faster mode0V-1V8).
= Feedback and Contributing =
At any point, if you see a mistake you can contribute to this How-To.<br>
= Fast ModeFirst way<br> = First way: this mode has an issue, when your system reboot or shutdown you will need to configure again. Using user space to configure mux and disable bluetooth. <br>
=== Configure IGEP ===
'''Disable Bluetooth:'''
Go to /sys/kernel/debug/omap_mux/<br>
Set sdmmc2_dat5 to gpio137 (mode 4):
<pre>echo 0x004 > sdmmc2_dat5 </pre>
<pre>root@localhost:/sys/kernel/debug/omap_mux# cat sdmmc2_dat5
name: sdmmc2_dat5.gpio_137 (0x48002166/0x136 = 0x0004), b ah3, t NA
Set gpio137 to low value to disable bluetooth:
<pre>echo 0 > /sys/class/gpio/gpio137/value</pre>
<pre>root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio137/value
0
echo 0x007 > uart2_rx
echo 0x007 > uart2_tx </pre>
<pre>root@localhost:/sys/kernel/debug/omap_mux# cat uart2_cts
name: uart2_cts.safe_mode (0x48002174/0x144 = 0x0007), b ab26, t NA
echo 0x101 > mcbsp3_fsx
echo 0x101 > mcbsp3_dr </pre>
<pre>root@localhost:/sys/kernel/debug/omap_mux# cat mcbsp3_dx
name: mcbsp3_dx.uart2_cts (0x4800216c/0x13c = 0x0101), b af6, t NA
root@localhost:/sys/kernel/debug/omap_mux#
</pre>
Mode will be 1 (uart mode)
= Faster Mode Second way<br> =
'''NOTE: ''' Only configures UART2_TX(6) and UART2_RX(8). You can not use UART2_CTS(4) AND UART2_RTS(10) which are usually referred to as hardware flow control. For example you can use RS232 but not RS485 peripheral. Also you can Don't use minicom with hardware flow control, disable it if you want check with minicom this modeenable. '''<br> Go to igep.ini file, replaced by or type this:
<pre>buddy=igep0022
buddy.modem=yes </pre>= Third way =
Default kernel has disabled TWL4030 PCM voice interface output pins to high impedance, otherwise this module forces the level of mcbsp3_fsx (uart2_rx) and mcbsp3_clkx (uart2_tx) pins. To make sure, go to ~[http://git.isee.biz/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=sound/soc/codecs/twl4030.c;hb=linux-2.6.35.y $(kernel path)/sound/soc/codecs/twl4030.c ] file already read: <br>
<pre> 0x04, /* REG_VOICE_IF (0xF) */
</pre>
= Test UART2 in J990<br> =
<br>
{| cellspacing="1" cellpadding="1" borderwidth="1200" widthborder="2001"
|-
| Pin
=== Test ===
'''NOTE: '''Starting from Kernel 2.6.37.y, ttySx are named ttyOx.
Connect UART2_TX with UART2_RX. Use minicom to prove UART2 (/dev/ttyS1) :<br>
<pre>minicom -D /dev/ttyS1</pre>
or
<pre>microcom /dev/ttyS1 </pre>
If you write characters and see the echo on the screen, you configure correctly UART.
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center" width="200"
|-
| [[Image:Uart2 igepv2 j990 connector.png|800x500px]]
|}
[[Category:UART]]