qcom,pmic-gpio.txt 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. Qualcomm PMIC GPIO block
  2. This binding describes the GPIO block(s) found in the 8xxx series of
  3. PMIC's from Qualcomm.
  4. - compatible:
  5. Usage: required
  6. Value type: <string>
  7. Definition: must be one of:
  8. "qcom,pm8018-gpio"
  9. "qcom,pm8038-gpio"
  10. "qcom,pm8058-gpio"
  11. "qcom,pm8916-gpio"
  12. "qcom,pm8917-gpio"
  13. "qcom,pm8921-gpio"
  14. "qcom,pm8941-gpio"
  15. "qcom,pma8084-gpio"
  16. - reg:
  17. Usage: required
  18. Value type: <prop-encoded-array>
  19. Definition: Register base of the GPIO block and length.
  20. - interrupts:
  21. Usage: required
  22. Value type: <prop-encoded-array>
  23. Definition: Must contain an array of encoded interrupt specifiers for
  24. each available GPIO
  25. - gpio-controller:
  26. Usage: required
  27. Value type: <none>
  28. Definition: Mark the device node as a GPIO controller
  29. - #gpio-cells:
  30. Usage: required
  31. Value type: <u32>
  32. Definition: Must be 2;
  33. the first cell will be used to define gpio number and the
  34. second denotes the flags for this gpio
  35. Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
  36. a general description of GPIO and interrupt bindings.
  37. Please refer to pinctrl-bindings.txt in this directory for details of the
  38. common pinctrl bindings used by client devices, including the meaning of the
  39. phrase "pin configuration node".
  40. The pin configuration nodes act as a container for an arbitrary number of
  41. subnodes. Each of these subnodes represents some desired configuration for a
  42. pin or a list of pins. This configuration can include the
  43. mux function to select on those pin(s), and various pin configuration
  44. parameters, as listed below.
  45. SUBNODES:
  46. The name of each subnode is not important; all subnodes should be enumerated
  47. and processed purely based on their content.
  48. Each subnode only affects those parameters that are explicitly listed. In
  49. other words, a subnode that lists a mux function but no pin configuration
  50. parameters implies no information about any pin configuration parameters.
  51. Similarly, a pin subnode that describes a pullup parameter implies no
  52. information about e.g. the mux function.
  53. The following generic properties as defined in pinctrl-bindings.txt are valid
  54. to specify in a pin configuration subnode:
  55. - pins:
  56. Usage: required
  57. Value type: <string-array>
  58. Definition: List of gpio pins affected by the properties specified in
  59. this subnode. Valid pins are:
  60. gpio1-gpio6 for pm8018
  61. gpio1-gpio12 for pm8038
  62. gpio1-gpio40 for pm8058
  63. gpio1-gpio4 for pm8916
  64. gpio1-gpio38 for pm8917
  65. gpio1-gpio44 for pm8921
  66. gpio1-gpio36 for pm8941
  67. gpio1-gpio22 for pma8084
  68. - function:
  69. Usage: required
  70. Value type: <string>
  71. Definition: Specify the alternative function to be configured for the
  72. specified pins. Valid values are:
  73. "normal",
  74. "paired",
  75. "func1",
  76. "func2",
  77. "dtest1",
  78. "dtest2",
  79. "dtest3",
  80. "dtest4"
  81. - bias-disable:
  82. Usage: optional
  83. Value type: <none>
  84. Definition: The specified pins should be configured as no pull.
  85. - bias-pull-down:
  86. Usage: optional
  87. Value type: <none>
  88. Definition: The specified pins should be configured as pull down.
  89. - bias-pull-up:
  90. Usage: optional
  91. Value type: <empty>
  92. Definition: The specified pins should be configured as pull up.
  93. - qcom,pull-up-strength:
  94. Usage: optional
  95. Value type: <u32>
  96. Definition: Specifies the strength to use for pull up, if selected.
  97. Valid values are; as defined in
  98. <dt-bindings/pinctrl/qcom,pmic-gpio.h>:
  99. 1: 30uA (PMIC_GPIO_PULL_UP_30)
  100. 2: 1.5uA (PMIC_GPIO_PULL_UP_1P5)
  101. 3: 31.5uA (PMIC_GPIO_PULL_UP_31P5)
  102. 4: 1.5uA + 30uA boost (PMIC_GPIO_PULL_UP_1P5_30)
  103. If this property is ommited 30uA strength will be used if
  104. pull up is selected
  105. - bias-high-impedance:
  106. Usage: optional
  107. Value type: <none>
  108. Definition: The specified pins will put in high-Z mode and disabled.
  109. - input-enable:
  110. Usage: optional
  111. Value type: <none>
  112. Definition: The specified pins are put in input mode.
  113. - output-high:
  114. Usage: optional
  115. Value type: <none>
  116. Definition: The specified pins are configured in output mode, driven
  117. high.
  118. - output-low:
  119. Usage: optional
  120. Value type: <none>
  121. Definition: The specified pins are configured in output mode, driven
  122. low.
  123. - power-source:
  124. Usage: optional
  125. Value type: <u32>
  126. Definition: Selects the power source for the specified pins. Valid
  127. power sources are defined per chip in
  128. <dt-bindings/pinctrl/qcom,pmic-gpio.h>
  129. - qcom,drive-strength:
  130. Usage: optional
  131. Value type: <u32>
  132. Definition: Selects the drive strength for the specified pins. Value
  133. drive strengths are:
  134. 0: no (PMIC_GPIO_STRENGTH_NO)
  135. 1: high (PMIC_GPIO_STRENGTH_HIGH) 0.9mA @ 1.8V - 1.9mA @ 2.6V
  136. 2: medium (PMIC_GPIO_STRENGTH_MED) 0.6mA @ 1.8V - 1.25mA @ 2.6V
  137. 3: low (PMIC_GPIO_STRENGTH_LOW) 0.15mA @ 1.8V - 0.3mA @ 2.6V
  138. as defined in <dt-bindings/pinctrl/qcom,pmic-gpio.h>
  139. - drive-push-pull:
  140. Usage: optional
  141. Value type: <none>
  142. Definition: The specified pins are configured in push-pull mode.
  143. - drive-open-drain:
  144. Usage: optional
  145. Value type: <none>
  146. Definition: The specified pins are configured in open-drain mode.
  147. - drive-open-source:
  148. Usage: optional
  149. Value type: <none>
  150. Definition: The specified pins are configured in open-source mode.
  151. Example:
  152. pm8921_gpio: gpio@150 {
  153. compatible = "qcom,pm8921-gpio";
  154. reg = <0x150 0x160>;
  155. interrupts = <192 1>, <193 1>, <194 1>,
  156. <195 1>, <196 1>, <197 1>,
  157. <198 1>, <199 1>, <200 1>,
  158. <201 1>, <202 1>, <203 1>,
  159. <204 1>, <205 1>, <206 1>,
  160. <207 1>, <208 1>, <209 1>,
  161. <210 1>, <211 1>, <212 1>,
  162. <213 1>, <214 1>, <215 1>,
  163. <216 1>, <217 1>, <218 1>,
  164. <219 1>, <220 1>, <221 1>,
  165. <222 1>, <223 1>, <224 1>,
  166. <225 1>, <226 1>, <227 1>,
  167. <228 1>, <229 1>, <230 1>,
  168. <231 1>, <232 1>, <233 1>,
  169. <234 1>, <235 1>;
  170. gpio-controller;
  171. #gpio-cells = <2>;
  172. pm8921_gpio_keys: gpio-keys {
  173. volume-keys {
  174. pins = "gpio20", "gpio21";
  175. function = "normal";
  176. input-enable;
  177. bias-pull-up;
  178. drive-push-pull;
  179. qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
  180. power-source = <PM8921_GPIO_S4>;
  181. };
  182. };
  183. };