qcom,wcd-pinctrl.txt 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Qualcomm Technologies, Inc. WCD GPIO block
  2. This binding describes the GPIO block found in the WCD934X series of
  3. audio codec's from QTI.
  4. - compatible:
  5. Usage: required
  6. Value type: <string>
  7. Definition: must be "qcom,wcd-pinctrl"
  8. - qcom,num-gpios:
  9. Usage: required
  10. Value type: <u32>
  11. Definition: Number of GPIO's supported by the controller
  12. - gpio-controller:
  13. Usage: required
  14. Value type: <none>
  15. Definition: Mark the device node as a GPIO controller
  16. - #gpio-cells:
  17. Usage: required
  18. Value type: <u32>
  19. Definition: Must be 2;
  20. the first cell will be used to define gpio number and the
  21. second denotes the flags for this gpio
  22. Please refer to ../gpio/gpio.txt for a general description of GPIO bindings.
  23. Please refer to pinctrl-bindings.txt in this directory for details of the
  24. common pinctrl bindings used by client devices, including the meaning of the
  25. phrase "pin configuration node".
  26. The pin configuration nodes act as a container for an arbitrary number of
  27. subnodes. Each of these subnodes represents some desired configuration for a
  28. pin or a list of pins. This configuration can include the
  29. mux function to select on those pin(s), and various pin configuration
  30. parameters, as listed below.
  31. SUBNODES:
  32. The name of each subnode is not important; all subnodes should be enumerated
  33. and processed purely based on their content.
  34. Each subnode only affects those parameters that are explicitly listed. In
  35. other words, a subnode that lists a mux function but no pin configuration
  36. parameters implies no information about any pin configuration parameters.
  37. Similarly, a pin subnode that describes a pullup parameter implies no
  38. information about e.g. the mux function.
  39. The following generic properties as defined in pinctrl-bindings.txt are valid
  40. to specify in a pin configuration subnode:
  41. - pins:
  42. Usage: required
  43. Value type: <string-array>
  44. Definition: List of gpio pins affected by the properties specified in
  45. this subnode. Valid pins are:
  46. gpio1-gpio5 for wcd9340
  47. - bias-disable:
  48. Usage: optional
  49. Value type: <none>
  50. Definition: The specified pins should be configured as no pull.
  51. - bias-pull-down:
  52. Usage: optional
  53. Value type: <none>
  54. Definition: The specified pins should be configured as pull down.
  55. - bias-pull-up:
  56. Usage: optional
  57. Value type: <empty>
  58. Definition: The specified pins should be configured as pull up.
  59. - qcom,pull-up-strength:
  60. Usage: optional
  61. Value type: <u32>
  62. Definition: Specifies the strength to use for pull up, if selected.
  63. - bias-high-impedance:
  64. Usage: optional
  65. Value type: <none>
  66. Definition: The specified pins will put in high-Z mode and disabled.
  67. - input-enable:
  68. Usage: optional
  69. Value type: <none>
  70. Definition: The specified pins are put in input mode.
  71. - output-high:
  72. Usage: optional
  73. Value type: <none>
  74. Definition: The specified pins are configured in output mode, driven
  75. high.
  76. - output-low:
  77. Usage: optional
  78. Value type: <none>
  79. Definition: The specified pins are configured in output mode, driven
  80. low.
  81. - qcom,drive-strength:
  82. Usage: optional
  83. Value type: <u32>
  84. Definition: Selects the drive strength for the specified pins.
  85. Example:
  86. wcd: wcd_pinctrl@5 {
  87. compatible = "qcom,wcd-pinctl";
  88. qcom,num-gpios = <5>
  89. gpio-controller;
  90. #gpio-cells = <2>;
  91. spkr_1_wcd_en_active: spkr_1_wcd_en_active {
  92. mux {
  93. pins = "gpio2";
  94. };
  95. config {
  96. pins = "gpio2";
  97. output-high;
  98. };
  99. };
  100. spkr_1_wcd_en_sleep: spkr_1_wcd_en_sleep {
  101. mux {
  102. pins = "gpio2";
  103. };
  104. config {
  105. pins = "gpio2";
  106. input-enable;
  107. };
  108. };
  109. };