xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,msm8660-pinctrl.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotQualcomm MSM8660 TLMM block
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: "qcom,msm8660-pinctrl"
5*c66ec88fSEmmanuel Vadot- reg: Should be the base address and length of the TLMM block.
6*c66ec88fSEmmanuel Vadot- interrupts: Should be the parent IRQ of the TLMM block.
7*c66ec88fSEmmanuel Vadot- interrupt-controller: Marks the device node as an interrupt controller.
8*c66ec88fSEmmanuel Vadot- #interrupt-cells: Should be two.
9*c66ec88fSEmmanuel Vadot- gpio-controller: Marks the device node as a GPIO controller.
10*c66ec88fSEmmanuel Vadot- #gpio-cells : Should be two.
11*c66ec88fSEmmanuel Vadot                The first cell is the gpio pin number and the
12*c66ec88fSEmmanuel Vadot                second cell is used for optional parameters.
13*c66ec88fSEmmanuel Vadot- gpio-ranges: see ../gpio/gpio.txt
14*c66ec88fSEmmanuel Vadot
15*c66ec88fSEmmanuel VadotOptional properties:
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel Vadot- gpio-reserved-ranges: see ../gpio/gpio.txt
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel VadotPlease refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
20*c66ec88fSEmmanuel Vadota general description of GPIO and interrupt bindings.
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel VadotPlease refer to pinctrl-bindings.txt in this directory for details of the
23*c66ec88fSEmmanuel Vadotcommon pinctrl bindings used by client devices, including the meaning of the
24*c66ec88fSEmmanuel Vadotphrase "pin configuration node".
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel VadotQualcomm's pin configuration nodes act as a container for an arbitrary number of
27*c66ec88fSEmmanuel Vadotsubnodes. Each of these subnodes represents some desired configuration for a
28*c66ec88fSEmmanuel Vadotpin, a group, or a list of pins or groups. This configuration can include the
29*c66ec88fSEmmanuel Vadotmux function to select on those pin(s)/group(s), and various pin configuration
30*c66ec88fSEmmanuel Vadotparameters, such as pull-up, drive strength, etc.
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel VadotThe name of each subnode is not important; all subnodes should be enumerated
33*c66ec88fSEmmanuel Vadotand processed purely based on their content.
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotEach subnode only affects those parameters that are explicitly listed. In
36*c66ec88fSEmmanuel Vadotother words, a subnode that lists a mux function but no pin configuration
37*c66ec88fSEmmanuel Vadotparameters implies no information about any pin configuration parameters.
38*c66ec88fSEmmanuel VadotSimilarly, a pin subnode that describes a pullup parameter implies no
39*c66ec88fSEmmanuel Vadotinformation about e.g. the mux function.
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotThe following generic properties as defined in pinctrl-bindings.txt are valid
43*c66ec88fSEmmanuel Vadotto specify in a pin configuration subnode:
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel Vadot pins, function, bias-disable, bias-pull-down, bias-pull-up, drive-strength,
46*c66ec88fSEmmanuel Vadot output-low, output-high.
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel VadotNon-empty subnodes must specify the 'pins' property.
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel VadotValid values for pins are:
51*c66ec88fSEmmanuel Vadot  gpio0-gpio172, sdc3_clk, sdc3_cmd, sdc3_data sdc4_clk, sdc4_cmd, sdc4_data
52*c66ec88fSEmmanuel Vadot
53*c66ec88fSEmmanuel VadotValid values for function are:
54*c66ec88fSEmmanuel Vadot  gpio, cam_mclk, dsub, ext_gps, gp_clk_0a, gp_clk_0b, gp_clk_1a, gp_clk_1b,
55*c66ec88fSEmmanuel Vadot  gp_clk_2a, gp_clk_2b, gp_mn, gsbi1, gsbi1_spi_cs1_n, gsbi1_spi_cs2a_n,
56*c66ec88fSEmmanuel Vadot  gsbi1_spi_cs2b_n, gsbi1_spi_cs3_n, gsbi2, gsbi2_spi_cs1_n, gsbi2_spi_cs2_n,
57*c66ec88fSEmmanuel Vadot  gsbi2_spi_cs3_n, gsbi3, gsbi3_spi_cs1_n, gsbi3_spi_cs2_n, gsbi3_spi_cs3_n,
58*c66ec88fSEmmanuel Vadot  gsbi4, gsbi5, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10, gsbi11, gsbi12, hdmi, i2s,
59*c66ec88fSEmmanuel Vadot  lcdc, mdp_vsync, mi2s, pcm, ps_hold, sdc1, sdc2, sdc5, tsif1, tsif2, usb_fs1,
60*c66ec88fSEmmanuel Vadot  usb_fs1_oe_n, usb_fs2, usb_fs2_oe_n, vfe, vsens_alarm, ebi2, ebi2cs
61*c66ec88fSEmmanuel Vadot
62*c66ec88fSEmmanuel VadotExample:
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel Vadot	msmgpio: pinctrl@800000 {
65*c66ec88fSEmmanuel Vadot		compatible = "qcom,msm8660-pinctrl";
66*c66ec88fSEmmanuel Vadot		reg = <0x800000 0x4000>;
67*c66ec88fSEmmanuel Vadot
68*c66ec88fSEmmanuel Vadot		gpio-controller;
69*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
70*c66ec88fSEmmanuel Vadot		gpio-ranges = <&msmgpio 0 0 173>;
71*c66ec88fSEmmanuel Vadot		interrupt-controller;
72*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
73*c66ec88fSEmmanuel Vadot		interrupts = <0 16 0x4>;
74*c66ec88fSEmmanuel Vadot
75*c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
76*c66ec88fSEmmanuel Vadot		pinctrl-0 = <&gsbi12_uart>;
77*c66ec88fSEmmanuel Vadot
78*c66ec88fSEmmanuel Vadot		gsbi12_uart: gsbi12-uart {
79*c66ec88fSEmmanuel Vadot			mux {
80*c66ec88fSEmmanuel Vadot				pins = "gpio117", "gpio118";
81*c66ec88fSEmmanuel Vadot				function = "gsbi12";
82*c66ec88fSEmmanuel Vadot			};
83*c66ec88fSEmmanuel Vadot
84*c66ec88fSEmmanuel Vadot			tx {
85*c66ec88fSEmmanuel Vadot				pins = "gpio118";
86*c66ec88fSEmmanuel Vadot				drive-strength = <8>;
87*c66ec88fSEmmanuel Vadot				bias-disable;
88*c66ec88fSEmmanuel Vadot			};
89*c66ec88fSEmmanuel Vadot
90*c66ec88fSEmmanuel Vadot			rx {
91*c66ec88fSEmmanuel Vadot				pins = "gpio117";
92*c66ec88fSEmmanuel Vadot				drive-strength = <2>;
93*c66ec88fSEmmanuel Vadot				bias-pull-up;
94*c66ec88fSEmmanuel Vadot			};
95*c66ec88fSEmmanuel Vadot		};
96*c66ec88fSEmmanuel Vadot	};
97