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

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

Convert Qualcomm MSM8660 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').

Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221107185931.22075-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

+125 -96
-96
Documentation/devicetree/bindings/pinctrl/qcom,msm8660-pinctrl.txt
··· 1 - Qualcomm MSM8660 TLMM block 2 - 3 - Required properties: 4 - - compatible: "qcom,msm8660-pinctrl" 5 - - reg: Should be the base address and length of the TLMM block. 6 - - interrupts: Should be the parent IRQ of the TLMM block. 7 - - interrupt-controller: Marks the device node as an interrupt controller. 8 - - #interrupt-cells: Should be two. 9 - - gpio-controller: Marks the device node as a GPIO controller. 10 - - #gpio-cells : Should be two. 11 - The first cell is the gpio pin number and the 12 - second cell is used for optional parameters. 13 - - gpio-ranges: see ../gpio/gpio.txt 14 - 15 - Optional properties: 16 - 17 - - gpio-reserved-ranges: see ../gpio/gpio.txt 18 - 19 - Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for 20 - a general description of GPIO and interrupt bindings. 21 - 22 - Please refer to pinctrl-bindings.txt in this directory for details of the 23 - common pinctrl bindings used by client devices, including the meaning of the 24 - phrase "pin configuration node". 25 - 26 - Qualcomm's pin configuration nodes act as a container for an arbitrary number of 27 - subnodes. Each of these subnodes represents some desired configuration for a 28 - pin, a group, or a list of pins or groups. This configuration can include the 29 - mux function to select on those pin(s)/group(s), and various pin configuration 30 - parameters, such as pull-up, drive strength, etc. 31 - 32 - The name of each subnode is not important; all subnodes should be enumerated 33 - and processed purely based on their content. 34 - 35 - Each subnode only affects those parameters that are explicitly listed. In 36 - other words, a subnode that lists a mux function but no pin configuration 37 - parameters implies no information about any pin configuration parameters. 38 - Similarly, a pin subnode that describes a pullup parameter implies no 39 - information about e.g. the mux function. 40 - 41 - 42 - The following generic properties as defined in pinctrl-bindings.txt are valid 43 - to specify in a pin configuration subnode: 44 - 45 - pins, function, bias-disable, bias-pull-down, bias-pull-up, drive-strength, 46 - output-low, output-high. 47 - 48 - Non-empty subnodes must specify the 'pins' property. 49 - 50 - Valid values for pins are: 51 - gpio0-gpio172, sdc3_clk, sdc3_cmd, sdc3_data sdc4_clk, sdc4_cmd, sdc4_data 52 - 53 - Valid values for function are: 54 - gpio, cam_mclk, dsub, ext_gps, gp_clk_0a, gp_clk_0b, gp_clk_1a, gp_clk_1b, 55 - gp_clk_2a, gp_clk_2b, gp_mn, gsbi1, gsbi1_spi_cs1_n, gsbi1_spi_cs2a_n, 56 - gsbi1_spi_cs2b_n, gsbi1_spi_cs3_n, gsbi2, gsbi2_spi_cs1_n, gsbi2_spi_cs2_n, 57 - gsbi2_spi_cs3_n, gsbi3, gsbi3_spi_cs1_n, gsbi3_spi_cs2_n, gsbi3_spi_cs3_n, 58 - gsbi4, gsbi5, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10, gsbi11, gsbi12, hdmi, i2s, 59 - lcdc, mdp_vsync, mi2s, pcm, ps_hold, sdc1, sdc2, sdc5, tsif1, tsif2, usb_fs1, 60 - usb_fs1_oe_n, usb_fs2, usb_fs2_oe_n, vfe, vsens_alarm, ebi2, ebi2cs 61 - 62 - Example: 63 - 64 - msmgpio: pinctrl@800000 { 65 - compatible = "qcom,msm8660-pinctrl"; 66 - reg = <0x800000 0x4000>; 67 - 68 - gpio-controller; 69 - #gpio-cells = <2>; 70 - gpio-ranges = <&msmgpio 0 0 173>; 71 - interrupt-controller; 72 - #interrupt-cells = <2>; 73 - interrupts = <0 16 0x4>; 74 - 75 - pinctrl-names = "default"; 76 - pinctrl-0 = <&gsbi12_uart>; 77 - 78 - gsbi12_uart: gsbi12-uart { 79 - mux { 80 - pins = "gpio117", "gpio118"; 81 - function = "gsbi12"; 82 - }; 83 - 84 - tx { 85 - pins = "gpio118"; 86 - drive-strength = <8>; 87 - bias-disable; 88 - }; 89 - 90 - rx { 91 - pins = "gpio117"; 92 - drive-strength = <2>; 93 - bias-pull-up; 94 - }; 95 - }; 96 - };
+125
Documentation/devicetree/bindings/pinctrl/qcom,msm8660-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,msm8660-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm MSM8660 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 MSM8660 SoC. 15 + 16 + properties: 17 + compatible: 18 + const: qcom,msm8660-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: 86 34 + 35 + gpio-line-names: 36 + maxItems: 173 37 + 38 + patternProperties: 39 + "-state$": 40 + oneOf: 41 + - $ref: "#/$defs/qcom-msm8660-tlmm-state" 42 + - patternProperties: 43 + "-pins$": 44 + $ref: "#/$defs/qcom-msm8660-tlmm-state" 45 + additionalProperties: false 46 + 47 + $defs: 48 + qcom-msm8660-tlmm-state: 49 + type: object 50 + description: 51 + Pinctrl node's client devices use subnodes for desired pin configuration. 52 + Client device subnodes use below standard properties. 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 59 + subnode. 60 + items: 61 + oneOf: 62 + - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-6][0-9]|17[0-2])$" 63 + - enum: [ sdc3_clk, sdc3_cmd, sdc3_data, sdc4_clk, sdc4_cmd, sdc4_data ] 64 + minItems: 1 65 + maxItems: 36 66 + 67 + function: 68 + description: 69 + Specify the alternative function to be configured for the specified 70 + pins. 71 + 72 + enum: [ gpio, cam_mclk, dsub, ext_gps, gp_clk_0a, gp_clk_0b, gp_clk_1a, 73 + gp_clk_1b, gp_clk_2a, gp_clk_2b, gp_mn, gsbi1, gsbi1_spi_cs1_n, 74 + gsbi1_spi_cs2a_n, gsbi1_spi_cs2b_n, gsbi1_spi_cs3_n, gsbi2, 75 + gsbi2_spi_cs1_n, gsbi2_spi_cs2_n, gsbi2_spi_cs3_n, gsbi3, 76 + gsbi3_spi_cs1_n, gsbi3_spi_cs2_n, gsbi3_spi_cs3_n, gsbi4, 77 + gsbi5, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10, gsbi11, gsbi12, 78 + hdmi, i2s, lcdc, mdp_vsync, mi2s, pcm, ps_hold, sdc1, sdc2, 79 + sdc5, tsif1, tsif2, usb_fs1, usb_fs1_oe_n, usb_fs2, 80 + usb_fs2_oe_n, vfe, vsens_alarm, ebi2, ebi2cs ] 81 + 82 + 83 + bias-pull-down: true 84 + bias-pull-up: true 85 + bias-disable: true 86 + drive-strength: true 87 + input-enable: true 88 + output-high: true 89 + output-low: true 90 + 91 + required: 92 + - pins 93 + 94 + additionalProperties: false 95 + 96 + allOf: 97 + - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml# 98 + 99 + required: 100 + - compatible 101 + - reg 102 + 103 + additionalProperties: false 104 + 105 + examples: 106 + - | 107 + #include <dt-bindings/interrupt-controller/arm-gic.h> 108 + tlmm: pinctrl@800000 { 109 + compatible = "qcom,msm8660-pinctrl"; 110 + reg = <0x800000 0x4000>; 111 + 112 + gpio-controller; 113 + gpio-ranges = <&tlmm 0 0 173>; 114 + #gpio-cells = <2>; 115 + interrupts = <0 16 0x4>; 116 + interrupt-controller; 117 + #interrupt-cells = <2>; 118 + 119 + gsbi3-i2c-state { 120 + pins = "gpio43", "gpio44"; 121 + function = "gsbi3"; 122 + drive-strength = <8>; 123 + bias-disable; 124 + }; 125 + };