pinconf-tegra.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * pinctrl configuration definitions for the NVIDIA Tegra pinmux
  3. *
  4. * Copyright (c) 2011, NVIDIA CORPORATION. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. */
  15. #ifndef __PINCONF_TEGRA_H__
  16. #define __PINCONF_TEGRA_H__
  17. enum tegra_pinconf_param {
  18. /* argument: tegra_pinconf_pull */
  19. TEGRA_PINCONF_PARAM_PULL,
  20. /* argument: tegra_pinconf_tristate */
  21. TEGRA_PINCONF_PARAM_TRISTATE,
  22. /* argument: Boolean */
  23. TEGRA_PINCONF_PARAM_ENABLE_INPUT,
  24. /* argument: Boolean */
  25. TEGRA_PINCONF_PARAM_OPEN_DRAIN,
  26. /* argument: Boolean */
  27. TEGRA_PINCONF_PARAM_LOCK,
  28. /* argument: Boolean */
  29. TEGRA_PINCONF_PARAM_IORESET,
  30. /* argument: Boolean */
  31. TEGRA_PINCONF_PARAM_HIGH_SPEED_MODE,
  32. /* argument: Boolean */
  33. TEGRA_PINCONF_PARAM_SCHMITT,
  34. /* argument: Boolean */
  35. TEGRA_PINCONF_PARAM_LOW_POWER_MODE,
  36. /* argument: Integer, range is HW-dependant */
  37. TEGRA_PINCONF_PARAM_DRIVE_DOWN_STRENGTH,
  38. /* argument: Integer, range is HW-dependant */
  39. TEGRA_PINCONF_PARAM_DRIVE_UP_STRENGTH,
  40. /* argument: Integer, range is HW-dependant */
  41. TEGRA_PINCONF_PARAM_SLEW_RATE_FALLING,
  42. /* argument: Integer, range is HW-dependant */
  43. TEGRA_PINCONF_PARAM_SLEW_RATE_RISING,
  44. };
  45. enum tegra_pinconf_pull {
  46. TEGRA_PINCONFIG_PULL_NONE,
  47. TEGRA_PINCONFIG_PULL_DOWN,
  48. TEGRA_PINCONFIG_PULL_UP,
  49. };
  50. enum tegra_pinconf_tristate {
  51. TEGRA_PINCONFIG_DRIVEN,
  52. TEGRA_PINCONFIG_TRISTATE,
  53. };
  54. #define TEGRA_PINCONF_PACK(_param_, _arg_) ((_param_) << 16 | (_arg_))
  55. #define TEGRA_PINCONF_UNPACK_PARAM(_conf_) ((_conf_) >> 16)
  56. #define TEGRA_PINCONF_UNPACK_ARG(_conf_) ((_conf_) & 0xffff)
  57. #endif