18c2ecf20Sopenharmony_ciQualcomm MSM8960 TLMM block
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis binding describes the Top Level Mode Multiplexer block found in the
48c2ecf20Sopenharmony_ciMSM8960 platform.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci- compatible:
78c2ecf20Sopenharmony_ci	Usage: required
88c2ecf20Sopenharmony_ci	Value type: <string>
98c2ecf20Sopenharmony_ci	Definition: must be "qcom,msm8960-pinctrl"
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci- reg:
128c2ecf20Sopenharmony_ci	Usage: required
138c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
148c2ecf20Sopenharmony_ci	Definition: the base address and size of the TLMM register space.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci- interrupts:
178c2ecf20Sopenharmony_ci	Usage: required
188c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
198c2ecf20Sopenharmony_ci	Definition: should specify the TLMM summary IRQ.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci- interrupt-controller:
228c2ecf20Sopenharmony_ci	Usage: required
238c2ecf20Sopenharmony_ci	Value type: <none>
248c2ecf20Sopenharmony_ci	Definition: identifies this node as an interrupt controller
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci- #interrupt-cells:
278c2ecf20Sopenharmony_ci	Usage: required
288c2ecf20Sopenharmony_ci	Value type: <u32>
298c2ecf20Sopenharmony_ci	Definition: must be 2. Specifying the pin number and flags, as defined
308c2ecf20Sopenharmony_ci		    in <dt-bindings/interrupt-controller/irq.h>
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci- gpio-controller:
338c2ecf20Sopenharmony_ci	Usage: required
348c2ecf20Sopenharmony_ci	Value type: <none>
358c2ecf20Sopenharmony_ci	Definition: identifies this node as a gpio controller
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci- #gpio-cells:
388c2ecf20Sopenharmony_ci	Usage: required
398c2ecf20Sopenharmony_ci	Value type: <u32>
408c2ecf20Sopenharmony_ci	Definition: must be 2. Specifying the pin number and flags, as defined
418c2ecf20Sopenharmony_ci		    in <dt-bindings/gpio/gpio.h>
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci- gpio-ranges:
448c2ecf20Sopenharmony_ci	Usage: required
458c2ecf20Sopenharmony_ci	Definition:  see ../gpio/gpio.txt
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci- gpio-reserved-ranges:
488c2ecf20Sopenharmony_ci	Usage: optional
498c2ecf20Sopenharmony_ci	Definition: see ../gpio/gpio.txt
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciPlease refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
528c2ecf20Sopenharmony_cia general description of GPIO and interrupt bindings.
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ciPlease refer to pinctrl-bindings.txt in this directory for details of the
558c2ecf20Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning of the
568c2ecf20Sopenharmony_ciphrase "pin configuration node".
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ciThe pin configuration nodes act as a container for an arbitrary number of
598c2ecf20Sopenharmony_cisubnodes. Each of these subnodes represents some desired configuration for a
608c2ecf20Sopenharmony_cipin, a group, or a list of pins or groups. This configuration can include the
618c2ecf20Sopenharmony_cimux function to select on those pin(s)/group(s), and various pin configuration
628c2ecf20Sopenharmony_ciparameters, such as pull-up, drive strength, etc.
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciPIN CONFIGURATION NODES:
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciThe name of each subnode is not important; all subnodes should be enumerated
688c2ecf20Sopenharmony_ciand processed purely based on their content.
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ciEach subnode only affects those parameters that are explicitly listed. In
718c2ecf20Sopenharmony_ciother words, a subnode that lists a mux function but no pin configuration
728c2ecf20Sopenharmony_ciparameters implies no information about any pin configuration parameters.
738c2ecf20Sopenharmony_ciSimilarly, a pin subnode that describes a pullup parameter implies no
748c2ecf20Sopenharmony_ciinformation about e.g. the mux function.
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ciThe following generic properties as defined in pinctrl-bindings.txt are valid
788c2ecf20Sopenharmony_cito specify in a pin configuration subnode:
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci- pins:
818c2ecf20Sopenharmony_ci	Usage: required
828c2ecf20Sopenharmony_ci	Value type: <string-array>
838c2ecf20Sopenharmony_ci	Definition: List of gpio pins affected by the properties specified in
848c2ecf20Sopenharmony_ci		    this subnode.  Valid pins are:
858c2ecf20Sopenharmony_ci		    gpio0-gpio151,
868c2ecf20Sopenharmony_ci		    sdc1_clk,
878c2ecf20Sopenharmony_ci		    sdc1_cmd,
888c2ecf20Sopenharmony_ci		    sdc1_data
898c2ecf20Sopenharmony_ci		    sdc3_clk,
908c2ecf20Sopenharmony_ci		    sdc3_cmd,
918c2ecf20Sopenharmony_ci		    sdc3_data
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci- function:
948c2ecf20Sopenharmony_ci	Usage: required
958c2ecf20Sopenharmony_ci	Value type: <string>
968c2ecf20Sopenharmony_ci	Definition: Specify the alternative function to be configured for the
978c2ecf20Sopenharmony_ci		    specified pins. Functions are only valid for gpio pins.
988c2ecf20Sopenharmony_ci		    Valid values are:
998c2ecf20Sopenharmony_ci		    audio_pcm, bt, cam_mclk0, cam_mclk1, cam_mclk2,
1008c2ecf20Sopenharmony_ci		    codec_mic_i2s, codec_spkr_i2s, ext_gps, fm, gps_blanking,
1018c2ecf20Sopenharmony_ci		    gps_pps_in, gps_pps_out, gp_clk_0a, gp_clk_0b, gp_clk_1a,
1028c2ecf20Sopenharmony_ci		    gp_clk_1b, gp_clk_2a, gp_clk_2b, gp_mn, gp_pdm_0a,
1038c2ecf20Sopenharmony_ci		    gp_pdm_0b, gp_pdm_1a, gp_pdm_1b, gp_pdm_2a, gp_pdm_2b, gpio,
1048c2ecf20Sopenharmony_ci		    gsbi1, gsbi1_spi_cs1_n, gsbi1_spi_cs2a_n, gsbi1_spi_cs2b_n,
1058c2ecf20Sopenharmony_ci		    gsbi1_spi_cs3_n, gsbi2, gsbi2_spi_cs1_n, gsbi2_spi_cs2_n,
1068c2ecf20Sopenharmony_ci		    gsbi2_spi_cs3_n, gsbi3, gsbi4, gsbi4_3d_cam_i2c_l,
1078c2ecf20Sopenharmony_ci		    gsbi4_3d_cam_i2c_r, gsbi5, gsbi5_3d_cam_i2c_l,
1088c2ecf20Sopenharmony_ci		    gsbi5_3d_cam_i2c_r, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10,
1098c2ecf20Sopenharmony_ci		    gsbi11, gsbi11_spi_cs1a_n, gsbi11_spi_cs1b_n,
1108c2ecf20Sopenharmony_ci		    gsbi11_spi_cs2a_n, gsbi11_spi_cs2b_n, gsbi11_spi_cs3_n,
1118c2ecf20Sopenharmony_ci		    gsbi12, hdmi_cec, hdmi_ddc_clock, hdmi_ddc_data,
1128c2ecf20Sopenharmony_ci		    hdmi_hot_plug_detect, hsic, mdp_vsync, mi2s, mic_i2s,
1138c2ecf20Sopenharmony_ci		    pmb_clk, pmb_ext_ctrl, ps_hold, rpm_wdog, sdc2, sdc4, sdc5,
1148c2ecf20Sopenharmony_ci		    slimbus1, slimbus2, spkr_i2s, ssbi1, ssbi2, ssbi_ext_gps,
1158c2ecf20Sopenharmony_ci		    ssbi_pmic2, ssbi_qpa1, ssbi_ts, tsif1, tsif2, ts_eoc,
1168c2ecf20Sopenharmony_ci		    usb_fs1, usb_fs1_oe, usb_fs1_oe_n, usb_fs2, usb_fs2_oe,
1178c2ecf20Sopenharmony_ci		    usb_fs2_oe_n, vfe_camif_timer1_a, vfe_camif_timer1_b,
1188c2ecf20Sopenharmony_ci		    vfe_camif_timer2, vfe_camif_timer3_a, vfe_camif_timer3_b,
1198c2ecf20Sopenharmony_ci		    vfe_camif_timer4_a, vfe_camif_timer4_b, vfe_camif_timer4_c,
1208c2ecf20Sopenharmony_ci		    vfe_camif_timer5_a, vfe_camif_timer5_b, vfe_camif_timer6_a,
1218c2ecf20Sopenharmony_ci		    vfe_camif_timer6_b, vfe_camif_timer6_c, vfe_camif_timer7_a,
1228c2ecf20Sopenharmony_ci		    vfe_camif_timer7_b, vfe_camif_timer7_c, wlan
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci- bias-disable:
1258c2ecf20Sopenharmony_ci	Usage: optional
1268c2ecf20Sopenharmony_ci	Value type: <none>
1278c2ecf20Sopenharmony_ci	Definition: The specified pins should be configured as no pull.
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci- bias-pull-down:
1308c2ecf20Sopenharmony_ci	Usage: optional
1318c2ecf20Sopenharmony_ci	Value type: <none>
1328c2ecf20Sopenharmony_ci	Definition: The specified pins should be configured as pull down.
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci- bias-pull-up:
1358c2ecf20Sopenharmony_ci	Usage: optional
1368c2ecf20Sopenharmony_ci	Value type: <none>
1378c2ecf20Sopenharmony_ci	Definition: The specified pins should be configured as pull up.
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci- output-high:
1408c2ecf20Sopenharmony_ci	Usage: optional
1418c2ecf20Sopenharmony_ci	Value type: <none>
1428c2ecf20Sopenharmony_ci	Definition: The specified pins are configured in output mode, driven
1438c2ecf20Sopenharmony_ci		    high.
1448c2ecf20Sopenharmony_ci		    Not valid for sdc pins.
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci- output-low:
1478c2ecf20Sopenharmony_ci	Usage: optional
1488c2ecf20Sopenharmony_ci	Value type: <none>
1498c2ecf20Sopenharmony_ci	Definition: The specified pins are configured in output mode, driven
1508c2ecf20Sopenharmony_ci		    low.
1518c2ecf20Sopenharmony_ci		    Not valid for sdc pins.
1528c2ecf20Sopenharmony_ci
1538c2ecf20Sopenharmony_ci- drive-strength:
1548c2ecf20Sopenharmony_ci	Usage: optional
1558c2ecf20Sopenharmony_ci	Value type: <u32>
1568c2ecf20Sopenharmony_ci	Definition: Selects the drive strength for the specified pins, in mA.
1578c2ecf20Sopenharmony_ci		    Valid values are: 2, 4, 6, 8, 10, 12, 14 and 16
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_ciExample:
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ci	msmgpio: pinctrl@800000 {
1628c2ecf20Sopenharmony_ci		compatible = "qcom,msm8960-pinctrl";
1638c2ecf20Sopenharmony_ci		reg = <0x800000 0x4000>;
1648c2ecf20Sopenharmony_ci
1658c2ecf20Sopenharmony_ci		gpio-controller;
1668c2ecf20Sopenharmony_ci		#gpio-cells = <2>;
1678c2ecf20Sopenharmony_ci		gpio-ranges = <&msmgpio 0 0 152>;
1688c2ecf20Sopenharmony_ci		interrupt-controller;
1698c2ecf20Sopenharmony_ci		#interrupt-cells = <2>;
1708c2ecf20Sopenharmony_ci		interrupts = <0 16 0x4>;
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_ci		gsbi8_uart: gsbi8-uart {
1738c2ecf20Sopenharmony_ci			mux {
1748c2ecf20Sopenharmony_ci				pins = "gpio34", "gpio35";
1758c2ecf20Sopenharmony_ci				function = "gsbi8";
1768c2ecf20Sopenharmony_ci			};
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci			tx {
1798c2ecf20Sopenharmony_ci				pins = "gpio34";
1808c2ecf20Sopenharmony_ci				drive-strength = <4>;
1818c2ecf20Sopenharmony_ci				bias-disable;
1828c2ecf20Sopenharmony_ci			};
1838c2ecf20Sopenharmony_ci
1848c2ecf20Sopenharmony_ci			rx {
1858c2ecf20Sopenharmony_ci				pins = "gpio35";
1868c2ecf20Sopenharmony_ci				drive-strength = <2>;
1878c2ecf20Sopenharmony_ci				bias-pull-up;
1888c2ecf20Sopenharmony_ci			};
1898c2ecf20Sopenharmony_ci		};
1908c2ecf20Sopenharmony_ci	};
191