diff options
-rw-r--r-- | README | 110 | ||||
-rw-r--r-- | README.md | 120 |
2 files changed, 120 insertions, 110 deletions
@@ -1,110 +0,0 @@ | |||
1 | +++++ Python Script to generate the IOdelay values +++++ | ||
2 | |||
3 | IODELAY CONFIGURATION | ||
4 | ===================== | ||
5 | When migrating to adapt to the IOdelay framework on DRA7xx SoCs, | ||
6 | |||
7 | * All the pinmuxing is performed from the bootloader | ||
8 | ** Allows to select the muxmode and pad direction | ||
9 | ** LEGACY_MODE padmux | ||
10 | |||
11 | * For some pads, along with mux mode, extra delay mode has to be configured | ||
12 | ** Allows to select one of the precoded delays from the ROM | ||
13 | ** VIRTUAL_MODE delay | ||
14 | |||
15 | * For some pads, additional registers have to be written with delays | ||
16 | ** Allows to manually set input/output delays per pad | ||
17 | ** MANUAL_MODE delay | ||
18 | |||
19 | |||
20 | DESCRIPTION | ||
21 | =========== | ||
22 | This script is used for generating the padmux and IO delay data for the | ||
23 | existing use cases based on group selection of delay modes. | ||
24 | |||
25 | For each pad, depending on the muxmode that is being used, there can be | ||
26 | multiple choices of choosing the delay - LEGACY, VIRTUAL_MODE or MANUAL_MODE | ||
27 | For LEGACY_MODE, nothing special has to be done. | ||
28 | Depending on the way the pad is being used, a specific delay mode has to be | ||
29 | chosen out of the multiple possibilities. | ||
30 | |||
31 | This script uses the register dump of the PAD registers from a running kernel. | ||
32 | From this, it derives the muxmode and pad directions used in the system. | ||
33 | Now the only thing that the script needs to add is the delay information. | ||
34 | |||
35 | Using PCT(Pad Configuration Tool) XML files as reference, the script finds | ||
36 | out all the possible options for VIRTUAL and MANUAL mode delays. | ||
37 | Depending on the way the hardware is used, user has to choose a specific mode. | ||
38 | |||
39 | User has to only select the delay mode to be used by a PAD group so that the | ||
40 | script selects them whenever in conflict. Optionally, the script can run | ||
41 | interactively to build up this data via menu based selection. | ||
42 | |||
43 | |||
44 | FILES | ||
45 | ===== | ||
46 | iodelay-autogen.py - Python script | ||
47 | guidelines.txt - Describes when a specific delay mode is to be used | ||
48 | XMLFiles/*.xml - XML data from Pad Config Tool | ||
49 | Contains available delay modes and values | ||
50 | |||
51 | selected-modes.txt - User selected delay modes to be used by script | ||
52 | ctrl-core.dump - Register dump of all the PAD registers | ||
53 | generate-all-modes.sh - Helper script to generate all modes of a peripheral | ||
54 | |||
55 | |||
56 | EXAMPLES | ||
57 | ======== | ||
58 | ## For getting the register dump of the PAD registers from "linux" system:- | ||
59 | - Run this command on target "omapconf dump 0x4a003400 0x4a00380c" | ||
60 | and save the output to a file called ctrl-core.dump | ||
61 | - Please refer to the usage and help message for more info. | ||
62 | $> ./iodelay-autogen.py --help | ||
63 | |||
64 | ## For getting the register dump of the PAD registers from "bios" system:- | ||
65 | - For bios use cases, omapconf is not available. Use the CCS tool to | ||
66 | create the dump of pad registers using gel script 'get-pad-dump.gel' | ||
67 | |||
68 | #1 For generating the IOdelay values from the old kernel interactively:- | ||
69 | - Run the script interactively with -i option (default). | ||
70 | - Select the delay mode for the PAD group in conflict. Refer to the | ||
71 | guidelines.txt for description about that delay mode. | ||
72 | - For the peripherals in doubt, you can skip the entire PAD group | ||
73 | - Selection of each PAD group and the selected mode is printed at end. | ||
74 | - e.g. to generate the pad/delay data first time, run | ||
75 | $> ./iodelay-autogen.py -i 1 | ||
76 | $> ./iodelay-autogen.py | ||
77 | |||
78 | #2 For generating the IOdelay values for a specific module only:- | ||
79 | - Use the module filter to specify the desired module. | ||
80 | The script would only generate output wrt the module specified. | ||
81 | - e.g. to generate the pad/delay data only for VIN3A interface, run | ||
82 | $> ./iodelay-autogen.py -m VIN3A | ||
83 | |||
84 | #3 For generating the IOdelay values for kernel format:- | ||
85 | - Use the format option -f to specify the output format. | ||
86 | - e.g. for generating pad/delay data for MMC1 in DTS format, run | ||
87 | $> ./iodelay-autogen.py -m MMC1 -f linux | ||
88 | |||
89 | #4 For generating MMC data in kernel DTS format:- | ||
90 | - Use the generate-all-modes.sh helper similar to the python tool. | ||
91 | - e.g. for generating MMC1 for J6eco SR1.0, run | ||
92 | #> ./generate-all-modes.sh -p dra72x -m MMC1 -r 1.0 -f linux | ||
93 | |||
94 | #5 For generating signal probe script for VIN1A signals:- | ||
95 | - Use the module filter for to specify the module. | ||
96 | - Enable '--gpio' option | ||
97 | #> ./iodelay-autogen.py -m VIN1A --gpio | ||
98 | - This would create vin1a-probe.sh which can be used on target | ||
99 | |||
100 | TODO | ||
101 | ==== | ||
102 | |||
103 | SUPPORT AND BUGS | ||
104 | ================ | ||
105 | - Some PAD registers are hidden in the XML, so warnings for them are expected | ||
106 | - I2C1 PADs do not have mux mode names, so errors for them are expected | ||
107 | |||
108 | For any queries and support on this script, please write to | ||
109 | "Nikhil Devshatwar" <nikhil.nd@ti.com> | ||
110 | |||
diff --git a/README.md b/README.md new file mode 100644 index 0000000..2a38b67 --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,120 @@ | |||
1 | <!-- | ||
2 | This README.md is written in Markdown | ||
3 | For syntax reference, refer https://markdown-it.github.io/ | ||
4 | Use following to convert this to html | ||
5 | |||
6 | # markdown README.md > README.html | ||
7 | --> | ||
8 | |||
9 | # Python Script to generate the IOdelay values | ||
10 | --- | ||
11 | |||
12 | |||
13 | ## IO delay configuration | ||
14 | |||
15 | When migrating to adapt to the IOdelay framework on DRA7xx SoCs, | ||
16 | |||
17 | * All the pinmuxing is performed from the bootloader | ||
18 | * Allows to select the muxmode and pad direction | ||
19 | * `LEGACY_MODE` padmux | ||
20 | |||
21 | * For some pads, along with mux mode, extra delay mode has to be configured | ||
22 | * Allows to select one of the precoded delays from the ROM | ||
23 | * `VIRTUAL_MODE` delay | ||
24 | |||
25 | * For some pads, additional registers have to be written with delays | ||
26 | * Allows to manually set input/output delays per pad | ||
27 | * `MANUAL_MODE` delay | ||
28 | |||
29 | |||
30 | ## Description | ||
31 | |||
32 | This script is used for generating the padmux and IO delay data for the | ||
33 | existing use cases based on group selection of delay modes. | ||
34 | |||
35 | ### Pinmux and iodelay | ||
36 | For each pad, depending on the muxmode that is being used, there can be | ||
37 | multiple choices of choosing the delay - LEGACY, VIRTUAL_MODE or MANUAL_MODE | ||
38 | For LEGACY_MODE, nothing special has to be done. | ||
39 | Depending on the way the pad is being used, a specific delay mode has to be chosen out of the multiple possibilities. | ||
40 | |||
41 | ### Auto generation | ||
42 | This script uses the register dump of the PAD registers from a **running kernel**. | ||
43 | From this, it derives the **muxmode** and pad **directions** used in the system. | ||
44 | Now the only thing that the script needs to add is the delay information. | ||
45 | |||
46 | Using `PCT`(Pad Configuration Tool) XML files as reference, the script finds | ||
47 | out all the possible options for **VIRTUAL** and **MANUAL** mode delays. | ||
48 | Depending on the way the hardware is used, user has to choose a specific mode. | ||
49 | |||
50 | User has to select only the delay mode to be used by a PAD group so that the | ||
51 | script selects them whenever in conflict. Optionally, the script can run | ||
52 | interactively to build up this data via menu based selection. | ||
53 | |||
54 | |||
55 | ## Files in this repo | ||
56 | |||
57 | | File | Description | | ||
58 | | ------ | ----------- | | ||
59 | | iodelay-autogen.py | Python script | | ||
60 | | guidelines.txt | Describes when a specific delay mode is to be used | | ||
61 | | XMLFiles/*.xml | XML data from Pad Config Tool (Contains available delay modes and values) | ||
62 | | selected-modes.txt | User selected delay modes to be used by script | | ||
63 | | ctrl-core.dump | Register dump of all the PAD registers | ||
64 | | generate-all-modes.sh | Helper script to generate all modes of a peripheral | | ||
65 | |||
66 | |||
67 | ## Example usage | ||
68 | |||
69 | #### For getting the register dump of the PAD registers from "linux" system:- | ||
70 | * Run this command on target and save the output to a file called ctrl-core.dump | ||
71 | `omapconf dump 0x4a003400 0x4a00380c` | ||
72 | * Please refer to the usage and help message for more info. | ||
73 | `./iodelay-autogen.py --help` | ||
74 | --- | ||
75 | |||
76 | #### For getting the register dump of the PAD registers from "bios" system:- | ||
77 | * For bios use cases, omapconf is not available. Use the CCS tool to | ||
78 | create the dump of pad registers using gel script | ||
79 | `get-pad-dump.gel` | ||
80 | --- | ||
81 | |||
82 | #### For generating the IOdelay values from the old kernel interactively | ||
83 | * Run the script interactively with -i option (default). | ||
84 | * Select the delay mode for the PAD group in conflict. Refer to the guidelines.txt for description about that delay mode. | ||
85 | * For the peripherals in doubt, you can skip the entire PAD group | ||
86 | * Selection of each PAD group and the selected mode is printed at end. | ||
87 | * e.g. to generate the pad/delay data first time, run | ||
88 | `./iodelay-autogen.py` | ||
89 | --- | ||
90 | |||
91 | #### For generating the IOdelay values for a specific module only:- | ||
92 | * Use the module filter to specify the desired module. The script would only generate output wrt the module specified. | ||
93 | * e.g. to generate the pad/delay data only for VIN3A interface, run | ||
94 | `./iodelay-autogen.py -m VIN3A` | ||
95 | --- | ||
96 | |||
97 | #### For generating the IOdelay values for kernel format:- | ||
98 | * Use the format option -f to specify the output format. | ||
99 | * e.g. for generating pad/delay data for MMC1 in DTS format, run | ||
100 | `./iodelay-autogen.py -m MMC1 -f linux` | ||
101 | --- | ||
102 | |||
103 | #### For generating MMC data in kernel DTS format:- | ||
104 | * Use the generate-all-modes.sh helper similar to the python tool. | ||
105 | * e.g. for generating MMC1 for J6eco SR1.0, run | ||
106 | `./generate-all-modes.sh -p dra72x -m MMC1 -r 1.0 -f linux` | ||
107 | --- | ||
108 | |||
109 | #### For generating signal probe script for VIN1A signals:- | ||
110 | * Use the module filter for to specify the module. | ||
111 | * Enable '--gpio' option | ||
112 | `./iodelay-autogen.py -m VIN1A --gpio` | ||
113 | * This would create vin1a-probe.sh which can be used on target | ||
114 | |||
115 | ## Support and bugs | ||
116 | * Some PAD registers are hidden in the XML, so warnings for them are expected | ||
117 | * I2C1 PADs do not have mux mode names, so errors for them are expected | ||
118 | |||
119 | For any queries and support on this script, please write to | ||
120 | **Nikhil Devshatwar** <nikhil.nd@ti.com> | ||