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: wlf,wm8994: Convert to dtschema

Convert the Wolfson WM1811/WM8994/WM8958 audio codecs bindings to DT
schema.

Changes against original binding:
1. Add missing LDO1VDD-supply and LDO2VDD-supply.
2. Use "gpios" suffix for wlf,ldo1ena and wlf,ldo2ena (Linux kernel's
gpiolib already looks for both variants).
3. Do not require AVDD1-supply and DCVDD-supply, because at least on
Arndale board with Exynos5250 these are being supplied by internal
LDOs.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230322193541.827291-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
80404e4e 056db840

+194 -112
+194
Documentation/devicetree/bindings/sound/wlf,wm8994.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/wlf,wm8994.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Wolfson WM1811/WM8994/WM8958 audio codecs 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 11 + - patches@opensource.cirrus.com 12 + 13 + description: | 14 + These devices support both I2C and SPI (configured with pin strapping on the 15 + board). 16 + 17 + Pins on the device (for linking into audio routes): 18 + IN1LN, IN1LP, IN2LN, IN2LP:VXRN, IN1RN, IN1RP, IN2RN, IN2RP:VXRP, SPKOUTLP, 19 + SPKOUTLN, SPKOUTRP, SPKOUTRN, HPOUT1L, HPOUT1R, HPOUT2P, HPOUT2N, LINEOUT1P, 20 + LINEOUT1N, LINEOUT2P, LINEOUT2N. 21 + 22 + properties: 23 + compatible: 24 + enum: 25 + - wlf,wm1811 26 + - wlf,wm8994 27 + - wlf,wm8958 28 + 29 + reg: 30 + maxItems: 1 31 + 32 + clocks: 33 + minItems: 1 34 + maxItems: 2 35 + 36 + clock-names: 37 + minItems: 1 38 + items: 39 + - const: MCLK1 40 + - const: MCLK2 41 + 42 + gpio-controller: true 43 + 44 + '#gpio-cells': 45 + const: 2 46 + 47 + interrupts: 48 + maxItems: 1 49 + 50 + interrupt-controller: true 51 + 52 + '#interrupt-cells': 53 + const: 2 54 + description: 55 + The first cell is the IRQ number. The second cell is the flags, encoded 56 + as the trigger masks. 57 + 58 + AVDD1-supply: true 59 + AVDD2-supply: true 60 + CPVDD-supply: true 61 + DBVDD-supply: true 62 + DBVDD1-supply: true 63 + DBVDD2-supply: true 64 + DBVDD3-supply: true 65 + DCVDD-supply: true 66 + LDO1VDD-supply: true 67 + LDO2VDD-supply: true 68 + SPKVDD1-supply: true 69 + SPKVDD2-supply: true 70 + 71 + '#sound-dai-cells': 72 + const: 0 73 + 74 + wlf,gpio-cfg: 75 + $ref: /schemas/types.yaml#/definitions/uint32-array 76 + maxItems: 11 77 + description: 78 + A list of GPIO configuration register values. If absent, no configuration 79 + of these registers is performed. If any value is over 0xffff then the 80 + register will be left as default. If present 11 values must be supplied. 81 + 82 + wlf,micbias-cfg: 83 + $ref: /schemas/types.yaml#/definitions/uint32-array 84 + maxItems: 2 85 + description: 86 + Two MICBIAS register values for WM1811 or WM8958. If absent the register 87 + defaults will be used. 88 + 89 + wlf,ldo1ena-gpios: 90 + maxItems: 1 91 + description: 92 + Control of LDO1ENA input to device. 93 + 94 + wlf,ldo2ena-gpios: 95 + maxItems: 1 96 + description: 97 + Control of LDO2ENA input to device. 98 + 99 + wlf,lineout1-se: 100 + type: boolean 101 + description: 102 + LINEOUT1 is in single ended mode. 103 + 104 + wlf,lineout2-se: 105 + type: boolean 106 + description: 107 + INEOUT2 is in single ended mode. 108 + 109 + wlf,lineout1-feedback: 110 + type: boolean 111 + description: 112 + LINEOUT1 has common mode feedback connected. 113 + 114 + wlf,lineout2-feedback: 115 + type: boolean 116 + description: 117 + LINEOUT2 has common mode feedback connected. 118 + 119 + wlf,ldoena-always-driven: 120 + type: boolean 121 + description: 122 + LDOENA is always driven. 123 + 124 + wlf,spkmode-pu: 125 + type: boolean 126 + description: 127 + Enable the internal pull-up resistor on the SPKMODE pin. 128 + 129 + wlf,csnaddr-pd: 130 + type: boolean 131 + description: 132 + Enable the internal pull-down resistor on the CS/ADDR pin. 133 + 134 + required: 135 + - compatible 136 + - reg 137 + - AVDD2-supply 138 + - CPVDD-supply 139 + - SPKVDD1-supply 140 + - SPKVDD2-supply 141 + 142 + allOf: 143 + - $ref: dai-common.yaml# 144 + - if: 145 + properties: 146 + compatible: 147 + enum: 148 + - wlf,wm1811 149 + - wlf,wm8958 150 + then: 151 + properties: 152 + DBVDD-supply: false 153 + LDO2VDD-supply: false 154 + required: 155 + - DBVDD1-supply 156 + - DBVDD2-supply 157 + - DBVDD3-supply 158 + else: 159 + properties: 160 + DBVDD1-supply: false 161 + DBVDD2-supply: false 162 + DBVDD3-supply: false 163 + required: 164 + - DBVDD-supply 165 + 166 + unevaluatedProperties: false 167 + 168 + examples: 169 + - | 170 + #include <dt-bindings/gpio/gpio.h> 171 + 172 + i2c { 173 + #address-cells = <1>; 174 + #size-cells = <0>; 175 + 176 + audio-codec@1a { 177 + compatible = "wlf,wm1811"; 178 + reg = <0x1a>; 179 + clocks = <&i2s0 0>; 180 + clock-names = "MCLK1"; 181 + 182 + AVDD2-supply = <&main_dc_reg>; 183 + CPVDD-supply = <&main_dc_reg>; 184 + DBVDD1-supply = <&main_dc_reg>; 185 + DBVDD2-supply = <&main_dc_reg>; 186 + DBVDD3-supply = <&main_dc_reg>; 187 + LDO1VDD-supply = <&main_dc_reg>; 188 + SPKVDD1-supply = <&main_dc_reg>; 189 + SPKVDD2-supply = <&main_dc_reg>; 190 + 191 + wlf,ldo1ena-gpios = <&gpb0 0 GPIO_ACTIVE_HIGH>; 192 + wlf,ldo2ena-gpios = <&gpb0 1 GPIO_ACTIVE_HIGH>; 193 + }; 194 + };
-112
Documentation/devicetree/bindings/sound/wm8994.txt
··· 1 - WM1811/WM8994/WM8958 audio CODEC 2 - 3 - These devices support both I2C and SPI (configured with pin strapping 4 - on the board). 5 - 6 - Required properties: 7 - 8 - - compatible : One of "wlf,wm1811", "wlf,wm8994" or "wlf,wm8958". 9 - 10 - - reg : the I2C address of the device for I2C, the chip select 11 - number for SPI. 12 - 13 - - gpio-controller : Indicates this device is a GPIO controller. 14 - - #gpio-cells : Must be 2. The first cell is the pin number and the 15 - second cell is used to specify optional parameters (currently unused). 16 - 17 - - power supplies for the device, as covered in 18 - Documentation/devicetree/bindings/regulator/regulator.txt, depending 19 - on compatible: 20 - - for wlf,wm1811 and wlf,wm8958: 21 - AVDD1-supply, AVDD2-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply, 22 - DCVDD-supply, CPVDD-supply, SPKVDD1-supply, SPKVDD2-supply 23 - - for wlf,wm8994: 24 - AVDD1-supply, AVDD2-supply, DBVDD-supply, DCVDD-supply, CPVDD-supply, 25 - SPKVDD1-supply, SPKVDD2-supply 26 - 27 - Optional properties: 28 - 29 - - interrupts : The interrupt line the IRQ signal for the device is 30 - connected to. This is optional, if it is not connected then none 31 - of the interrupt related properties should be specified. 32 - - interrupt-controller : These devices contain interrupt controllers 33 - and may provide interrupt services to other devices if they have an 34 - interrupt line connected. 35 - - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. 36 - The first cell is the IRQ number. 37 - The second cell is the flags, encoded as the trigger masks from 38 - Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 39 - 40 - - clocks : A list of up to two phandle and clock specifier pairs 41 - - clock-names : A list of clock names sorted in the same order as clocks. 42 - Valid clock names are "MCLK1" and "MCLK2". 43 - 44 - - wlf,gpio-cfg : A list of GPIO configuration register values. If absent, 45 - no configuration of these registers is performed. If any value is 46 - over 0xffff then the register will be left as default. If present 11 47 - values must be supplied. 48 - 49 - - wlf,micbias-cfg : Two MICBIAS register values for WM1811 or 50 - WM8958. If absent the register defaults will be used. 51 - 52 - - wlf,ldo1ena : GPIO specifier for control of LDO1ENA input to device. 53 - - wlf,ldo2ena : GPIO specifier for control of LDO2ENA input to device. 54 - 55 - - wlf,lineout1-se : If present LINEOUT1 is in single ended mode. 56 - - wlf,lineout2-se : If present LINEOUT2 is in single ended mode. 57 - 58 - - wlf,lineout1-feedback : If present LINEOUT1 has common mode feedback 59 - connected. 60 - - wlf,lineout2-feedback : If present LINEOUT2 has common mode feedback 61 - connected. 62 - 63 - - wlf,ldoena-always-driven : If present LDOENA is always driven. 64 - 65 - - wlf,spkmode-pu : If present enable the internal pull-up resistor on 66 - the SPKMODE pin. 67 - 68 - - wlf,csnaddr-pd : If present enable the internal pull-down resistor on 69 - the CS/ADDR pin. 70 - 71 - Pins on the device (for linking into audio routes): 72 - 73 - * IN1LN 74 - * IN1LP 75 - * IN2LN 76 - * IN2LP:VXRN 77 - * IN1RN 78 - * IN1RP 79 - * IN2RN 80 - * IN2RP:VXRP 81 - * SPKOUTLP 82 - * SPKOUTLN 83 - * SPKOUTRP 84 - * SPKOUTRN 85 - * HPOUT1L 86 - * HPOUT1R 87 - * HPOUT2P 88 - * HPOUT2N 89 - * LINEOUT1P 90 - * LINEOUT1N 91 - * LINEOUT2P 92 - * LINEOUT2N 93 - 94 - Example: 95 - 96 - wm8994: codec@1a { 97 - compatible = "wlf,wm8994"; 98 - reg = <0x1a>; 99 - 100 - gpio-controller; 101 - #gpio-cells = <2>; 102 - 103 - lineout1-se; 104 - 105 - AVDD1-supply = <&regulator>; 106 - AVDD2-supply = <&regulator>; 107 - CPVDD-supply = <&regulator>; 108 - DBVDD-supply = <&regulator>; 109 - DCVDD-supply = <&regulator>; 110 - SPKVDD1-supply = <&regulator>; 111 - SPKVDD2-supply = <&regulator>; 112 - };