summaryrefslogtreecommitdiff
path: root/soc-to-kernel-pinctrl-driver.py
Commit message (Collapse)AuthorAgeFilesLines
* Update to use bitmask instead of bit for parked configurationHEADmasterSowjanya Komatineni2019-07-011-10/+24
| | | | | | | | | | | | | | Parked bits for SDMMC2 and SDMMC4 are part of CFGPAD register rather than pinmux registers and contains bit for each of their pins. So updating pinctrl Tegra driver to use bitmask for parked configuration rather than bit. Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com> [treding@nvidia.com: reshuffle fields to match driver order] [treding@nvidia.com: use bitmask 0 for unsupported] Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Do not output NVIDIA as an authorThierry Reding2019-07-011-3/+8
| | | | | | | | | Printing out the string 'NVIDIA' as the author of a file looks somewhat strange and is pretty meaningless given that there's already a copyright from NVIDIA in the files. Detect the special case and ignore it. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Update kernel driver templateThierry Reding2019-07-011-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some changes in recent years have modified the upstream kernel driver in some ways that make it incompatible with the current template. Update the template to take into account changes introduced by the following commits: commit e3d2160f12d6aa7a87d9db09d8458b4a3492cd45 Author: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Mon May 22 16:56:47 2017 -0400 pinctrl: tegra: clean up modular vs. non-modular distinctions None of the Kconfigs for any of these drivers are tristate, meaning that they currently are not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the drivers there is no doubt they are builtin-only. All drivers get similar changes, so they are handled in batch. We remove module.h from code that isn't doing anything modular at all; if they have __init sections, then replace it with init.h. A couple drivers have module_exit() code that is essentially orphaned, and so we remove that. Quite a few bool drivers (hence non-modular) are converted over to to builtin_platform_driver(). Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Pritesh Raithatha <praithatha@nvidia.com> Cc: Ashwini Ghuge <aghuge@nvidia.com> Cc: linux-gpio@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> commit 3c94d2d08a032d911bbe34f2edb24cb63a63644a Author: Stefan Agner <stefan@agner.ch> Date: Thu Jul 26 17:40:24 2018 +0200 pinctrl: tegra: define GPIO compatible node per SoC Tegra 2 uses a different GPIO controller which uses "tegra20-gpio" as compatible string. Make the compatible string the GPIO node is using a SoC specific property. This prevents the kernel from registering the GPIO range twice in case the GPIO range is specified in the device tree. Fixes: 9462510ce31e ("pinctrl: tegra: Only set the gpio range if needed") Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> commit 1e0813ee5599932c856bda64a568895ed7a33d3a Author: Dmitry Osipenko <digetx@gmail.com> Date: Thu Aug 2 14:11:43 2018 +0300 pinctrl: tegra: Move drivers registration to arch_init level There is a bug in regards to deferred probing within the drivers core that causes GPIO-driver to suspend after its users. The bug appears if GPIO-driver probe is getting deferred, which happens after introducing dependency on PINCTRL-driver for the GPIO-driver by defining "gpio-ranges" property in device-tree. The bug in the drivers core is old (more than 4 years now) and is well known, unfortunately there is no easy fix for it. The good news is that we can workaround the deferred probe issue by changing GPIO / PINCTRL drivers registration order and hence by moving PINCTRL driver registration to the arch_init level and GPIO to the subsys_init. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Note that the last one is something that we probably should fix correctly by using device links rather than working around it by playing init level tricks. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* soc: Get rid of .remove callbackLaxman Dewangan2016-05-031-1/+0
| | | | | | | | | | Pinctrl driver uses the devm_pinctrl_register and hence it is not required to generate code for .remove callback. Remove the need of .remove callback. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* soc: Avoid parked_reg and parked_bankLaxman Dewangan2016-05-031-5/+3
| | | | | | | | | | | | | | | | | | | | NVIDIA's Tegra210 support the park bit to make pinmux configuration enable/disable. If parked bit is 1 then configuration does not apply and if it is 0 then pinmux configuration applies. This is to support to avoid any glitch in pinmux configurations. The parked bit is part of mux register and mux bank and hence it is not required to have member for the parked_reg and parked bank very similar to other bit field of the same register. Remove the need of the parked register and parked bank and get whether parked function supported or not by parked_bit. This is to make the parked bit handling same as other fields of mux registers. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* soc: Add support for Parked bits for Tegra210Rhyland Klein2016-04-071-0/+12
| | | | | | | | | Tegra210 has a parked bit for each pin. Add code to express this by updating the kernel driver MACROs to add in parked_* fields so that the kernel can handle them as it sees fit. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Fix some TAB alignment issuesStephen Warren2015-03-251-2/+2
| | | | | | | | | | | append_aligned_tabs_indent_with_tabs() was converting TABs to spaces to simplify calculation of line length, assuming the only TABs were at the beginning of the line, and hence were all exactly 8 characters wide. In some scenarios, TABs were also embedded within the line, which caused incorrect calculations. Solve this by explicitly evaluating TAB widths character by character, rather than taking shortcuts. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Support Tegra210Stephen Warren2015-02-251-109/+281
| | | | | | | | | | | | | | | | | | | | | | | | | Tegra210 changes the pinmux HW in a few ways; at least: - The set of drive groups is much more 1:1 with the set of pins. Most pins have an associated drive group register as well as an associated pinmux register, and most drive groups cover a single pin. - Some register fields have moved from the drive group registers into the pinmux registers. - The set of available options for each pin and group varies relative to previous chips, and hence the register layouts vary a bit too. This patch updates tegra-pinmux-scripts minimally to handle these changes, to a level equivalent to the support for previous chips. For example, some new options such as per-pin schmitt aren't handled since the syseng-supplied pinmux spreadsheets don't provide a value for this option. csv-to-board-tegra124-xlsx.py is renamed to csv-to-board.py since it now supports boards using different SoCs, and it's not worth encoding all supported SoCs in the filename (Tegra30/114 aren't supported by it, hence the previous naming). Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add support for MIPI Pad Ctrl groups on Tegra124Stephen Warren2015-02-111-0/+64
| | | | | | | | | This aligns the output with what's check into the kernel. There are now only minor white-space/formatting differences. I'll fix those in the kernel soon, when I send patched to add Tegra210 SoC support. Cc: Sean Paul <seanpaul@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Don't set .owner field in kernel pinctrl driver any moreStephen Warren2015-02-111-1/+0
| | | | | | This aligns the output with what's checked into the kernel. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Make kernel driver of_device_id tables constStephen Warren2014-09-021-1/+1
| | | | | | | This updates to output to match the kernel drivers as of 5dfe10b43a91 "pinctrl: Make of_device_id array const". Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Initial set of scriptsStephen Warren2014-04-221-0/+408
A set of scripts to generate Linux kernel and U-Boot pinmux drivers and board pinmux configuration tables. Also included are scripts to convert existing Linux kernel pinmux drivers and NV-internal spreadsheets to the internal data representation. SoC configuration files are included for Tegra30, Tegra114, and Tegra124. Board configuration files are included for Jetson TK1 and Venice2. configs/tegra30.soc configs/tegra114.soc configs/tegra124.soc SoC pin definitions configs/jetson-tk1.board configs/venice2.board Board configurations soc-to-kernel-pinctrl-driver.py soc-to-uboot-driver.py Generate Linux kernel and U-Boot pinmux drivers board-to-kernel-dt.py board-to-uboot.py Generate board configuration tables for the Linux kernel (DT) and U-Boot. kernel-pinctrl-driver-to-soc.py Convert an existing Linux kernel pinmux driver to the internal representation of an SoC used by this project. csv-to-board-tegra124-xlsx.py Convert an NV-internal board configuration spreadsheet to the internal representation of a board configuration used by this project. tegra_pmx_board_parser.py tegra_pmx_parser_utils.py tegra_pmx_soc_parser.py tegra_pmx_utils.py Internal Python modules used to parse the internal data representations, and various other utilities. Signed-off-by: Stephen Warren <swarren@nvidia.com>