On 15/04/2021 17:29, Rob Herring wrote:
+    codec {
+        compatible = "qcom,wcd9380-codec";
+        reset-gpios = <&tlmm 32 0>;
+        #sound-dai-cells = <1>;
+        qcom,tx-device = <&wcd938x_tx>;
+        qcom,rx-device = <&wcd938x_rx>;
+        qcom,micbias1-microvolt = <1800000>;
+        qcom,micbias2-microvolt = <1800000>;
+        qcom,micbias3-microvolt = <1800000>;
+        qcom,micbias4-microvolt = <1800000>;
+        qcom,mbhc-hphl-switch;
+        qcom,mbhc-ground-switch;
+        qcom,mbhc-button0-vthreshold-microvolt = <75000>;
+        qcom,mbhc-button1-vthreshold-microvolt = <150000>;
+        qcom,mbhc-button2-vthreshold-microvolt = <237000>;
+        qcom,mbhc-button3-vthreshold-microvolt = <500000>;
+        qcom,mbhc-button5-vthreshold-microvolt = <500000>;
+        qcom,mbhc-button6-vthreshold-microvolt = <500000>;
+        qcom,mbhc-button7-vthreshold-microvolt = <500000>;
+    };
+
+    /* ... */
+
+    soundwire@3230000 {
+        #address-cells = <2>;
+        #size-cells = <0>;
+        reg = <0x03230000 0x2000>;
+        wcd938x_tx: codec@0,3 {
+            compatible = "sdw20217010d00";
+            reg  = <0 3>;
+            qcom,direction = "tx";
+            qcom,port-mapping = <2 3 4 5>;
+        };
+
+        wcd938x_rx: codec@0,4 {
+            compatible = "sdw20217010d00";
+            reg  = <0 4>;
+            qcom,direction = "rx";
+            qcom,port-mapping = <1 2 3 4 5>;
+        };

This is a single device, right? We shouldn't need 3 nodes to describe

Just realized that the example is bit misleading here.
It should look like:

 codec {
        compatible = "qcom,wcd9380-codec";
        reset-gpios = <&tlmm 32 0>;
        #sound-dai-cells = <1>;
        qcom,tx-device = <&wcd938x_tx>;
        qcom,rx-device = <&wcd938x_rx>;
        qcom,micbias1-microvolt = <1800000>;
        qcom,micbias2-microvolt = <1800000>;
        qcom,micbias3-microvolt = <1800000>;
        qcom,micbias4-microvolt = <1800000>;
        qcom,mbhc-hphl-switch;
        qcom,mbhc-ground-switch;
        qcom,mbhc-button0-vthreshold-microvolt = <75000>;
        qcom,mbhc-button1-vthreshold-microvolt = <150000>;
        qcom,mbhc-button2-vthreshold-microvolt = <237000>;
        qcom,mbhc-button3-vthreshold-microvolt = <500000>;
        qcom,mbhc-button5-vthreshold-microvolt = <500000>;
        qcom,mbhc-button6-vthreshold-microvolt = <500000>;
        qcom,mbhc-button7-vthreshold-microvolt = <500000>;
    };


soundwire-controller@3230000 {
        reg = <0 0x3230000 0 0x2000>;
        compatible = "qcom,soundwire-v1.5.1";
        wcd938x_tx: codec@0,3 {
                compatible = "sdw20217010d00";
                reg  = <0 3>;
                qcom,direction = "tx";
                qcom,port-mapping = <2 3 4 5>;
        };
};


soundwire-controller@3210000 {
        reg = <0 0x3210000 0 0x2000>;
        compatible = "qcom,soundwire-v1.5.1";
         wcd938x_rx: codec@0,4 {
                compatible = "sdw20217010d00";
                reg  = <0 4>;
                qcom,direction = "rx";
                qcom,port-mapping = <1 2 3 4 5>;
        };
};


--srini

Reply via email to