Difference between revisions of "Mux configuration"
From IGEP - ISEE Wiki
Line 384: | Line 384: | ||
|- | |- | ||
| [[Peripherals Summary#UART|UART1]] | | [[Peripherals Summary#UART|UART1]] | ||
− | | Yes, not default configuration (disable DVI) | + | | Yes, not default configuration (disable DVI) |
| Yes, default configuration | | Yes, default configuration | ||
| No | | No | ||
Line 395: | Line 395: | ||
| [[Peripherals Summary#UART|UART3]] | | [[Peripherals Summary#UART|UART3]] | ||
| Yes, default configuration | | Yes, default configuration | ||
− | | No | + | | No |
| No | | No | ||
|- | |- | ||
| [[Peripherals Summary#UART|UART4]] | | [[Peripherals Summary#UART|UART4]] | ||
− | | No | + | | No |
− | | Yes, not default configuration | + | | Yes, not default configuration |
| No | | No | ||
|- | |- | ||
| [[Peripherals Summary#GPIO|GPIO]] | | [[Peripherals Summary#GPIO|GPIO]] | ||
− | | Yes, default configuration | + | | Yes, default configuration |
− | | Yes, default configuration | + | | Yes, default configuration |
| Yes, default configuration | | Yes, default configuration | ||
|- | |- | ||
| [[Peripherals Summary#SPI|McSPI1]] | | [[Peripherals Summary#SPI|McSPI1]] | ||
− | | No | + | | No |
− | | Yes, default configuration | + | | Yes, default configuration |
| No | | No | ||
|- | |- | ||
| [[Peripherals Summary#SPI|McSPI2]] | | [[Peripherals Summary#SPI|McSPI2]] | ||
− | | No | + | | No |
− | | No | + | | No |
| No | | No | ||
|- | |- | ||
| [[Peripherals Summary#SPI|McSPI3]] | | [[Peripherals Summary#SPI|McSPI3]] | ||
− | | Yes, not default configuration (disable DVI) | + | | Yes, not default configuration (disable DVI) |
− | | No | + | | No |
| No | | No | ||
|- | |- | ||
| [[Peripherals Summary#SPI|McSPI4]] | | [[Peripherals Summary#SPI|McSPI4]] | ||
− | | | + | | No |
− | | | + | | No |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#BSP|McBSP1]] | | [[Peripherals Summary#BSP|McBSP1]] | ||
− | | | + | | No |
− | | | + | | No |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#BSP|McBSP2]] | | [[Peripherals Summary#BSP|McBSP2]] | ||
− | | | + | | No |
− | | | + | | No |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#BSP|McBSP3]] | | [[Peripherals Summary#BSP|McBSP3]] | ||
− | | | + | | Yes, not default configuration (disable UART2) |
− | | | + | | No |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#BSP|McBSP4]] | | [[Peripherals Summary#BSP|McBSP4]] | ||
− | | | + | | No |
− | | | + | | Yes, not default configuration |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#BSP|McBSP5]] | | [[Peripherals Summary#BSP|McBSP5]] | ||
− | | | + | | No |
− | | | + | | Yes, not default configuration (disable GPIOs) |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#MMC|MMC1]] | | [[Peripherals Summary#MMC|MMC1]] | ||
− | | | + | | No |
− | | | + | | No |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#MMC|MMC2]] | | [[Peripherals Summary#MMC|MMC2]] | ||
− | | | + | | No |
− | | | + | | No |
− | | | + | | No |
|- | |- | ||
| [[Peripherals Summary#MMC|MMC3]] | | [[Peripherals Summary#MMC|MMC3]] | ||
− | | | + | | No |
− | | | + | | No |
− | | | + | | Yes, not default configuration (disable GPIOs) |
|- | |- | ||
| [[Peripherals Summary#I2C|I2C1]] | | [[Peripherals Summary#I2C|I2C1]] |
Revision as of 16:33, 13 February 2012
Contents
Overview
This How-To is meant to be a starting point for people to learn configure mux for IGEP devices as quickly and easily as possible. For this how-to i used Linaro Headless and Ubuntu 10.04 with Linaro Toolchain.
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:
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.
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, connectors summary or how-to disable peripherals for more information.
There are three ways to configure mux in IGEP Boards based in OMAP35xx and DM37xx:
- Editing OS User Space. This mode has a issue, when your system reboot or shutdown you will need to configure again. Example.
- Using kernel buddies. This way is not avaliable in some cases. Example and buddies parametres.
- Editing and compile kernel sources. Example.
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, |
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 |
(TODO: make dvi part in mux instructions)
IGEP MODULE
Next table pretends help you to configure IGEP MODULE. First column shows some OMAP35xx/DM37xx peripherals, first row shows all IGEP MODULE connectors. Note that not all peripherals are avaliable in all connectors and each configuration can take diferent solutions, for example: some peripherals are only avaliable if you place or replace some resistances, some peripherals are avaliable if you disable other one, other configurations don't have any problem, etc. There are some connectors than have more peripherals avaliable, but they don't have all signals to use it.
J1 | J4 | J5 | |
UART1 | Yes, not default configuration (disable DVI) | Yes, default configuration | No |
UART2 | Yes, not default configuration | No | No |
UART3 | Yes, default configuration | No | No |
UART4 | No | Yes, not default configuration | 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 DVI) | 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 | 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 | |||
I2C2 | |||
I2C3 | |||
I2C4 |
Under construction