Difference between revisions of "Mux instructions"

From IGEP - ISEE Wiki

Jump to: navigation, search
(Overview)
 
(47 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Notes =
+
= Overview =
  
Read [[Mux configuration|this page]] before use this wiki.<br>
+
This wiki page has more detailed information about mux on IGEPv2. <br>
 +
Read general [[Mux configuration|'Mux configuration' page]] before use it. This article contains: <br>  
 +
 
 +
*How-to disable some external peripherals to avoid interferences
 +
*Some detailed examples.
  
= Overview  =
 
This wiki explained more detailed how-to configure mux<br>
 
 
= Disable Peripherals  =
 
= Disable Peripherals  =
  
Some connectors share multiples peripherals like OMAP, WIFI/BT combo, etc. You should disable unused peripherals to avoid interferences.&nbsp; For example: if you want to control WIFI module via J990 disable OMAP or if you want use [[How to set up UART2 in J990|UART2 at j990]] disable Bluetooth. See schematics or [[Connectors Summary|connectors summary]] for more information.  
+
Some connectors share multiple peripherals like OMAP, WIFI/BT combo, etc. You should disable unused peripherals to avoid interferences. For example: if you want to control WIFI module via J990 disable OMAP or if you want use [[How to set up UART2 in J990|UART2 at j990]] disable Bluetooth. See schematics or [[Connectors Summary|connectors summary]] for more information.  
  
 
=== BT/WIFI Combo  ===
 
=== BT/WIFI Combo  ===
  
Bluetooth and WIFI can be disabled separately with reset pins: RESET_N_W (for WIFI) in pad 47 and RST_N_B (for Bluetooth):
+
Bluetooth and WIFI can be disabled separately with reset pins: RESET_N_W (for WIFI) in pad 47 and RST_N_B (for Bluetooth) in pad 16:  
  
*RESET_N_W/RST_N_B=0: Enabled reset
+
*RESET_N_W/RST_N_B=0: Enabled reset  
 
*RESET_N_W/RST_N_B=1: Disabled reset
 
*RESET_N_W/RST_N_B=1: Disabled reset
  
Use GPIO to control it. See [[Frequently Asked Questions and Their Answers#Is_it_possible_to_config_the_wireless_LAN_and_bluetooth_so_they_are_completely_off.2C_and_not_consuming_any_power_at_all.3F|FAQs]] to know which GPIO needs to be used.&nbsp;[[How to setup Marvell bluetooth|How to setup Marvell bluetooth]][[How to setup Marvell 88w8686 SDIO wifi|How to setup Marvell 88w8686 SDIO wifi]]
+
Use GPIO to control it. See [[Frequently Asked Questions and Their Answers|FAQs]] to know which GPIO needs to be used.  
  
 
{| cellspacing="1" cellpadding="1" border="1" align="center" width="200"
 
{| cellspacing="1" cellpadding="1" border="1" align="center" width="200"
Line 27: Line 29:
 
==== Bluetooth  ====
 
==== Bluetooth  ====
  
More information about [[How to setup Marvell bluetooth|Bluetooth]]
+
There are two ways to disable Bluetooth. More information about [[How to setup Marvell bluetooth|Bluetooth]]  
  
 
===== First way:  =====
 
===== First way:  =====
Line 35: Line 37:
 
Logging with root user via SSH or Serial cable.<br>  
 
Logging with root user via SSH or Serial cable.<br>  
  
 +
NOTE: Poky distribution does not have debug filesystem enabled. Mount it:
 +
<pre>mount -t debugfs none /sys/kernel/debug</pre>
 
Go to /sys/kernel/debug/omap_mux/<br>  
 
Go to /sys/kernel/debug/omap_mux/<br>  
  
Line 77: Line 81:
 
'''Compile kernel source code'''  
 
'''Compile kernel source code'''  
  
Use this [[Linux Kernel 2.6.35.y|tutorial]] (Kernel) and this [http://labs.igep.es/index.php/The_IGEP_X-loader other] (IGEPxloader) to install Linaro Headless with your custom kernel in SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>  
+
Use this [[Linux Kernel 2.6.35.y|tutorial]] (Kernel) and this [http://labs.igep.es/index.php/The_IGEP_X-loader other] (IGEPxloader) to install Linaro Headless (or Poky) with your custom kernel in SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>  
  
 
==== WIFI  ====
 
==== WIFI  ====
  
More information about [[How to setup Marvell 88w8686 SDIO wifi|WIFI]]
+
There are two ways to disable WIFI. More information about [[How to setup Marvell 88w8686 SDIO wifi|WIFI]]  
  
 
===== 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.  
+
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. If you need bluetooth activate, configure it before disable WIFI. Follow [[How to setup Marvell bluetooth|this tutorial]].  
 
 
NOTE: If you need bluetooth activate, configure it before disable WIFI. Follow [[How to setup Marvell bluetooth|this tutorial]].  
 
  
 
Logging with root user via SSH or Serial cable.<br>  
 
Logging with root user via SSH or Serial cable.<br>  
  
 +
NOTE: Poky distribution does not have debug filesystem enabled. Mount it:
 +
<pre>mount -t debugfs none /sys/kernel/debug</pre>
 
Go to /sys/kernel/debug/omap_mux/<br>  
 
Go to /sys/kernel/debug/omap_mux/<br>  
  
Line 136: Line 140:
 
'''Compile kernel source code'''  
 
'''Compile kernel source code'''  
  
Use this [[Linux Kernel 2.6.35.y|tutorial]] (Kernel) and this [http://labs.igep.es/index.php/The_IGEP_X-loader other] (IGEPxloader) to install Linaro Headless with your custom kernel in SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>
+
Use this [[Linux Kernel 2.6.35.y|tutorial]] (Kernel) and this [http://labs.igep.es/index.php/The_IGEP_X-loader other] (IGEPxloader) to install Linaro Headless (or Poky) with your custom kernel in SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>  
 +
 
 +
=== TP65950 PCM VSP  ===
 +
 
 +
This module is used to transfer audio via Bluetooth
 +
 
 +
{| cellspacing="1" cellpadding="1" border="1" align="center" width="200"
 +
|-
 +
| [[Image:TPS-PCM-VSP.png|800x164px]]
 +
|}
  
=== TP65950 PCM VSP<br>  ===
+
Click to enlarge image
  
==== Disable BT audio<br> ====
+
'''Disable BT audio'''<br>  
  
 
Default kernel&nbsp; 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 [http://git.igep.es/?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>  
 
Default kernel&nbsp; 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 [http://git.igep.es/?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> 0x04, /* REG_VOICE_IF (0xF) */
 
</pre>  
 
</pre>  
==== Enable BT audio<br> ====
+
'''Enable BT audio'''<br>  
 
<pre> 0x00, /* REG_VOICE_IF (0xF) */
 
<pre> 0x00, /* REG_VOICE_IF (0xF) */
 +
 
</pre>  
 
</pre>  
<br>
+
<br>  
  
= Edit mux =
+
=== TFP410 ===
  
=== UART1 in J990  ===
+
This external peripheral converts DVI signal to HDMI. To use some JA41/JA42 pads for other purpose is necessary disable it. GPIO_170 control TFP410 Power down (PD pad).
  
Use ebuddies to configure UART1 in J990, go to igep.ini:
+
Power down (active low). In the powerdown state, only the digital I/O buffers and I2C interface remain active. A high level selects the normal operating mode. A low level selects the powerdown mode.<br>
  
  board.ei485=  [yes, no]
+
It was tested using alternate peripherals like UARTs and GPIOs. Caution, in powerdown mode, pads aren't in safe mode (high impedance).
                Format: &lt;string&gt;
 
                no: disable ei485, use UART1 as RS232, supported by igep0020
 
                default: yes
 
  
More information about RS485 [[Connectors Summary#J940_connector|here]] and [http://en.wikipedia.org/wiki/RS-485 here]
+
{| cellspacing="1" cellpadding="1" border="1" align="center" width="200"
 
+
|-
You can test new configuration using [[How to use UARTs|this tutorial]]<br>
+
| [[Image:Tfp410 IGEPv2.png|713x462px]]
 
+
|}
=== 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, more information [[Connectors Summary#J990_connector|here]].
 
 
 
Configure GPIO, don't use [[Frequently Asked Questions and Their Answers#Is_it_possible_to_config_the_wireless_LAN_and_bluetooth_so_they_are_completely_off.2C_and_not_consuming_any_power_at_all.3F|these GPIO]] in IGEP WIFI/BT versions.<br>
 
 
 
Use [[How to use GPIOs|this manual]] to configure mux via user space<br>
 
 
 
Edit&nbsp; [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=refs/heads/linux-2.6.35.y $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]].
 
  
 
<br>  
 
<br>  
  
=== GPIO in JTAG ===
+
===== First way: =====
  
Not all JTAG pins have GPIO, more information [[Connectors Summary#J400_connector|here]].<br>
+
This mode has a issue, when your system reboot or shutdown you will need to configure again. Using user space to configure mux and powerdown TFP410.  
  
Use [[How to use GPIOs|this manual]] to configure mux via user space<br>  
+
Logging with root user via SSH or Serial cable.<br>  
  
Edit&nbsp; [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=refs/heads/linux-2.6.35.y $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]].
+
NOTE: Poky distribution does not have debug filesystem enabled. Mount it:
 +
<pre>mount -t debugfs none /sys/kernel/debug</pre>
 +
Go to /sys/kernel/debug/omap_mux/<br>
  
=== GPIO in JC30  ===
+
Set hdq_sio to gpio170 (mode 4):
 +
<pre>echo 0x104 &gt; hdp_sio</pre>
 +
Revise that:
 +
<pre>root@localhost:/sys/kernel/debug/omap_mux# cat hdq_sio
 +
name: hdq_sio.gpio_170 (0x480021c6/0x196 = 0x0104), b j25, t NA
 +
mode: OMAP_PIN_INPUT | OMAP_MUX_MODE4
 +
signals: hdq_sio | sys_altclk | i2c2_sccbe | i2c3_sccbe | gpio_170 | NA | NA | safe_mode
 +
root@localhost:/sys/kernel/debug/omap_mux#
 +
</pre>
 +
Go to: /sys/class/gpio/
  
Not all JC30 pins have GPIO, more information [[Connectors Summary#JC30_connector|here]].<br>  
+
Check that gpio170 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 gpio170: <br>
 +
<pre>echo 170 &gt; /sys/class/gpio/export </pre>
 +
Set gpio170 to low value to disable TFP410:
 +
<pre>echo 0 &gt; /sys/class/gpio/gpio170/value</pre>
 +
Revise that:
 +
<pre>root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio170/value
 +
0
 +
root@localhost:/sys/class/gpio#
 +
</pre>  
 +
===== Second way&nbsp;:  =====
  
Use [[How to use GPIOs|this manual]] to configure mux via user space<br>  
+
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. <br> Go to [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=db3cb47adf10504d3847d54927de50b2fa94c008 $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] and search next line: <br>  
 +
<pre> static inline void igep0020_display_init(void)
 +
static int igep0020_enable_dvi(struct omap_dss_device *dssdev)
 +
{
 +
gpio_direction_output(GPIO_DVI_PUP, 1);
  
Edit&nbsp; [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=refs/heads/linux-2.6.35.y $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]].
+
return 0;
 +
}
 +
</pre>
 +
"static int igep0020_enable_dvi" initialize DVI. Edit to disable it:
 +
<pre>static int igep0020_enable_dvi(struct omap_dss_device *dssdev)
 +
{
 +
gpio_direction_output(GPIO_DVI_PUP, 0);
  
=== GPIO in JA42  ===
+
return 0;
 +
}
 +
</pre>
 +
'''Compile kernel source code'''
  
Not all JA42 pins have GPIO, more information [[Connectors Summary#JA42_connector|here]]. Some pads are shared with TFP410<br>  
+
Use this [[Linux Kernel 2.6.35.y|tutorial]] (Kernel) and this [http://labs.igep.es/index.php/The_IGEP_X-loader other] (IGEPxloader) to install Linaro Headless (or Poky) with your custom kernel in SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>  
  
Use [[How to use GPIOs|this manual]] to configure mux via user space.<br>
+
= Edit mux =
  
Edit&nbsp; [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=refs/heads/linux-2.6.35.y $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]].  
+
Here you can found some detailed examples to configure mux. You can add more.  
  
=== GPIO in JA41 ===
+
=== UART1 in J960 ===
  
Not all JA41 pins have GPIO, more information [[Connectors Summary#JA41_connector|here]]. Some pads are shared with TFP410 and TXS0102DCUR
+
Use ebuddies to configure UART1 in J960, go to igep.ini:
  
Use [[How to use GPIOs|this manual]] to configure mux via user space.<br>
+
  board.ei485=  [yes, no]
 +
                Format: &lt;string&gt;
 +
                no: disable ei485, use UART1 as RS232, supported by igep0020
 +
                default: yes
  
Edit&nbsp; [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=refs/heads/linux-2.6.35.y $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]].
+
More information about RS485 [[Connectors Summary#J940_connector|here]] and [http://en.wikipedia.org/wiki/RS-485 here]  
  
=== GPIO in TP  ===
+
You can test new configuration using [[How to use UARTs|this tutorial]]<br>
  
Some GPIOs avaliable in TP:<br>
+
=== UART3 in J960  ===
  
{| cellspacing="1" cellpadding="1" border="1" width="200"
+
Edit igep.ini to disable serial debug, comment next lines:
|-
+
<pre>; Setup the Kernel console params
|
+
;console=ttyO2,115200n8
Default peripheral
+
;console=ttyS2,115200n8
 +
; Enable early printk
 +
;earlyprintk=serial,tty02,115200
 +
;earlyprintk=serial,ttyS2,115200 </pre>
  
(mode=0)
+
Poky linux starts an user terminal at UART3, You must disable it to avoid interferences. Comment next lines in /etc/inittab:
  
|
+
<pre># Normally not reached, but fallthrough in case of emergency.
GPIO
+
#z6:6:respawn:/sbin/sulogin
 +
#S:2345:respawn:/sbin/getty 115200 ttyO2
 +
# /sbin/getty invocations for the runlevels.
 +
</pre>
  
(mode=4)
+
You can test new configuration using [[How to use UARTs|this tutorial]]<br>
  
| TP
+
=== GPIO in J990  ===
|-
 
| gpmc_ncs1
 
| gpio_52
 
| TP303
 
|-
 
| gpmc_ncs2
 
| gpio_53
 
| TP304
 
|-
 
| gpmc_ncs3
 
| gpio_54
 
| TP305
 
|-
 
| gpmc_ncs4
 
| gpio_55
 
| TP306
 
|-
 
| gpmc_ncs6
 
| gpio_57
 
| TP307
 
|-
 
| gpmc_ncs7
 
| gpio_58
 
| TP318
 
|-
 
| gpmc_clk
 
| gpio_59
 
| TP308
 
|-
 
| gpmc_nwp
 
| gpio_62
 
| TP312
 
|-
 
| gpmc_wait1
 
| gpio_63
 
| TP313
 
|-
 
| gpmc_wait3
 
| gpio_65
 
| TP315
 
|-
 
| mmc1_dat6
 
| gpio_128
 
| TP902
 
|-
 
| etk_d11
 
| gpio_25
 
| TP405
 
|}
 
  
NOTE: There are more GPIO, but they are only an input (and not an output) and others GPIO the usage is strongly restricted.  
+
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, more information [[Connectors Summary#J990_connector|here]].  
  
Use [[How to use GPIOs|this manual]] to configure mux via user space.  
+
Configure GPIO, don't use [[Frequently Asked Questions and Their Answers#Is_it_possible_to_config_the_wireless_LAN_and_bluetooth_so_they_are_completely_off.2C_and_not_consuming_any_power_at_all.3F|these GPIO]] in IGEP WIFI/BT versions.<br>
  
Edit&nbsp; [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=refs/heads/linux-2.6.35.y $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]].
+
Use [[How to use GPIOs|this manual]] to configure mux via user space<br>
  
'''Under construction'''
+
Edit&nbsp; [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep0020.c;hb=refs/heads/linux-2.6.35.y $(kernel path)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]].<br>
  
[[Category:How_to_forge]] [[Category:Tutorials]]
+
[[Category:Peripherals]]

Latest revision as of 19:30, 13 February 2013

Overview

This wiki page has more detailed information about mux on IGEPv2.
Read general 'Mux configuration' page before use it. This article contains:

  • How-to disable some external peripherals to avoid interferences
  • Some detailed examples.

Disable Peripherals

Some connectors share multiple peripherals like OMAP, WIFI/BT combo, etc. You should disable unused peripherals to avoid interferences. For example: if you want to control WIFI module via J990 disable OMAP or if you want use UART2 at j990 disable Bluetooth. See schematics or connectors summary for more information.

BT/WIFI Combo

Bluetooth and WIFI can be disabled separately with reset pins: RESET_N_W (for WIFI) in pad 47 and RST_N_B (for Bluetooth) in pad 16:

  • RESET_N_W/RST_N_B=0: Enabled reset
  • RESET_N_W/RST_N_B=1: Disabled reset

Use GPIO to control it. See FAQs to know which GPIO needs to be used.

WIFI-BT Schematic.png

Click to enlarge image

Bluetooth

There are two ways to disable Bluetooth. More information about 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.

NOTE: Poky distribution does not have debug filesystem enabled. Mount it:

mount -t debugfs none /sys/kernel/debug

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); 

Compile kernel source code

Use this tutorial (Kernel) and this other (IGEPxloader) to install Linaro Headless (or Poky) with your custom kernel in SD card.  You can compile the IGEPxloader, but is not necessary.

WIFI

There are two ways to disable WIFI. More information about 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. If you need bluetooth activate, configure it before disable WIFI. Follow this tutorial.

Logging with root user via SSH or Serial cable.

NOTE: Poky distribution does not have debug filesystem enabled. Mount it:

mount -t debugfs none /sys/kernel/debug

Go to /sys/kernel/debug/omap_mux/

Set sdmmc2_dat6 to gpio138 (mode 4):

echo 0x004 > sdmmc2_dat7

Revise that:

root@localhost:/sys/kernel/debug/omap_mux# cat sdmmc2_dat7
name: sdmmc2_dat7.gpio_139 (0x4800216a/0x13a = 0x0004), b ae3, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE4
signals: sdmmc2_dat7 | sdmmc2_clkin | NA | sdmmc3_dat3 | gpio_139 | hsusb3_tll_nxt | mm3_rxdm | safe_mode
root@localhost:/sys/kernel/debug/omap_mux# 

Go to: /sys/class/gpio/

Check that gpio139 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 gpio139:

echo 139 > /sys/class/gpio/export 

Set gpio139 to low value to disable bluetooth:

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

Revise that:

root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio139/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-igep00x0.c and search next line:

	if ((gpio_request(wifi_nreset, "WIFI NRESET") == 0) &&
	    (gpio_direction_output(wifi_nreset, 1) == 0)) {
		gpio_export(wifi_nreset, 0);
		gpio_set_value(wifi_nreset, 0);
		udelay(10);
		gpio_set_value(wifi_nreset, 1);
	} else 

"igep00x0_wifi_bt_init" function initializes WIFI and Bluetooth peripherals, this code make a PWM to initialize WIFI. Edit lines to disable this initialization.

		if ((gpio_request(wifi_nreset, "WIFI NRESET") == 0) &&
	    (gpio_direction_output(wifi_nreset, 0) == 0)) {
		gpio_export(wifi_nreset, 0);

	} else 

Compile kernel source code

Use this tutorial (Kernel) and this other (IGEPxloader) to install Linaro Headless (or Poky) with your custom kernel in SD card.  You can compile the IGEPxloader, but is not necessary.

TP65950 PCM VSP

This module is used to transfer audio via Bluetooth

TPS-PCM-VSP.png

Click to enlarge image

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)	*/


TFP410

This external peripheral converts DVI signal to HDMI. To use some JA41/JA42 pads for other purpose is necessary disable it. GPIO_170 control TFP410 Power down (PD pad).

Power down (active low). In the powerdown state, only the digital I/O buffers and I2C interface remain active. A high level selects the normal operating mode. A low level selects the powerdown mode.

It was tested using alternate peripherals like UARTs and GPIOs. Caution, in powerdown mode, pads aren't in safe mode (high impedance).

Tfp410 IGEPv2.png


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 powerdown TFP410.

Logging with root user via SSH or Serial cable.

NOTE: Poky distribution does not have debug filesystem enabled. Mount it:

mount -t debugfs none /sys/kernel/debug

Go to /sys/kernel/debug/omap_mux/

Set hdq_sio to gpio170 (mode 4):

echo 0x104 > hdp_sio

Revise that:

root@localhost:/sys/kernel/debug/omap_mux# cat hdq_sio 
name: hdq_sio.gpio_170 (0x480021c6/0x196 = 0x0104), b j25, t NA
mode: OMAP_PIN_INPUT | OMAP_MUX_MODE4
signals: hdq_sio | sys_altclk | i2c2_sccbe | i2c3_sccbe | gpio_170 | NA | NA | safe_mode
root@localhost:/sys/kernel/debug/omap_mux# 

Go to: /sys/class/gpio/

Check that gpio170 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 gpio170:

echo 170 > /sys/class/gpio/export 

Set gpio170 to low value to disable TFP410:

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

Revise that:

root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio170/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:

	static inline void igep0020_display_init(void)
static int igep0020_enable_dvi(struct omap_dss_device *dssdev)
{
	gpio_direction_output(GPIO_DVI_PUP, 1);

	return 0;
}

"static int igep0020_enable_dvi" initialize DVI. Edit to disable it:

static int igep0020_enable_dvi(struct omap_dss_device *dssdev)
{
	gpio_direction_output(GPIO_DVI_PUP, 0);

	return 0;
}

Compile kernel source code

Use this tutorial (Kernel) and this other (IGEPxloader) to install Linaro Headless (or Poky) with your custom kernel in SD card.  You can compile the IGEPxloader, but is not necessary.

Edit mux

Here you can found some detailed examples to configure mux. You can add more.

UART1 in J960

Use ebuddies to configure UART1 in J960, 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

UART3 in J960

Edit igep.ini to disable serial debug, comment next lines:

; Setup the Kernel console params
;console=ttyO2,115200n8
;console=ttyS2,115200n8
; Enable early printk
;earlyprintk=serial,tty02,115200
;earlyprintk=serial,ttyS2,115200 

Poky linux starts an user terminal at UART3, You must disable it to avoid interferences. Comment next lines in /etc/inittab:

# Normally not reached, but fallthrough in case of emergency.
#z6:6:respawn:/sbin/sulogin
#S:2345:respawn:/sbin/getty 115200 ttyO2
# /sbin/getty invocations for the runlevels.

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, more information here.

Configure GPIO, don't use these GPIO in IGEP WIFI/BT versions.

Use this manual to configure mux via user space

Edit  $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c  or $(kernel path)/arch/arm/mach-omap2/board-igep0020.c to configure GPIO via Kernel source, example here.