All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
@ 2023-02-08 17:25 Krzysztof Kozlowski
  2023-02-08 17:39 ` Mark Brown
  2023-02-08 18:46 ` Rob Herring
  0 siblings, 2 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-08 17:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski, -,
	alsa-devel, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

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

Changes against original binding:
1. Add missing LDO1VDD-supply for WM1811.
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 grounded.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/sound/wlf,wm8994.yaml | 203 ++++++++++++++++++
 .../devicetree/bindings/sound/wm8994.txt      | 112 ----------
 2 files changed, 203 insertions(+), 112 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8994.yaml
 delete mode 100644 Documentation/devicetree/bindings/sound/wm8994.txt

diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8994.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8994.yaml
new file mode 100644
index 000000000000..24eabca7c173
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wlf,wm8994.yaml
@@ -0,0 +1,203 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/wlf,wm8994.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Wolfson WM1811/WM8994/WM8958 audio codecs
+
+maintainers:
+  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+  - patches@opensource.cirrus.com
+
+description: |
+  These devices support both I2C and SPI (configured with pin strapping on the
+  board).
+
+  Pins on the device (for linking into audio routes):
+  IN1LN, IN1LP, IN2LN, IN2LP:VXRN, IN1RN, IN1RP, IN2RN, IN2RP:VXRP, SPKOUTLP,
+  SPKOUTLN, SPKOUTRP, SPKOUTRN, HPOUT1L, HPOUT1R, HPOUT2P, HPOUT2N, LINEOUT1P,
+  LINEOUT1N, LINEOUT2P, LINEOUT2N.
+
+properties:
+  compatible:
+    enum:
+      - wlf,wm1811
+      - wlf,wm8994
+      - wlf,wm8958
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: MCLK1
+      - const: MCLK2
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
+    description:
+      The first cell is the IRQ number. The second cell is the flags, encoded
+      as the trigger masks.
+
+  AVDD1-supply: true
+  AVDD2-supply: true
+  CPVDD-supply: true
+  DBVDD-supply: true
+  DBVDD1-supply: true
+  DBVDD2-supply: true
+  DBVDD3-supply: true
+  DCVDD-supply: true
+  LDO1VDD-supply: true
+  SPKVDD1-supply: true
+  SPKVDD2-supply: true
+
+  '#sound-dai-cells':
+    const: 0
+
+  wlf,gpio-cfg:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    maxItems: 11
+    description:
+      A list of GPIO configuration register values. If absent, no configuration
+      of these registers is performed. If any value is over 0xffff then the
+      register will be left as default. If present 11 values must be supplied.
+
+  wlf,micbias-cfg:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    maxItems: 2
+    description:
+      Two MICBIAS register values for WM1811 or WM8958.  If absent the register
+      defaults will be used.
+
+  wlf,ldo1ena-gpios:
+    maxItems: 1
+    description:
+      Control of LDO1ENA input to device.
+
+  wlf,ldo2ena-gpios:
+    maxItems: 1
+    description:
+      Control of LDO2ENA input to device.
+
+  wlf,lineout1-se:
+    type: boolean
+    description:
+      LINEOUT1 is in single ended mode.
+
+  wlf,lineout2-se:
+    type: boolean
+    description:
+      INEOUT2 is in single ended mode.
+
+  wlf,lineout1-feedback:
+    type: boolean
+    description:
+      LINEOUT1 has common mode feedback connected.
+
+  wlf,lineout2-feedback:
+    type: boolean
+    description:
+      LINEOUT2 has common mode feedback connected.
+
+  wlf,ldoena-always-driven:
+    type: boolean
+    description:
+      LDOENA is always driven.
+
+  wlf,spkmode-pu:
+    type: boolean
+    description:
+      Enable the internal pull-up resistor on the SPKMODE pin.
+
+  wlf,csnaddr-pd:
+    type: boolean
+    description:
+      Enable the internal pull-down resistor on the CS/ADDR pin.
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - $ref: dai-common.yaml#
+  - if:
+      properties:
+        compatible:
+          enum:
+            - wlf,wm1811
+            - wlf,wm8958
+    then:
+      properties:
+        DBVDD-supply: false
+      required:
+        - CPVDD-supply
+        - DBVDD1-supply
+        - DBVDD2-supply
+        - DBVDD3-supply
+        - SPKVDD1-supply
+        - SPKVDD2-supply
+      anyOf:
+        - required:
+            - AVDD1-supply
+        - required:
+            - AVDD2-supply
+    else:
+      properties:
+        DBVDD1-supply: false
+        DBVDD2-supply: false
+        DBVDD3-supply: false
+      required:
+        - AVDD1-supply
+        - AVDD2-supply
+        - CPVDD-supply
+        - DBVDD-supply
+        - DCVDD-supply
+        - SPKVDD1-supply
+        - SPKVDD2-supply
+
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        audio-codec@1a {
+            compatible = "wlf,wm1811";
+            reg = <0x1a>;
+            clocks = <&i2s0 0>;
+            clock-names = "MCLK1";
+
+            AVDD2-supply = <&main_dc_reg>;
+            CPVDD-supply = <&main_dc_reg>;
+            DBVDD1-supply = <&main_dc_reg>;
+            DBVDD2-supply = <&main_dc_reg>;
+            DBVDD3-supply = <&main_dc_reg>;
+            LDO1VDD-supply = <&main_dc_reg>;
+            SPKVDD1-supply = <&main_dc_reg>;
+            SPKVDD2-supply = <&main_dc_reg>;
+
+            wlf,ldo1ena-gpios = <&gpb0 0 GPIO_ACTIVE_HIGH>;
+            wlf,ldo2ena-gpios = <&gpb0 1 GPIO_ACTIVE_HIGH>;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/sound/wm8994.txt b/Documentation/devicetree/bindings/sound/wm8994.txt
deleted file mode 100644
index 8fa947509c10..000000000000
--- a/Documentation/devicetree/bindings/sound/wm8994.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-WM1811/WM8994/WM8958 audio CODEC
-
-These devices support both I2C and SPI (configured with pin strapping
-on the board).
-
-Required properties:
-
-  - compatible : One of "wlf,wm1811", "wlf,wm8994" or "wlf,wm8958".
-
-  - reg : the I2C address of the device for I2C, the chip select
-          number for SPI.
-
-  - gpio-controller : Indicates this device is a GPIO controller.
-  - #gpio-cells : Must be 2. The first cell is the pin number and the
-    second cell is used to specify optional parameters (currently unused).
-
-  - power supplies for the device, as covered in
-    Documentation/devicetree/bindings/regulator/regulator.txt, depending
-    on compatible:
-    - for wlf,wm1811 and wlf,wm8958:
-      AVDD1-supply, AVDD2-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply,
-      DCVDD-supply, CPVDD-supply, SPKVDD1-supply, SPKVDD2-supply
-    - for wlf,wm8994:
-      AVDD1-supply, AVDD2-supply, DBVDD-supply, DCVDD-supply, CPVDD-supply,
-      SPKVDD1-supply, SPKVDD2-supply
-
-Optional properties:
-
-  - interrupts : The interrupt line the IRQ signal for the device is
-    connected to.  This is optional, if it is not connected then none
-    of the interrupt related properties should be specified.
-  - interrupt-controller : These devices contain interrupt controllers
-    and may provide interrupt services to other devices if they have an
-    interrupt line connected.
-  - #interrupt-cells: the number of cells to describe an IRQ, this should be 2.
-    The first cell is the IRQ number.
-    The second cell is the flags, encoded as the trigger masks from
-    Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
-
-  - clocks : A list of up to two phandle and clock specifier pairs
-  - clock-names : A list of clock names sorted in the same order as clocks.
-                  Valid clock names are "MCLK1" and "MCLK2".
-
-  - wlf,gpio-cfg : A list of GPIO configuration register values. If absent,
-    no configuration of these registers is performed. If any value is
-    over 0xffff then the register will be left as default. If present 11
-    values must be supplied.
-
-  - wlf,micbias-cfg : Two MICBIAS register values for WM1811 or
-    WM8958.  If absent the register defaults will be used.
-
-  - wlf,ldo1ena : GPIO specifier for control of LDO1ENA input to device.
-  - wlf,ldo2ena : GPIO specifier for control of LDO2ENA input to device.
-
-  - wlf,lineout1-se : If present LINEOUT1 is in single ended mode.
-  - wlf,lineout2-se : If present LINEOUT2 is in single ended mode.
-
-  - wlf,lineout1-feedback : If present LINEOUT1 has common mode feedback
-    connected.
-  - wlf,lineout2-feedback : If present LINEOUT2 has common mode feedback
-    connected.
-
-  - wlf,ldoena-always-driven : If present LDOENA is always driven.
-
-  - wlf,spkmode-pu : If present enable the internal pull-up resistor on
-    the SPKMODE pin.
-
-  - wlf,csnaddr-pd : If present enable the internal pull-down resistor on
-    the CS/ADDR pin.
-
-Pins on the device (for linking into audio routes):
-
-  * IN1LN
-  * IN1LP
-  * IN2LN
-  * IN2LP:VXRN
-  * IN1RN
-  * IN1RP
-  * IN2RN
-  * IN2RP:VXRP
-  * SPKOUTLP
-  * SPKOUTLN
-  * SPKOUTRP
-  * SPKOUTRN
-  * HPOUT1L
-  * HPOUT1R
-  * HPOUT2P
-  * HPOUT2N
-  * LINEOUT1P
-  * LINEOUT1N
-  * LINEOUT2P
-  * LINEOUT2N
-
-Example:
-
-wm8994: codec@1a {
-	compatible = "wlf,wm8994";
-	reg = <0x1a>;
-
-	gpio-controller;
-	#gpio-cells = <2>;
-
-	lineout1-se;
-
-	AVDD1-supply = <&regulator>;
-	AVDD2-supply = <&regulator>;
-	CPVDD-supply = <&regulator>;
-	DBVDD-supply = <&regulator>;
-	DCVDD-supply = <&regulator>;
-	SPKVDD1-supply = <&regulator>;
-	SPKVDD2-supply = <&regulator>;
-};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 17:25 [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema Krzysztof Kozlowski
@ 2023-02-08 17:39 ` Mark Brown
  2023-02-08 17:50   ` Krzysztof Kozlowski
  2023-02-08 17:57   ` Krzysztof Kozlowski
  2023-02-08 18:46 ` Rob Herring
  1 sibling, 2 replies; 9+ messages in thread
From: Mark Brown @ 2023-02-08 17:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, -,
	alsa-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

On Wed, Feb 08, 2023 at 06:25:52PM +0100, Krzysztof Kozlowski wrote:
> Convert the Wolfson WM1811/WM8994/WM8958 audio codecs bindings to DT
> schema.

> Changes against original binding:
> 1. Add missing LDO1VDD-supply for WM1811.

Both LDOs are present on all variants.

> 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 grounded.

Are you *sure* they are grounded and not supplied from the LDOs?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 17:39 ` Mark Brown
@ 2023-02-08 17:50   ` Krzysztof Kozlowski
  2023-02-08 18:09     ` Mark Brown
  2023-02-08 17:57   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-08 17:50 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, -,
	alsa-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

On 08/02/2023 18:39, Mark Brown wrote:
> On Wed, Feb 08, 2023 at 06:25:52PM +0100, Krzysztof Kozlowski wrote:
>> Convert the Wolfson WM1811/WM8994/WM8958 audio codecs bindings to DT
>> schema.
> 
>> Changes against original binding:
>> 1. Add missing LDO1VDD-supply for WM1811.
> 
> Both LDOs are present on all variants.

The schematics for Arndale with WM1811 and WM1811 datasheet I found in
internet say there is only LDO1VDD pin, thus "both" does not look
correct at least for wm1811.

But if you meant that this should be for WM8994 as well, then sure, I
can change it.

> 
>> 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 grounded.
> 
> Are you *sure* they are grounded and not supplied from the LDOs?

That's what I have on schematics (attached), if I got it right.

Best regards,
Krzysztof

[-- Attachment #2: Schematics_Arndale_Audio_WM1811A-A.pdf --]
[-- Type: application/pdf, Size: 43386 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 17:39 ` Mark Brown
  2023-02-08 17:50   ` Krzysztof Kozlowski
@ 2023-02-08 17:57   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-08 17:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, -,
	alsa-devel, devicetree, linux-kernel

On 08/02/2023 18:39, Mark Brown wrote:
> On Wed, Feb 08, 2023 at 06:25:52PM +0100, Krzysztof Kozlowski wrote:
>> Convert the Wolfson WM1811/WM8994/WM8958 audio codecs bindings to DT
>> schema.
> 
>> Changes against original binding:
>> 1. Add missing LDO1VDD-supply for WM1811.
> 
> Both LDOs are present on all variants.

I see LDO2VDD on WM8994 but not on WM1811 and WM8958.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 17:50   ` Krzysztof Kozlowski
@ 2023-02-08 18:09     ` Mark Brown
  2023-02-08 19:37       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2023-02-08 18:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, -,
	alsa-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]

On Wed, Feb 08, 2023 at 06:50:56PM +0100, Krzysztof Kozlowski wrote:
> On 08/02/2023 18:39, Mark Brown wrote:
> > On Wed, Feb 08, 2023 at 06:25:52PM +0100, Krzysztof Kozlowski wrote:

> >> 1. Add missing LDO1VDD-supply for WM1811.

> > Both LDOs are present on all variants.

> The schematics for Arndale with WM1811 and WM1811 datasheet I found in
> internet say there is only LDO1VDD pin, thus "both" does not look
> correct at least for wm1811.

> But if you meant that this should be for WM8994 as well, then sure, I
> can change it.

Ah, now I think about it IIRC LDO2 uses one of the other digital input
supplies rather than a distinct supply so there's nothing for the DT.

> >> 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 grounded.

> > Are you *sure* they are grounded and not supplied from the LDOs?

> That's what I have on schematics (attached), if I got it right.

You'll notice that they've got decoupling caps on rather than being
grounded - there's an internal connection to the LDO output so if the
LDOs are in use that's all that's required, while if the LDOs are not in
use for some reason then an external supply is connected there.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 17:25 [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema Krzysztof Kozlowski
  2023-02-08 17:39 ` Mark Brown
@ 2023-02-08 18:46 ` Rob Herring
  2023-02-08 19:38   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring @ 2023-02-08 18:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, linux-kernel, Mark Brown, alsa-devel,
	Krzysztof Kozlowski, Liam Girdwood, -,
	devicetree


On Wed, 08 Feb 2023 18:25:52 +0100, Krzysztof Kozlowski wrote:
> Convert the Wolfson WM1811/WM8994/WM8958 audio codecs bindings to DT
> schema.
> 
> Changes against original binding:
> 1. Add missing LDO1VDD-supply for WM1811.
> 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 grounded.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/sound/wlf,wm8994.yaml | 203 ++++++++++++++++++
>  .../devicetree/bindings/sound/wm8994.txt      | 112 ----------
>  2 files changed, 203 insertions(+), 112 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8994.yaml
>  delete mode 100644 Documentation/devicetree/bindings/sound/wm8994.txt
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230208172552.404324-1-krzysztof.kozlowski@linaro.org


audio-codec@1a: 'AVDD1-supply' is a required property
	arch/arm/boot/dts/exynos5250-smdk5250.dtb
	arch/arm/boot/dts/s5pv210-fascinate4g.dtb
	arch/arm/boot/dts/s5pv210-galaxys.dtb

audio-codec@1a: 'DCVDD-supply' is a required property
	arch/arm/boot/dts/exynos5250-smdk5250.dtb
	arch/arm/boot/dts/s5pv210-fascinate4g.dtb
	arch/arm/boot/dts/s5pv210-galaxys.dtb

audio-codec@1a: Unevaluated properties are not allowed ('wlf,ldo1ena', 'wlf,ldo2ena' were unexpected)
	arch/arm/boot/dts/exynos4412-i9300.dtb
	arch/arm/boot/dts/exynos4412-i9305.dtb
	arch/arm/boot/dts/exynos4412-n710x.dtb
	arch/arm/boot/dts/exynos4412-trats2.dtb
	arch/arm/boot/dts/exynos5250-arndale.dtb
	arch/arm/boot/dts/s5pv210-fascinate4g.dtb
	arch/arm/boot/dts/s5pv210-galaxys.dtb


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 18:09     ` Mark Brown
@ 2023-02-08 19:37       ` Krzysztof Kozlowski
  2023-02-08 19:58         ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-08 19:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, -,
	alsa-devel, devicetree, linux-kernel

On 08/02/2023 19:09, Mark Brown wrote:
> 
>>> Are you *sure* they are grounded and not supplied from the LDOs?
> 
>> That's what I have on schematics (attached), if I got it right.
> 
> You'll notice that they've got decoupling caps on rather than being
> grounded - there's an internal connection to the LDO output so if the
> LDOs are in use that's all that's required, while if the LDOs are not in
> use for some reason then an external supply is connected there.

Yes, indeed, not grounded. I'll rephrase the commit. I also found few
other differences needed:
1. AVDD2 should be always required,
2. LDO2VDD exists on WM8994.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 18:46 ` Rob Herring
@ 2023-02-08 19:38   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-08 19:38 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rob Herring, linux-kernel, Mark Brown, alsa-devel,
	Krzysztof Kozlowski, Liam Girdwood, -,
	devicetree

On 08/02/2023 19:46, Rob Herring wrote:
> 
> On Wed, 08 Feb 2023 18:25:52 +0100, Krzysztof Kozlowski wrote:
>> Convert the Wolfson WM1811/WM8994/WM8958 audio codecs bindings to DT
>> schema.
>>
>> Changes against original binding:
>> 1. Add missing LDO1VDD-supply for WM1811.
>> 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 grounded.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../devicetree/bindings/sound/wlf,wm8994.yaml | 203 ++++++++++++++++++
>>  .../devicetree/bindings/sound/wm8994.txt      | 112 ----------
>>  2 files changed, 203 insertions(+), 112 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8994.yaml
>>  delete mode 100644 Documentation/devicetree/bindings/sound/wm8994.txt
>>
> 
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
> 
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
> 
> Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230208172552.404324-1-krzysztof.kozlowski@linaro.org
> 
> 
> audio-codec@1a: 'AVDD1-supply' is a required property
> 	arch/arm/boot/dts/exynos5250-smdk5250.dtb
> 	arch/arm/boot/dts/s5pv210-fascinate4g.dtb
> 	arch/arm/boot/dts/s5pv210-galaxys.dtb
> 
> audio-codec@1a: 'DCVDD-supply' is a required property
> 	arch/arm/boot/dts/exynos5250-smdk5250.dtb
> 	arch/arm/boot/dts/s5pv210-fascinate4g.dtb
> 	arch/arm/boot/dts/s5pv210-galaxys.dtb

These two need corrections in the binding - next version of patch.

> 
> audio-codec@1a: Unevaluated properties are not allowed ('wlf,ldo1ena', 'wlf,ldo2ena' were unexpected)
> 	arch/arm/boot/dts/exynos4412-i9300.dtb

These are fixed here:
https://lore.kernel.org/linux-samsung-soc/20230208172634.404452-1-krzysztof.kozlowski@linaro.org/T/#t

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema
  2023-02-08 19:37       ` Krzysztof Kozlowski
@ 2023-02-08 19:58         ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2023-02-08 19:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, -,
	alsa-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On Wed, Feb 08, 2023 at 08:37:22PM +0100, Krzysztof Kozlowski wrote:
> On 08/02/2023 19:09, Mark Brown wrote:

> >>> Are you *sure* they are grounded and not supplied from the LDOs?

> >> That's what I have on schematics (attached), if I got it right.

> > You'll notice that they've got decoupling caps on rather than being
> > grounded - there's an internal connection to the LDO output so if the
> > LDOs are in use that's all that's required, while if the LDOs are not in
> > use for some reason then an external supply is connected there.

> Yes, indeed, not grounded. I'll rephrase the commit. I also found few

Strictly the supplies are mandatory, it's just that the code was written
such that the default configuration is that they'll be provided by the
internal LDOs, with the DT having carried that on.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-08 19:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 17:25 [PATCH] ASoC: dt-bindings: wlf,wm8994: Convert to dtschema Krzysztof Kozlowski
2023-02-08 17:39 ` Mark Brown
2023-02-08 17:50   ` Krzysztof Kozlowski
2023-02-08 18:09     ` Mark Brown
2023-02-08 19:37       ` Krzysztof Kozlowski
2023-02-08 19:58         ` Mark Brown
2023-02-08 17:57   ` Krzysztof Kozlowski
2023-02-08 18:46 ` Rob Herring
2023-02-08 19:38   ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.