script: Add generate all modes helper
Kernel device tree needs to have pad/delay config
information for all the supported modes of the peripheral.
e.g. MMC instances have multiple for different speeds.
Add a helper to generate data for all modes in one shot.
Update the README to document the usage.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Kernel device tree needs to have pad/delay config
information for all the supported modes of the peripheral.
e.g. MMC instances have multiple for different speeds.
Add a helper to generate data for all modes in one shot.
Update the README to document the usage.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: DRA72x: Migrate to v3.0.7
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Exit after generating GPIO script
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add additional mux support for DRA72x SoCs
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Correct MMC related warnings in u-boot and kernel
Even though MMC padconf is allowed and recommended in kernel DTS, we still
might need to program the pad and delays in the u-boot.
Remove the un-nececessary warnings for MMC module.
Only warn if non MMC module is enabled in kernel, but skip nothing.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Even though MMC padconf is allowed and recommended in kernel DTS, we still
might need to program the pad and delays in the u-boot.
Remove the un-nececessary warnings for MMC module.
Only warn if non MMC module is enabled in kernel, but skip nothing.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: DRA75x: Migrate to v3.0.10
This has the fixes for the RGMII additional modes
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
This has the fixes for the RGMII additional modes
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Use Regular Expression in module filter
This will help get the pinmux for multiple instances in one go.
e.g. All kernel pinmux for MMC (-m MMC) or all video muxes (-m VIN)
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
This will help get the pinmux for multiple instances in one go.
e.g. All kernel pinmux for MMC (-m MMC) or all video muxes (-m VIN)
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT: XML: Migrate DRA72x to PCT 1.0.6
Update the model file - with updated delay modes and values
Small corrections to the CTRL_CORE XML file.
Update the model file - with updated delay modes and values
Small corrections to the CTRL_CORE XML file.
script: Use reset value for slewcontrol bit in pads
It is recommended to use the reset value of the slewcontrol bit
in the pad registers. Update the bitfield by referring to the
reset value given in the CTRL_MODULE_CORE.xml
Add an option if someone does not want to override this bit.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
It is recommended to use the reset value of the slewcontrol bit
in the pad registers. Update the bitfield by referring to the
reset value given in the CTRL_MODULE_CORE.xml
Add an option if someone does not want to override this bit.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add support for SLEWCONTROL in the pad generation
Bit number 19 of pad registers allow setting slewrate for that pad.
Interprete the bit and generate the SLEWCONTROL macro whenever required.
Same macro is used for linux and uboot formats.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Bit number 19 of pad registers allow setting slewrate for that pad.
Interprete the bit and generate the SLEWCONTROL macro whenever required.
Same macro is used for linux and uboot formats.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Warn but generate MMC values
For MMC modules, only generate a warning if attempting
to generate pad data in u-boot.
Sometimes, it's okay to ignore the warning as the padconf
for MMC is essential in uboot.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
For MMC modules, only generate a warning if attempting
to generate pad data in u-boot.
Sometimes, it's okay to ignore the warning as the padconf
for MMC is essential in uboot.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Fix linux format typo error
Fix the linux format pad generation to avoid compiler
errors in the DTS file.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Fix the linux format pad generation to avoid compiler
errors in the DTS file.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Pass selected mode name in pad data
For MMC instance, there can be nodes for all the supported
delay modes. These are differentiated by the mode name.
To do this, pass the delay mode in the pad data.
Update the parameter extraction for linux/bios/uboot.
Use the modename to generate unique DTS nodes for MMC pads.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
For MMC instance, there can be nodes for all the supported
delay modes. These are differentiated by the mode name.
To do this, pass the delay mode in the pad data.
Update the parameter extraction for linux/bios/uboot.
Use the modename to generate unique DTS nodes for MMC pads.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Fix the menu check in hurried push
Fix the menu check which breaks the menu selection of
last available mode.
The last commit 2e9c2437 (script: Add LEGACY mode menu option
to avoid manual/virtual) broke this check.
Fix this.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Fix the menu check which breaks the menu selection of
last available mode.
The last commit 2e9c2437 (script: Add LEGACY mode menu option
to avoid manual/virtual) broke this check.
Fix this.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add LEGACY mode menu option to avoid manual/virtual
If the module has virtual/manual modes availble, user is presented
with the menu and a mode needs to be selected.
For some of the modules, Data manual suggests to use LEGACY mode.
This is valid even if some virtual/manual modes are available.
Fix this with LEGACY option in menu, upon selection of which would
configure the pads without any virtual/manual delays.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
If the module has virtual/manual modes availble, user is presented
with the menu and a mode needs to be selected.
For some of the modules, Data manual suggests to use LEGACY mode.
This is valid even if some virtual/manual modes are available.
Fix this with LEGACY option in menu, upon selection of which would
configure the pads without any virtual/manual delays.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Use different guidelines info for parts
Different parts may have virtual/manual modes with the same name.
It's better to use a different guideline so as to avoid conflicts.
Also, fix an RE regarding the parsing to handle extra columns.
Add the guidelines.txt for the DRA72 part.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Different parts may have virtual/manual modes with the same name.
It's better to use a different guideline so as to avoid conflicts.
Also, fix an RE regarding the parsing to handle extra columns.
Add the guidelines.txt for the DRA72 part.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add support for all DRA7xx parts
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: Add data for DRA72x part
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: Move XML files to part specific directory
Also delete some of the obsolete XML files for old version
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Also delete some of the obsolete XML files for old version
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Print tool version and PCT version
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: Add XML files used in PCT v1.0.9
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: kernel: Fix delay format to avoid build error
Missing paranthesis around the delay values would result in DTB build error.
Fix the format string properly.
Reported-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Missing paranthesis around the delay values would result in DTB build error.
Fix the format string properly.
Reported-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Fix the gpio script for bit > 9
Fix a bug where the script would only consider first bit for the gpio pin
e.g. GPIO7_10 would be read to extract bit number '1' instead of '10'
Fix the regular expression to correct the script generation.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Fix a bug where the script would only consider first bit for the gpio pin
e.g. GPIO7_10 would be read to extract bit number '1' instead of '10'
Fix the regular expression to correct the script generation.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Small change in uboot delay format
Include the pin name associated with the PAD register and
also the name of the manual mode used.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Include the pin name associated with the PAD register and
also the name of the manual mode used.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Generate sorted manual delays in u-boot format
Generate the manual delay data and store in a list.
Sort the list on the delay offset and dump the sorted list.
* Improve help message to add information on pad dump generation
* Generate the array name based on the silicon revision.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Generate the manual delay data and store in a list.
Sort the list on the delay offset and dump the sorted list.
* Improve help message to add information on pad dump generation
* Generate the array name based on the silicon revision.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add strict mode command line option
For some peripherals, only one delaymode cannot be used for all pads.
In this case, it is not good to remember the delaymode and select it
automatically for other pads.
e.g. ethernet or mcasp peripherals may use different delaymodes for
RX pads and different delaymodes for TX pads. With strict mode, the
script won't assume anything and ask questions for all the pads.
With this, it's possible to generate data for peripherals using
multiple delaymodes.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
For some peripherals, only one delaymode cannot be used for all pads.
In this case, it is not good to remember the delaymode and select it
automatically for other pads.
e.g. ethernet or mcasp peripherals may use different delaymodes for
RX pads and different delaymodes for TX pads. With strict mode, the
script won't assume anything and ask questions for all the pads.
With this, it's possible to generate data for peripherals using
multiple delaymodes.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: Add support for ES2.0 silicon revision
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add support for bios output format
Add support for pad/delay generation in bios output format.
Currently, the MMC check is not added, so all the pads/delays
are configured, irrespective.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Add support for pad/delay generation in bios output format.
Currently, the MMC check is not added, so all the pads/delays
are configured, irrespective.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
README: Update the steps with new options
Update the examples to use the new command line options.
Also, correct the FILES section to remove the config file which
is not being used now.
Add more examples for generating module specific config and for the
changing output format.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Update the examples to use the new command line options.
Also, correct the FILES section to remove the config file which
is not being used now.
Add more examples for generating module specific config and for the
changing output format.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: Add XML files used in PCT v1.0.7
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add XML correctness checks
Add a command line option -c / --check to perform some tests
to identify issues with the XML files.
This would perform a set of checks to verify the consistency of
the data in the XML files and the guidelines.txt.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Add a command line option -c / --check to perform some tests
to identify issues with the XML files.
This would perform a set of checks to verify the consistency of
the data in the XML files and the guidelines.txt.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add option to filter module and to dump gpio
Add another --module / -m option to generate values only
While iterating over all the pads, skip all the pads which
are not configured for the module specified.
Also, add the checks to avoid MMC configuration in uboot and
restrict the non MMC configuration in kernel.
For debugging purposes, some of the pads (input pads) can be
sampled using the GPIO DATA-IN registers even if the pad is
configured in non GPIO mux mode.
Add a command line option --gpio / -g to dump the script
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Add another --module / -m option to generate values only
While iterating over all the pads, skip all the pads which
are not configured for the module specified.
Also, add the checks to avoid MMC configuration in uboot and
restrict the non MMC configuration in kernel.
For debugging purposes, some of the pads (input pads) can be
sampled using the GPIO DATA-IN registers even if the pad is
configured in non GPIO mux mode.
Add a command line option --gpio / -g to dump the script
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Add support for output format linux and uboot
Add a command line option to select the output format.
Format the pad and delay dump differently based on the format
selected by user.
Along with the padconf and delayconf lists(which are sorted address wise)
maintain a dictonary which has entries grouped for a specific module.
Use padconf in uboot format to generate one big array.
Use per_padconf in linux format to generate DTS entries for each module.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Add a command line option to select the output format.
Format the pad and delay dump differently based on the format
selected by user.
Along with the padconf and delayconf lists(which are sorted address wise)
maintain a dictonary which has entries grouped for a specific module.
Use padconf in uboot format to generate one big array.
Use per_padconf in linux format to generate DTS entries for each module.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Refactoring the logic improved interface
* Remove the config file and the config parser.
* Add command line option parser and add basic options.
* Introduce debug levels controlled by cmd line option.
* Do not dump the generated values on the fly, save and dump later.
* Hooks to generate the data in the required format - kernel/uboot/QNX.
* Rename functions and variable to improve readability.
* Rearranged functions and added comments for better understanding.
* Fixed bugs for handling unused pads and lagacy mode.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
* Remove the config file and the config parser.
* Add command line option parser and add basic options.
* Introduce debug levels controlled by cmd line option.
* Do not dump the generated values on the fly, save and dump later.
* Hooks to generate the data in the required format - kernel/uboot/QNX.
* Rename functions and variable to improve readability.
* Rearranged functions and added comments for better understanding.
* Fixed bugs for handling unused pads and lagacy mode.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
README: Add Initial README file
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
config: Set default config options
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dump: Add GLSDK CTRL CORE regdumps for common use cases
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
PCT XML: Add XML files used in PCT v1.0.6
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
script: Initial version of the IOdelay autogen script
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>