| Qualcomm Technologies, Inc. WCD GPIO block |
| |
| This binding describes the GPIO block found in the WCD934X series of |
| audio codec's from QTI. |
| |
| - compatible: |
| Usage: required |
| Value type: <string> |
| Definition: must be "qcom,wcd-pinctrl" |
| |
| - qcom,num-gpios: |
| Usage: required |
| Value type: <u32> |
| Definition: Number of GPIO's supported by the controller |
| |
| - gpio-controller: |
| Usage: required |
| Value type: <none> |
| Definition: Mark the device node as a GPIO controller |
| |
| - #gpio-cells: |
| Usage: required |
| Value type: <u32> |
| Definition: Must be 2; |
| the first cell will be used to define gpio number and the |
| second denotes the flags for this gpio |
| |
| Please refer to ../gpio/gpio.txt for a general description of GPIO bindings. |
| |
| Please refer to pinctrl-bindings.txt in this directory for details of the |
| common pinctrl bindings used by client devices, including the meaning of the |
| phrase "pin configuration node". |
| |
| The pin configuration nodes act as a container for an arbitrary number of |
| subnodes. Each of these subnodes represents some desired configuration for a |
| pin or a list of pins. This configuration can include the |
| mux function to select on those pin(s), and various pin configuration |
| parameters, as listed below. |
| |
| |
| SUBNODES: |
| |
| The name of each subnode is not important; all subnodes should be enumerated |
| and processed purely based on their content. |
| |
| Each subnode only affects those parameters that are explicitly listed. In |
| other words, a subnode that lists a mux function but no pin configuration |
| parameters implies no information about any pin configuration parameters. |
| Similarly, a pin subnode that describes a pullup parameter implies no |
| information about e.g. the mux function. |
| |
| The following generic properties as defined in pinctrl-bindings.txt are valid |
| to specify in a pin configuration subnode: |
| |
| - pins: |
| Usage: required |
| Value type: <string-array> |
| Definition: List of gpio pins affected by the properties specified in |
| this subnode. Valid pins are: |
| gpio1-gpio5 for wcd9340 |
| |
| - bias-disable: |
| Usage: optional |
| Value type: <none> |
| Definition: The specified pins should be configured as no pull. |
| |
| - bias-pull-down: |
| Usage: optional |
| Value type: <none> |
| Definition: The specified pins should be configured as pull down. |
| |
| - bias-pull-up: |
| Usage: optional |
| Value type: <empty> |
| Definition: The specified pins should be configured as pull up. |
| |
| - qcom,pull-up-strength: |
| Usage: optional |
| Value type: <u32> |
| Definition: Specifies the strength to use for pull up, if selected. |
| |
| - bias-high-impedance: |
| Usage: optional |
| Value type: <none> |
| Definition: The specified pins will put in high-Z mode and disabled. |
| |
| - input-enable: |
| Usage: optional |
| Value type: <none> |
| Definition: The specified pins are put in input mode. |
| |
| - output-high: |
| Usage: optional |
| Value type: <none> |
| Definition: The specified pins are configured in output mode, driven |
| high. |
| |
| - output-low: |
| Usage: optional |
| Value type: <none> |
| Definition: The specified pins are configured in output mode, driven |
| low. |
| |
| - qcom,drive-strength: |
| Usage: optional |
| Value type: <u32> |
| Definition: Selects the drive strength for the specified pins. |
| |
| Example: |
| |
| wcd: wcd_pinctrl@5 { |
| compatible = "qcom,wcd-pinctl"; |
| qcom,num-gpios = <5> |
| gpio-controller; |
| #gpio-cells = <2>; |
| |
| spkr_1_wcd_en_active: spkr_1_wcd_en_active { |
| mux { |
| pins = "gpio2"; |
| }; |
| |
| config { |
| pins = "gpio2"; |
| output-high; |
| }; |
| }; |
| |
| spkr_1_wcd_en_sleep: spkr_1_wcd_en_sleep { |
| mux { |
| pins = "gpio2"; |
| }; |
| |
| config { |
| pins = "gpio2"; |
| input-enable; |
| }; |
| }; |
| }; |