Commit 34c86173 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Bjorn Andersson
Browse files

arm64: dts: qcom: sdm845: move codec to separate file



Re-organize SDM845 audio codec into separate, audio DTSI which
should be included and customized by the SDM845 boards wanting audio.
The codec node is anyway not a property of the SoC, but the boards.

On all others boards not using audio, keep the Slimbus node disabled as
it is empty.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarCaleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230123084300.22353-4-krzysztof.kozlowski@linaro.org
parent 099f035d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include "sdm845.dtsi"
#include "sdm845-wcd9340.dtsi"
#include "pm8998.dtsi"
#include "pmi8998.dtsi"

+69 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * SDM845 SoC device tree source
 *
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 */

&slim {
	status = "okay";

	slim@1 {
		reg = <1>;
		#address-cells = <2>;
		#size-cells = <0>;

		wcd9340_ifd: ifd@0,0 {
			compatible = "slim217,250";
			reg = <0 0>;
		};

		wcd9340: codec@1,0 {
			compatible = "slim217,250";
			reg = <1 0>;
			slim-ifc-dev = <&wcd9340_ifd>;

			#sound-dai-cells = <1>;

			interrupts-extended = <&tlmm 54 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-controller;
			#interrupt-cells = <1>;

			#clock-cells = <0>;
			clock-frequency = <9600000>;
			clock-output-names = "mclk";
			qcom,micbias1-microvolt = <1800000>;
			qcom,micbias2-microvolt = <1800000>;
			qcom,micbias3-microvolt = <1800000>;
			qcom,micbias4-microvolt = <1800000>;

			#address-cells = <1>;
			#size-cells = <1>;

			wcdgpio: gpio-controller@42 {
				compatible = "qcom,wcd9340-gpio";
				gpio-controller;
				#gpio-cells = <2>;
				reg = <0x42 0x2>;
			};

			swm: swm@c85 {
				compatible = "qcom,soundwire-v1.3.0";
				reg = <0xc85 0x40>;
				interrupts-extended = <&wcd9340 20>;

				qcom,dout-ports = <6>;
				qcom,din-ports = <2>;
				qcom,ports-sinterval-low = /bits/ 8  <0x07 0x1f 0x3f 0x7 0x1f 0x3f 0x0f 0x0f>;
				qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x6 0x12 0x0d 0x07 0x0a>;
				qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1f 0x00 0x00 0x1f 0x00 0x00>;

				#sound-dai-cells = <1>;
				clocks = <&wcd9340>;
				clock-names = "iface";
				#address-cells = <2>;
				#size-cells = <0>;
			};
		};
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include "sdm845.dtsi"
#include "sdm845-wcd9340.dtsi"
#include "pm8998.dtsi"
#include "pmi8998.dtsi"

+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include "sdm845.dtsi"
#include "sdm845-wcd9340.dtsi"
#include "pm8998.dtsi"
#include "pmi8998.dtsi"
#include "pm8005.dtsi"
+1 −59
Original line number Diff line number Diff line
@@ -3841,65 +3841,7 @@ slim: slim-ngd@171c0000 {
			iommus = <&apps_smmu 0x1806 0x0>;
			#address-cells = <1>;
			#size-cells = <0>;

			slim@1 {
				reg = <1>;
				#address-cells = <2>;
				#size-cells = <0>;

				wcd9340_ifd: ifd@0,0 {
					compatible = "slim217,250";
					reg = <0 0>;
				};

				wcd9340: codec@1,0 {
					compatible = "slim217,250";
					reg = <1 0>;
					slim-ifc-dev = <&wcd9340_ifd>;

					#sound-dai-cells = <1>;

					interrupts-extended = <&tlmm 54 IRQ_TYPE_LEVEL_HIGH>;
					interrupt-controller;
					#interrupt-cells = <1>;

					#clock-cells = <0>;
					clock-frequency = <9600000>;
					clock-output-names = "mclk";
					qcom,micbias1-microvolt = <1800000>;
					qcom,micbias2-microvolt = <1800000>;
					qcom,micbias3-microvolt = <1800000>;
					qcom,micbias4-microvolt = <1800000>;

					#address-cells = <1>;
					#size-cells = <1>;

					wcdgpio: gpio-controller@42 {
						compatible = "qcom,wcd9340-gpio";
						gpio-controller;
						#gpio-cells = <2>;
						reg = <0x42 0x2>;
					};

					swm: swm@c85 {
						compatible = "qcom,soundwire-v1.3.0";
						reg = <0xc85 0x40>;
						interrupts-extended = <&wcd9340 20>;

						qcom,dout-ports = <6>;
						qcom,din-ports = <2>;
						qcom,ports-sinterval-low = /bits/ 8  <0x07 0x1f 0x3f 0x7 0x1f 0x3f 0x0f 0x0f>;
						qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x6 0x12 0x0d 0x07 0x0a>;
						qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1f 0x00 0x00 0x1f 0x00 0x00>;

						#sound-dai-cells = <1>;
						clocks = <&wcd9340>;
						clock-names = "iface";
						#address-cells = <2>;
						#size-cells = <0>;
					};
				};
			};
			status = "disabled";
		};

		lmh_cluster1: lmh@17d70800 {
Loading