Difference between revisions of "Pin Mux Configuration in U-Boot (Naon)"

From DAVE Developer's Wiki
Jump to: navigation, search
(infobox created)
 
Line 3: Line 3:
 
{{Applies To U-Boot}}
 
{{Applies To U-Boot}}
 
{{InfoBoxBottom}}
 
{{InfoBoxBottom}}
 +
 +
=== Introduction ===
 +
 +
The first thing to do when adding/modifying a peripheral is configure correctly the internal Pin Mux: in fact, nearly every peripheral function can be attached to more than one pin and nearly every pin is shared between two or more peripheral.
 +
 +
=== Texas Instruments Pin Mux Utility ===
 +
 +
Pin Mux is quite complex in [[:Category:Naon|Naon]] and, fortunately, a tool from TI can help: we suggest to download and install TI [http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors Pin Mux Utility] from [http://focus.ti.com/docs/toolsw/folders/print/pinmuxtool.html TI website].
 +
 +
Software installation and generic usage documentation is available on [http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors this TI wiki page]
 +
 +
=== Pin Mux Configuration in u-boot ===
 +
 +
Due the fact the correct configuration of pin mux usually should be applied as soon as possible and that's better if pin mux is done is only one place, Dave choose to move all its initialization inside the startup code of [[:Category:U-Boot|U-Boot]]
 +
 +
Changing default pin mux configuration is just a matter of:
 +
# open TI Pin Mux configuration
 +
# load the Dave provided Naon default configuration
 +
# change the mux as needed
 +
# export the generated source code into the [[:Category:U-Boot|U-Boot]] source tree
 +
# [[Development_Environment_HowTo_%28NELK%29#Build.2Fconfigure_U-Boot_only|rebuild u-boot]] and update it on your Naon board
 +
 +
=== Exporting generated source file ===
 +
 +
Pix Mux Utility export function, generate two source file:
 +
# ''mux.h'': which contains only pin mux registers offset. This file does NOT change when user changes pin mux configuration. It does NOT need to be updated.
 +
# ''pinmux.h'': which contains pin mux register values for each pin. This is the file that need to be updated in U-Boot source code
 +
 +
To update the default pin mux configuration with your changes just overwrite the <code>board/dave/naon/pinmux.h</code> file inside the U-Boot source tree with the generated one.
 +
 +
{{Board Specific Information|text=To avoid timestamp problems and broken dependency, before building U-Boot we suggest to run '''u-boot_clean''' target:
 +
 +
<pre class="workstation-terminal">
 +
nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make u-boot_clean u-boot u-boot_install
 +
</pre>
 +
}}

Revision as of 07:58, 8 May 2012

Info Box
Naon am387x-dm814x.png Applies to Naon
Tux.png Applies to U-Boot

Introduction[edit | edit source]

The first thing to do when adding/modifying a peripheral is configure correctly the internal Pin Mux: in fact, nearly every peripheral function can be attached to more than one pin and nearly every pin is shared between two or more peripheral.

Texas Instruments Pin Mux Utility[edit | edit source]

Pin Mux is quite complex in Naon and, fortunately, a tool from TI can help: we suggest to download and install TI Pin Mux Utility from TI website.

Software installation and generic usage documentation is available on this TI wiki page

Pin Mux Configuration in u-boot[edit | edit source]

Due the fact the correct configuration of pin mux usually should be applied as soon as possible and that's better if pin mux is done is only one place, Dave choose to move all its initialization inside the startup code of U-Boot

Changing default pin mux configuration is just a matter of:

  1. open TI Pin Mux configuration
  2. load the Dave provided Naon default configuration
  3. change the mux as needed
  4. export the generated source code into the U-Boot source tree
  5. rebuild u-boot and update it on your Naon board

Exporting generated source file[edit | edit source]

Pix Mux Utility export function, generate two source file:

  1. mux.h: which contains only pin mux registers offset. This file does NOT change when user changes pin mux configuration. It does NOT need to be updated.
  2. pinmux.h: which contains pin mux register values for each pin. This is the file that need to be updated in U-Boot source code

To update the default pin mux configuration with your changes just overwrite the board/dave/naon/pinmux.h file inside the U-Boot source tree with the generated one.


Info-icon.png To avoid timestamp problems and broken dependency, before building U-Boot we suggest to run u-boot_clean target:
nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make u-boot_clean u-boot u-boot_install
Info-icon.png