poplar-pinctrl.dtsi 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Pinctrl dts file for HiSilicon Poplar board
  4. *
  5. * Copyright (c) 2016-2018 HiSilicon Technologies Co., Ltd.
  6. */
  7. #include <dt-bindings/pinctrl/hisi.h>
  8. /* value, enable bits, disable bits, mask */
  9. #define PINCTRL_PULLDOWN(value, enable, disable, mask) \
  10. (value << 13) (enable << 13) (disable << 13) (mask << 13)
  11. #define PINCTRL_PULLUP(value, enable, disable, mask) \
  12. (value << 12) (enable << 12) (disable << 12) (mask << 12)
  13. #define PINCTRL_SLEW_RATE(value, mask) (value << 8) (mask << 8)
  14. #define PINCTRL_DRV_STRENGTH(value, mask) (value << 4) (mask << 4)
  15. &pmx0 {
  16. emmc_pins_1: emmc-pins-1 {
  17. pinctrl-single,pins = <
  18. 0x000 MUX_M2
  19. 0x004 MUX_M2
  20. 0x008 MUX_M2
  21. 0x00c MUX_M2
  22. 0x010 MUX_M2
  23. 0x014 MUX_M2
  24. 0x018 MUX_M2
  25. 0x01c MUX_M2
  26. 0x024 MUX_M2
  27. >;
  28. pinctrl-single,bias-pulldown = <
  29. PINCTRL_PULLDOWN(0, 1, 0, 1)
  30. >;
  31. pinctrl-single,bias-pullup = <
  32. PINCTRL_PULLUP(0, 1, 0, 1)
  33. >;
  34. pinctrl-single,slew-rate = <
  35. PINCTRL_SLEW_RATE(1, 1)
  36. >;
  37. pinctrl-single,drive-strength = <
  38. PINCTRL_DRV_STRENGTH(0xb, 0xf)
  39. >;
  40. };
  41. emmc_pins_2: emmc-pins-2 {
  42. pinctrl-single,pins = <
  43. 0x028 MUX_M2
  44. >;
  45. pinctrl-single,bias-pulldown = <
  46. PINCTRL_PULLDOWN(0, 1, 0, 1)
  47. >;
  48. pinctrl-single,bias-pullup = <
  49. PINCTRL_PULLUP(0, 1, 0, 1)
  50. >;
  51. pinctrl-single,slew-rate = <
  52. PINCTRL_SLEW_RATE(1, 1)
  53. >;
  54. pinctrl-single,drive-strength = <
  55. PINCTRL_DRV_STRENGTH(0x9, 0xf)
  56. >;
  57. };
  58. emmc_pins_3: emmc-pins-3 {
  59. pinctrl-single,pins = <
  60. 0x02c MUX_M2
  61. >;
  62. pinctrl-single,bias-pulldown = <
  63. PINCTRL_PULLDOWN(0, 1, 0, 1)
  64. >;
  65. pinctrl-single,bias-pullup = <
  66. PINCTRL_PULLUP(0, 1, 0, 1)
  67. >;
  68. pinctrl-single,slew-rate = <
  69. PINCTRL_SLEW_RATE(1, 1)
  70. >;
  71. pinctrl-single,drive-strength = <
  72. PINCTRL_DRV_STRENGTH(3, 3)
  73. >;
  74. };
  75. emmc_pins_4: emmc-pins-4 {
  76. pinctrl-single,pins = <
  77. 0x030 MUX_M2
  78. >;
  79. pinctrl-single,bias-pulldown = <
  80. PINCTRL_PULLDOWN(1, 1, 0, 1)
  81. >;
  82. pinctrl-single,bias-pullup = <
  83. PINCTRL_PULLUP(0, 1, 0, 1)
  84. >;
  85. pinctrl-single,slew-rate = <
  86. PINCTRL_SLEW_RATE(1, 1)
  87. >;
  88. pinctrl-single,drive-strength = <
  89. PINCTRL_DRV_STRENGTH(3, 3)
  90. >;
  91. };
  92. };