Difference between revisions of "BeagleBoardPinMux"

From eLinux.org
Jump to: navigation, search
m (Add short intro for HW section)
m (Give details how pin mux basically works)
Line 10: Line 10:
 
==OMAP3==
 
==OMAP3==
  
Details of OMAP35x PinMux can be found in [http://focus.ti.com/lit/ug/spruf98b/spruf98b.pdf OMAP35x Applications Processor TRM] (spruf98b.pdf) in section ''7.4.4.3 Pad Multiplexing Register Fields'' (page 814).
+
Details of OMAP35x PinMux can be found in [http://focus.ti.com/lit/ug/spruf98b/spruf98b.pdf OMAP35x Applications Processor TRM] (spruf98b.pdf) in section ''7.4.4.3 Pad Multiplexing Register Fields'' (page 814):
  
tbd.
+
* Each ball (pin) can (but don't must) have up to 8 different functionalities assigned to. These are called ''Mode 0'' to ''Mode 7''.
 +
* Each ball (pin) muxing is controlled by 16bit. So two balls (pins) are controlled by one 32bit register inside OMAP3. Each register can be written/read by 16bit or 32bit accesses.
 +
* The name of the register is normally done by the name of Mode0 ball (pin) functionality which is controlled by the lower 16bit of the 32bit register.
 +
* The physical address of the register is given in the table, too. To configure the ball (pin) which is controlled by the upper 16bit of the register ([31-16]) you can do this by a 16bit access to ''physical_register_address + 0x2''
  
 
==Beagle==
 
==Beagle==

Revision as of 01:14, 29 May 2009

This page is about Pin Multiplex (PinMux) on BeagleBoard (OMAP3). OMAP3 chip has less balls (pins) than the internal logic provides functionality. So each ball (pin) of OMAP3 can have different functionality (e.g. GPIO or I2C.TX). This is controlled by OMAP3 chip internal registers. This page tries to give some details where some info about OMAP3 pin mux can be found in hardware and how this is controlled by software, mainly U-Boot and Linux kernel. The information on this page can be used then e.g. to re-configure pins exposed at Beagle's expansion connector.

Hardware

This section tries to give an idea how pin mux on OMAP3 basically works, and looks at the Beagle specific hardware documentation for the expansion connector.

OMAP3

Details of OMAP35x PinMux can be found in OMAP35x Applications Processor TRM (spruf98b.pdf) in section 7.4.4.3 Pad Multiplexing Register Fields (page 814):

  • Each ball (pin) can (but don't must) have up to 8 different functionalities assigned to. These are called Mode 0 to Mode 7.
  • Each ball (pin) muxing is controlled by 16bit. So two balls (pins) are controlled by one 32bit register inside OMAP3. Each register can be written/read by 16bit or 32bit accesses.
  • The name of the register is normally done by the name of Mode0 ball (pin) functionality which is controlled by the lower 16bit of the 32bit register.
  • The physical address of the register is given in the table, too. To configure the ball (pin) which is controlled by the upper 16bit of the register ([31-16]) you can do this by a 16bit access to physical_register_address + 0x2

Beagle

Details of Beagle's expansion header usage can be found in BeagleBoard System Reference Manual in table 20 Expansion connector signals (page 96).

tbd.

Software

Controlling the hardware interface (i.e. writing the registers with appropriate values) described above can be done by any software. Up to know, default configuration is that initial pin mux is done by bootloader U-Boot, and later can be overwritten by Linux kernel.

  • Default configuration is that pin mux is set board specific by U-Boot and kernel's pin mux is disabled (i.e. kernel's CONFIG_OMAP_MUX is not set, see below).
  • Kernel's pin mux is known to be somehow broken. While different boards need different pin mux, recent Linux kernel has only one pin mux configuration, which then obviously don't fit any special board. Therefore, kernel's pin mux (see below) is disabled unless you enabled it intentionally. Kernel's pin mux needs some major re-write.

U-Boot

Main PinMux configuration in done in bootloader U-Boot. For beagle, see file board/omap3/beagle/beagle.h.

tbd.

Linux kernel

Some additional PinMux configuration is done by Linux kernel, too. Note that this has to be enabled by CONFIG_OMAP_MUX, else this isn't executed. This is done in file arch/arm/mach-omap2/mux.c (section CONFIG_ARCH_OMAP34XX).

tbd.

Examples

tbd.