Difference between revisions of "Mux instructions"

From IGEP - ISEE Wiki

Jump to: navigation, search
Line 70: Line 70:
  
 
===== First way:  =====
 
===== First way:  =====
 +
 +
This mode has a issue, when your system reboot or shutdown you will need to configure again. Using user space to configure mux and disable WIFI.
 +
 +
Logging with root user via SSH or Serial cable.<br>
 +
 +
Go to /sys/kernel/debug/omap_mux/<br>
 +
 +
Set sdmmc2_dat6 to gpio138 (mode 4):
 +
<pre>echo 0x004 &gt; sdmmc2_dat6 </pre>
 +
Revise that:
 +
<pre>root@localhost:/sys/kernel/debug/omap_mux# cat sdmmc2_dat6
 +
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
 +
</pre>
 +
Go to: /sys/class/gpio/
 +
 +
Check that gpio137 is in user space:
 +
<pre>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#
 +
</pre>
 +
If you don't have it, you should export gpio137: <br>
 +
<pre>echo 137 &gt; /sys/class/gpio/export </pre>
 +
Set gpio137 to low value to disable bluetooth:
 +
<pre>echo 0 &gt; /sys/class/gpio/gpio137/value</pre>
 +
Revise that:
 +
<pre>root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio137/value
 +
0
 +
root@localhost:/sys/class/gpio#
 +
</pre>
 +
<br>
  
 
===== Second way:  =====
 
===== Second way:  =====

Revision as of 17:27, 31 January 2012

Overview

Detailed instructions to configure mux

For more information go to this page.

Feedback and Contributing

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

Disable Peripherals

BT/WIFI

See FAQ to see with pins need to configure.

Bluetooth

First way:

This mode has a issue, when your system reboot or shutdown you will need to configure again. Using user space to configure mux and disable bluetooth.

Logging with root user via SSH or Serial cable.

Go to /sys/kernel/debug/omap_mux/

Set sdmmc2_dat5 to gpio137 (mode 4):

echo 0x004 > sdmmc2_dat5 

Revise 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

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# 

If you don't have it, you should export gpio137:

echo 137 > /sys/class/gpio/export 

Set gpio137 to low value to disable bluetooth:

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

Revise that:

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


Second way:

Configure kernel sources. Configuration will be permanent. There are many ways to edit source code, this method is focused for igep0020 RC without igep0022 support.

Go to $(kernel path)/arch/arm/mach-omap2/board-igep0020.c and search next line:

	else if (hwrev == IGEP2_BOARD_HWREV_C)
		igep00x0_wifi_bt_init(IGEP2_RC_GPIO_WIFI_NPD,
			IGEP2_RC_GPIO_WIFI_NRESET, IGEP2_RC_GPIO_BT_NRESET,
			!opt); 

"igep00x0_wifi_bt_init" function initializes WIFI and Bluetooth peripherals. "opt" variable is used for disable Bluetooth in some cases: enabled (opt!=0) or disabled (opt==0). For example you can disable it permanently replacing "opt" by 1:

	else if (hwrev == IGEP2_BOARD_HWREV_C)
		igep00x0_wifi_bt_init(IGEP2_RC_GPIO_WIFI_NPD,
			IGEP2_RC_GPIO_WIFI_NRESET, IGEP2_RC_GPIO_BT_NRESET,
			!1); 


WIFI

First way:

This mode has a issue, when your system reboot or shutdown you will need to configure again. Using user space to configure mux and disable WIFI.

Logging with root user via SSH or Serial cable.

Go to /sys/kernel/debug/omap_mux/

Set sdmmc2_dat6 to gpio138 (mode 4):

echo 0x004 > sdmmc2_dat6 

Revise that:

root@localhost:/sys/kernel/debug/omap_mux# cat sdmmc2_dat6
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

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# 

If you don't have it, you should export gpio137:

echo 137 > /sys/class/gpio/export 

Set gpio137 to low value to disable bluetooth:

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

Revise that:

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


Second way:

TP65950 PCM VSP

Please contribute

Edit mux

UART1 in J990

Use ebuddies to configure UART1 in J990, go to igep.ini:

 board.ei485=  [yes, no]
               Format: <string>
               no: disable ei485, use UART1 as RS232, supported by igep0020
               default: yes

More information about RS485 here and here:

You can test new configuration using this tutorial:

Under construction