Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Mux instructions

87 bytes added, 19:30, 13 February 2013
Overview
= Notes Overview =
This wiki page has more detailed information about mux on IGEPv2. <br> Read general [[Mux configuration|this 'Mux configuration' page]] before use this wikiit.This article contains: <br>
= Overview =*How-to disable some external peripherals to avoid interferences This wiki explained more *Some detailed how-to configure mux<br>examples.
= Disable Peripherals =
=== 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 [[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.
{| cellspacing="1" cellpadding="1" border="1" align="center" width="200"
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 ====
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>
=== 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|800x104px800x164px]]
|}
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>
= 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 J990Power down (active low). In the powerdown state, go to igeponly 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.ini: <br>
boardIt was tested using alternate peripherals like UARTs and GPIOs.ei485= [yesCaution, no] Format: &lt;string&gt; no: disable ei485in powerdown mode, use UART1 as RS232, supported by igep0020 default: yespads aren't in safe mode (high impedance).
More information about RS485 [[Connectors Summary#J940_connector|here]] and [http://en.wikipedia.org/wiki/RS-485 here]  You can test new configuration using [[How to use UARTs{|this tutorial]]<br>  cellspacing="1" cellpadding="1" border= GPIO in J990 ="1" align="center" width="200"|-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 versionsImage:Tfp410 IGEPv2.<br>  Use [[How to use GPIOspng|this manual713x462px]] 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>
=== GPIO in JTAG == First way: =====
Not all JTAG pins have GPIOThis mode has a issue, more information [[Connectors Summary#J400_connector|here]]when your system reboot or shutdown you will need to configure again. Using user space to configure mux and powerdown TFP410.<br>
Use [[How to use GPIOs|this manual]] to configure mux Logging with root user via user spaceSSH or Serial cable.<br>
Edit&nbsp; [httpNOTE://gitPoky distribution does not have debug filesystem enabled.igep.es/?p=pub/scm/linuxMount it: <pre>mount -omap-2.6.git;a=blob_plain;f=arch/armt debugfs none /mach-omap2sys/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $(kernel path)/arch/arm/mach-omap2/board-igep00x0.c]&nbsp; or [http:debug</pre> Go to /git.igep.essys/?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/armdebug/mach-omap2omap_mux/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]]. <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 === GPIO in JC30 ===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/
Not all JC30 pins Check that gpio170 is in user 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 GPIOit, more information [[Connectors Summaryyou 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#JC30_connector|here]].cat /sys/class/gpio/gpio170/value 0root@localhost:/sys/class/gpio# <br/pre> ===== Second way&nbsp;: =====
Use [[How Configure kernel sources. Configuration will be permanent. There are many ways to use GPIOs|edit source code, this manualmethod 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]] to configure mux via user spaceand 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 return 0; [http:/}</gitpre> "static int igep0020_enable_dvi" initialize DVI.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob_plain;f=arch/arm/mach-omap2/board-igep00x0.c;hb=e620ef8e577d73681f16ab80471332286c1b9fd5 $Edit to disable it: <pre>static int igep0020_enable_dvi(kernel pathstruct omap_dss_device *dssdev)/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 ${ gpio_direction_output(kernel pathGPIO_DVI_PUP, 0)/arch/arm/mach-omap2/board-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]]. ;
=== GPIO in JA42 === return 0;}</pre> '''Compile kernel source code'''
Not all JA42 pins have GPIO, more information Use this [[Connectors Summary#JA42_connectorLinux Kernel 2.6.35.y|heretutorial]](Kernel) and this [http://labs. Some pads are shared igep.es/index.php/The_IGEP_X-loader other] (IGEPxloader) to install Linaro Headless (or Poky) with TFP410your 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 = Edit 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] Here you can found some detailed examples to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|here]]mux. You can add more.
=== GPIO UART1 in JA41 J960 ===
Not all JA41 pins have GPIOUse ebuddies to configure UART1 in J960, more information [[Connectors Summary#JA41_connector|here]]go to igep. Some pads are shared with TFP410 and TXS0102DCUR ini:
Use board.ei485= [[How to yes, no] Format: &lt;string&gt; no: disable ei485, use GPIOs|this manual]] to configure mux via user space.<br> UART1 as RS232, supported by igep0020 default: yes
Edit&nbsp; More information about RS485 [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[Connectors Summary#J940_connector|here]]&nbsp; or and [http://giten.igepwikipedia.esorg/?p=pubwiki/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/boardRS-igep0020.c] to configure GPIO via Kernel source, example [[How to set up UART2 in J990#Third_way|485 here]].
=== GPIO in TP ===You can test new configuration using [[How to use UARTs|this tutorial]]<br>
Some GPIOs avaliable === UART3 in TP:<br> J960 ===
{| cellspacingEdit igep.ini to disable serial debug, comment next lines: <pre>; Setup the Kernel console params;console="1" cellpaddingttyO2,115200n8;console="1" border="1" width="200"ttyS2,115200n8|-; Enable early printk| ;earlyprintk=serial,tty02,115200Default peripheral ;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|-| 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|}=== GPIO in J990 ===
NOTE: There are 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 GPIO, but they are only an input (and not an output) and others GPIO the usage is strongly restrictedinformation [[Connectors Summary#J990_connector|here]].
Use Configure GPIO, don't use [[How to use GPIOsFrequently 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|this manualthese GPIO]] to configure mux via user spacein 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 Use [[How to set up UART2 in J990#Third_wayuse GPIOs|herethis 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