linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common
@ 2023-02-20  9:56 Krzysztof Kozlowski
  2023-02-20  9:56 ` [PATCH 2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-20  9:56 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, alsa-devel, linux-arm-msm,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Reference common DAI properties to get sound-dai-cells description and
allow name-prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
index ea09590bfa30..ae8346b9d332 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
@@ -151,6 +151,7 @@ required:
   - reg
 
 allOf:
+  - $ref: dai-common.yaml#
   - if:
       required:
         - slim-ifc-dev
-- 
2.34.1


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

* [PATCH 2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema
  2023-02-20  9:56 [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Krzysztof Kozlowski
@ 2023-02-20  9:56 ` Krzysztof Kozlowski
  2023-02-21 15:44   ` Rob Herring
  2023-02-21 15:43 ` [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Rob Herring
  2023-03-06 13:32 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-20  9:56 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, alsa-devel, linux-arm-msm,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

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>

---

Few DTS boards have incomplete WCD9335 node causing dtbs_check warnings.
These are fixed here:
https://lore.kernel.org/linux-arm-msm/42f7d53b-a922-760a-4be2-7498ea0d560a@linaro.org/T/#t
---
 .../bindings/sound/qcom,wcd9335.txt           | 123 --------------
 .../bindings/sound/qcom,wcd9335.yaml          | 156 ++++++++++++++++++
 2 files changed, 156 insertions(+), 123 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9335.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9335.yaml

diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt b/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt
deleted file mode 100644
index 1f75feec3dec..000000000000
--- a/Documentation/devicetree/bindings/sound/qcom,wcd9335.txt
+++ /dev/null
@@ -1,123 +0,0 @@
-QCOM WCD9335 Codec
-
-Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC, supports
-Qualcomm Technologies, Inc. (QTI) multimedia solutions, including
-the MSM8996, MSM8976, and MSM8956 chipsets. It has in-built
-Soundwire controller, interrupt mux. It supports both I2S/I2C and
-SLIMbus audio interfaces.
-
-Required properties with SLIMbus Interface:
-
-- compatible:
-	Usage: required
-	Value type: <stringlist>
-	Definition: For SLIMbus interface it should be "slimMID,PID",
-		    textual representation of Manufacturer ID, Product Code,
-		    shall be in lower case hexadecimal with leading zeroes
-		    suppressed.  Refer to slimbus/bus.txt for details.
-		    Should be:
-		    "slim217,1a0" for MSM8996 and APQ8096 SoCs with SLIMbus.
-
-- reg
-	Usage: required
-	Value type: <u32 u32>
-	Definition: Should be ('Device index', 'Instance ID')
-
-- interrupts
-	Usage: required
-	Value type: <prop-encoded-array>
-	Definition: Interrupts via WCD INTR1 and INTR2 pins
-
-- interrupt-names:
-	Usage: required
-	Value type: <String array>
-	Definition: Interrupt names of WCD INTR1 and INTR2
-	Should be: "intr1", "intr2"
-
-- reset-gpios:
-	Usage: required
-	Value type: <String Array>
-	Definition: Reset gpio line
-
-- slim-ifc-dev:
-	Usage: required
-	Value type: <phandle>
-	Definition: SLIM interface device
-
-- clocks:
-	Usage: required
-	Value type: <prop-encoded-array>
-	Definition: See clock-bindings.txt section "consumers". List of
-                three clock specifiers for mclk, mclk2 and slimbus clock.
-
-- clock-names:
-	Usage: required
-	Value type: <string>
-	Definition: Must contain "mclk", "mclk2" and "slimbus" strings.
-
-- vdd-buck-supply:
-	Usage: required
-	Value type: <phandle>
-	Definition: Should contain a reference to the 1.8V buck supply
-
-- vdd-buck-sido-supply:
-	Usage: required
-	Value type: <phandle>
-	Definition: Should contain a reference to the 1.8V SIDO buck supply
-
-- vdd-rx-supply:
-	Usage: required
-	Value type: <phandle>
-	Definition: Should contain a reference to the 1.8V rx supply
-
-- vdd-tx-supply:
-	Usage: required
-	Value type: <phandle>
-	Definition: Should contain a reference to the 1.8V tx supply
-
-- vdd-vbat-supply:
-	Usage: Optional
-	Value type: <phandle>
-	Definition: Should contain a reference to the vbat supply
-
-- vdd-micbias-supply:
-	Usage: required
-	Value type: <phandle>
-	Definition: Should contain a reference to the micbias supply
-
-- vdd-io-supply:
-	Usage: required
-	Value type: <phandle>
-	Definition: Should contain a reference to the 1.8V io supply
-
-- interrupt-controller:
-	Usage: required
-	Definition: Indicating that this is a interrupt controller
-
-- #interrupt-cells:
-	Usage: required
-	Value type: <int>
-	Definition: should be 1
-
-#sound-dai-cells
-	Usage: required
-	Value type: <u32>
-	Definition: Must be 1
-
-audio-codec@1{
-	compatible = "slim217,1a0";
-	reg  = <1 0>;
-	interrupts = <&msmgpio 54 IRQ_TYPE_LEVEL_HIGH>;
-	interrupt-names = "intr2"
-	reset-gpios = <&msmgpio 64 GPIO_ACTIVE_LOW>;
-	slim-ifc-dev  = <&wc9335_ifd>;
-	clock-names = "mclk", "native";
-	clocks = <&rpmcc RPM_SMD_DIV_CLK1>,
-		 <&rpmcc RPM_SMD_BB_CLK1>;
-	vdd-buck-supply = <&pm8994_s4>;
-	vdd-rx-supply = <&pm8994_s4>;
-	vdd-buck-sido-supply = <&pm8994_s4>;
-	vdd-tx-supply = <&pm8994_s4>;
-	vdd-io-supply = <&pm8994_s4>;
-	#sound-dai-cells = <1>;
-}
diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd9335.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd9335.yaml
new file mode 100644
index 000000000000..34f8fe4da9d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qcom,wcd9335.yaml
@@ -0,0 +1,156 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/qcom,wcd9335.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm WCD9335 Audio Codec
+
+maintainers:
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description:
+  Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC with in-built
+  Soundwire controller and interrupt mux. It supports both I2S/I2C and SLIMbus
+  audio interfaces.
+
+properties:
+  compatible:
+    const: slim217,1a0
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: mclk
+      - const: slimbus
+
+  interrupts:
+    maxItems: 2
+
+  interrupt-names:
+    items:
+      - const: intr1
+      - const: intr2
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  slim-ifc-dev:
+    description: SLIM IFC device interface
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  '#sound-dai-cells':
+    const: 1
+
+  vdd-buck-supply:
+    description: 1.8V buck supply
+
+  vdd-buck-sido-supply:
+    description: 1.8V SIDO buck supply
+
+  vdd-io-supply:
+    description: 1.8V I/O supply
+
+  vdd-micbias-supply:
+    description: micbias supply
+
+  vdd-rx-supply:
+    description: 1.8V rx supply
+
+  vdd-tx-supply:
+    description: 1.8V tx supply
+
+  vdd-vbat-supply:
+    description: vbat supply
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - $ref: dai-common.yaml#
+  - if:
+      required:
+        - slim-ifc-dev
+    then:
+      required:
+        - clocks
+        - clock-names
+        - interrupts
+        - interrupt-names
+        - interrupt-controller
+        - '#interrupt-cells'
+        - reset-gpios
+        - slim-ifc-dev
+        - '#sound-dai-cells'
+        - vdd-buck-supply
+        - vdd-buck-sido-supply
+        - vdd-io-supply
+        - vdd-rx-supply
+        - vdd-tx-supply
+    else:
+      properties:
+        clocks: false
+        clock-names: false
+        interrupts: false
+        interrupt-names: false
+        interrupt-controller: false
+        '#interrupt-cells': false
+        reset-gpios: false
+        slim-ifc-dev: false
+        '#sound-dai-cells': false
+        vdd-buck-supply: false
+        vdd-buck-sido-supply: false
+        vdd-io-supply: false
+        vdd-micbias-supply: false
+        vdd-rx-supply: false
+        vdd-tx-supply: false
+        vdd-vbat-supply: false
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmcc.h>
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    tasha_ifd: codec@0,0 {
+        compatible = "slim217,1a0";
+        reg = <0 0>;
+    };
+
+    codec@1,0 {
+        compatible = "slim217,1a0";
+        reg = <1 0>;
+
+        clock-names = "mclk", "slimbus";
+        clocks = <&div1_mclk>, <&rpmcc RPM_SMD_BB_CLK1>;
+
+        interrupt-parent = <&tlmm>;
+        interrupts = <54 IRQ_TYPE_LEVEL_HIGH>,
+                     <53 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-names = "intr1", "intr2";
+        interrupt-controller;
+        #interrupt-cells = <1>;
+
+        reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
+        slim-ifc-dev = <&tasha_ifd>;
+        #sound-dai-cells = <1>;
+
+        vdd-buck-supply = <&vreg_s4a_1p8>;
+        vdd-buck-sido-supply = <&vreg_s4a_1p8>;
+        vdd-tx-supply = <&vreg_s4a_1p8>;
+        vdd-rx-supply = <&vreg_s4a_1p8>;
+        vdd-io-supply = <&vreg_s4a_1p8>;
+    };
-- 
2.34.1


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

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common
  2023-02-20  9:56 [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Krzysztof Kozlowski
  2023-02-20  9:56 ` [PATCH 2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema Krzysztof Kozlowski
@ 2023-02-21 15:43 ` Rob Herring
  2023-03-06 13:32 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2023-02-21 15:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Krzysztof Kozlowski, devicetree, Andy Gross, Mark Brown,
	Konrad Dybcio, Rob Herring, linux-kernel, Banajit Goswami,
	Bjorn Andersson, Srinivas Kandagatla, linux-arm-msm,
	Liam Girdwood, alsa-devel


On Mon, 20 Feb 2023 10:56:42 +0100, Krzysztof Kozlowski wrote:
> Reference common DAI properties to get sound-dai-cells description and
> allow name-prefix.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH 2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema
  2023-02-20  9:56 ` [PATCH 2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema Krzysztof Kozlowski
@ 2023-02-21 15:44   ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2023-02-21 15:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: devicetree, Konrad Dybcio, Banajit Goswami, linux-arm-msm,
	linux-kernel, Krzysztof Kozlowski, Liam Girdwood,
	Srinivas Kandagatla, Andy Gross, Rob Herring, Mark Brown,
	alsa-devel, Bjorn Andersson


On Mon, 20 Feb 2023 10:56:43 +0100, Krzysztof Kozlowski wrote:
> 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>
> 
> ---
> 
> Few DTS boards have incomplete WCD9335 node causing dtbs_check warnings.
> These are fixed here:
> https://lore.kernel.org/linux-arm-msm/42f7d53b-a922-760a-4be2-7498ea0d560a@linaro.org/T/#t
> ---
>  .../bindings/sound/qcom,wcd9335.txt           | 123 --------------
>  .../bindings/sound/qcom,wcd9335.yaml          | 156 ++++++++++++++++++
>  2 files changed, 156 insertions(+), 123 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9335.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9335.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common
  2023-02-20  9:56 [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Krzysztof Kozlowski
  2023-02-20  9:56 ` [PATCH 2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema Krzysztof Kozlowski
  2023-02-21 15:43 ` [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Rob Herring
@ 2023-03-06 13:32 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-03-06 13:32 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Rob Herring,
	Krzysztof Kozlowski, alsa-devel, linux-arm-msm, devicetree,
	linux-kernel, Krzysztof Kozlowski

On Mon, 20 Feb 2023 10:56:42 +0100, Krzysztof Kozlowski wrote:
> Reference common DAI properties to get sound-dai-cells description and
> allow name-prefix.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common
      commit: 0106ba2476e1cce06da738a2076a98428a7da2a2
[2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema
      commit: 631b8a8bb448e90764b8d4b6c0f8cdcc97b1e3e4

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2023-03-06 13:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  9:56 [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Krzysztof Kozlowski
2023-02-20  9:56 ` [PATCH 2/2] ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema Krzysztof Kozlowski
2023-02-21 15:44   ` Rob Herring
2023-02-21 15:43 ` [PATCH 1/2] ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Rob Herring
2023-03-06 13:32 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).