Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Mux instructions

5,504 bytes added, 19:30, 13 February 2013
Overview
= Overview =
Detailed instructions to configure 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>
See [[Mux configuration|this page]] for more information*How-to disable some external peripherals to avoid interferences *Some detailed examples.
= Feedback and Contributing 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 [[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 ===
At any point, if you see a mistake you Bluetooth and WIFI can contribute to this How-To. 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= Disable Peripherals 0: Enabled reset *RESET_N_W/RST_N_B=1: Disabled reset
=== BT/WIFI ===Use GPIO to control it. See [[Frequently Asked Questions and Their Answers|FAQs]] to know which GPIO needs to be used.
See {| cellspacing="1" cellpadding="1" border="1" align="center" width="200"|-| [[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_allImage:WIFI-BT Schematic.3Fpng|FAQ400x277px]] to see with pins need to configure.<br> |}
More information about [[How Click to setup Marvell bluetooth|BT]] and [[How to setup Marvell 88w8686 SDIO wifi|WIFI]] enlarge image<br>
==== Bluetooth ====
 
There are two ways to disable Bluetooth. More information about [[How to setup Marvell bluetooth|Bluetooth]]
===== First way: =====
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>
'''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 (or Poky) with your custom kernel in SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>
==== WIFI ====
 
There are two ways to disable WIFI. More information about [[How to setup Marvell 88w8686 SDIO wifi|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 bluetoothactivate, configure it before disable WIFI. Follow [[How to setup Marvell bluetooth|this tutorial]].
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>
Set sdmmc2_dat6 to gpio138 (mode 4):
<pre>echo 0x004 &gt; sdmmc2_dat6 sdmmc2_dat7</pre>
Revise that:
<pre>root@localhost:/sys/kernel/debug/omap_mux# cat sdmmc2_dat6sdmmc2_dat7name: sdmmc2_dat6sdmmc2_dat7.gpio_138 gpio_139 (0x480021680x4800216a/0x138 0x13a = 0x0004), b af3ae3, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE4
signals: sdmmc2_dat6 sdmmc2_dat7 | sdmmc2_dir_cmd sdmmc2_clkin | cam_shutter NA | sdmmc3_dat2 sdmmc3_dat3 | gpio_138 gpio_139 | hsusb3_tll_dir hsusb3_tll_nxt | NA mm3_rxdm | safe_mode
root@localhost:/sys/kernel/debug/omap_mux#
</pre>
Go to: /sys/class/gpio/
Check that gpio138 gpio139 is in user space:
<pre>root@localhost:/sys/class/gpio# ls
export gpio137 gpio140 gpio138 gpio139 gpio157 gpio170 gpio64 gpiochip160 gpiochip64gpio126 gpiochip0 gpio138 gpiochip128 gpio141 gpiochip160 gpio167 gpiochip0 gpiochip192 gpiochip96gpio136 gpiochip32 gpio139 gpiochip64 gpio156 gpiochip96 gpio170 gpiochip128 gpiochip32 unexport
root@localhost:/sys/class/gpio#
</pre>
If you don't have it, you should export gpio138gpio139: <br> <pre>echo 138 139 &gt; /sys/class/gpio/export </pre> Set gpio138 gpio139 to low value to disable bluetooth: <pre>echo 0 &gt; /sys/class/gpio/gpio138gpio139/value</pre>
Revise that:
<pre>root@localhost:/sys/class/gpio# cat /sys/class/gpio/gpio138gpio139/value
0
root@localhost:/sys/class/gpio#
</pre>
===== Second way&nbsp;: ===== 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>
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-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c] and search next line: <br>
<pre> if ((gpio_request(wifi_nreset, "WIFI NRESET") == 0) &amp;&amp;
(gpio_direction_output(wifi_nreset, 1) == 0)) {
udelay(10);
gpio_set_value(wifi_nreset, 1);
} else </pre> p "igep00x0_wifi_bt_init" function initializes WIFI and Bluetooth peripherals, this code make a PWM to initialize WIFI. Edit lines to disable this initialization.<br> <pre> if ((gpio_request(wifi_nreset, "WIFI NRESET") == 0) &amp;&amp; (gpio_direction_output(wifi_nreset, 10) == 0)) {
gpio_export(wifi_nreset, 0);
gpio_set_value(wifi_nreset, 0);
//udelay(10);
//gpio_set_value(wifi_nreset, 1);
} </pre>
} else </pre>
'''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 (or Poky) with your custom kernel in SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>
=== TP65950 PCM VSP<br> ===
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]]|} Click to enlarge image  '''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>
<pre> 0x04, /* REG_VOICE_IF (0xF) */
</pre>
==== '''Enable BT audio'''<br> ====
<pre> 0x00, /* REG_VOICE_IF (0xF) */
 
</pre>
<br> === 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.<br>  It was tested using alternate peripherals like UARTs and GPIOs. Caution, in powerdown mode, pads aren't in safe mode (high impedance).  {| cellspacing="1" cellpadding="1" border="1" align="center" width="200"|-| [[Image:Tfp410 IGEPv2.png|713x462px]]|} <br>  ===== First way: =====
= Edit 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.<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>
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 === UART1 in J990 ===0x0104), b j25, t NAmode: OMAP_PIN_INPUT | OMAP_MUX_MODE4signals: hdq_sio | sys_altclk | i2c2_sccbe | i2c3_sccbe | gpio_170 | NA | NA | safe_moderoot@localhost:/sys/kernel/debug/omap_mux# </pre> Go to: /sys/class/gpio/
Use ebuddies to configure UART1 Check that gpio170 is in J990user space: <pre>root@localhost:/sys/class/gpio# lsexport gpio137 gpio138 gpio139 gpio170 gpio64 gpiochip0 gpiochip128 gpiochip160 gpiochip192 gpiochip32 gpiochip64 gpiochip96 unexportroot@localhost:/sys/class/gpio# </pre> If you don't have it, go you should export gpio170: <br> <pre>echo 170 &gt; /sys/class/gpio/export </pre> Set gpio170 to low value to igep.inidisable 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 0root@localhost:/sys/class/gpio# </pre> ===== Second way&nbsp;: =====
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.ei485c;hb= [yes, nodb3cb47adf10504d3847d54927de50b2fa94c008 $(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) Format: &lt;string&gt;{ no: disable ei485 gpio_direction_output(GPIO_DVI_PUP, use UART1 as RS232, supported by igep0020 default: yes1);
More information about RS485 [[Connectors Summary#J940_connector|here]] and [http: return 0;}<//enpre> "static int igep0020_enable_dvi" initialize DVI.wikipedia.org/wiki/RS-485 here] Edit to disable it: <pre>static int igep0020_enable_dvi(struct omap_dss_device *dssdev){ gpio_direction_output(GPIO_DVI_PUP, 0);
You can test new configuration using [[How to use UARTs|this tutorial]] return 0;}</pre> '''Compile kernel source code'''
=== GPIO 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 J990 ===SD card.&nbsp; You can compile the IGEPxloader, but is not necessary.<br>
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, = Edit mux =
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_offHere you can found some detailed examples to configure mux.2C_and_not_consuming_any_power_at_allYou can add more.3F|these GPIO]] in IGEP WIFI/BT versions.<br>
Please contribute === UART1 in J960 ===
More information [[Connectors Summary#J990_connector|here]]Use ebuddies to configure UART1 in J960, go to igep.<br>ini:
board.ei485=== GPIO in JTAG ===[yes, no] Format: &lt;string&gt; no: disable ei485, use UART1 as RS232, supported by igep0020 default: yes
Please contribute<br>More information about RS485 [[Connectors Summary#J940_connector|here]] and [http://en.wikipedia.org/wiki/RS-485 here]
=== GPIO in JC30 ===You can test new configuration using [[How to use UARTs|this tutorial]]<br>
Please contribute<br>=== UART3 in J960 ===
Edit igep.ini to disable serial debug, comment next lines: <pre>; Setup the Kernel console params;console=ttyO2,115200n8;console=ttyS2,115200n8; Enable early printk;earlyprintk= GPIO in JA42 ==serial,tty02,115200;earlyprintk=serial,ttyS2,115200 </pre>
Please contribute<br>Poky linux starts an user terminal at UART3, You must disable it to avoid interferences. Comment next lines in /etc/inittab:
=== GPIO <pre># Normally not reached, but fallthrough in JA41 ===case of emergency.#z6:6:respawn:/sbin/sulogin#S:2345:respawn:/sbin/getty 115200 ttyO2# /sbin/getty invocations for the runlevels.</pre>
Please contributeYou can test new configuration using [[How to use UARTs|this tutorial]]<br>
=== GPIO in TP J990 ===
Please contribute<br>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>
'''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:TutorialsPeripherals]]
0
edits