xref: /openbmc/linux/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt (revision 55f5587a4977384b88185b08e3c3ffbd9f0994f4)
1*55f5587aSBjorn AnderssonQualcomm APQ8064 TLMM block
2*55f5587aSBjorn Andersson
3*55f5587aSBjorn AnderssonRequired properties:
4*55f5587aSBjorn Andersson- compatible: "qcom,apq8064-pinctrl"
5*55f5587aSBjorn Andersson- reg: Should be the base address and length of the TLMM block.
6*55f5587aSBjorn Andersson- interrupts: Should be the parent IRQ of the TLMM block.
7*55f5587aSBjorn Andersson- interrupt-controller: Marks the device node as an interrupt controller.
8*55f5587aSBjorn Andersson- #interrupt-cells: Should be two.
9*55f5587aSBjorn Andersson- gpio-controller: Marks the device node as a GPIO controller.
10*55f5587aSBjorn Andersson- #gpio-cells : Should be two.
11*55f5587aSBjorn Andersson                The first cell is the gpio pin number and the
12*55f5587aSBjorn Andersson                second cell is used for optional parameters.
13*55f5587aSBjorn Andersson
14*55f5587aSBjorn AnderssonPlease refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
15*55f5587aSBjorn Anderssona general description of GPIO and interrupt bindings.
16*55f5587aSBjorn Andersson
17*55f5587aSBjorn AnderssonPlease refer to pinctrl-bindings.txt in this directory for details of the
18*55f5587aSBjorn Anderssoncommon pinctrl bindings used by client devices, including the meaning of the
19*55f5587aSBjorn Anderssonphrase "pin configuration node".
20*55f5587aSBjorn Andersson
21*55f5587aSBjorn AnderssonQualcomm's pin configuration nodes act as a container for an abitrary number of
22*55f5587aSBjorn Anderssonsubnodes. Each of these subnodes represents some desired configuration for a
23*55f5587aSBjorn Anderssonpin, a group, or a list of pins or groups. This configuration can include the
24*55f5587aSBjorn Anderssonmux function to select on those pin(s)/group(s), and various pin configuration
25*55f5587aSBjorn Anderssonparameters, such as pull-up, drive strength, etc.
26*55f5587aSBjorn Andersson
27*55f5587aSBjorn AnderssonThe name of each subnode is not important; all subnodes should be enumerated
28*55f5587aSBjorn Anderssonand processed purely based on their content.
29*55f5587aSBjorn Andersson
30*55f5587aSBjorn AnderssonEach subnode only affects those parameters that are explicitly listed. In
31*55f5587aSBjorn Anderssonother words, a subnode that lists a mux function but no pin configuration
32*55f5587aSBjorn Anderssonparameters implies no information about any pin configuration parameters.
33*55f5587aSBjorn AnderssonSimilarly, a pin subnode that describes a pullup parameter implies no
34*55f5587aSBjorn Anderssoninformation about e.g. the mux function.
35*55f5587aSBjorn Andersson
36*55f5587aSBjorn Andersson
37*55f5587aSBjorn AnderssonThe following generic properties as defined in pinctrl-bindings.txt are valid
38*55f5587aSBjorn Anderssonto specify in a pin configuration subnode:
39*55f5587aSBjorn Andersson
40*55f5587aSBjorn Andersson pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength,
41*55f5587aSBjorn Andersson output-low, output-high.
42*55f5587aSBjorn Andersson
43*55f5587aSBjorn AnderssonNon-empty subnodes must specify the 'pins' property.
44*55f5587aSBjorn Andersson
45*55f5587aSBjorn AnderssonValid values for pins are:
46*55f5587aSBjorn Andersson  gpio0-gpio89
47*55f5587aSBjorn Andersson
48*55f5587aSBjorn AnderssonValid values for function are:
49*55f5587aSBjorn Andersson  cam_mclk, codec_mic_i2s, codec_spkr_i2s, gsbi1, gsbi2, gsbi3, gsbi4,
50*55f5587aSBjorn Andersson  gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6,
51*55f5587aSBjorn Andersson  gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1,
52*55f5587aSBjorn Andersson  gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm,
53*55f5587aSBjorn Andersson  riva_wlan, sdc2, sdc4, slimbus, spkr_i2s, tsif1, tsif2, usb2_hsic,
54*55f5587aSBjorn Andersson
55*55f5587aSBjorn AnderssonExample:
56*55f5587aSBjorn Andersson
57*55f5587aSBjorn Andersson	msmgpio: pinctrl@800000 {
58*55f5587aSBjorn Andersson		compatible = "qcom,apq8064-pinctrl";
59*55f5587aSBjorn Andersson		reg = <0x800000 0x4000>;
60*55f5587aSBjorn Andersson
61*55f5587aSBjorn Andersson		gpio-controller;
62*55f5587aSBjorn Andersson		#gpio-cells = <2>;
63*55f5587aSBjorn Andersson		interrupt-controller;
64*55f5587aSBjorn Andersson		#interrupt-cells = <2>;
65*55f5587aSBjorn Andersson		interrupts = <0 32 0x4>;
66*55f5587aSBjorn Andersson
67*55f5587aSBjorn Andersson		pinctrl-names = "default";
68*55f5587aSBjorn Andersson		pinctrl-0 = <&gsbi5_uart_default>;
69*55f5587aSBjorn Andersson
70*55f5587aSBjorn Andersson		gsbi5_uart_default: gsbi5_uart_default {
71*55f5587aSBjorn Andersson			mux {
72*55f5587aSBjorn Andersson				pins = "gpio51", "gpio52";
73*55f5587aSBjorn Andersson				function = "gsbi5";
74*55f5587aSBjorn Andersson			};
75*55f5587aSBjorn Andersson
76*55f5587aSBjorn Andersson			tx {
77*55f5587aSBjorn Andersson				pins = "gpio51";
78*55f5587aSBjorn Andersson				drive-strength = <4>;
79*55f5587aSBjorn Andersson				bias-disable;
80*55f5587aSBjorn Andersson			};
81*55f5587aSBjorn Andersson
82*55f5587aSBjorn Andersson			rx {
83*55f5587aSBjorn Andersson				pins = "gpio52";
84*55f5587aSBjorn Andersson				drive-strength = <2>;
85*55f5587aSBjorn Andersson				bias-pull-up;
86*55f5587aSBjorn Andersson			};
87*55f5587aSBjorn Andersson		};
88*55f5587aSBjorn Andersson	};
89