xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,apq8064-pinctrl.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotQualcomm APQ8064 TLMM block
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: "qcom,apq8064-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-gpio89
52*c66ec88fSEmmanuel Vadot
53*c66ec88fSEmmanuel VadotValid values for function are:
54*c66ec88fSEmmanuel Vadot  cam_mclk, codec_mic_i2s, codec_spkr_i2s, gp_clk_0a, gp_clk_0b, gp_clk_1a,
55*c66ec88fSEmmanuel Vadot  gp_clk_1b, gp_clk_2a, gp_clk_2b, gpio, gsbi1, gsbi2, gsbi3, gsbi4,
56*c66ec88fSEmmanuel Vadot  gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6,
57*c66ec88fSEmmanuel Vadot  gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1,
58*c66ec88fSEmmanuel Vadot  gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm,
59*c66ec88fSEmmanuel Vadot  riva_wlan, sdc2, sdc4, slimbus, spkr_i2s, tsif1, tsif2, usb2_hsic, ps_hold
60*c66ec88fSEmmanuel Vadot
61*c66ec88fSEmmanuel VadotExample:
62*c66ec88fSEmmanuel Vadot
63*c66ec88fSEmmanuel Vadot	msmgpio: pinctrl@800000 {
64*c66ec88fSEmmanuel Vadot		compatible = "qcom,apq8064-pinctrl";
65*c66ec88fSEmmanuel Vadot		reg = <0x800000 0x4000>;
66*c66ec88fSEmmanuel Vadot
67*c66ec88fSEmmanuel Vadot		gpio-controller;
68*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
69*c66ec88fSEmmanuel Vadot		interrupt-controller;
70*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
71*c66ec88fSEmmanuel Vadot		interrupts = <0 16 0x4>;
72*c66ec88fSEmmanuel Vadot
73*c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
74*c66ec88fSEmmanuel Vadot		pinctrl-0 = <&gsbi5_uart_default>;
75*c66ec88fSEmmanuel Vadot		gpio-ranges = <&msmgpio 0 0 90>;
76*c66ec88fSEmmanuel Vadot
77*c66ec88fSEmmanuel Vadot		gsbi5_uart_default: gsbi5_uart_default {
78*c66ec88fSEmmanuel Vadot			mux {
79*c66ec88fSEmmanuel Vadot				pins = "gpio51", "gpio52";
80*c66ec88fSEmmanuel Vadot				function = "gsbi5";
81*c66ec88fSEmmanuel Vadot			};
82*c66ec88fSEmmanuel Vadot
83*c66ec88fSEmmanuel Vadot			tx {
84*c66ec88fSEmmanuel Vadot				pins = "gpio51";
85*c66ec88fSEmmanuel Vadot				drive-strength = <4>;
86*c66ec88fSEmmanuel Vadot				bias-disable;
87*c66ec88fSEmmanuel Vadot			};
88*c66ec88fSEmmanuel Vadot
89*c66ec88fSEmmanuel Vadot			rx {
90*c66ec88fSEmmanuel Vadot				pins = "gpio52";
91*c66ec88fSEmmanuel Vadot				drive-strength = <2>;
92*c66ec88fSEmmanuel Vadot				bias-pull-up;
93*c66ec88fSEmmanuel Vadot			};
94*c66ec88fSEmmanuel Vadot		};
95*c66ec88fSEmmanuel Vadot	};
96