1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/pinctrl/qcom,msm8960-pinctrl.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm MSM8960 TLMM pin controller 8 9maintainers: 10 - Bjorn Andersson <andersson@kernel.org> 11 - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 12 13description: 14 Top Level Mode Multiplexer pin controller in Qualcomm MSM8960 SoC. 15 16properties: 17 compatible: 18 const: qcom,msm8960-pinctrl 19 20 reg: 21 maxItems: 1 22 23 interrupts: 24 maxItems: 1 25 26 interrupt-controller: true 27 "#interrupt-cells": true 28 gpio-controller: true 29 "#gpio-cells": true 30 gpio-ranges: true 31 wakeup-parent: true 32 33 gpio-reserved-ranges: 34 minItems: 1 35 maxItems: 76 36 37 gpio-line-names: 38 maxItems: 152 39 40patternProperties: 41 "-state$": 42 oneOf: 43 - $ref: "#/$defs/qcom-msm8960-tlmm-state" 44 - patternProperties: 45 "-pins$": 46 $ref: "#/$defs/qcom-msm8960-tlmm-state" 47 additionalProperties: false 48 49$defs: 50 qcom-msm8960-tlmm-state: 51 type: object 52 description: 53 Pinctrl node's client devices use subnodes for desired pin configuration. 54 Client device subnodes use below standard properties. 55 $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state 56 57 properties: 58 pins: 59 description: 60 List of gpio pins affected by the properties specified in this 61 subnode. 62 items: 63 oneOf: 64 - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-4][0-9]|15[0-1])$" 65 - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc3_clk, sdc3_cmd, 66 sdc3_data ] 67 minItems: 1 68 maxItems: 36 69 70 function: 71 description: 72 Specify the alternative function to be configured for the specified 73 pins. 74 75 enum: [ gpio, audio_pcm, bt, cam_mclk0, cam_mclk1, cam_mclk2, 76 codec_mic_i2s, codec_spkr_i2s, ext_gps, fm, gps_blanking, 77 gps_pps_in, gps_pps_out, gp_clk_0a, gp_clk_0b, gp_clk_1a, 78 gp_clk_1b, gp_clk_2a, gp_clk_2b, gp_mn, gp_pdm_0a, gp_pdm_0b, 79 gp_pdm_1a, gp_pdm_1b, gp_pdm_2a, gp_pdm_2b, gsbi1, 80 gsbi1_spi_cs1_n, gsbi1_spi_cs2a_n, gsbi1_spi_cs2b_n, 81 gsbi1_spi_cs3_n, gsbi2, gsbi2_spi_cs1_n, gsbi2_spi_cs2_n, 82 gsbi2_spi_cs3_n, gsbi3, gsbi4, gsbi4_3d_cam_i2c_l, 83 gsbi4_3d_cam_i2c_r, gsbi5, gsbi5_3d_cam_i2c_l, 84 gsbi5_3d_cam_i2c_r, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10, gsbi11, 85 gsbi11_spi_cs1a_n, gsbi11_spi_cs1b_n, gsbi11_spi_cs2a_n, 86 gsbi11_spi_cs2b_n, gsbi11_spi_cs3_n, gsbi12, hdmi_cec, 87 hdmi_ddc_clock, hdmi_ddc_data, hdmi_hot_plug_detect, hsic, 88 mdp_vsync, mi2s, mic_i2s, pmb_clk, pmb_ext_ctrl, ps_hold, 89 rpm_wdog, sdc2, sdc4, sdc5, slimbus1, slimbus2, spkr_i2s, 90 ssbi1, ssbi2, ssbi_ext_gps, ssbi_pmic2, ssbi_qpa1, ssbi_ts, 91 tsif1, tsif2, ts_eoc, usb_fs1, usb_fs1_oe, usb_fs1_oe_n, 92 usb_fs2, usb_fs2_oe, usb_fs2_oe_n, vfe_camif_timer1_a, 93 vfe_camif_timer1_b, vfe_camif_timer2, vfe_camif_timer3_a, 94 vfe_camif_timer3_b, vfe_camif_timer4_a, vfe_camif_timer4_b, 95 vfe_camif_timer4_c, vfe_camif_timer5_a, vfe_camif_timer5_b, 96 vfe_camif_timer6_a, vfe_camif_timer6_b, vfe_camif_timer6_c, 97 vfe_camif_timer7_a, vfe_camif_timer7_b, vfe_camif_timer7_c, 98 wlan ] 99 100 bias-pull-down: true 101 bias-pull-up: true 102 bias-disable: true 103 drive-strength: true 104 input-enable: true 105 output-high: true 106 output-low: true 107 108 required: 109 - pins 110 111 additionalProperties: false 112 113allOf: 114 - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# 115 116required: 117 - compatible 118 - reg 119 120additionalProperties: false 121 122examples: 123 - | 124 #include <dt-bindings/interrupt-controller/arm-gic.h> 125 126 msmgpio: pinctrl@800000 { 127 compatible = "qcom,msm8960-pinctrl"; 128 reg = <0x800000 0x4000>; 129 #gpio-cells = <2>; 130 gpio-controller; 131 gpio-ranges = <&msmgpio 0 0 152>; 132 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 133 interrupt-controller; 134 #interrupt-cells = <2>; 135 136 spi1-default-state { 137 mosi-pins { 138 pins = "gpio6"; 139 function = "gsbi1"; 140 drive-strength = <12>; 141 bias-disable; 142 }; 143 144 miso-pins { 145 pins = "gpio7"; 146 function = "gsbi1"; 147 drive-strength = <12>; 148 bias-disable; 149 }; 150 151 cs-pins { 152 pins = "gpio8"; 153 function = "gpio"; 154 drive-strength = <12>; 155 bias-disable; 156 output-low; 157 }; 158 159 clk-pins { 160 pins = "gpio9"; 161 function = "gsbi1"; 162 drive-strength = <12>; 163 bias-disable; 164 }; 165 }; 166 }; 167