hisi.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. /* drive strength definition for hi3660 */
  55. #define DRIVE6_MASK (15 << 4)
  56. #define DRIVE6_04MA (0 << 4)
  57. #define DRIVE6_12MA (4 << 4)
  58. #define DRIVE6_19MA (8 << 4)
  59. #define DRIVE6_27MA (10 << 4)
  60. #define DRIVE6_32MA (15 << 4)
  61. #define DRIVE7_02MA (0 << 4)
  62. #define DRIVE7_04MA (1 << 4)
  63. #define DRIVE7_06MA (2 << 4)
  64. #define DRIVE7_08MA (3 << 4)
  65. #define DRIVE7_10MA (4 << 4)
  66. #define DRIVE7_12MA (5 << 4)
  67. #define DRIVE7_14MA (6 << 4)
  68. #define DRIVE7_16MA (7 << 4)
  69. #endif