diff mbox series

[v2,6/6] arm64: dts: qcom: sm8250: move sound and codec nodes out of soc

Message ID 20221212100232.138519-6-krzysztof.kozlowski@linaro.org
State Accepted
Commit e5b8c08245307a82cdf180cd5d385a34ba1cfd9d
Headers show
Series [v2,1/6] arm64: dts: qcom: sc7180: order top-level nodes alphabetically | expand

Commit Message

Krzysztof Kozlowski Dec. 12, 2022, 10:02 a.m. UTC
The sound and on-board WCD9380 codec nodes are not properties of the
soc, but rather board as it describes the sound configuration.  They also
does not have unit addresses:

  sm8250-hdk.dtb: soc@0: sound: {} should not be valid under {'type': 'object'}

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

---

Changes since v1:
1. Add Rb tag.
2. Rephrase commit msg.
---
 arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 40 ++++++++++++-------------
 arch/arm64/boot/dts/qcom/sm8250.dtsi    |  6 ++--
 2 files changed, 22 insertions(+), 24 deletions(-)

Comments

Dmitry Baryshkov Dec. 12, 2022, 1:48 p.m. UTC | #1
On 12 December 2022 13:02:32 GMT+03:00, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>The sound and on-board WCD9380 codec nodes are not properties of the
>soc, but rather board as it describes the sound configuration.  They also
>does not have unit addresses:
>
>  sm8250-hdk.dtb: soc@0: sound: {} should not be valid under {'type': 'object'}
>
>Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Reviewed-by: Dmitry Baryshkov<dmitry.baryshkov@linaro.org>


>
>---
>
>Changes since v1:
>1. Add Rb tag.
>2. Rephrase commit msg.
>---
> arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 40 ++++++++++++-------------
> arch/arm64/boot/dts/qcom/sm8250.dtsi    |  6 ++--
> 2 files changed, 22 insertions(+), 24 deletions(-)
>
>diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
>index 3ed8c84e25b8..b741b7da1afc 100644
>--- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
>+++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
>@@ -27,6 +27,25 @@ chosen {
> 		stdout-path = "serial0:115200n8";
> 	};
> 
>+	wcd938x: codec {
>+		compatible = "qcom,wcd9380-codec";
>+		#sound-dai-cells = <1>;
>+		reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
>+		vdd-buck-supply = <&vreg_s4a_1p8>;
>+		vdd-rxtx-supply = <&vreg_s4a_1p8>;
>+		vdd-io-supply = <&vreg_s4a_1p8>;
>+		vdd-mic-bias-supply = <&vreg_bob>;
>+		qcom,micbias1-microvolt = <1800000>;
>+		qcom,micbias2-microvolt = <1800000>;
>+		qcom,micbias3-microvolt = <1800000>;
>+		qcom,micbias4-microvolt = <1800000>;
>+		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
>+		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
>+		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
>+		qcom,rx-device = <&wcd_rx>;
>+		qcom,tx-device = <&wcd_tx>;
>+	};
>+
> 	thermal-zones {
> 		camera-thermal {
> 			polling-delay-passive = <0>;
>@@ -631,27 +650,6 @@ &slpi {
> 	firmware-name = "qcom/sm8250/slpi.mbn";
> };
> 
>-&soc {
>-	wcd938x: codec {
>-		compatible = "qcom,wcd9380-codec";
>-		#sound-dai-cells = <1>;
>-		reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
>-		vdd-buck-supply = <&vreg_s4a_1p8>;
>-		vdd-rxtx-supply = <&vreg_s4a_1p8>;
>-		vdd-io-supply = <&vreg_s4a_1p8>;
>-		vdd-mic-bias-supply = <&vreg_bob>;
>-		qcom,micbias1-microvolt = <1800000>;
>-		qcom,micbias2-microvolt = <1800000>;
>-		qcom,micbias3-microvolt = <1800000>;
>-		qcom,micbias4-microvolt = <1800000>;
>-		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
>-		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
>-		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
>-		qcom,rx-device = <&wcd_rx>;
>-		qcom,tx-device = <&wcd_tx>;
>-	};
>-};
>-
> &sound {
> 	compatible = "qcom,sm8250-sndcard";
> 	model = "SM8250-MTP-WCD9380-WSA8810-VA-DMIC";
>diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
>index d517d6a80bdc..fbbbae29e0c2 100644
>--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
>+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
>@@ -2826,9 +2826,6 @@ compute-cb@8 {
> 			};
> 		};
> 
>-		sound: sound {
>-		};
>-
> 		usb_1_hsphy: phy@88e3000 {
> 			compatible = "qcom,sm8250-usb-hs-phy",
> 				     "qcom,usb-snps-hs-7nm-phy";
>@@ -4910,6 +4907,9 @@ cpufreq_hw: cpufreq@18591000 {
> 		};
> 	};
> 
>+	sound: sound {
>+	};
>+
> 	timer {
> 		compatible = "arm,armv8-timer";
> 		interrupts = <GIC_PPI 13
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
index 3ed8c84e25b8..b741b7da1afc 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
@@ -27,6 +27,25 @@  chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	wcd938x: codec {
+		compatible = "qcom,wcd9380-codec";
+		#sound-dai-cells = <1>;
+		reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
+		vdd-buck-supply = <&vreg_s4a_1p8>;
+		vdd-rxtx-supply = <&vreg_s4a_1p8>;
+		vdd-io-supply = <&vreg_s4a_1p8>;
+		vdd-mic-bias-supply = <&vreg_bob>;
+		qcom,micbias1-microvolt = <1800000>;
+		qcom,micbias2-microvolt = <1800000>;
+		qcom,micbias3-microvolt = <1800000>;
+		qcom,micbias4-microvolt = <1800000>;
+		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
+		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
+		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
+		qcom,rx-device = <&wcd_rx>;
+		qcom,tx-device = <&wcd_tx>;
+	};
+
 	thermal-zones {
 		camera-thermal {
 			polling-delay-passive = <0>;
@@ -631,27 +650,6 @@  &slpi {
 	firmware-name = "qcom/sm8250/slpi.mbn";
 };
 
-&soc {
-	wcd938x: codec {
-		compatible = "qcom,wcd9380-codec";
-		#sound-dai-cells = <1>;
-		reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
-		vdd-buck-supply = <&vreg_s4a_1p8>;
-		vdd-rxtx-supply = <&vreg_s4a_1p8>;
-		vdd-io-supply = <&vreg_s4a_1p8>;
-		vdd-mic-bias-supply = <&vreg_bob>;
-		qcom,micbias1-microvolt = <1800000>;
-		qcom,micbias2-microvolt = <1800000>;
-		qcom,micbias3-microvolt = <1800000>;
-		qcom,micbias4-microvolt = <1800000>;
-		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
-		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
-		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
-		qcom,rx-device = <&wcd_rx>;
-		qcom,tx-device = <&wcd_tx>;
-	};
-};
-
 &sound {
 	compatible = "qcom,sm8250-sndcard";
 	model = "SM8250-MTP-WCD9380-WSA8810-VA-DMIC";
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index d517d6a80bdc..fbbbae29e0c2 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -2826,9 +2826,6 @@  compute-cb@8 {
 			};
 		};
 
-		sound: sound {
-		};
-
 		usb_1_hsphy: phy@88e3000 {
 			compatible = "qcom,sm8250-usb-hs-phy",
 				     "qcom,usb-snps-hs-7nm-phy";
@@ -4910,6 +4907,9 @@  cpufreq_hw: cpufreq@18591000 {
 		};
 	};
 
+	sound: sound {
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 13