Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: pinctrl: qcom,msm8976: convert to dtschema

Convert Qualcomm MSM8976 pin controller bindings to DT schema. Keep the
parsing of pin configuration subnodes consistent with other Qualcomm
schemas (children named with '-state' suffix, their children with
'-pins').

Changes during conversion: update the list of non-mux pins (like sdc1)
to match Linux driver.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Link: https://lore.kernel.org/r/20221110085230.15108-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

+136 -183
-183
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.txt
··· 1 - Qualcomm MSM8976 TLMM block 2 - 3 - This binding describes the Top Level Mode Multiplexer block found in the 4 - MSM8956 and MSM8976 platforms. 5 - 6 - - compatible: 7 - Usage: required 8 - Value type: <string> 9 - Definition: must be "qcom,msm8976-pinctrl" 10 - 11 - - reg: 12 - Usage: required 13 - Value type: <prop-encoded-array> 14 - Definition: the base address and size of the TLMM register space. 15 - 16 - - interrupts: 17 - Usage: required 18 - Value type: <prop-encoded-array> 19 - Definition: should specify the TLMM summary IRQ. 20 - 21 - - interrupt-controller: 22 - Usage: required 23 - Value type: <none> 24 - Definition: identifies this node as an interrupt controller 25 - 26 - - #interrupt-cells: 27 - Usage: required 28 - Value type: <u32> 29 - Definition: must be 2. Specifying the pin number and flags, as defined 30 - in <dt-bindings/interrupt-controller/irq.h> 31 - 32 - - gpio-controller: 33 - Usage: required 34 - Value type: <none> 35 - Definition: identifies this node as a gpio controller 36 - 37 - - #gpio-cells: 38 - Usage: required 39 - Value type: <u32> 40 - Definition: must be 2. Specifying the pin number and flags, as defined 41 - in <dt-bindings/gpio/gpio.h> 42 - 43 - - gpio-ranges: 44 - Usage: required 45 - Definition: see ../gpio/gpio.txt 46 - 47 - - gpio-reserved-ranges: 48 - Usage: optional 49 - Definition: see ../gpio/gpio.txt 50 - 51 - Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for 52 - a general description of GPIO and interrupt bindings. 53 - 54 - Please refer to pinctrl-bindings.txt in this directory for details of the 55 - common pinctrl bindings used by client devices, including the meaning of the 56 - phrase "pin configuration node". 57 - 58 - The pin configuration nodes act as a container for an arbitrary number of 59 - subnodes. Each of these subnodes represents some desired configuration for a 60 - pin, a group, or a list of pins or groups. This configuration can include the 61 - mux function to select on those pin(s)/group(s), and various pin configuration 62 - parameters, such as pull-up, drive strength, etc. 63 - 64 - 65 - PIN CONFIGURATION NODES: 66 - 67 - The name of each subnode is not important; all subnodes should be enumerated 68 - and processed purely based on their content. 69 - 70 - Each subnode only affects those parameters that are explicitly listed. In 71 - other words, a subnode that lists a mux function but no pin configuration 72 - parameters implies no information about any pin configuration parameters. 73 - Similarly, a pin subnode that describes a pullup parameter implies no 74 - information about e.g. the mux function. 75 - 76 - 77 - The following generic properties as defined in pinctrl-bindings.txt are valid 78 - to specify in a pin configuration subnode: 79 - 80 - - pins: 81 - Usage: required 82 - Value type: <string-array> 83 - Definition: List of gpio pins affected by the properties specified in 84 - this subnode. 85 - 86 - Valid pins are: 87 - gpio0-gpio145 88 - Supports mux, bias and drive-strength 89 - 90 - sdc1_clk, sdc1_cmd, sdc1_data, 91 - sdc2_clk, sdc2_cmd, sdc2_data, 92 - sdc3_clk, sdc3_cmd, sdc3_data 93 - Supports bias and drive-strength 94 - 95 - - function: 96 - Usage: required 97 - Value type: <string> 98 - Definition: Specify the alternative function to be configured for the 99 - specified pins. Functions are only valid for gpio pins. 100 - Valid values are: 101 - 102 - gpio, blsp_uart1, blsp_spi1, smb_int, blsp_i2c1, blsp_spi2, 103 - blsp_uart2, blsp_i2c2, gcc_gp1_clk_b, blsp_spi3, 104 - qdss_tracedata_b, blsp_i2c3, gcc_gp2_clk_b, gcc_gp3_clk_b, 105 - blsp_spi4, cap_int, blsp_i2c4, blsp_spi5, blsp_uart5, 106 - qdss_traceclk_a, m_voc, blsp_i2c5, qdss_tracectl_a, 107 - qdss_tracedata_a, blsp_spi6, blsp_uart6, qdss_tracectl_b, 108 - blsp_i2c6, qdss_traceclk_b, mdp_vsync, pri_mi2s_mclk_a, 109 - sec_mi2s_mclk_a, cam_mclk, cci0_i2c, cci1_i2c, blsp1_spi, 110 - blsp3_spi, gcc_gp1_clk_a, gcc_gp2_clk_a, gcc_gp3_clk_a, 111 - uim_batt, sd_write, uim1_data, uim1_clk, uim1_reset, 112 - uim1_present, uim2_data, uim2_clk, uim2_reset, 113 - uim2_present, ts_xvdd, mipi_dsi0, us_euro, ts_resout, 114 - ts_sample, sec_mi2s_mclk_b, pri_mi2s, codec_reset, 115 - cdc_pdm0, us_emitter, pri_mi2s_mclk_b, pri_mi2s_mclk_c, 116 - lpass_slimbus, lpass_slimbus0, lpass_slimbus1, codec_int1, 117 - codec_int2, wcss_bt, sdc3, wcss_wlan2, wcss_wlan1, 118 - wcss_wlan0, wcss_wlan, wcss_fm, key_volp, key_snapshot, 119 - key_focus, key_home, pwr_down, dmic0_clk, hdmi_int, 120 - dmic0_data, wsa_vi, wsa_en, blsp_spi8, wsa_irq, blsp_i2c8, 121 - pa_indicator, modem_tsync, ssbi_wtr1, gsm1_tx, gsm0_tx, 122 - sdcard_det, sec_mi2s, ss_switch, 123 - 124 - - bias-disable: 125 - Usage: optional 126 - Value type: <none> 127 - Definition: The specified pins should be configured as no pull. 128 - 129 - - bias-pull-down: 130 - Usage: optional 131 - Value type: <none> 132 - Definition: The specified pins should be configured as pull down. 133 - 134 - - bias-pull-up: 135 - Usage: optional 136 - Value type: <none> 137 - Definition: The specified pins should be configured as pull up. 138 - 139 - - output-high: 140 - Usage: optional 141 - Value type: <none> 142 - Definition: The specified pins are configured in output mode, driven 143 - high. 144 - Not valid for sdc pins. 145 - 146 - - output-low: 147 - Usage: optional 148 - Value type: <none> 149 - Definition: The specified pins are configured in output mode, driven 150 - low. 151 - Not valid for sdc pins. 152 - 153 - - drive-strength: 154 - Usage: optional 155 - Value type: <u32> 156 - Definition: Selects the drive strength for the specified pins, in mA. 157 - Valid values are: 2, 4, 6, 8, 10, 12, 14 and 16 158 - 159 - Example: 160 - 161 - tlmm: pinctrl@1000000 { 162 - compatible = "qcom,msm8976-pinctrl"; 163 - reg = <0x1000000 0x300000>; 164 - interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 165 - gpio-controller; 166 - #gpio-cells = <2>; 167 - gpio-ranges = <&tlmm 0 0 145>; 168 - interrupt-controller; 169 - #interrupt-cells = <2>; 170 - 171 - blsp1_uart2_active: blsp1_uart2_active { 172 - mux { 173 - pins = "gpio4", "gpio5", "gpio6", "gpio7"; 174 - function = "blsp_uart2"; 175 - }; 176 - 177 - config { 178 - pins = "gpio4", "gpio5", "gpio6", "gpio7"; 179 - drive-strength = <2>; 180 - bias-disable; 181 - }; 182 - }; 183 - };
+136
Documentation/devicetree/bindings/pinctrl/qcom,msm8976-pinctrl.yaml
··· 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,msm8976-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm MSM8976 TLMM pin controller 8 + 9 + maintainers: 10 + - Bjorn Andersson <andersson@kernel.org> 11 + - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 12 + 13 + description: 14 + Top Level Mode Multiplexer pin controller in Qualcomm MSM8976 SoC. 15 + 16 + properties: 17 + compatible: 18 + const: qcom,msm8976-pinctrl 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: true 24 + interrupt-controller: true 25 + "#interrupt-cells": true 26 + gpio-controller: true 27 + "#gpio-cells": true 28 + gpio-ranges: true 29 + wakeup-parent: true 30 + 31 + gpio-reserved-ranges: 32 + minItems: 1 33 + maxItems: 73 34 + 35 + gpio-line-names: 36 + maxItems: 145 37 + 38 + patternProperties: 39 + "-state$": 40 + oneOf: 41 + - $ref: "#/$defs/qcom-msm8976-tlmm-state" 42 + - patternProperties: 43 + "-pins$": 44 + $ref: "#/$defs/qcom-msm8976-tlmm-state" 45 + additionalProperties: false 46 + 47 + $defs: 48 + qcom-msm8976-tlmm-state: 49 + type: object 50 + description: 51 + Desired pin configuration for a device or its specific state (like sleep 52 + or active). 53 + $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state 54 + 55 + properties: 56 + pins: 57 + description: 58 + List of gpio pins affected by the properties specified in this state. 59 + items: 60 + oneOf: 61 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-3][0-9]|14[0-4])$" 62 + - enum: [ qdsd_clk, qdsd_cmd, qdsd_data0, qdsd_data1, qdsd_data2, 63 + qdsd_data3, sdc1_clk, sdc1_cmd, sdc1_data, sdc1_rclk, 64 + sdc2_clk, sdc2_cmd, sdc2_data ] 65 + minItems: 1 66 + maxItems: 36 67 + 68 + function: 69 + description: 70 + Specify the alternative function to be configured for the specified 71 + pins. 72 + 73 + enum: [ gpio, blsp_uart1, blsp_spi1, smb_int, blsp_i2c1, blsp_spi2, 74 + blsp_uart2, blsp_i2c2, gcc_gp1_clk_b, blsp_spi3, 75 + qdss_tracedata_b, blsp_i2c3, gcc_gp2_clk_b, gcc_gp3_clk_b, 76 + blsp_spi4, cap_int, blsp_i2c4, blsp_spi5, blsp_uart5, 77 + qdss_traceclk_a, m_voc, blsp_i2c5, qdss_tracectl_a, 78 + qdss_tracedata_a, blsp_spi6, blsp_uart6, qdss_tracectl_b, 79 + blsp_i2c6, qdss_traceclk_b, mdp_vsync, pri_mi2s_mclk_a, 80 + sec_mi2s_mclk_a, cam_mclk, cci0_i2c, cci1_i2c, blsp1_spi, 81 + blsp3_spi, gcc_gp1_clk_a, gcc_gp2_clk_a, gcc_gp3_clk_a, 82 + uim_batt, sd_write, uim1_data, uim1_clk, uim1_reset, 83 + uim1_present, uim2_data, uim2_clk, uim2_reset, uim2_present, 84 + ts_xvdd, mipi_dsi0, us_euro, ts_resout, ts_sample, 85 + sec_mi2s_mclk_b, pri_mi2s, codec_reset, cdc_pdm0, us_emitter, 86 + pri_mi2s_mclk_b, pri_mi2s_mclk_c, lpass_slimbus, 87 + lpass_slimbus0, lpass_slimbus1, codec_int1, codec_int2, 88 + wcss_bt, sdc3, wcss_wlan2, wcss_wlan1, wcss_wlan0, wcss_wlan, 89 + wcss_fm, key_volp, key_snapshot, key_focus, key_home, pwr_down, 90 + dmic0_clk, hdmi_int, dmic0_data, wsa_vi, wsa_en, blsp_spi8, 91 + wsa_irq, blsp_i2c8, pa_indicator, modem_tsync, ssbi_wtr1, 92 + gsm1_tx, gsm0_tx, sdcard_det, sec_mi2s, ss_switch ] 93 + 94 + bias-pull-down: true 95 + bias-pull-up: true 96 + bias-disable: true 97 + drive-strength: true 98 + input-enable: true 99 + output-high: true 100 + output-low: true 101 + 102 + required: 103 + - pins 104 + 105 + additionalProperties: false 106 + 107 + allOf: 108 + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# 109 + 110 + required: 111 + - compatible 112 + - reg 113 + 114 + additionalProperties: false 115 + 116 + examples: 117 + - | 118 + #include <dt-bindings/interrupt-controller/arm-gic.h> 119 + 120 + tlmm: pinctrl@1000000 { 121 + compatible = "qcom,msm8976-pinctrl"; 122 + reg = <0x1000000 0x300000>; 123 + #gpio-cells = <2>; 124 + gpio-controller; 125 + gpio-ranges = <&tlmm 0 0 145>; 126 + interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; 127 + interrupt-controller; 128 + #interrupt-cells = <2>; 129 + 130 + blsp1-uart2-active-state { 131 + pins = "gpio4", "gpio5", "gpio6", "gpio7"; 132 + function = "blsp_uart2"; 133 + drive-strength = <2>; 134 + bias-disable; 135 + }; 136 + };