xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunQualcomm MSM8974 TLMM block
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- compatible: "qcom,msm8974-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 pins, function, bias-disable, bias-pull-down, bias-pull-up, drive-strength.
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunNon-empty subnodes must specify the 'pins' property.
47*4882a593SmuzhiyunNote that not all properties are valid for all pins.
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun
50*4882a593SmuzhiyunValid values for pins are:
51*4882a593Smuzhiyun  gpio0-gpio145
52*4882a593Smuzhiyun    Supports mux, bias and drive-strength
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun  sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, sdc2_cmd, sdc2_data
55*4882a593Smuzhiyun    Supports bias and drive-strength
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun  hsic_data, hsic_strobe
58*4882a593Smuzhiyun    Supports only mux
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunValid values for function are:
61*4882a593Smuzhiyun  cci_i2c0, cci_i2c1, uim1, uim2, uim_batt_alarm,
62*4882a593Smuzhiyun  blsp_uim1, blsp_uart1, blsp_i2c1, blsp_spi1,
63*4882a593Smuzhiyun  blsp_uim2, blsp_uart2, blsp_i2c2, blsp_spi2,
64*4882a593Smuzhiyun  blsp_uim3, blsp_uart3, blsp_i2c3, blsp_spi3,
65*4882a593Smuzhiyun  blsp_uim4, blsp_uart4, blsp_i2c4, blsp_spi4,
66*4882a593Smuzhiyun  blsp_uim5, blsp_uart5, blsp_i2c5, blsp_spi5,
67*4882a593Smuzhiyun  blsp_uim6, blsp_uart6, blsp_i2c6, blsp_spi6,
68*4882a593Smuzhiyun  blsp_uim7, blsp_uart7, blsp_i2c7, blsp_spi7,
69*4882a593Smuzhiyun  blsp_uim8, blsp_uart8, blsp_i2c8, blsp_spi8,
70*4882a593Smuzhiyun  blsp_uim9, blsp_uart9, blsp_i2c9, blsp_spi9,
71*4882a593Smuzhiyun  blsp_uim10, blsp_uart10, blsp_i2c10, blsp_spi10,
72*4882a593Smuzhiyun  blsp_uim11, blsp_uart11, blsp_i2c11, blsp_spi11,
73*4882a593Smuzhiyun  blsp_uim12, blsp_uart12, blsp_i2c12, blsp_spi12,
74*4882a593Smuzhiyun  blsp_spi1_cs1, blsp_spi2_cs2, blsp_spi_cs3, blsp_spi2_cs1, blsp_spi2_cs2
75*4882a593Smuzhiyun  blsp_spi2_cs3, blsp_spi10_cs1, blsp_spi10_cs2, blsp_spi10_cs3,
76*4882a593Smuzhiyun  sdc3, sdc4, gcc_gp_clk1, gcc_gp_clk2, gcc_gp_clk3, cci_timer0, cci_timer1,
77*4882a593Smuzhiyun  cci_timer2, cci_timer3, cci_async_in0, cci_async_in1, cci_async_in2,
78*4882a593Smuzhiyun  cam_mckl0, cam_mclk1, cam_mclk2, cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc,
79*4882a593Smuzhiyun  hdmi_hpd, edp_hpd, gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk,
80*4882a593Smuzhiyun  gp_mn, tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s, spkr_mi2s,
81*4882a593Smuzhiyun  ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus, hsic_ctl, gpio
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun  (Note that this is not yet the complete list of functions)
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun
87*4882a593SmuzhiyunExample:
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun	msmgpio: pinctrl@fd510000 {
90*4882a593Smuzhiyun		compatible = "qcom,msm8974-pinctrl";
91*4882a593Smuzhiyun		reg = <0xfd510000 0x4000>;
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun		gpio-controller;
94*4882a593Smuzhiyun		#gpio-cells = <2>;
95*4882a593Smuzhiyun		gpio-ranges = <&msmgpio 0 0 146>;
96*4882a593Smuzhiyun		interrupt-controller;
97*4882a593Smuzhiyun		#interrupt-cells = <2>;
98*4882a593Smuzhiyun		interrupts = <0 208 0>;
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun		pinctrl-names = "default";
101*4882a593Smuzhiyun		pinctrl-0 = <&uart2_default>;
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun		uart2_default: uart2_default {
104*4882a593Smuzhiyun			mux {
105*4882a593Smuzhiyun				pins = "gpio4", "gpio5";
106*4882a593Smuzhiyun				function = "blsp_uart2";
107*4882a593Smuzhiyun			};
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun			tx {
110*4882a593Smuzhiyun				pins = "gpio4";
111*4882a593Smuzhiyun				drive-strength = <4>;
112*4882a593Smuzhiyun				bias-disable;
113*4882a593Smuzhiyun			};
114*4882a593Smuzhiyun
115*4882a593Smuzhiyun			rx {
116*4882a593Smuzhiyun				pins = "gpio5";
117*4882a593Smuzhiyun				drive-strength = <2>;
118*4882a593Smuzhiyun				bias-pull-up;
119*4882a593Smuzhiyun			};
120*4882a593Smuzhiyun		};
121*4882a593Smuzhiyun	};
122