Difference between revisions of "Mux instructions"

From IGEP - ISEE Wiki

Jump to: navigation, search
Line 134: Line 134:
  
 
=== GPIO in J990  ===
 
=== GPIO in J990  ===
 +
 +
Reset [[Mux instructions#WIFI|WIFI]], [[Mux instructions#Bluetooth|BT]] or [[Mux instructions#TP65950_PCM_VSP|TPS]] if you use some pad shared with this connector,
 +
 +
Configure GPIO
  
 
Please contribute
 
Please contribute
 +
 +
More information [[Connectors Summary#J990_connector|here]].<br>
  
 
=== GPIO in JTAG  ===
 
=== GPIO in JTAG  ===

Revision as of 10:24, 1 February 2012

Overview

Detailed instructions to configure mux

See this page for more information.

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.

NOTE: If you need bluetooth, configure before disable WIFI. Follow this tutorial.

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_dat6.gpio_138 (0x48002168/0x138 = 0x0004), b af3, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE4
signals: sdmmc2_dat6 | sdmmc2_dir_cmd | cam_shutter | sdmmc3_dat2 | gpio_138 | hsusb3_tll_dir | NA | safe_mode
root@localhost:/sys/kernel/debug/omap_mux# 

Go to: /sys/class/gpio/

Check that gpio138 is in user space:

root@localhost:/sys/class/gpio# ls
export   gpio137  gpio140  gpio157  gpio64       gpiochip160  gpiochip64
gpio126  gpio138  gpio141  gpio167  gpiochip0    gpiochip192  gpiochip96
gpio136  gpio139  gpio156  gpio170  gpiochip128  gpiochip32   unexport
root@localhost:/sys/class/gpio# 

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

echo 138 > /sys/class/gpio/export 

Set gpio138 to low value to disable bluetooth:

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

Revise that:

root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio138/value 
0
root@localhost:/sys/class/gpio# 
Second way:

Please contribute

TP65950 PCM VSP

Disable BT audio

Default kernel  has 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 $(kernel path)/sound/soc/codecs/twl4030.c file already read:

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

Enable BT audio

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


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

GPIO in J990

Reset WIFI, BT or TPS if you use some pad shared with this connector,

Configure GPIO

Please contribute

More information here.

GPIO in JTAG

Please contribute

GPIO in JC30

Please contribute

GPIO in JA42

Please contribute

GPIO in JA41

Please contribute

GPIO in TP

Please contribute


Under construction