diff mbox series

[4/4] dt-bindings: sound: Add documentation for KeemBay sound card and i2s

Message ID 1589166964-8985-5-git-send-email-jee.heng.sia@intel.com (mailing list archive)
State New, archived
Headers show
Series ASoC: Intel: Add KeemBay ASoC driver | expand

Commit Message

Sia Jee Heng May 11, 2020, 3:16 a.m. UTC
Document Intel KeemBay sound card and i2s DT bindings.

Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
---
 .../bindings/sound/intel,keembay-i2s.yaml          | 57 ++++++++++++++++++++++
 .../bindings/sound/intel,keembay-sound-card.yaml   | 30 ++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/intel,keembay-sound-card.yaml

Comments

Mark Brown May 11, 2020, 11:34 a.m. UTC | #1
On Mon, May 11, 2020 at 11:16:04AM +0800, Sia Jee Heng wrote:

> +description: |
> + Intel KeemBay I2S
> +
> +properties:
> +  compatible:
> +    enum:
> +      - snps,designware-i2s

If this is the DesignWare I2S controller we already have a driver for
that with existing DT bindings, anything that needs to be added should
be added to that.  We can't have multiple sets of bindings for the same
device.
Sia Jee Heng May 15, 2020, 8:38 a.m. UTC | #2
-----Original Message-----
From: Mark Brown <broonie@kernel.org> 
Sent: Monday, May 11, 2020 7:34 PM
To: Sia, Jee Heng <jee.heng.sia@intel.com>
Cc: alsa-devel@alsa-project.org; tiwai@suse.com; pierre-louis.bossart@linux.intel.com; liam.r.girdwood@linux.intel.com
Subject: Re: [PATCH 4/4] dt-bindings: sound: Add documentation for KeemBay sound card and i2s

On Mon, May 11, 2020 at 11:16:04AM +0800, Sia Jee Heng wrote:

> +description: |
> + Intel KeemBay I2S
> +
> +properties:
> +  compatible:
> +    enum:
> +      - snps,designware-i2s

If this is the DesignWare I2S controller we already have a driver for that with existing DT bindings, anything that needs to be added should be added to that.  We can't have multiple sets of bindings for the same device.
[>>] Sorry for the confusion, I meant intel,keembay-i2s. Shall submit the fix.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml b/Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml
new file mode 100644
index 0000000..737a16d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml
@@ -0,0 +1,57 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2020 Intel Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/intel,keembay-i2s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel KeemBay I2S Device Tree Bindings
+
+maintainers:
+  - Sia, Jee Heng <jee.heng.sia@intel.com>
+
+description: |
+ Intel KeemBay I2S
+
+properties:
+  compatible:
+    enum:
+      - snps,designware-i2s
+
+  reg:
+    items:
+      - description: Should contain registers location and length
+
+  reg-names:
+    items:
+      - const: i2s-regs
+      - const: i2s_gen_cfg
+      - const: i2s_gen_cfg_count
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Bus Clock
+      - description: Module Clock
+
+  clock-names:
+    items:
+      - const: osc
+      - const: apb_clk
+
+examples:
+  - |
+     #include <dt-bindings/interrupt-controller/arm-gic.h>
+     #include <dt-bindings/interrupt-controller/irq.h>
+     #define KEEM_BAY_PSS_AUX_I2S3
+     #define KEEM_BAY_PSS_I2S3
+     i2s@20140000 {
+         compatible = "snps,designware-i2s";
+         reg = <0x0 0x20140000 0x0 0x200 0x0 0x202a00a4 0x0 0x4 0x0 0x202a00c0 0x0 0x4>;
+         reg-names = "i2s-regs", "i2s_gen_cfg", "i2s_gen_cfg_count";
+         interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+         clock-names = "osc", "apb_clk";
+         clocks = <&scmi_clk KEEM_BAY_PSS_AUX_I2S3>, <&scmi_clk KEEM_BAY_PSS_I2S3>;
+     };
diff --git a/Documentation/devicetree/bindings/sound/intel,keembay-sound-card.yaml b/Documentation/devicetree/bindings/sound/intel,keembay-sound-card.yaml
new file mode 100644
index 0000000..cca413a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/intel,keembay-sound-card.yaml
@@ -0,0 +1,30 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2020 Intel Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/intel,keembay-sound-card.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel KeemBay Sound Card
+
+maintainers:
+  - Sia, Jee Heng <jee.heng.sia@intel.com>
+
+description: |
+ Intel KeemBay Sound Card DT Binding
+
+properties:
+  compatible:
+    enum:
+      - intel,kmb-snd-asoc
+
+  intel,pcm-audio:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: phandle of the i2s
+
+examples:
+ - |
+    sound {
+      compatible = "intel,kmb-snd-asoc";
+      intel,pcm-audio = <&i2s3>;
+    };