qcom,pmic-mpp.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. Qualcomm PMIC Multi-Purpose Pin (MPP) block
  2. This binding describes the MPP block(s) found in the 8xxx series
  3. of PMIC's from Qualcomm.
  4. - compatible:
  5. Usage: required
  6. Value type: <string>
  7. Definition: Should contain one of:
  8. "qcom,pm8018-mpp",
  9. "qcom,pm8038-mpp",
  10. "qcom,pm8821-mpp",
  11. "qcom,pm8841-mpp",
  12. "qcom,pm8916-mpp",
  13. "qcom,pm8917-mpp",
  14. "qcom,pm8921-mpp",
  15. "qcom,pm8941-mpp",
  16. "qcom,pma8084-mpp",
  17. - reg:
  18. Usage: required
  19. Value type: <prop-encoded-array>
  20. Definition: Register base of the MPP block and length.
  21. - interrupts:
  22. Usage: required
  23. Value type: <prop-encoded-array>
  24. Definition: Must contain an array of encoded interrupt specifiers for
  25. each available MPP
  26. - gpio-controller:
  27. Usage: required
  28. Value type: <none>
  29. Definition: Mark the device node as a GPIO controller
  30. - #gpio-cells:
  31. Usage: required
  32. Value type: <u32>
  33. Definition: Must be 2;
  34. the first cell will be used to define MPP number and the
  35. second denotes the flags for this MPP
  36. Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
  37. a general description of GPIO and interrupt bindings.
  38. Please refer to pinctrl-bindings.txt in this directory for details of the
  39. common pinctrl bindings used by client devices, including the meaning of the
  40. phrase "pin configuration node".
  41. The pin configuration nodes act as a container for an arbitrary number of
  42. subnodes. Each of these subnodes represents some desired configuration for a
  43. pin or a list of pins. This configuration can include the
  44. mux function to select on those pin(s), and various pin configuration
  45. parameters, as listed below.
  46. SUBNODES:
  47. The name of each subnode is not important; all subnodes should be enumerated
  48. and processed purely based on their content.
  49. Each subnode only affects those parameters that are explicitly listed. In
  50. other words, a subnode that lists a mux function but no pin configuration
  51. parameters implies no information about any pin configuration parameters.
  52. Similarly, a pin subnode that describes a pullup parameter implies no
  53. information about e.g. the mux function.
  54. The following generic properties as defined in pinctrl-bindings.txt are valid
  55. to specify in a pin configuration subnode:
  56. - pins:
  57. Usage: required
  58. Value type: <string-array>
  59. Definition: List of MPP pins affected by the properties specified in
  60. this subnode. Valid pins are:
  61. mpp1-mpp4 for pm8841
  62. mpp1-mpp4 for pm8916
  63. mpp1-mpp8 for pm8941
  64. mpp1-mpp4 for pma8084
  65. - function:
  66. Usage: required
  67. Value type: <string>
  68. Definition: Specify the alternative function to be configured for the
  69. specified pins. Valid values are:
  70. "digital",
  71. "analog",
  72. "sink"
  73. - bias-disable:
  74. Usage: optional
  75. Value type: <none>
  76. Definition: The specified pins should be configured as no pull.
  77. - bias-pull-up:
  78. Usage: optional
  79. Value type: <u32>
  80. Definition: The specified pins should be configured as pull up.
  81. Valid values are 600, 10000 and 30000 in bidirectional mode
  82. only, i.e. when operating in qcom,analog-mode and input and
  83. outputs are enabled. The hardware ignores the configuration
  84. when operating in other modes.
  85. - bias-high-impedance:
  86. Usage: optional
  87. Value type: <none>
  88. Definition: The specified pins will put in high-Z mode and disabled.
  89. - input-enable:
  90. Usage: optional
  91. Value type: <none>
  92. Definition: The specified pins are put in input mode, i.e. their input
  93. buffer is enabled
  94. - output-high:
  95. Usage: optional
  96. Value type: <none>
  97. Definition: The specified pins are configured in output mode, driven
  98. high.
  99. - output-low:
  100. Usage: optional
  101. Value type: <none>
  102. Definition: The specified pins are configured in output mode, driven
  103. low.
  104. - power-source:
  105. Usage: optional
  106. Value type: <u32>
  107. Definition: Selects the power source for the specified pins. Valid power
  108. sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
  109. - qcom,analog-level:
  110. Usage: optional
  111. Value type: <u32>
  112. Definition: Selects the source for analog output. Valued values are
  113. defined in <dt-binding/pinctrl/qcom,pmic-mpp.h>
  114. PMIC_MPP_AOUT_LVL_*
  115. - qcom,dtest:
  116. Usage: optional
  117. Value type: <u32>
  118. Definition: Selects which dtest rail to be routed in the various functions.
  119. Valid values are 1-4
  120. - qcom,amux-route:
  121. Usage: optional
  122. Value type: <u32>
  123. Definition: Selects the source for analog input. Valid values are
  124. defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
  125. PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6...
  126. - qcom,paired:
  127. Usage: optional
  128. Value type: <none>
  129. Definition: Indicates that the pin should be operating in paired mode.
  130. Example:
  131. mpps@a000 {
  132. compatible = "qcom,pm8841-mpp";
  133. reg = <0xa000>;
  134. gpio-controller;
  135. #gpio-cells = <2>;
  136. interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>;
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&pm8841_default>;
  139. pm8841_default: default {
  140. gpio {
  141. pins = "mpp1", "mpp2", "mpp3", "mpp4";
  142. function = "digital";
  143. input-enable;
  144. power-source = <PM8841_MPP_S3>;
  145. };
  146. };
  147. };