Difference between revisions of "Mux configuration"

From IGEP - ISEE Wiki

Jump to: navigation, search
 
(247 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
= Overview  =
 
= Overview  =
  
Mux (or multiplexer) is a Omap peripheral that can be controlled via software. Its function is connect other Omap peripherals to some available Omap pads.  
+
This wiki is meant to be a starting point for people to learn configure mux for IGEP devices as quickly and easily as possible. This wiki contains:<br>
  
IgepV2 Board have a default mux configuration, but some cases is necessary change it, for example your project need UART2 at j990 connector to transmit data, for this purpose you need change some mux configurations to enable it and be sure that this modification don't break or interferes in other IC or peripherals. The mux options are vast.
+
*Mux characteristics summary
 +
*Tips to avoid problems
 +
*Ways to configure mux
 +
*Tables that links peripherals and connectors for IGEPv2 and IGEP MODULE
  
This How-To is meant to be a starting point for people to learn configure mux for IGEP v2 devices as quickly and easily as possible. For this how-to i used [http://releases.linaro.org/platform/linaro-m/headless/final/linaro-m-headless-tar-20101108-2.tar.gz Linaro Headless] and Ubuntu 10.04 with Linaro toolchain.<br>
 
  
= Feedback and Contributing  =
+
There are three ways to configure mux in IGEP Boards based in OMAP35xx and DM37xx:<br>
  
At any point, if you see a mistake you can contribute to this How-To.  
+
*[[Mux_instructions|Configuring MUX from OS User Space]]. This mode has a issue, when your system reboot or shutdown you will need to configure again. [[How to set up UART2 in J990#First_way|Example]].
 +
*Configuring MUX by using kernel commandline buddies. This way is not avaliable in some cases. [[How to set up UART2 in J990#Second_way|Example]] and [[Linux Kernel 2.6.37.y#Kernel_Parameters|buddies parametres]].<br>
 +
*Editing and compile kernel sources. [[How to set up UART2 in J990#Third_way|Example]].<br>
  
= Available peripherals on external connector  =
 
  
Before configure mux is necessary review some things:
+
= Introduction =
  
- If connector is shared with other peripherals you should disable it via software or hardware.<br>
+
Mux (or multiplexer) is a Omap peripheral that can be controlled via software. Its function is connect other peripherals to some available Omap pins.  
  
- Don't use the same peripheral in more than one pad.
+
Each pin is configurable by software using its associated pad configuration register field, which is 16 bits wide:
  
The next tables show you all the mux capabilities:  
+
{| cellspacing="1" cellpadding="1" border="1" align="center"
 +
|-
 +
| [[Image:Mux register.png]]
 +
|}
  
=== J990 connector  ===
+
<br> One pad configuration register field is available for each pin. Each 32-bit pad configuration register is grouped into two 16-bit pad configuration register fields. One pad configuration register provides control for two different pins. These registers can be accessed using 8, 16 and 32 bits operations.<br>
  
{| width="200" cellspacing="1" cellpadding="1" border="1" align="center"
+
The functional bits of a pad configuration register field are divided into the following five fields:  
|-
 
| Pad:  
 
| Connect to:
 
| Default peripheral (mode=0)'''(3)'''
 
| Default function:
 
| Other available peripherals:
 
| Share with:
 
|-
 
| 1
 
| VIO 1V8
 
| -
 
| Power 1v8
 
| -
 
| -<br>
 
|-
 
| 2
 
| DC 5V
 
| -
 
| Power 5v
 
| -
 
| -<br>
 
|-
 
| 3
 
| MMC2_DAT7
 
| MMC2_DAT7
 
| Reset Wlan
 
|
 
MMC2_CLKIN(mode=1)
 
  
MMC3_DAT3(mode=3)  
+
• '''MUXMODE''' (3 bits) defines the multiplexing mode applied to the pin. A mode corresponds to the selection of the functionality mapped on the pin with six (0 to 5) possible functional modes for each pin.
  
GPIO_139(mode=4)  
+
• '''PULL''' (2 bits) for combinational pullup/pulldown configuration:
  
| <div align="JUSTIFY"><font size="2">'''Wlan:''' This pad can reset Wlan peripheral using Omap GPIO low level (GND). If you reset continuously Wlan all their pads are in High Impedance. Also you can disable Wlan from J990 low level.</font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
+
-&gt; PULLTYPESELECT: Pullup/pulldown selection for the pin.  
use it.</span>'''(1)'''</font></div>
 
|-
 
| 5
 
| MMC2_DAT6
 
| MMC2_DAT6
 
| Power down&nbsp; Wlan
 
|
 
MMC2_DIR_CMD(mode=1)
 
  
MMC3_DAT2(mode=3)
+
-&gt; PULLUDENABLE: Pullup/pulldown enable for the pin.
  
GPIO_138(mode=4)  
+
• '''INPUTENABLE''' (1 bit) drives an input enable signal to the I/O CTRL.
  
| <div align="JUSTIFY"><font size="2">'''Wlan:''' This pad can power down Wlan peripheral using Omap GPIO low level (GND), power up removing GND. Also you can power down Wlan from J990 low level.</font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
+
'''Off mode values''' (5 bits) override the pin state when the OFFENABLE bit CONTROL. This feature is used for power saving management. Pins in off mode can be configured like output with HIGH or LOW value or input with wake-up detection feature. For input pins, OFFOUTENABLE and OFFOUTVALUE bits can not be configured:  
use it.</span>'''(1)'''</font></div>
 
|-
 
| 7
 
| MMC2_DAT5
 
| MMC2_DAT5
 
| Reset Bluethoot
 
|
 
MMC2_DIR_DAT1(mode=1)
 
  
MMC3_DAT1(mode=3)
+
-&gt;OFFENABLE: Off mode pin state override control. Set to 1 to enable the feature and to 0 to disable it.
  
GPIO_137(mode=4)
+
-&gt;OFFOUTENABLE: Off mode output enable value. Set to 0 to enable the feature and to 1 to disable it.
  
| <div align="JUSTIFY"><font size="2">'''Bluethoot: '''<span style="font-weight: normal">This pad can reset Bluethoot
+
-&gt;OFFOUTVALUE: Off mode output value.
  
peripheral using Omap GPIO low level (GND). If you reset continuously
+
-&gt;OFFPULLUDENABLE: Off mode pullup/pulldown enable.  
Bluethoot all their pads are in High Impedance. Also you can disable Bluethoot from J990 low level.
 
  
 +
-&gt;OFFPULLTYPESELECT: Off mode pullup/pulldown selection.
  
 +
• '''Wake-up''' bits (2 bits):
  
 +
-&gt;WAKEUPENABLE: Enable wake-up detection on input. It is also the off mode input enable value.
  
 +
-&gt;WAKEUPEVENT: Wake-up event status for the pin.'''<br>'''
  
 +
{| cellspacing="1" cellpadding="1" border="1" align="center" width="200"
 +
|-
 +
|
 +
[[Image:Mux pad configuration diagram.png]]
  
 +
|}
  
 +
=== Mode selection  ===
  
 +
The next table shows all capabilities.<br>
  
 +
{| cellspacing="1" cellpadding="1" border="1" style="width: 287px; height: 235px;"
 +
|-
 +
| MUXMODE
 +
| Select Mode
 +
|-
 +
| 0b000=0
 +
| Mode 0 (Primary mode)
 +
|-
 +
| 0b001=1
 +
| Mode 1 (Possible mode)<br>
 +
|-
 +
| 0b010=2
 +
| Mode 2 (Possible mode)
 +
|-
 +
| 0b011=3
 +
| Mode 3 (Possible mode)
 +
|-
 +
| 0b100=4
 +
| Mode 4 (Possible mode)
 +
|-
 +
| 0b101=5
 +
| Mode 5 (Possible mode)
 +
|-
 +
| 0b110=6
 +
| Mode 6 (Possible mode)
 +
|-
 +
| 0b111=7
 +
| Mode 7 (Safe Mode)<br>
 +
|}
  
 +
'''Definitions:'''
  
 +
'''Mode 0''' is the primary mode. When mode 0 is set, the function mapped to the pin corresponds to the name of the pin. In IGEP some pads don't use primary mode by default.
  
 +
'''Mode 1 to mode 6''' are possible modes for alternate functions. On each pin, some modes are used effectively for alternate functions, while other modes are unused and correspond to no functional configuration.
  
 +
'''The safe mode (default mode 7) '''avoids any risk of electrical contention by configuring the pin as an input with no functional interface mapped to it. The safe mode is used mainly as the default mode for all pins containing no mandatory interface at the release of power-on reset.<br>
  
 +
=== Pull Selection  ===
  
 +
The next table shows all capabilities.
  
 +
{| cellspacing="1" cellpadding="1" border="1" style="width: 696px; height: 1px;"
 +
|-
 +
| PULLTYPESELECT
 +
| PULLUDENABLE
 +
| Pin Behavior
 +
|-
 +
| 0b0
 +
| 0b0
 +
| Pull-down selected but not activated
 +
|-
 +
| 0b0
 +
| 0b1
 +
| Pull-down selected and activated if pin is NOT configured as OUTPUT
 +
|-
 +
| 0b1
 +
| 0b0
 +
| Pull-up selected but not activated
 +
|-
 +
| 0b1
 +
| 0b1
 +
| Pull-up selected and activated if pin is NOT configured as OUTPUT
 +
|}
  
 +
When a pin is in output mode, pulls are automatically disable.
  
 +
=== Input Enable  ===
  
 +
INPUTENABLE = 0: Input Disable. Pin is configured in output only mode.
  
 +
INPUTENABLE = 1: Input Enable. Pin is configured in bidirectional mode.<br>
  
 +
=== '''Off mode values''' and '''Wake-up'''  ===
  
 +
This mode is used to disable some pins and reduce power consumption. <br>
  
 +
Please contribute.
  
 +
[http://www.ti.com/lit/ug/spruf98x/spruf98x.pdf More information] about mux.
  
 +
= Configure Mux  =
  
 +
Mux options are vast, at the beginning can be difficult and tedious change some configurations. Before configure mux, use the following tips to avoid problems:
  
 +
*Mux can connect multiple connectors at the same peripheral, this improper use can damage the processor. Before configure mux, revise that this peripheral is not used in other pads. See schematics or [[Connectors Summary|connectors summary]] for more information.
 +
*Some peripherals are only available if you place or replace some resistances. See schematics for more information.<br>
 +
*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 of board or [[Connectors Summary|connectors summary]] or [[Mux_instructions#Disable_Peripherals|how-to disable peripherals]] or [[How_to_use_GPIOs|how-to use gpios]] for more information.
  
 +
=== IGEPv2  ===
  
 +
Next table pretends help you to configure IGEPv2. First column shows some OMAP35xx/DM37xx peripherals and first row shows all IGEPv2 connectors. Read articles about connector and peripheral before use them. Each configuration can take different solutions. <br> There are some connectors than have more peripherals available, but they don't have all signals to use it. <br> Table shows four answers:&nbsp;
  
 +
*"'''Yes, default configuration(utility)'''": Peripheral enabled by default. "utility" shows if this peripheral is used.<br>
 +
*"'''Yes, not default configuration(information)'''": Peripheral don't enabled by default. Maybe you need to disable other one<br>
 +
*"'''No, via hardware'''": Not available, but via hardware (placing or replacing some resistances) can be enabled.<br>
 +
*"'''No'''"
  
 
+
{| cellspacing="1" cellpadding="1" border="1" style="width: 933px; height: 409px;"
<font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
+
|-
use it.</span>'''(1)'''</font>&lt;font size="2"&lt;/font&gt;<br>  
+
| <br>  
</span></font></div>
+
| [[Connectors Summary#J990_connector|J990]]
 +
| [[Connectors Summary#J960_connector|J960]]
 +
| [[Connectors Summary#J970_connector|J970]]
 +
| [[Connectors Summary#J400_connector|J400]]
 +
| [[Connectors Summary#JC30_connector|JC30]]
 +
| [[Connectors Summary#JA42_connector|JA42]]
 +
| [[Connectors Summary#JA41_connector|JA41]]
 +
|-
 +
| [[Peripherals Summary#UART|UART1]]
 +
| No
 +
| Yes, not default configuration ([[Mux instructions#UART1_in_J960|disable RS485]])
 +
| No
 +
| No
 +
| No
 +
| No
 +
| Yes, not default configuration ([[Mux_instructions#TFP410|disable DVI]])
 
|-
 
|-
| 9
+
| [[Peripherals Summary#UART|UART2]]
| MMC2_DAT4
+
| Yes, not default configuration ([[How to set up UART2 in J990|disable Bluetooth]])
| MMC2_DAT4
 
| -
 
 
|  
 
|  
MMC_DIR_DAT0(mode=1)
+
No, [[How to use UARTs#RS232_Schematic_Igep_V2|via hardware]],
  
MMC3_DAT0(mode=3)
+
[[Mux instructions#Bluetooth|disable Bluetooth]]
  
GPIO136(mode=4)  
+
| No
 
+
| No
| <div align="JUSTIFY"><font size="2">'''Wlan: '''<span style="font-weight: normal">Protect Wlan if you don' use
+
| No
it. See MMC2_DAT7 pad.</span></font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
+
| No
use it.</span>'''(1)'''</font></div>
+
| No
 +
|-
 +
| [[Peripherals Summary#UART|UART3]]
 +
| No
 +
| Yes, default configuration ([[Mux instructions#UART3_in_J960|Serial debug]])  
 +
| No
 +
| No
 +
| No
 +
| No
 +
| Yes, not default configuration ([[Mux_instructions#TFP410|disable DVI]])
 +
|-
 +
| [[Peripherals Summary#UART|UART4]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 
|-
 
|-
| 11
+
| [[Peripherals Summary#GPIO|GPIO]]
| MMC2_DAT3
 
| MMC2_DAT3
 
| Transfer data between Omap and Wlan
 
 
|  
 
|  
McSPI3_CS0(mode=1)  
+
Yes, default configuration ([[Mux instructions#GPIO_in_J990|info]])  
  
GPIO_135(mode=4)  
+
| No
 
+
| No
| <div align="JUSTIFY"><div align="JUSTIFY"><font size="2">'''Wlan: '''<span style="font-weight: normal">Protect Wlan if you don' use
+
| Yes, not default configuration ([[Mux instructions#GPIO_in_J990|disable JTAG]])  
it. See MMC2_DAT7 pad.</span></font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
+
| Yes, default configuration
use it.</span>'''(1)'''</font></div><font size="2"></font></div>
+
| Yes, default configuration
 +
| Yes, not default configuration ([[Mux_instructions#TFP410|disable DVI]])
 +
|-
 +
| [[Peripherals Summary#SPI|McSPI1]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| Yes, default configuration
 +
| No
 +
|-
 +
| [[Peripherals Summary#SPI|McSPI2]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 
|-
 
|-
| 13
+
| [[Peripherals Summary#SPI|McSPI3]]
| MMC2_DAT2
 
| MMC2_DAT2
 
| Transfer data between Omap and Wlan
 
 
|  
 
|  
McSPI3_CS1(mode=1)<br>
+
Yes, not default configuration ([[Mux instructions#WIFI|disable WIFI]])  
  
GPIO_134(mode=4)  
+
| No
 
+
| No
| <div align="JUSTIFY"><font size="2">'''Wlan: '''<span style="font-weight: normal">Protect Wlan if you don' use
+
| No
it. See MMC2_DAT7 pad.</span></font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
+
| No
use it.</span>'''(1)'''</font></div>
+
| No
 +
| Yes, not default configuration ([[Mux_instructions#TFP410|disable DVI]])<br>
 +
|-
 +
| [[Peripherals Summary#SPI|McSPI4]]
 +
| Yes, not default configuration ([[Mux instructions#GPIO_in_J990|disable GPIOs]])
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
|-
 +
| [[Peripherals Summary#BSP|McBSP1]]
 +
| Yes, not default configuration ([[Mux instructions#GPIO_in_J990|disable GPIOs]])
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
|-
 +
| [[Peripherals Summary#BSP|McBSP2]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
|-
 +
| [[Peripherals Summary#BSP|McBSP3]]
 +
| Yes, default configuration ([[Mux instructions#TP65950_PCM_VSP|Bluetooth audio]])
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
|-
 +
| [[Peripherals Summary#BSP|McBSP4]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| Yes, not default configuration ([[Mux instructions#GPIO_in_J990|disable GPIOs]])  
 +
| No
 +
|-
 +
| [[Peripherals Summary#BSP|McBSP5]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
|-
 +
| [[Peripherals Summary#MMC|MMC1]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
|-
 +
| [[Peripherals Summary#MMC|MMC2]]
 +
| Yes, default configuration ([[Mux instructions#WIFI|WIFI]])  
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
|-
 +
| [[Peripherals Summary#MMC|MMC3]]
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 +
| No
 
|-
 
|-
| 15
+
| [[Peripherals Summary#I2C|I2C1]]
| MMC2_DAT1
+
| No
| MMC2_DAT1
+
| No
| Transfer data between Omap and Wlan
+
| No
| &nbsp;GPIO_133(mode=4)
+
| No
| <div align="JUSTIFY"><font size="2">'''Wlan: '''<span style="font-weight: normal">Protect Wlan if you don' use
+
| No
it. See MMC2_DAT7 pad.</span></font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
+
| No
use it.</span>'''(1)'''</font></div>
+
| No
 
|-
 
|-
| 17
+
| [[Peripherals Summary#I2C|I2C2]]
| MMC2_DAT0
+
| Yes, default configuration
| MMC2_DAT0
+
| No
| Transfer data between Omap and Wlan
+
| No
|  
+
| No
McSPI3_SOMI(mode=1)
+
| No, [[Connectors Summary#JC30_connector|via hardware]]
 
+
| No
GPIO_132(mode=4)
+
| No
 
 
| <div align="JUSTIFY"><font size="2">'''Wlan: '''<span style="font-weight: normal">Protect Wlan if you don' use
 
it. See MMC2_DAT7 pad.</span></font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
 
use it.</span>'''(1)'''</font></div>
 
 
|-
 
|-
| 19
+
| [[Peripherals Summary#I2C|I2C3]]
| MMC2_CMD
+
| No
| MMC2_CMD
+
| No
| Control Wire for bus MMC2 (Wlan)
+
| No
|  
+
| No
McSPI3_SIMO(mode=1)
+
| No
 
+
| No
GPIO_131(mode=4)
+
| Yes, default configuration (DVI)
 
 
| <div align="JUSTIFY"><font size="2">'''Wlan: '''<span style="font-weight: normal">Protect Wlan if you don' use
 
it. See MMC2_DAT7 pad.</span></font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
 
use it.</span>'''(1)'''</font></div>
 
 
|-
 
|-
| 21
+
| [[Peripherals Summary#I2C|I2C4]]
| MMC2_CLK0
+
| No
| MMC2_CLK
+
| No
| Clock for MMC2 (Wlan)
+
| No
|  
+
| No
McSPI3_CLK(mode=1)
+
| No
 +
| No
 +
| No
 +
|}
  
GPIO_130(mode=4)
+
=== IGEP MODULE  ===
  
| <div align="JUSTIFY"><font size="2">'''Wlan: '''<span style="font-weight: normal">Protect Wlan if you don' use
+
Next table pretends help you to configure IGEP MODULE. First column shows some OMAP35xx/DM37xx peripherals and first row shows all IGEP MODULE connectors. Read articles about connector and peripheral before use them. Each configuration can take different solutions. <br> There are some connectors than have more peripherals available, but they don't have all signals to use it. <br> Table shows four answers:&nbsp;
it. See MMC2_DAT7 pad.</span></font></div> <div align="JUSTIFY"><font size="2">'''Omap: '''<span style="font-weight: normal">protect Omap pad if you don't
 
  
use it.'''(1)'''&lt;/font&lt;/div&gt;
+
*"'''Yes, default configuration(utility)'''": Peripheral enabled by default. "utility" shows if this peripheral is used.<br>
 +
*"'''Yes, not default configuration(information)'''": Peripheral don't enabled by default. Maybe you need to disable other one<br>
 +
*"'''No, via hardware'''": Not available, but via hardware (placing or replacing some resistances) can be enabled.<br>
 +
*"'''No'''"
  
 
+
{| cellspacing="1" cellpadding="1" border="1" style="width: 933px; height: 190px;"
 
+
|-
 
+
| <br>
 
+
| [[Connectors Summary#J1_connector|J1]]
 
+
| [[Connectors Summary#J4_connector|J4]]
 
+
| [[Connectors Summary#J5_connector|J5]]
 
+
|-
 
+
| [[Peripherals Summary#UART|UART1]]
 
+
| Yes, not default configuration (disable DSS)
 
+
| Yes, default configuration
 
+
| No
 
+
|-
 
+
| [[Peripherals Summary#UART|UART2]]
 
+
| Yes, not default configuration(enable: TX and RX)
 
+
| No
 
+
| No
 
+
|-
 
+
| [[Peripherals Summary#UART|UART3]]
 
+
| Yes, default configuration
 
+
| No
 
+
| No
 
+
|-
 
+
| [[Peripherals Summary#UART|UART4]]
 
+
| No
 
+
| Yes, not default configuration(disable: GPIO_64 and GPMC_WAIT3)
 
+
| No
 
+
|-
 
+
| [[Peripherals Summary#GPIO|GPIO]]
 
+
| Yes, default configuration
</span></font></div>
+
| Yes, default configuration
 +
| Yes, default configuration
 
|-
 
|-
| 4
+
| [[Peripherals Summary#SPI|McSPI1]]
| MCBSP3_DX
+
| No
| MCBSP3_DX
+
| Yes, default configuration
| Transmitted serial Data (Bluethoot audio)
+
| No
|  
 
UART2_CTS(mode=1)
 
 
 
GPIO_140(mode=4)
 
 
 
| <div align="JUSTIFY"><font size="2">'''TPS65950:''' disable it via kernel '''(2) '''<span style="font-weight: normal">If
 
you don't use it.</span></font></div>
 
 
|-
 
|-
| 6
+
| [[Peripherals Summary#SPI|McSPI2]]
| MCBSP3_CLKX
+
| No
| MCBSP3_CLKX
+
| No
| Transmitted serial Clock (Bluethoot audio)
+
| No
|  
 
UART2_TX(mode=1)
 
 
 
GPIO_142(mode=4)
 
 
 
| <div align="JUSTIFY"><font size="2">'''Bluethoot: '''<span style="font-weight: normal">Protect Bluethoot if you don'
 
use it. See MMC2_DAT5 pad.</span></font></div> <div align="JUSTIFY"><br> </div> <div align="JUSTIFY"><font size="2">'''TPS65950:''' disable it via kernel '''(2) '''<span style="font-weight: normal">If
 
you don't use it.</span></font></div>
 
 
|-
 
|-
| 8
+
| [[Peripherals Summary#SPI|McSPI3]]
| MCBSP3_FSX
+
| Yes, not default configuration (disable DSS)  
| MCBSP3_FSX
+
| No
| Transmited Frame Syncronisation (Bluethoot audio)  
+
| No
|  
 
UART2_RX(mode=1)
 
 
 
GPIO_143(mode=4)
 
 
 
| <div align="JUSTIFY"><font size="2">'''Bluethoot: '''<span style="font-weight: normal">Protect Bluethoot if you don'
 
use it. See MMC2_DAT5 pad.</span></font></div> <div align="JUSTIFY"><br> </div> <div align="JUSTIFY"><font size="2">'''TPS65950:''' disable it via kernel '''(2) '''<span style="font-weight: normal">If
 
you don't use it.</span></font></div>
 
 
|-
 
|-
| 10
+
| [[Peripherals Summary#SPI|McSPI4]]
| MCBSP3_DR
+
| No
| MCBSP3_DR
+
| No
| Received Serial Data (Bluethoot audio)
+
| No
|  
 
UART2_RTS(mode=1)
 
 
 
GPIO_141(mode=4)
 
 
 
| <div align="JUSTIFY"><font size="2">'''TPS65950:''' disable it via kernel '''(2) '''<span style="font-weight: normal">If
 
you don't use it.</span></font></div>
 
 
|-
 
|-
| 12
+
| [[Peripherals Summary#BSP|McBSP1]]
| MCBSP1_DX
+
| No
| MCBSP1_DX
+
| No
| Transmited serial Data (not used)
+
| No
|
 
McSPI4_SIMO(mode=1)
 
 
 
McBSP3_DX(mode=2)
 
 
 
GPIO_158(mode=4)
 
 
 
| -<br>
 
 
|-
 
|-
| 14
+
| [[Peripherals Summary#BSP|McBSP2]]
| MCBSP1_CLKX
+
| No
| MCBSP1_CLKX
+
| No
| Transmited serial clock (not used)
+
| No
|  
 
McBSP3_CLKX(mode=2)<br>
 
 
 
GPIO_162(mode=4)
 
 
 
| -<br>
 
 
|-
 
|-
| 16
+
| [[Peripherals Summary#BSP|McBSP3]]
| MCBSP1_FSX
+
| Yes, not default configuration (disable UART2)  
| MCBSP1_FSX
+
| No
| Transmited Frame Syncronization (not used)  
+
| No
|  
 
McSPI4_CS0(mode=1)
 
 
 
McBSP3_FSX(mode=2)
 
 
 
GPIO_161(mode=4)
 
 
 
| -<br>
 
 
|-
 
|-
| 18
+
| [[Peripherals Summary#BSP|McBSP4]]
| MCBSP1_DR
+
| No
| MCBSP1_DR
+
| Yes, not default configuration (disable GPMCs)  
| Received Serial Data (not used)
+
| No
|
 
McSPI4_SOMI(mode=1)  
 
 
 
McBSP3_DR(mode=2)
 
 
 
GPIO_159(mode=4)
 
 
 
| -<br>
 
 
|-
 
|-
| 20
+
| [[Peripherals Summary#BSP|McBSP5]]
| MCBSP1_CLKR
+
| No
| MCBSP1_CLKR
+
| Yes, not default configuration (disable GPIOs)  
| Received Clock (not used)
+
| No
|
 
GPIO_156(mode=4)<br>
 
 
 
| -<br>
 
 
|-
 
|-
| 22
+
| [[Peripherals Summary#MMC|MMC1]]
| MCBSP1_FSR
+
| No
| MCBSP1_FSR
+
| No
| Received frame syncronization (not used)
+
| No
|
 
GPIO_157(mode=4)<br>
 
 
 
| -<br>
 
 
|-
 
|-
| 23
+
| [[Peripherals Summary#MMC|MMC2]]
| I2C2_SDA
+
| No
| I2C2_SDA
+
| No
| I2C Data
+
| No
|
 
GPIO_183(mode=4)<br>
 
 
 
| <div align="JUSTIFY"><font size="2">'''Cam connector:''' Check and RC14 is not welded or don't use it.<br></font></div>
 
 
|-
 
|-
| 24
+
| [[Peripherals Summary#MMC|MMC3]]
| I2C2_SCL
+
| No
| I2C2_SCL
+
| No
| I2C Clock
+
| Yes, not default configuration (disable GPIOs)
|  
 
GPIO_168(mode=4)<br>
 
 
 
| <font size="2">'''Cam connector:''' Check and RC13 is not welded or don't use it.</font>
 
 
|-
 
|-
| 25
+
| [[Peripherals Summary#I2C|I2C1]]
| REGEN
+
| No
| -
+
| No
| <br>
+
| No
| -
 
| -<br>
 
 
|-
 
|-
| 26
+
| [[Peripherals Summary#I2C|I2C2]]
| nRESET
+
| No
| -
+
| No
| Read Reset Omap
+
| No
| -
 
| -<br>
 
 
|-
 
|-
| 27
+
| [[Peripherals Summary#I2C|I2C3]]
| GND
+
| Yes, default configuration (J5)
| -
+
| No
| GND
+
| Yes, default configuration (J1)
| -
 
| -<br>
 
 
|-
 
|-
| 28
+
| [[Peripherals Summary#I2C|I2C4]]
| GND
+
| No
| -
+
| No
| GND
+
| No
| -
 
| -<br>
 
 
|}
 
|}
  
'''(1):''' To protect Omap pads from esternal signals configure Mux in mode=7 (safe_mode). With this mode, buffer is configured in high impedance
+
[[Category:Work_in_progress]]
 
+
[[Category:Peripherals]]
'''(2):''' Disable <font size="2">TPS65950</font> go to file sound/soc/codecs/twl4030.c change line 54 Code:
 
<pre>0x00, /* REG_VOICE_IF (0xF) */</pre>
 
to Code:  
 
<pre>0x04, /* REG_VOICE_IF (0xF) */</pre>
 
'''(3):''' Omap mux have 8 modes, somes modes are disable in some pads.
 
 
 
Under construction
 

Latest revision as of 10:55, 17 February 2014

Overview

This wiki is meant to be a starting point for people to learn configure mux for IGEP devices as quickly and easily as possible. This wiki contains:

  • Mux characteristics summary
  • Tips to avoid problems
  • Ways to configure mux
  • Tables that links peripherals and connectors for IGEPv2 and IGEP MODULE


There are three ways to configure mux in IGEP Boards based in OMAP35xx and DM37xx:


Introduction

Mux (or multiplexer) is a Omap peripheral that can be controlled via software. Its function is connect other peripherals to some available Omap pins.

Each pin is configurable by software using its associated pad configuration register field, which is 16 bits wide:

Mux register.png


One pad configuration register field is available for each pin. Each 32-bit pad configuration register is grouped into two 16-bit pad configuration register fields. One pad configuration register provides control for two different pins. These registers can be accessed using 8, 16 and 32 bits operations.

The functional bits of a pad configuration register field are divided into the following five fields:

MUXMODE (3 bits) defines the multiplexing mode applied to the pin. A mode corresponds to the selection of the functionality mapped on the pin with six (0 to 5) possible functional modes for each pin.

PULL (2 bits) for combinational pullup/pulldown configuration:

-> PULLTYPESELECT: Pullup/pulldown selection for the pin.

-> PULLUDENABLE: Pullup/pulldown enable for the pin.

INPUTENABLE (1 bit) drives an input enable signal to the I/O CTRL.

Off mode values (5 bits) override the pin state when the OFFENABLE bit CONTROL. This feature is used for power saving management. Pins in off mode can be configured like output with HIGH or LOW value or input with wake-up detection feature. For input pins, OFFOUTENABLE and OFFOUTVALUE bits can not be configured:

->OFFENABLE: Off mode pin state override control. Set to 1 to enable the feature and to 0 to disable it.

->OFFOUTENABLE: Off mode output enable value. Set to 0 to enable the feature and to 1 to disable it.

->OFFOUTVALUE: Off mode output value.

->OFFPULLUDENABLE: Off mode pullup/pulldown enable.

->OFFPULLTYPESELECT: Off mode pullup/pulldown selection.

Wake-up bits (2 bits):

->WAKEUPENABLE: Enable wake-up detection on input. It is also the off mode input enable value.

->WAKEUPEVENT: Wake-up event status for the pin.

Mux pad configuration diagram.png

Mode selection

The next table shows all capabilities.

MUXMODE Select Mode
0b000=0 Mode 0 (Primary mode)
0b001=1 Mode 1 (Possible mode)
0b010=2 Mode 2 (Possible mode)
0b011=3 Mode 3 (Possible mode)
0b100=4 Mode 4 (Possible mode)
0b101=5 Mode 5 (Possible mode)
0b110=6 Mode 6 (Possible mode)
0b111=7 Mode 7 (Safe Mode)

Definitions:

Mode 0 is the primary mode. When mode 0 is set, the function mapped to the pin corresponds to the name of the pin. In IGEP some pads don't use primary mode by default.

Mode 1 to mode 6 are possible modes for alternate functions. On each pin, some modes are used effectively for alternate functions, while other modes are unused and correspond to no functional configuration.

The safe mode (default mode 7) avoids any risk of electrical contention by configuring the pin as an input with no functional interface mapped to it. The safe mode is used mainly as the default mode for all pins containing no mandatory interface at the release of power-on reset.

Pull Selection

The next table shows all capabilities.

PULLTYPESELECT PULLUDENABLE Pin Behavior
0b0 0b0 Pull-down selected but not activated
0b0 0b1 Pull-down selected and activated if pin is NOT configured as OUTPUT
0b1 0b0 Pull-up selected but not activated
0b1 0b1 Pull-up selected and activated if pin is NOT configured as OUTPUT

When a pin is in output mode, pulls are automatically disable.

Input Enable

INPUTENABLE = 0: Input Disable. Pin is configured in output only mode.

INPUTENABLE = 1: Input Enable. Pin is configured in bidirectional mode.

Off mode values and Wake-up

This mode is used to disable some pins and reduce power consumption.

Please contribute.

More information about mux.

Configure Mux

Mux options are vast, at the beginning can be difficult and tedious change some configurations. Before configure mux, use the following tips to avoid problems:

  • Mux can connect multiple connectors at the same peripheral, this improper use can damage the processor. Before configure mux, revise that this peripheral is not used in other pads. See schematics or connectors summary for more information.
  • Some peripherals are only available if you place or replace some resistances. See schematics for more information.
  • Some connectors share multiples 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 of board or connectors summary or how-to disable peripherals or how-to use gpios for more information.

IGEPv2

Next table pretends help you to configure IGEPv2. First column shows some OMAP35xx/DM37xx peripherals and first row shows all IGEPv2 connectors. Read articles about connector and peripheral before use them. Each configuration can take different solutions.
There are some connectors than have more peripherals available, but they don't have all signals to use it.
Table shows four answers: 

  • "Yes, default configuration(utility)": Peripheral enabled by default. "utility" shows if this peripheral is used.
  • "Yes, not default configuration(information)": Peripheral don't enabled by default. Maybe you need to disable other one
  • "No, via hardware": Not available, but via hardware (placing or replacing some resistances) can be enabled.
  • "No"

J990 J960 J970 J400 JC30 JA42 JA41
UART1 No Yes, not default configuration (disable RS485) No No No No Yes, not default configuration (disable DVI)
UART2 Yes, not default configuration (disable Bluetooth)

No, via hardware,

disable Bluetooth

No No No No No
UART3 No Yes, default configuration (Serial debug) No No No No Yes, not default configuration (disable DVI)
UART4 No No No No No No No
GPIO

Yes, default configuration (info)

No No Yes, not default configuration (disable JTAG) Yes, default configuration Yes, default configuration Yes, not default configuration (disable DVI)
McSPI1 No No No No No Yes, default configuration No
McSPI2 No No No No No No No
McSPI3

Yes, not default configuration (disable WIFI)

No No No No No Yes, not default configuration (disable DVI)
McSPI4 Yes, not default configuration (disable GPIOs) No No No No No No
McBSP1 Yes, not default configuration (disable GPIOs) No No No No No No
McBSP2 No No No No No No No
McBSP3 Yes, default configuration (Bluetooth audio) No No No No No No
McBSP4 No No No No No Yes, not default configuration (disable GPIOs) No
McBSP5 No No No No No No No
MMC1 No No No No No No No
MMC2 Yes, default configuration (WIFI) No No No No No No
MMC3 No No No No No No No
I2C1 No No No No No No No
I2C2 Yes, default configuration No No No No, via hardware No No
I2C3 No No No No No No Yes, default configuration (DVI)
I2C4 No No No No No No No

IGEP MODULE

Next table pretends help you to configure IGEP MODULE. First column shows some OMAP35xx/DM37xx peripherals and first row shows all IGEP MODULE connectors. Read articles about connector and peripheral before use them. Each configuration can take different solutions.
There are some connectors than have more peripherals available, but they don't have all signals to use it.
Table shows four answers: 

  • "Yes, default configuration(utility)": Peripheral enabled by default. "utility" shows if this peripheral is used.
  • "Yes, not default configuration(information)": Peripheral don't enabled by default. Maybe you need to disable other one
  • "No, via hardware": Not available, but via hardware (placing or replacing some resistances) can be enabled.
  • "No"

J1 J4 J5
UART1 Yes, not default configuration (disable DSS) Yes, default configuration No
UART2 Yes, not default configuration(enable: TX and RX) No No
UART3 Yes, default configuration No No
UART4 No Yes, not default configuration(disable: GPIO_64 and GPMC_WAIT3) No
GPIO Yes, default configuration Yes, default configuration Yes, default configuration
McSPI1 No Yes, default configuration No
McSPI2 No No No
McSPI3 Yes, not default configuration (disable DSS) No No
McSPI4 No No No
McBSP1 No No No
McBSP2 No No No
McBSP3 Yes, not default configuration (disable UART2) No No
McBSP4 No Yes, not default configuration (disable GPMCs) No
McBSP5 No Yes, not default configuration (disable GPIOs) No
MMC1 No No No
MMC2 No No No
MMC3 No No Yes, not default configuration (disable GPIOs)
I2C1 No No No
I2C2 No No No
I2C3 Yes, default configuration (J5) No Yes, default configuration (J1)
I2C4 No No No