hisi.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * This header provides constants for hisilicon pinctrl bindings.
  3. *
  4. * Copyright (c) 2015 Hisilicon Limited.
  5. * Copyright (c) 2015 Linaro Limited.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  12. * kind, whether express or implied; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #ifndef _DT_BINDINGS_PINCTRL_HISI_H
  17. #define _DT_BINDINGS_PINCTRL_HISI_H
  18. /* iomg bit definition */
  19. #define MUX_M0 0
  20. #define MUX_M1 1
  21. #define MUX_M2 2
  22. #define MUX_M3 3
  23. #define MUX_M4 4
  24. #define MUX_M5 5
  25. #define MUX_M6 6
  26. #define MUX_M7 7
  27. /* iocg bit definition */
  28. #define PULL_MASK (3)
  29. #define PULL_DIS (0)
  30. #define PULL_UP (1 << 0)
  31. #define PULL_DOWN (1 << 1)
  32. /* drive strength definition */
  33. #define DRIVE_MASK (7 << 4)
  34. #define DRIVE1_02MA (0 << 4)
  35. #define DRIVE1_04MA (1 << 4)
  36. #define DRIVE1_08MA (2 << 4)
  37. #define DRIVE1_10MA (3 << 4)
  38. #define DRIVE2_02MA (0 << 4)
  39. #define DRIVE2_04MA (1 << 4)
  40. #define DRIVE2_08MA (2 << 4)
  41. #define DRIVE2_10MA (3 << 4)
  42. #define DRIVE3_04MA (0 << 4)
  43. #define DRIVE3_08MA (1 << 4)
  44. #define DRIVE3_12MA (2 << 4)
  45. #define DRIVE3_16MA (3 << 4)
  46. #define DRIVE3_20MA (4 << 4)
  47. #define DRIVE3_24MA (5 << 4)
  48. #define DRIVE3_32MA (6 << 4)
  49. #define DRIVE3_40MA (7 << 4)
  50. #define DRIVE4_02MA (0 << 4)
  51. #define DRIVE4_04MA (2 << 4)
  52. #define DRIVE4_08MA (4 << 4)
  53. #define DRIVE4_10MA (6 << 4)
  54. #endif