xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunQualcomm IPQ8064 TLMM block
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- compatible: "qcom,ipq8064-pinctrl"
5*4882a593Smuzhiyun- reg: Should be the base address and length of the TLMM block.
6*4882a593Smuzhiyun- interrupts: Should be the parent IRQ of the TLMM block.
7*4882a593Smuzhiyun- interrupt-controller: Marks the device node as an interrupt controller.
8*4882a593Smuzhiyun- #interrupt-cells: Should be two.
9*4882a593Smuzhiyun- gpio-controller: Marks the device node as a GPIO controller.
10*4882a593Smuzhiyun- #gpio-cells : Should be two.
11*4882a593Smuzhiyun                The first cell is the gpio pin number and the
12*4882a593Smuzhiyun                second cell is used for optional parameters.
13*4882a593Smuzhiyun- gpio-ranges: see ../gpio/gpio.txt
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunOptional properties:
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun- gpio-reserved-ranges: see ../gpio/gpio.txt
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunPlease refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
20*4882a593Smuzhiyuna general description of GPIO and interrupt bindings.
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunPlease refer to pinctrl-bindings.txt in this directory for details of the
23*4882a593Smuzhiyuncommon pinctrl bindings used by client devices, including the meaning of the
24*4882a593Smuzhiyunphrase "pin configuration node".
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunQualcomm's pin configuration nodes act as a container for an arbitrary number of
27*4882a593Smuzhiyunsubnodes. Each of these subnodes represents some desired configuration for a
28*4882a593Smuzhiyunpin, a group, or a list of pins or groups. This configuration can include the
29*4882a593Smuzhiyunmux function to select on those pin(s)/group(s), and various pin configuration
30*4882a593Smuzhiyunparameters, such as pull-up, drive strength, etc.
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunThe name of each subnode is not important; all subnodes should be enumerated
33*4882a593Smuzhiyunand processed purely based on their content.
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunEach subnode only affects those parameters that are explicitly listed. In
36*4882a593Smuzhiyunother words, a subnode that lists a mux function but no pin configuration
37*4882a593Smuzhiyunparameters implies no information about any pin configuration parameters.
38*4882a593SmuzhiyunSimilarly, a pin subnode that describes a pullup parameter implies no
39*4882a593Smuzhiyuninformation about e.g. the mux function.
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunThe following generic properties as defined in pinctrl-bindings.txt are valid
43*4882a593Smuzhiyunto specify in a pin configuration subnode:
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun pins, function, bias-disable, bias-pull-down, bias-pull-up, drive-strength,
46*4882a593Smuzhiyun output-low, output-high.
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunNon-empty subnodes must specify the 'pins' property.
49*4882a593Smuzhiyun
50*4882a593SmuzhiyunValid values for qcom,pins are:
51*4882a593Smuzhiyun  gpio0-gpio68
52*4882a593Smuzhiyun   Supports mux, bias, and drive-strength
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun  sdc3_clk, sdc3_cmd, sdc3_data
55*4882a593Smuzhiyun   Supports bias and drive-strength
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunValid values for function are:
59*4882a593Smuzhiyun  mdio, mi2s, pdm, ssbi, spmi, audio_pcm, gpio, gsbi1, gsbi2, gsbi4, gsbi5,
60*4882a593Smuzhiyun  gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, gsbi7, nss_spi, sdc1,
61*4882a593Smuzhiyun  spdif, nand, tsif1, tsif2, usb_fs_n, usb_fs, usb2_hsic, rgmii2, sata,
62*4882a593Smuzhiyun  pcie1_rst, pcie1_prsnt, pcie1_pwren_n, pcie1_pwren, pcie1_pwrflt,
63*4882a593Smuzhiyun  pcie1_clk_req, pcie2_rst, pcie2_prsnt, pcie2_pwren_n, pcie2_pwren,
64*4882a593Smuzhiyun  pcie2_pwrflt, pcie2_clk_req, pcie3_rst, pcie3_prsnt, pcie3_pwren_n,
65*4882a593Smuzhiyun  pcie3_pwren, pcie3_pwrflt, pcie3_clk_req, ps_hold
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunExample:
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun	pinmux: pinctrl@800000 {
70*4882a593Smuzhiyun		compatible = "qcom,ipq8064-pinctrl";
71*4882a593Smuzhiyun		reg = <0x800000 0x4000>;
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun		gpio-controller;
74*4882a593Smuzhiyun		#gpio-cells = <2>;
75*4882a593Smuzhiyun		gpio-ranges = <&pinmux 0 0 69>;
76*4882a593Smuzhiyun		interrupt-controller;
77*4882a593Smuzhiyun		#interrupt-cells = <2>;
78*4882a593Smuzhiyun		interrupts = <0 32 0x4>;
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun		pinctrl-names = "default";
81*4882a593Smuzhiyun		pinctrl-0 = <&gsbi5_uart_default>;
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun		gsbi5_uart_default: gsbi5_uart_default {
84*4882a593Smuzhiyun			mux {
85*4882a593Smuzhiyun				pins = "gpio18", "gpio19";
86*4882a593Smuzhiyun				function = "gsbi5";
87*4882a593Smuzhiyun			};
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun			tx {
90*4882a593Smuzhiyun				pins = "gpio18";
91*4882a593Smuzhiyun				drive-strength = <4>;
92*4882a593Smuzhiyun				bias-disable;
93*4882a593Smuzhiyun			};
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun			rx {
96*4882a593Smuzhiyun				pins = "gpio19";
97*4882a593Smuzhiyun				drive-strength = <2>;
98*4882a593Smuzhiyun				bias-pull-up;
99*4882a593Smuzhiyun			};
100*4882a593Smuzhiyun		};
101*4882a593Smuzhiyun	};
102