diff mbox series

[1/2] arm64: dts: qcom: msm8996: move WCD9335 audio codec to boards

Message ID 20230220094339.47370-1-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Commit e028019095d6242c0952cead7ffe377d718e2993
Headers show
Series [1/2] arm64: dts: qcom: msm8996: move WCD9335 audio codec to boards | expand

Commit Message

Krzysztof Kozlowski Feb. 20, 2023, 9:43 a.m. UTC
The WCD9335 audio codec on Slimbus is a property of a board, not SoC,
thus it should not be present in MSM8996 DTSI.  Keep it in specific
boards, so it won't appear incomplete in the boards not having it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/apq8096-db820c.dts   | 56 +++++++++++++----
 .../boot/dts/qcom/msm8996-oneplus-common.dtsi | 56 +++++++++++++----
 .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 60 ++++++++++++++-----
 arch/arm64/boot/dts/qcom/msm8996.dtsi         | 30 +---------
 4 files changed, 135 insertions(+), 67 deletions(-)

Comments

Konrad Dybcio Feb. 20, 2023, 9:45 a.m. UTC | #1
On 20.02.2023 10:43, Krzysztof Kozlowski wrote:
> The WCD9335 audio codec on Slimbus is a property of a board, not SoC,
> thus it should not be present in MSM8996 DTSI.  Keep it in specific
> boards, so it won't appear incomplete in the boards not having it.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/apq8096-db820c.dts   | 56 +++++++++++++----
>  .../boot/dts/qcom/msm8996-oneplus-common.dtsi | 56 +++++++++++++----
>  .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 60 ++++++++++++++-----
>  arch/arm64/boot/dts/qcom/msm8996.dtsi         | 30 +---------
>  4 files changed, 135 insertions(+), 67 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> index fe6c415e8229..ce189dea2760 100644
> --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> @@ -974,6 +974,50 @@ dai@2 {
>  	};
>  };
>  
> +&slim_msm {
> +	status = "okay";
> +
> +	slim@1 {
> +		reg = <1>;
> +		#address-cells = <2>;
> +		#size-cells = <0>;
> +
> +		tasha_ifd: tas-ifd@0,0 {
> +			compatible = "slim217,1a0";
> +			reg = <0 0>;
> +		};
> +
> +		wcd9335: 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>;
> +
> +			pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
> +			pinctrl-names = "default";
> +
> +			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>;
> +		};
> +	};
> +};
> +
>  &sound {
>  	compatible = "qcom,apq8096-sndcard";
>  	model = "DB820c";
> @@ -1101,15 +1145,3 @@ &usb3phy {
>  &venus {
>  	status = "okay";
>  };
> -
> -&wcd9335 {
> -	clock-names = "mclk", "slimbus";
> -	clocks = <&div1_mclk>,
> -		 <&rpmcc RPM_SMD_BB_CLK1>;
> -
> -	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>;
> -};
> diff --git a/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi
> index 2994337c6046..104deaee74e5 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi
> @@ -504,6 +504,50 @@ vreg_l32a_1p8: l32 {
>  	};
>  };
>  
> +&slim_msm {
> +	status = "okay";
> +
> +	slim@1 {
> +		reg = <1>;
> +		#address-cells = <2>;
> +		#size-cells = <0>;
> +
> +		tasha_ifd: tas-ifd@0,0 {
> +			compatible = "slim217,1a0";
> +			reg = <0 0>;
> +		};
> +
> +		wcd9335: 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>;
> +
> +			pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
> +			pinctrl-names = "default";
> +
> +			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>;
> +		};
> +	};
> +};
> +
>  &slpi_pil {
>  	status = "okay";
>  };
> @@ -772,15 +816,3 @@ &usb3_dwc3 {
>  &venus {
>  	status = "okay";
>  };
> -
> -&wcd9335 {
> -	clock-names = "mclk", "slimbus";
> -	clocks = <&div1_mclk>,
> -		 <&rpmcc RPM_SMD_BB_CLK1>;
> -
> -	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>;
> -};
> diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> index 2acfed28e3cb..446b1d23dec0 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
> @@ -337,6 +337,52 @@ led@3 {
>  	};
>  };
>  
> +&slim_msm {
> +	status = "okay";
> +
> +	slim@1 {
> +		reg = <1>;
> +		#address-cells = <2>;
> +		#size-cells = <0>;
> +
> +		tasha_ifd: tas-ifd@0,0 {
> +			compatible = "slim217,1a0";
> +			reg = <0 0>;
> +		};
> +
> +		wcd9335: codec@1,0 {
> +			compatible = "slim217,1a0";
> +			reg = <1 0>;
> +
> +			clock-names = "mclk", "slimbus";
> +			clocks = <&divclk1_cdc>,
> +				 <&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>;
> +
> +			pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
> +			pinctrl-names = "default";
> +
> +			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-rx-supply = <&vreg_s4a_1p8>;
> +			vdd-tx-supply = <&vreg_s4a_1p8>;
> +			vdd-vbat-supply = <&vph_pwr>;
> +			vdd-micbias-supply = <&vph_pwr_bbyp>;
> +			vdd-io-supply = <&vreg_s4a_1p8>;
> +		};
> +	};
> +};
> +
>  &slpi_pil {
>  	status = "okay";
>  
> @@ -395,20 +441,6 @@ &venus {
>  	status = "okay";
>  };
>  
> -&wcd9335 {
> -	clock-names = "mclk", "slimbus";
> -	clocks = <&divclk1_cdc>,
> -		 <&rpmcc RPM_SMD_BB_CLK1>;
> -
> -	vdd-buck-supply = <&vreg_s4a_1p8>;
> -	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
> -	vdd-rx-supply = <&vreg_s4a_1p8>;
> -	vdd-tx-supply = <&vreg_s4a_1p8>;
> -	vdd-vbat-supply = <&vph_pwr>;
> -	vdd-micbias-supply = <&vph_pwr_bbyp>;
> -	vdd-io-supply = <&vreg_s4a_1p8>;
> -};
> -
>  &rpm_requests {
>  	regulators-0 {
>  		compatible = "qcom,rpm-pm8994-regulators";
> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> index 6f180a8efe77..dfc7153c9d8a 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> @@ -3383,36 +3383,8 @@ slim_msm: slim-ngd@91c0000 {
>  			dma-names = "rx", "tx";
>  			#address-cells = <1>;
>  			#size-cells = <0>;
> -			slim@1 {
> -				reg = <1>;
> -				#address-cells = <2>;
> -				#size-cells = <0>;
> -
> -				tasha_ifd: tas-ifd@0,0 {
> -					compatible = "slim217,1a0";
> -					reg = <0 0>;
> -				};
> -
> -				wcd9335: codec@1,0 {
> -					pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
> -					pinctrl-names = "default";
> -
> -					compatible = "slim217,1a0";
> -					reg = <1 0>;
>  
> -					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>;
> -				};
> -			};
> +			status = "disabled";
>  		};
>  
>  		adsp_pil: remoteproc@9300000 {
Bjorn Andersson March 15, 2023, 11:35 p.m. UTC | #2
On Mon, 20 Feb 2023 10:43:38 +0100, Krzysztof Kozlowski wrote:
> The WCD9335 audio codec on Slimbus is a property of a board, not SoC,
> thus it should not be present in MSM8996 DTSI.  Keep it in specific
> boards, so it won't appear incomplete in the boards not having it.
> 
> 

Applied, thanks!

[1/2] arm64: dts: qcom: msm8996: move WCD9335 audio codec to boards
      commit: 5a1816cc2d8caa054aa8b254efea9739aa8a68c6
[2/2] arm64: dts: qcom: apq8096-db820c: fix indentation
      commit: aec576821e6fd233ae895f4aa57ff1b511a71e8e

Best regards,
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
index fe6c415e8229..ce189dea2760 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
@@ -974,6 +974,50 @@  dai@2 {
 	};
 };
 
+&slim_msm {
+	status = "okay";
+
+	slim@1 {
+		reg = <1>;
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		tasha_ifd: tas-ifd@0,0 {
+			compatible = "slim217,1a0";
+			reg = <0 0>;
+		};
+
+		wcd9335: 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>;
+
+			pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
+			pinctrl-names = "default";
+
+			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>;
+		};
+	};
+};
+
 &sound {
 	compatible = "qcom,apq8096-sndcard";
 	model = "DB820c";
@@ -1101,15 +1145,3 @@  &usb3phy {
 &venus {
 	status = "okay";
 };
-
-&wcd9335 {
-	clock-names = "mclk", "slimbus";
-	clocks = <&div1_mclk>,
-		 <&rpmcc RPM_SMD_BB_CLK1>;
-
-	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>;
-};
diff --git a/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi
index 2994337c6046..104deaee74e5 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi
@@ -504,6 +504,50 @@  vreg_l32a_1p8: l32 {
 	};
 };
 
+&slim_msm {
+	status = "okay";
+
+	slim@1 {
+		reg = <1>;
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		tasha_ifd: tas-ifd@0,0 {
+			compatible = "slim217,1a0";
+			reg = <0 0>;
+		};
+
+		wcd9335: 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>;
+
+			pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
+			pinctrl-names = "default";
+
+			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>;
+		};
+	};
+};
+
 &slpi_pil {
 	status = "okay";
 };
@@ -772,15 +816,3 @@  &usb3_dwc3 {
 &venus {
 	status = "okay";
 };
-
-&wcd9335 {
-	clock-names = "mclk", "slimbus";
-	clocks = <&div1_mclk>,
-		 <&rpmcc RPM_SMD_BB_CLK1>;
-
-	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>;
-};
diff --git a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
index 2acfed28e3cb..446b1d23dec0 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
@@ -337,6 +337,52 @@  led@3 {
 	};
 };
 
+&slim_msm {
+	status = "okay";
+
+	slim@1 {
+		reg = <1>;
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		tasha_ifd: tas-ifd@0,0 {
+			compatible = "slim217,1a0";
+			reg = <0 0>;
+		};
+
+		wcd9335: codec@1,0 {
+			compatible = "slim217,1a0";
+			reg = <1 0>;
+
+			clock-names = "mclk", "slimbus";
+			clocks = <&divclk1_cdc>,
+				 <&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>;
+
+			pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
+			pinctrl-names = "default";
+
+			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-rx-supply = <&vreg_s4a_1p8>;
+			vdd-tx-supply = <&vreg_s4a_1p8>;
+			vdd-vbat-supply = <&vph_pwr>;
+			vdd-micbias-supply = <&vph_pwr_bbyp>;
+			vdd-io-supply = <&vreg_s4a_1p8>;
+		};
+	};
+};
+
 &slpi_pil {
 	status = "okay";
 
@@ -395,20 +441,6 @@  &venus {
 	status = "okay";
 };
 
-&wcd9335 {
-	clock-names = "mclk", "slimbus";
-	clocks = <&divclk1_cdc>,
-		 <&rpmcc RPM_SMD_BB_CLK1>;
-
-	vdd-buck-supply = <&vreg_s4a_1p8>;
-	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
-	vdd-rx-supply = <&vreg_s4a_1p8>;
-	vdd-tx-supply = <&vreg_s4a_1p8>;
-	vdd-vbat-supply = <&vph_pwr>;
-	vdd-micbias-supply = <&vph_pwr_bbyp>;
-	vdd-io-supply = <&vreg_s4a_1p8>;
-};
-
 &rpm_requests {
 	regulators-0 {
 		compatible = "qcom,rpm-pm8994-regulators";
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 6f180a8efe77..dfc7153c9d8a 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -3383,36 +3383,8 @@  slim_msm: slim-ngd@91c0000 {
 			dma-names = "rx", "tx";
 			#address-cells = <1>;
 			#size-cells = <0>;
-			slim@1 {
-				reg = <1>;
-				#address-cells = <2>;
-				#size-cells = <0>;
-
-				tasha_ifd: tas-ifd@0,0 {
-					compatible = "slim217,1a0";
-					reg = <0 0>;
-				};
-
-				wcd9335: codec@1,0 {
-					pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
-					pinctrl-names = "default";
-
-					compatible = "slim217,1a0";
-					reg = <1 0>;
 
-					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>;
-				};
-			};
+			status = "disabled";
 		};
 
 		adsp_pil: remoteproc@9300000 {