User`s guide

Configuring the IOMUX Controller (IOMUXC)
i.MX53 System Development User’s Guide, Rev. 1
13-4 Freescale Semiconductor
// Set pin as 0
reg = readl(GPIO7_BASE_ADDR + 0x0);
reg &= ~0x80;
writel(reg, GPIO7_BASE_ADDR + 0x0);
If done correctly, the pin PATA_DA_1 on the i.MX53 toggles when booting.
13.3 Setting Up the IOMUXC in Linux
The folder linux/arch/arm/mach-<platform name> contains the specific machine layer file for your custom
board. For example, the machine layer file used on the i.MX53 <reference> boards are
linux/arch/arm/mach-mx5/mx53_<reference board name>.c. This platform is used in the examples in this
section. The machine layer files include the IOMUX configuration information for peripherals used on a
specific board.
To set up the IOMUXC and configure the pads, change the two files described in Table 13-2:
13.3.1 IOMUX Configuration Definition
The iomux-mx53.h file contains definitions for all i.MX53 pins. Pin names are formed according to the
formula <SoC>PA D <Pad Name>_GPIO<Instance name>_<Port name>. Definitions are created with the
following line code.
IOMUX_PAD(PAD Control Offset, MUX Control Offset, MUX Mode, Select Input Offset, Select Input,
Pad Control)
The variables are defined as follows:
PAD Control Offset Address offset to pad control register
(IOMUXC_SW_PAD_CTL_PAD_<PAD_NAME>)
MUX Control Offset Address offset to MUX control register
(IOMUXC_SW_MUX_CTL_PAD_<PAD NAME>)
MUX Mode MUX mode data, defined on MUX control registers
Select Input Offset Address offset to MUX control register
(IOMUXC_<Instance_port>_SELECT_INPUT)
Select Input Select Input data, defined on select input registers
Pad Control Pad Control data, defined on Pad control registers
Definitions can be added or changed, as shown in the following example code:
#define MX53_PAD_ATA_CS_1__UART3_RXD IOMUX_PAD (0x620, 0x2A0, 4, 0x888, 3,
MX53_UART_PAD_CTRL)
Table 13-2. IOMUX Configuration Files
Path File name Description
linux/arch/arm/plat-mxc/include/mach/ iomux-mx53.h IOMUX configuration definitions
linux/arch/arm/mach-mx5 mx53_<reference
board name>.c
Machine Layer File. Contains IOMUX configuration
structures