summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: deb6488)
raw | patch | inline | side by side (parent: deb6488)
author | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Tue, 23 Jun 2015 15:55:24 +0000 (21:25 +0530) | ||
committer | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Tue, 23 Jun 2015 15:58:12 +0000 (21:28 +0530) |
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
README | [new file with mode: 0644] | patch | blob |
diff --git a/README b/README
--- /dev/null
+++ b/README
@@ -0,0 +1,99 @@
+ +++++ Python Script to generate the IOdelay values +++++
+
+IODELAY CONFIGURATION
+=====================
+When migrating to adapt to the IOdelay framework on DRA7xx SoCs,
+
+* All the pinmuxing is performed from the bootloader
+** Allows to select the muxmode and pad direction
+** LEGACY_MODE padmux
+
+* For some pads, along with mux mode, extra delay mode has to be configured
+** Allows to select one of the precoded delays from the ROM
+** VIRTUAL_MODE delay
+
+* For some pads, additional registers have to be written with delays
+** Allows to manually set input/output delays per pad
+** MANUAL_MODE delay
+
+
+DESCRIPTION
+===========
+This script is used for generating the padmux and IO delay data for the
+existing use cases based on group selection of delay modes.
+
+For each pad, depending on the muxmode that is being used, there can be
+multiple choices of choosing the delay - LEGACY, VIRTUAL_MODE or MANUAL_MODE
+For LEGACY_MODE, nothing special has to be done.
+Depending on the way the pad is being used, a specific delay mode has to be
+chosen out of the multiple possibilities.
+
+This script uses the register dump of the PAD registers from a running kernel.
+From this, it derives the muxmode and pad directions used in the system.
+Now the only thing that the script needs to add is the delay information.
+
+Using PCT(Pad Configuration Tool) XML files as reference, the script finds
+out all the possible options for VIRTUAL and MANUAL mode delays.
+Depending on the way the hardware is used, user has to choose a specific mode.
+
+User has to only select the delay mode to be used by a PAD group so that the
+script selects them whenever in conflict. Optionally, the script can run
+interactively to build up this data via menu based selection.
+
+
+FILES
+=====
+iodelay-autogen.py - Python script
+guidelines.txt - Describes when a specific delay mode is to be used
+XMLFiles/*.xml - XML data from Pad Config Tool
+ Contains available delay modes and values
+
+selected-modes.txt - User selected delay modes to be used by script
+ctrl-core.dump - Register dump of all the PAD registers
+config-iodelay-autogen - Turn on/off common options for the script
+
+
+EXAMPLES
+========
+#0 For getting the register dump of the PAD registers:-
+ - Run this command on target "omapconf dump 0x4a003400 0x4a00380c"
+ and save the output to a file called ctrl-core.dump
+
+#1 For generating the IOdelay values from the old kernel interactively:-
+ - Set interactive = 1 in the config-iodelay-autogen and run
+ $> python iodelay-autogen.py
+ - Select the delay mode for the PAD group in conflict. Refer to the
+ guidelines.txt for description about that delay mode.
+ - For the peripherals in doubt, you can skip the entire PAD group
+ - Selection of each PAD group and the selected mode is printed at end.
+
+#2 For generating the IOdelay values for a specific module only:-
+ - Update the selected-modes.txt with an entry for the correct delay mode
+ to be used for the specific module.
+ - Set interactive = 0 in the config-iodelay-autogen and run
+ $> python iodelay-autogen.py | grep "PAD:" #Dumps all pad entries
+ $> python iodelay-autogen.py | grep "DELAY:" #Dumps all manual delays
+
+#3 For generating the IOdelay values for all of the pads:-
+ - Create the selected-modes.txt either by following step #1 or
+ by referring to the guidelines.txt
+ - Set auto_decide = 1 in config-iodelay-autogen and run
+ $> python iodelay-autogen.py
+ - All the PAD and DELAY registers are dumped including the LEGACY_MODE
+ for which no manual/virtual modes are needed.
+
+TODO
+====
+- Do not dump the data immediately, save in a list and dump later
+- Create output in u-boot or kernel format
+- Dump data sorted by register address or by PAD group
+
+
+SUPPORT AND BUGS
+================
+- Some PAD registers are hidden in the XML, so warnings for them are expected
+- I2C1 PADs do not have mux mode names, so errors for them are expected
+
+For any queries and support on this script, please write to
+"Nikhil Devshatwar" <nikhil.nd@ti.com>
+