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

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema

Convert the Qualcomm WCD9335 audio codec binding to DT schema.

Changes against original binding:
1. Drop "mclk2" from clocks as neither Linux driver nor DTS uses it.
2. Do not require vdd-micbias-supply as several DTS do not provide it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230220095643.64898-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
631b8a8b 0106ba24

+156 -123
-123
Documentation/devicetree/bindings/sound/qcom,wcd9335.txt
··· 1 - QCOM WCD9335 Codec 2 - 3 - Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC, supports 4 - Qualcomm Technologies, Inc. (QTI) multimedia solutions, including 5 - the MSM8996, MSM8976, and MSM8956 chipsets. It has in-built 6 - Soundwire controller, interrupt mux. It supports both I2S/I2C and 7 - SLIMbus audio interfaces. 8 - 9 - Required properties with SLIMbus Interface: 10 - 11 - - compatible: 12 - Usage: required 13 - Value type: <stringlist> 14 - Definition: For SLIMbus interface it should be "slimMID,PID", 15 - textual representation of Manufacturer ID, Product Code, 16 - shall be in lower case hexadecimal with leading zeroes 17 - suppressed. Refer to slimbus/bus.txt for details. 18 - Should be: 19 - "slim217,1a0" for MSM8996 and APQ8096 SoCs with SLIMbus. 20 - 21 - - reg 22 - Usage: required 23 - Value type: <u32 u32> 24 - Definition: Should be ('Device index', 'Instance ID') 25 - 26 - - interrupts 27 - Usage: required 28 - Value type: <prop-encoded-array> 29 - Definition: Interrupts via WCD INTR1 and INTR2 pins 30 - 31 - - interrupt-names: 32 - Usage: required 33 - Value type: <String array> 34 - Definition: Interrupt names of WCD INTR1 and INTR2 35 - Should be: "intr1", "intr2" 36 - 37 - - reset-gpios: 38 - Usage: required 39 - Value type: <String Array> 40 - Definition: Reset gpio line 41 - 42 - - slim-ifc-dev: 43 - Usage: required 44 - Value type: <phandle> 45 - Definition: SLIM interface device 46 - 47 - - clocks: 48 - Usage: required 49 - Value type: <prop-encoded-array> 50 - Definition: See clock-bindings.txt section "consumers". List of 51 - three clock specifiers for mclk, mclk2 and slimbus clock. 52 - 53 - - clock-names: 54 - Usage: required 55 - Value type: <string> 56 - Definition: Must contain "mclk", "mclk2" and "slimbus" strings. 57 - 58 - - vdd-buck-supply: 59 - Usage: required 60 - Value type: <phandle> 61 - Definition: Should contain a reference to the 1.8V buck supply 62 - 63 - - vdd-buck-sido-supply: 64 - Usage: required 65 - Value type: <phandle> 66 - Definition: Should contain a reference to the 1.8V SIDO buck supply 67 - 68 - - vdd-rx-supply: 69 - Usage: required 70 - Value type: <phandle> 71 - Definition: Should contain a reference to the 1.8V rx supply 72 - 73 - - vdd-tx-supply: 74 - Usage: required 75 - Value type: <phandle> 76 - Definition: Should contain a reference to the 1.8V tx supply 77 - 78 - - vdd-vbat-supply: 79 - Usage: Optional 80 - Value type: <phandle> 81 - Definition: Should contain a reference to the vbat supply 82 - 83 - - vdd-micbias-supply: 84 - Usage: required 85 - Value type: <phandle> 86 - Definition: Should contain a reference to the micbias supply 87 - 88 - - vdd-io-supply: 89 - Usage: required 90 - Value type: <phandle> 91 - Definition: Should contain a reference to the 1.8V io supply 92 - 93 - - interrupt-controller: 94 - Usage: required 95 - Definition: Indicating that this is a interrupt controller 96 - 97 - - #interrupt-cells: 98 - Usage: required 99 - Value type: <int> 100 - Definition: should be 1 101 - 102 - #sound-dai-cells 103 - Usage: required 104 - Value type: <u32> 105 - Definition: Must be 1 106 - 107 - audio-codec@1{ 108 - compatible = "slim217,1a0"; 109 - reg = <1 0>; 110 - interrupts = <&msmgpio 54 IRQ_TYPE_LEVEL_HIGH>; 111 - interrupt-names = "intr2" 112 - reset-gpios = <&msmgpio 64 GPIO_ACTIVE_LOW>; 113 - slim-ifc-dev = <&wc9335_ifd>; 114 - clock-names = "mclk", "native"; 115 - clocks = <&rpmcc RPM_SMD_DIV_CLK1>, 116 - <&rpmcc RPM_SMD_BB_CLK1>; 117 - vdd-buck-supply = <&pm8994_s4>; 118 - vdd-rx-supply = <&pm8994_s4>; 119 - vdd-buck-sido-supply = <&pm8994_s4>; 120 - vdd-tx-supply = <&pm8994_s4>; 121 - vdd-io-supply = <&pm8994_s4>; 122 - #sound-dai-cells = <1>; 123 - }
+156
Documentation/devicetree/bindings/sound/qcom,wcd9335.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/sound/qcom,wcd9335.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm WCD9335 Audio Codec 8 + 9 + maintainers: 10 + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 + 12 + description: 13 + Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC with in-built 14 + Soundwire controller and interrupt mux. It supports both I2S/I2C and SLIMbus 15 + audio interfaces. 16 + 17 + properties: 18 + compatible: 19 + const: slim217,1a0 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + clocks: 25 + maxItems: 2 26 + 27 + clock-names: 28 + items: 29 + - const: mclk 30 + - const: slimbus 31 + 32 + interrupts: 33 + maxItems: 2 34 + 35 + interrupt-names: 36 + items: 37 + - const: intr1 38 + - const: intr2 39 + 40 + interrupt-controller: true 41 + 42 + '#interrupt-cells': 43 + const: 1 44 + 45 + reset-gpios: 46 + maxItems: 1 47 + 48 + slim-ifc-dev: 49 + description: SLIM IFC device interface 50 + $ref: /schemas/types.yaml#/definitions/phandle 51 + 52 + '#sound-dai-cells': 53 + const: 1 54 + 55 + vdd-buck-supply: 56 + description: 1.8V buck supply 57 + 58 + vdd-buck-sido-supply: 59 + description: 1.8V SIDO buck supply 60 + 61 + vdd-io-supply: 62 + description: 1.8V I/O supply 63 + 64 + vdd-micbias-supply: 65 + description: micbias supply 66 + 67 + vdd-rx-supply: 68 + description: 1.8V rx supply 69 + 70 + vdd-tx-supply: 71 + description: 1.8V tx supply 72 + 73 + vdd-vbat-supply: 74 + description: vbat supply 75 + 76 + required: 77 + - compatible 78 + - reg 79 + 80 + allOf: 81 + - $ref: dai-common.yaml# 82 + - if: 83 + required: 84 + - slim-ifc-dev 85 + then: 86 + required: 87 + - clocks 88 + - clock-names 89 + - interrupts 90 + - interrupt-names 91 + - interrupt-controller 92 + - '#interrupt-cells' 93 + - reset-gpios 94 + - slim-ifc-dev 95 + - '#sound-dai-cells' 96 + - vdd-buck-supply 97 + - vdd-buck-sido-supply 98 + - vdd-io-supply 99 + - vdd-rx-supply 100 + - vdd-tx-supply 101 + else: 102 + properties: 103 + clocks: false 104 + clock-names: false 105 + interrupts: false 106 + interrupt-names: false 107 + interrupt-controller: false 108 + '#interrupt-cells': false 109 + reset-gpios: false 110 + slim-ifc-dev: false 111 + '#sound-dai-cells': false 112 + vdd-buck-supply: false 113 + vdd-buck-sido-supply: false 114 + vdd-io-supply: false 115 + vdd-micbias-supply: false 116 + vdd-rx-supply: false 117 + vdd-tx-supply: false 118 + vdd-vbat-supply: false 119 + 120 + additionalProperties: false 121 + 122 + examples: 123 + - | 124 + #include <dt-bindings/clock/qcom,rpmcc.h> 125 + #include <dt-bindings/gpio/gpio.h> 126 + #include <dt-bindings/interrupt-controller/irq.h> 127 + 128 + tasha_ifd: codec@0,0 { 129 + compatible = "slim217,1a0"; 130 + reg = <0 0>; 131 + }; 132 + 133 + codec@1,0 { 134 + compatible = "slim217,1a0"; 135 + reg = <1 0>; 136 + 137 + clock-names = "mclk", "slimbus"; 138 + clocks = <&div1_mclk>, <&rpmcc RPM_SMD_BB_CLK1>; 139 + 140 + interrupt-parent = <&tlmm>; 141 + interrupts = <54 IRQ_TYPE_LEVEL_HIGH>, 142 + <53 IRQ_TYPE_LEVEL_HIGH>; 143 + interrupt-names = "intr1", "intr2"; 144 + interrupt-controller; 145 + #interrupt-cells = <1>; 146 + 147 + reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>; 148 + slim-ifc-dev = <&tasha_ifd>; 149 + #sound-dai-cells = <1>; 150 + 151 + vdd-buck-supply = <&vreg_s4a_1p8>; 152 + vdd-buck-sido-supply = <&vreg_s4a_1p8>; 153 + vdd-tx-supply = <&vreg_s4a_1p8>; 154 + vdd-rx-supply = <&vreg_s4a_1p8>; 155 + vdd-io-supply = <&vreg_s4a_1p8>; 156 + };