diff mbox series

[v1,1/2] ASoC: qcom: dt-bindings: Modify sc7180 machine bindings

Message ID 20200928063744.525700-2-ajye_huang@compal.corp-partner.google.com
State New
Headers show
Series Modify documentation and machine driver for SC7180 sound card | expand

Commit Message

Ajye Huang Sept. 28, 2020, 6:37 a.m. UTC
Add compatible "qcom,sc7180-sndcard-rt5682-m98357-2mic"
for 2mic case.

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
---
This patch depends on this patch series
https://patchwork.kernel.org/patch/11773221/ .

 .../bindings/sound/qcom,sc7180.yaml           | 64 ++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

Comments

Rob Herring Sept. 29, 2020, 7:41 p.m. UTC | #1
On Mon, 28 Sep 2020 14:37:43 +0800, Ajye Huang wrote:
> Add compatible "qcom,sc7180-sndcard-rt5682-m98357-2mic"

> for 2mic case.

> 

> Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>

> ---

> This patch depends on this patch series

> https://patchwork.kernel.org/patch/11773221/ .

> 

>  .../bindings/sound/qcom,sc7180.yaml           | 64 ++++++++++++++++++-

>  1 file changed, 63 insertions(+), 1 deletion(-)

> 


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

Patch

diff --git a/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml
index b77311bb5190..ec84dbfc1bc9 100644
--- a/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,sc7180.yaml
@@ -15,7 +15,9 @@  description:
 
 properties:
   compatible:
-    const: qcom,sc7180-sndcard-rt5682-m98357-1mic
+    enum:
+      - qcom,sc7180-sndcard-rt5682-m98357-1mic
+      - qcom,sc7180-sndcard-rt5682-m98357-2mic
 
   audio-routing:
     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
@@ -34,6 +36,11 @@  properties:
   "#size-cells":
     const: 0
 
+  dmic-gpios:
+    description:
+      GPIO for switching between DMICs, it is required when
+      compatible is "qcom,sc7180-sndcard-rt5682-m98357-2mic".
+
 patternProperties:
   "^dai-link(@[0-9])?$":
     description:
@@ -81,6 +88,7 @@  additionalProperties: false
 examples:
 
   - |
+    //Example 1
     sound {
         compatible = "qcom,sc7180-sndcard-rt5682-m98357-1mic";
         model = "sc7180-snd-card";
@@ -128,3 +136,57 @@  examples:
             };
         };
     };
+
+  - |
+    //Example 2 (2mic case)
+    sound {
+        compatible = "qcom,sc7180-sndcard-rt5682-m98357-2mic";
+        model = "sc7180-snd-card";
+
+        audio-routing =
+                    "Headphone Jack", "HPOL",
+                    "Headphone Jack", "HPOR";
+
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dmic-gpios = <&tlmm 86 0>;
+
+        dai-link@0 {
+            link-name = "MultiMedia0";
+            reg = <0>;
+            cpu {
+                sound-dai = <&lpass_cpu 0>;
+            };
+
+            codec {
+                sound-dai = <&alc5682 0>;
+            };
+        };
+
+        dai-link@1 {
+            link-name = "MultiMedia1";
+            reg = <1>;
+            cpu {
+                sound-dai = <&lpass_cpu 1>;
+            };
+
+            codec {
+                sound-dai = <&max98357a>;
+            };
+        };
+
+        dai-link@2 {
+            link-name = "MultiMedia2";
+            reg = <2>;
+            cpu {
+                sound-dai = <&lpass_hdmi 0>;
+            };
+
+            codec {
+                sound-dai = <&msm_dp>;
+            };
+        };
+    };
+
+...