kernel: update 3.14 to 3.14.18
[openwrt/staging/luka.git] / target / linux / ipq806x / patches / 0041-dt-Document-Qualcomm-IPQ8064-pinctrl-binding.patch
1 From 425015979d3b1600d14403be7d6d64ba1238e58d Mon Sep 17 00:00:00 2001
2 From: Andy Gross <agross@codeaurora.org>
3 Date: Mon, 14 Apr 2014 22:10:36 -0500
4 Subject: [PATCH 041/182] dt: Document Qualcomm IPQ8064 pinctrl binding
5
6 Define a new binding for the Qualcomm TLMMv2 based pin controller inside the
7 IPQ8064.
8
9 Signed-off-by: Andy Gross <agross@codeaurora.org>
10 Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
11 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 ---
13 .../bindings/pinctrl/qcom,ipq8064-pinctrl.txt | 95 ++++++++++++++++++++
14 1 file changed, 95 insertions(+)
15 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
16
17 --- /dev/null
18 +++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
19 @@ -0,0 +1,95 @@
20 +Qualcomm IPQ8064 TLMM block
21 +
22 +Required properties:
23 +- compatible: "qcom,ipq8064-pinctrl"
24 +- reg: Should be the base address and length of the TLMM block.
25 +- interrupts: Should be the parent IRQ of the TLMM block.
26 +- interrupt-controller: Marks the device node as an interrupt controller.
27 +- #interrupt-cells: Should be two.
28 +- gpio-controller: Marks the device node as a GPIO controller.
29 +- #gpio-cells : Should be two.
30 + The first cell is the gpio pin number and the
31 + second cell is used for optional parameters.
32 +
33 +Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
34 +a general description of GPIO and interrupt bindings.
35 +
36 +Please refer to pinctrl-bindings.txt in this directory for details of the
37 +common pinctrl bindings used by client devices, including the meaning of the
38 +phrase "pin configuration node".
39 +
40 +Qualcomm's pin configuration nodes act as a container for an abitrary number of
41 +subnodes. Each of these subnodes represents some desired configuration for a
42 +pin, a group, or a list of pins or groups. This configuration can include the
43 +mux function to select on those pin(s)/group(s), and various pin configuration
44 +parameters, such as pull-up, drive strength, etc.
45 +
46 +The name of each subnode is not important; all subnodes should be enumerated
47 +and processed purely based on their content.
48 +
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 +
55 +
56 +The following generic properties as defined in pinctrl-bindings.txt are valid
57 +to specify in a pin configuration subnode:
58 +
59 + pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength,
60 + output-low, output-high.
61 +
62 +Non-empty subnodes must specify the 'pins' property.
63 +
64 +Valid values for qcom,pins are:
65 + gpio0-gpio68
66 + Supports mux, bias, and drive-strength
67 +
68 + sdc3_clk, sdc3_cmd, sdc3_data
69 + Supports bias and drive-strength
70 +
71 +
72 +Valid values for function are:
73 + mdio, mi2s, pdm, ssbi, spmi, audio_pcm, gsbi1, gsbi2, gsbi4, gsbi5,
74 + gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, gsbi7, nss_spi, sdc1,
75 + spdif, nand, tsif1, tsif2, usb_fs_n, usb_fs, usb2_hsic, rgmii2, sata,
76 + pcie1_rst, pcie1_prsnt, pcie1_pwren_n, pcie1_pwren, pcie1_pwrflt,
77 + pcie1_clk_req, pcie2_rst, pcie2_prsnt, pcie2_pwren_n, pcie2_pwren,
78 + pcie2_pwrflt, pcie2_clk_req, pcie3_rst, pcie3_prsnt, pcie3_pwren_n,
79 + pcie3_pwren, pcie3_pwrflt, pcie3_clk_req, ps_hold
80 +
81 +Example:
82 +
83 + pinmux: pinctrl@800000 {
84 + compatible = "qcom,ipq8064-pinctrl";
85 + reg = <0x800000 0x4000>;
86 +
87 + gpio-controller;
88 + #gpio-cells = <2>;
89 + interrupt-controller;
90 + #interrupt-cells = <2>;
91 + interrupts = <0 32 0x4>;
92 +
93 + pinctrl-names = "default";
94 + pinctrl-0 = <&gsbi5_uart_default>;
95 +
96 + gsbi5_uart_default: gsbi5_uart_default {
97 + mux {
98 + pins = "gpio18", "gpio19";
99 + function = "gsbi5";
100 + };
101 +
102 + tx {
103 + pins = "gpio18";
104 + drive-strength = <4>;
105 + bias-disable;
106 + };
107 +
108 + rx {
109 + pins = "gpio19";
110 + drive-strength = <2>;
111 + bias-pull-up;
112 + };
113 + };
114 + };