diff mbox series

arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver

Message ID 1600440678-2137-1-git-send-email-srivasam@codeaurora.org
State Superseded
Headers show
Series arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver | expand

Commit Message

Srinivasa Rao Mandadapu Sept. 18, 2020, 2:51 p.m. UTC
From: Ajit Pandey <ajitp@codeaurora.org>

Add dai link for supporting lpass I2S driver, which is used
for audio capture and playback.
Add lpass-cpu node with  pin controls and i2s primary
and secondary dai-links

Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 59 ++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

Comments

Bjorn Andersson Nov. 30, 2020, 4:52 p.m. UTC | #1
On Fri 18 Sep 09:51 CDT 2020, Srinivasa Rao Mandadapu wrote:

> From: Ajit Pandey <ajitp@codeaurora.org>
> 
> Add dai link for supporting lpass I2S driver, which is used
> for audio capture and playback.
> Add lpass-cpu node with  pin controls and i2s primary
> and secondary dai-links
> 
> Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
> Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>

Ajit needs to certify the origin of the patch, with his signed-off-by
and as you are the last to touch it your signed-off-by should be last.

Also, please advice on the dependencies of this patch, because the tree
doesn't build after applying this patch.

Regards,
Bjorn

> ---
>  arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 59 ++++++++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> index bf87558..5724982 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> @@ -220,6 +220,44 @@
>  			max-brightness = <1023>;
>  		};
>  	};
> +
> +	sound {
> +		compatible = "qcom,sc7180-sndcard";
> +		model = "sc7180-snd-card";
> +
> +		audio-routing =
> +			"Headphone Jack", "HPOL",
> +			"Headphone Jack", "HPOR";
> +
> +		audio-jack = <&alc5682>;
> +
> +		#address-cells = <1>;
> +		#size-cells = <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>;
> +			};
> +		};
> +	};
>  };
>  
>  &qfprom {
> @@ -725,6 +763,27 @@ hp_i2c: &i2c9 {
>  	modem-init;
>  };
>  
> +&lpass_cpu {
> +	status = "okay";
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sec_mi2s_active &pri_mi2s_active &pri_mi2s_mclk_active>;
> +
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +
> +	mi2s-primary@0 {
> +		reg = <MI2S_PRIMARY>;
> +		qcom,playback-sd-lines = <1>;
> +		qcom,capture-sd-lines = <0>;
> +	};
> +
> +	mi2s-secondary@1 {
> +		reg = <MI2S_SECONDARY>;
> +		qcom,playback-sd-lines = <0>;
> +	};
> +};
> +
>  &mdp {
>  	status = "okay";
>  };
> -- 
> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
> is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
>
Srinivasa Rao Mandadapu Dec. 1, 2020, 3:52 a.m. UTC | #2
Thanks Bjorn For your comments!!!

On 11/30/2020 10:22 PM, Bjorn Andersson wrote:
> On Fri 18 Sep 09:51 CDT 2020, Srinivasa Rao Mandadapu wrote:
>
>> From: Ajit Pandey <ajitp@codeaurora.org>
>>
>> Add dai link for supporting lpass I2S driver, which is used
>> for audio capture and playback.
>> Add lpass-cpu node with  pin controls and i2s primary
>> and secondary dai-links
>>
>> Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
>> Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
> Ajit needs to certify the origin of the patch, with his signed-off-by
> and as you are the last to touch it your signed-off-by should be last.
>
> Also, please advice on the dependencies of this patch, because the tree
> doesn't build after applying this patch.
>
> Regards,
> Bjorn

After this patch v2 patch is posted.

https://lore.kernel.org/patchwork/patch/1317796/

>> ---
>>   arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 59 ++++++++++++++++++++++++++++
>>   1 file changed, 59 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
>> index bf87558..5724982 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
>> @@ -220,6 +220,44 @@
>>   			max-brightness = <1023>;
>>   		};
>>   	};
>> +
>> +	sound {
>> +		compatible = "qcom,sc7180-sndcard";
>> +		model = "sc7180-snd-card";
>> +
>> +		audio-routing =
>> +			"Headphone Jack", "HPOL",
>> +			"Headphone Jack", "HPOR";
>> +
>> +		audio-jack = <&alc5682>;
>> +
>> +		#address-cells = <1>;
>> +		#size-cells = <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>;
>> +			};
>> +		};
>> +	};
>>   };
>>   
>>   &qfprom {
>> @@ -725,6 +763,27 @@ hp_i2c: &i2c9 {
>>   	modem-init;
>>   };
>>   
>> +&lpass_cpu {
>> +	status = "okay";
>> +
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&sec_mi2s_active &pri_mi2s_active &pri_mi2s_mclk_active>;
>> +
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
>> +
>> +	mi2s-primary@0 {
>> +		reg = <MI2S_PRIMARY>;
>> +		qcom,playback-sd-lines = <1>;
>> +		qcom,capture-sd-lines = <0>;
>> +	};
>> +
>> +	mi2s-secondary@1 {
>> +		reg = <MI2S_SECONDARY>;
>> +		qcom,playback-sd-lines = <0>;
>> +	};
>> +};
>> +
>>   &mdp {
>>   	status = "okay";
>>   };
>> -- 
>> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
>> is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
>>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index bf87558..5724982 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -220,6 +220,44 @@ 
 			max-brightness = <1023>;
 		};
 	};
+
+	sound {
+		compatible = "qcom,sc7180-sndcard";
+		model = "sc7180-snd-card";
+
+		audio-routing =
+			"Headphone Jack", "HPOL",
+			"Headphone Jack", "HPOR";
+
+		audio-jack = <&alc5682>;
+
+		#address-cells = <1>;
+		#size-cells = <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>;
+			};
+		};
+	};
 };
 
 &qfprom {
@@ -725,6 +763,27 @@  hp_i2c: &i2c9 {
 	modem-init;
 };
 
+&lpass_cpu {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&sec_mi2s_active &pri_mi2s_active &pri_mi2s_mclk_active>;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	mi2s-primary@0 {
+		reg = <MI2S_PRIMARY>;
+		qcom,playback-sd-lines = <1>;
+		qcom,capture-sd-lines = <0>;
+	};
+
+	mi2s-secondary@1 {
+		reg = <MI2S_SECONDARY>;
+		qcom,playback-sd-lines = <0>;
+	};
+};
+
 &mdp {
 	status = "okay";
 };