pinctrl-max77620.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. Pincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.
  2. Device has 8 GPIO pins which can be configured as GPIO as well as the
  3. special IO functions.
  4. Please refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
  5. for details of the common pinctrl bindings used by client devices,
  6. including the meaning of the phrase "pin configuration node".
  7. Optional Pinmux properties:
  8. --------------------------
  9. Following properties are required if default setting of pins are required
  10. at boot.
  11. - pinctrl-names: A pinctrl state named per <pinctrl-binding.txt>.
  12. - pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
  13. <pinctrl-binding.txt>.
  14. The pin configurations are defined as child of the pinctrl states node. Each
  15. sub-node have following properties:
  16. Required properties:
  17. ------------------
  18. - pins: List of pins. Valid values of pins properties are:
  19. gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.
  20. Optional properties:
  21. -------------------
  22. Following are optional properties defined as pinmux DT binding document
  23. <pinctrl-bindings.txt>. Absence of properties will leave the configuration
  24. on default.
  25. function,
  26. drive-push-pull,
  27. drive-open-drain,
  28. bias-pull-up,
  29. bias-pull-down.
  30. Valid values for function properties are:
  31. gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
  32. reference-out
  33. Theres is also customised properties for the GPIO1, GPIO2 and GPIO3. These
  34. customised properties are required to configure FPS configuration parameters
  35. of these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
  36. detail of Flexible Power Sequence (FPS).
  37. - maxim,active-fps-source: FPS source for the GPIOs to get
  38. enabled/disabled when system is in
  39. active state. Valid values are:
  40. - MAX77620_FPS_SRC_0,
  41. FPS source is FPS0.
  42. - MAX77620_FPS_SRC_1,
  43. FPS source is FPS1
  44. - MAX77620_FPS_SRC_2 and
  45. FPS source is FPS2
  46. - MAX77620_FPS_SRC_NONE.
  47. GPIO is not controlled
  48. by FPS events and it gets
  49. enabled/disabled by register
  50. access.
  51. Absence of this property will leave
  52. the FPS configuration register for that
  53. GPIO to default configuration.
  54. - maxim,active-fps-power-up-slot: Sequencing event slot number on which
  55. the GPIO get enabled when
  56. master FPS input event set to HIGH.
  57. Valid values are 0 to 7.
  58. This is applicable if FPS source is
  59. selected as FPS0, FPS1 or FPS2.
  60. - maxim,active-fps-power-down-slot: Sequencing event slot number on which
  61. the GPIO get disabled when master
  62. FPS input event set to LOW.
  63. Valid values are 0 to 7.
  64. This is applicable if FPS source is
  65. selected as FPS0, FPS1 or FPS2.
  66. - maxim,suspend-fps-source: This is same as property
  67. "maxim,active-fps-source" but value
  68. get configured when system enters in
  69. to suspend state.
  70. - maxim,suspend-fps-power-up-slot: This is same as property
  71. "maxim,active-fps-power-up-slot" but
  72. this value get configured into FPS
  73. configuration register when system
  74. enters into suspend.
  75. This is applicable if suspend state
  76. FPS source is selected as FPS0, FPS1 or
  77. - maxim,suspend-fps-power-down-slot: This is same as property
  78. "maxim,active-fps-power-down-slot" but
  79. this value get configured into FPS
  80. configuration register when system
  81. enters into suspend.
  82. This is applicable if suspend state
  83. FPS source is selected as FPS0, FPS1 or
  84. FPS2.
  85. Example:
  86. --------
  87. #include <dt-bindings/mfd/max77620.h>
  88. ...
  89. max77620@3c {
  90. pinctrl-names = "default";
  91. pinctrl-0 = <&spmic_default>;
  92. spmic_default: pinmux@0 {
  93. pin_gpio0 {
  94. pins = "gpio0";
  95. function = "gpio";
  96. };
  97. pin_gpio1 {
  98. pins = "gpio1";
  99. function = "fps-out";
  100. maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
  101. };
  102. pin_gpio2 {
  103. pins = "gpio2";
  104. function = "fps-out";
  105. maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
  106. };
  107. };
  108. };