qcom,pmic-mpp.txt 4.7 KB

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