Difference between revisions of "How to set up UART2 in J990"

From IGEP - ISEE Wiki

Jump to: navigation, search
Line 21: Line 21:
 
Log with root user via SSH or Serial cable.<br>  
 
Log with root user via SSH or Serial cable.<br>  
  
Go to /sys/kernel/debug/omap_mux/.
+
Go to /sys/kernel/debug/omap_mux/
  
 
'''Disable Bluethoot:'''  
 
'''Disable Bluethoot:'''  
Line 41: Line 41:
 
export  gpio137  gpio138  gpio139  gpio170  gpio64  gpiochip0  gpiochip128  gpiochip160  gpiochip192  gpiochip32  gpiochip64  gpiochip96  unexport
 
export  gpio137  gpio138  gpio139  gpio170  gpio64  gpiochip0  gpiochip128  gpiochip160  gpiochip192  gpiochip32  gpiochip64  gpiochip96  unexport
 
root@localhost:/sys/class/gpio#  
 
root@localhost:/sys/class/gpio#  
</pre>  
+
</pre>  
 
Export Gpio137 if you don't have it:  
 
Export Gpio137 if you don't have it:  
 
<pre>echo 137 &gt; /sys/class/gpio/export </pre>  
 
<pre>echo 137 &gt; /sys/class/gpio/export </pre>  
Line 50: Line 50:
 
0
 
0
 
root@localhost:/sys/class/gpio#  
 
root@localhost:/sys/class/gpio#  
</pre>
+
</pre>
 +
'''Disable Bluethoot UART2 wires:'''
 +
Go to /sys/kernel/debug/omap_mux/
 +
Type:
 +
<pre>echo 0x007 > uart2_cts
 +
echo 0x007 > uart2_rts
 +
echo 0x007 > uart2_rx
 +
echo 0x007 > uart2_tx </pre>

Revision as of 17:55, 25 January 2012

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 Linaro Headless with Kernel 2.6.35.y. This How-To is focused for revisions RC1/RC3/RC4/RC6 (WIFI/BT versions).

More information about UART.

There are two modes to configure UART2 in J990: via user space (fast mode) or editing kernel source and compile it (slow mode).

Feedback and Contributing

At any point, if you see a mistake you can contribute to this How-To.

Fast Mode

Fast Mode, set up UART2 until system reboot or halt. Using space to configure mux and disabling bluethoot. Default kernel binaries and source have disabled TWL4030 PCM voice interface output pins to high impedance, otherwise this module forces the level of mcbsp3_fsx and mcbsp3_clkx pins. To make sure, go to ~/sound/soc/codecs/twl4030.c file already read:

	0x04, /* REG_VOICE_IF		(0xF)	*/

Configure IGEP

Make sure that IGEPv2 Expansion is disabled, go to igep.ini file:

;buddy=igep0022 

Log with root user via SSH or Serial cable.

Go to /sys/kernel/debug/omap_mux/

Disable Bluethoot:

Set sdmmc2_dat5 to GPIO137 mode(4):

echo 0x004 > sdmmc2_dat5 

Check that:

root@localhost:/sys/kernel/debug/omap_mux# cat sdmmc2_dat5
name: sdmmc2_dat5.gpio_137 (0x48002166/0x136 = 0x0004), b ah3, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE4
signals: sdmmc2_dat5 | sdmmc2_dir_dat1 | cam_global_reset | sdmmc3_dat1 | gpio_137 | hsusb3_tll_stp | mm3_rxdp | safe_mode

Disable Bluethoot:

Go to: /sys/class/gpio/

Check that gpio137 is in user space:

root@localhost:/sys/class/gpio# ls
export  gpio137  gpio138  gpio139  gpio170  gpio64  gpiochip0  gpiochip128  gpiochip160  gpiochip192  gpiochip32  gpiochip64  gpiochip96  unexport
root@localhost:/sys/class/gpio# 

Export Gpio137 if you don't have it:

echo 137 > /sys/class/gpio/export 

Set GPIO 137 to low value to reset bluethoot:

echo 0 > /sys/class/gpio/gpio137/value

Check that:

root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio137/value 
0
root@localhost:/sys/class/gpio# 

Disable Bluethoot UART2 wires: Go to /sys/kernel/debug/omap_mux/ Type:

echo 0x007 > uart2_cts
echo 0x007 > uart2_rts
echo 0x007 > uart2_rx
echo 0x007 > uart2_tx