diff mbox series

[v5,2/2] arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for HDMI

Message ID 20210721084126.14035-3-srivasam@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series Qualcomm's lpass device tree changes | expand

Commit Message

Srinivasa Rao Mandadapu July 21, 2021, 8:41 a.m. UTC
From: V Sujith Kumar Reddy <vsujithk@codeaurora.org>

Add dai link in sc7180-trogdor.dtsi for supporting audio over DP

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

Comments

Doug Anderson July 21, 2021, 4:20 p.m. UTC | #1
Hi,

On Wed, Jul 21, 2021 at 1:42 AM Srinivasa Rao Mandadapu
<srivasam@codeaurora.org> wrote:
>
> From: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
>
> Add dai link in sc7180-trogdor.dtsi for supporting audio over DP
>
> Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
> Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> index 31bf7c698b8f..a4cb9ee567ff 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> @@ -288,6 +288,7 @@ sound: sound {
>                         "Headphone Jack", "HPOL",
>                         "Headphone Jack", "HPOR";
>
> +               #sound-dai-cells = <0>;

The `#sound-dai-cells` is not in the bindings. The bindings also say
`additionalProperties: false`. So either your patch is wrong for
including this or the bindings are wrong for omitting it. Which is it?
I notice that downstream we don't have this.


> @@ -314,6 +315,18 @@ sound_multimedia1_codec: codec {
>                                 sound-dai = <&max98357a>;

Ideally you'll want to rebase to make context clean since the above
got changed from `max98357a` to `max98360a`.


>                         };
>                 };
> +
> +               dai-link@2 {
> +                       link-name = "MultiMedia2";
> +                       reg = <2>;

I am certainly not an expert, but I notice that downstream we have reg
as <LPASS_DP_RX>, which makes the node name dai-link@5 instead of @2.
Does that matter?


> @@ -768,6 +781,10 @@ secondary_mi2s: mi2s@1 {
>                 reg = <MI2S_SECONDARY>;
>                 qcom,playback-sd-lines = <0>;
>         };
> +
> +       hdmi-primary@0 {
> +               reg = <LPASS_DP_RX>;

Your node name and `reg` don't match. `LPASS_DP_RX` is 5 so the node
name should include @5, not @0. I also notice that downstream the node
name is called `hdmi`, not `hdmi-primary`. The downstream `hdmi` seems
more parallel to the sibling nodes, like `mi2s@0` and `mi2s@1`.
Srinivasa Rao Mandadapu July 22, 2021, 2:49 p.m. UTC | #2
Thanks for your time Doug!!

On 7/21/2021 9:50 PM, Doug Anderson wrote:
> Hi,
>
> On Wed, Jul 21, 2021 at 1:42 AM Srinivasa Rao Mandadapu
> <srivasam@codeaurora.org> wrote:
>> From: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
>>
>> Add dai link in sc7180-trogdor.dtsi for supporting audio over DP
>>
>> Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
>> Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
>> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>>   arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
>> index 31bf7c698b8f..a4cb9ee567ff 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
>> @@ -288,6 +288,7 @@ sound: sound {
>>                          "Headphone Jack", "HPOL",
>>                          "Headphone Jack", "HPOR";
>>
>> +               #sound-dai-cells = <0>;
> The `#sound-dai-cells` is not in the bindings. The bindings also say
> `additionalProperties: false`. So either your patch is wrong for
> including this or the bindings are wrong for omitting it. Which is it?
> I notice that downstream we don't have this.
>
Yes it's wrongly placed Here. Will remove it.
>> @@ -314,6 +315,18 @@ sound_multimedia1_codec: codec {
>>                                  sound-dai = <&max98357a>;
> Ideally you'll want to rebase to make context clean since the above
> got changed from `max98357a` to `max98360a`.
>
>
>>                          };
>>                  };
>> +
>> +               dai-link@2 {
>> +                       link-name = "MultiMedia2";
>> +                       reg = <2>;
> I am certainly not an expert, but I notice that downstream we have reg
> as <LPASS_DP_RX>, which makes the node name dai-link@5 instead of @2.
> Does that matter?
>
Yes,Here reg as <LPASS_DP_RX> is correct option. Will change 
accordingly.  But It seems dai-link@2 is appropriate as in this platform

we are using only 3 nodes. i.e. I2S primary, I2S secondary and DP node.

>> @@ -768,6 +781,10 @@ secondary_mi2s: mi2s@1 {
>>                  reg = <MI2S_SECONDARY>;
>>                  qcom,playback-sd-lines = <0>;
>>          };
>> +
>> +       hdmi-primary@0 {
>> +               reg = <LPASS_DP_RX>;
> Your node name and `reg` don't match. `LPASS_DP_RX` is 5 so the node
> name should include @5, not @0. I also notice that downstream the node
> name is called `hdmi`, not `hdmi-primary`. The downstream `hdmi` seems
> more parallel to the sibling nodes, like `mi2s@0` and `mi2s@1`.
Yes hdmi@2 is appropriate. will change accordingly.
Doug Anderson July 22, 2021, 2:52 p.m. UTC | #3
Hi,


On Thu, Jul 22, 2021 at 7:49 AM Srinivasa Rao Mandadapu
<srivasam@codeaurora.org> wrote:
>
> Thanks for your time Doug!!
>
> On 7/21/2021 9:50 PM, Doug Anderson wrote:
> > Hi,
> >
> > On Wed, Jul 21, 2021 at 1:42 AM Srinivasa Rao Mandadapu
> > <srivasam@codeaurora.org> wrote:
> >> From: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
> >>
> >> Add dai link in sc7180-trogdor.dtsi for supporting audio over DP
> >>
> >> Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
> >> Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
> >> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> >> ---
> >>   arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 17 +++++++++++++++++
> >>   1 file changed, 17 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> >> index 31bf7c698b8f..a4cb9ee567ff 100644
> >> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> >> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> >> @@ -288,6 +288,7 @@ sound: sound {
> >>                          "Headphone Jack", "HPOL",
> >>                          "Headphone Jack", "HPOR";
> >>
> >> +               #sound-dai-cells = <0>;
> > The `#sound-dai-cells` is not in the bindings. The bindings also say
> > `additionalProperties: false`. So either your patch is wrong for
> > including this or the bindings are wrong for omitting it. Which is it?
> > I notice that downstream we don't have this.
> >
> Yes it's wrongly placed Here. Will remove it.
> >> @@ -314,6 +315,18 @@ sound_multimedia1_codec: codec {
> >>                                  sound-dai = <&max98357a>;
> > Ideally you'll want to rebase to make context clean since the above
> > got changed from `max98357a` to `max98360a`.
> >
> >
> >>                          };
> >>                  };
> >> +
> >> +               dai-link@2 {
> >> +                       link-name = "MultiMedia2";
> >> +                       reg = <2>;
> > I am certainly not an expert, but I notice that downstream we have reg
> > as <LPASS_DP_RX>, which makes the node name dai-link@5 instead of @2.
> > Does that matter?
> >
> Yes,Here reg as <LPASS_DP_RX> is correct option. Will change
> accordingly.  But It seems dai-link@2 is appropriate as in this platform

I think you misunderstand. The "@num" is _required_ to match the value
for "reg". So if reg is 5 then you need "@5", not "@2"


> we are using only 3 nodes. i.e. I2S primary, I2S secondary and DP node.
>
> >> @@ -768,6 +781,10 @@ secondary_mi2s: mi2s@1 {
> >>                  reg = <MI2S_SECONDARY>;
> >>                  qcom,playback-sd-lines = <0>;
> >>          };
> >> +
> >> +       hdmi-primary@0 {
> >> +               reg = <LPASS_DP_RX>;
> > Your node name and `reg` don't match. `LPASS_DP_RX` is 5 so the node
> > name should include @5, not @0. I also notice that downstream the node
> > name is called `hdmi`, not `hdmi-primary`. The downstream `hdmi` seems
> > more parallel to the sibling nodes, like `mi2s@0` and `mi2s@1`.
> Yes hdmi@2 is appropriate. will change accordingly.

Same here. Since LPASS_DP_RX is actually the number 5 then you need
@5. I think there was discussion about allowing it to be @LPASS_DP_RX
but last I remember the decision was to keep it as a number.

-Doug
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 31bf7c698b8f..a4cb9ee567ff 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -288,6 +288,7 @@  sound: sound {
 			"Headphone Jack", "HPOL",
 			"Headphone Jack", "HPOR";
 
+		#sound-dai-cells = <0>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 
@@ -314,6 +315,18 @@  sound_multimedia1_codec: codec {
 				sound-dai = <&max98357a>;
 			};
 		};
+
+		dai-link@2 {
+			link-name = "MultiMedia2";
+			reg = <2>;
+			cpu {
+				sound-dai = <&lpass_cpu 2>;
+			};
+
+			codec {
+				sound-dai = <&mdss_dp>;
+			};
+		};
 	};
 };
 
@@ -768,6 +781,10 @@  secondary_mi2s: mi2s@1 {
 		reg = <MI2S_SECONDARY>;
 		qcom,playback-sd-lines = <0>;
 	};
+
+	hdmi-primary@0 {
+		reg = <LPASS_DP_RX>;
+	};
 };
 
 &mdp {