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

From DAVE Developer's Wiki
Jump to: navigation, search
(Exporting generated source file)
Line 39: Line 39:
 
</pre>
 
</pre>
 
}}
 
}}
 +
 +
{{Board Specific Information|text=Please note that pin mux configuration is applied in both U-Boot stage (1st and 2nd). When changing pin mux configuration for your custom board, please be sure to update both binaries}}

Revision as of 08:06, 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


Info-icon.png Please note that pin mux configuration is applied in both U-Boot stage (1st and 2nd). When changing pin mux configuration for your custom board, please be sure to update both binaries Info-icon.png