diff mbox series

[v4,4/6] dts: qcom: arm64: qcom: sdm845: use defines for VMIDs

Message ID 20230401173523.15244-5-me@dylanvanassche.be
State New
Headers show
Series dts: qcom: arm64: sdm845: SLPI DSP enablement | expand

Commit Message

Dylan Van Assche April 1, 2023, 5:35 p.m. UTC
Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS
instead of hardcoded magic values.

Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski April 3, 2023, 9:20 a.m. UTC | #1
On 01/04/2023 19:35, Dylan Van Assche wrote:
> Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS
> instead of hardcoded magic values.
> 
> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> ---
>  arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 1f25a7f4e02b..dc4b553cbe2e 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -13,6 +13,7 @@
>  #include <dt-bindings/clock/qcom,rpmh.h>
>  #include <dt-bindings/clock/qcom,videocc-sdm845.h>
>  #include <dt-bindings/dma/qcom-gpi.h>
> +#include <dt-bindings/firmware/qcom,scm.h>
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/interconnect/qcom,osm-l3.h>
>  #include <dt-bindings/interconnect/qcom,sdm845.h>
> @@ -3372,7 +3373,8 @@ fastrpc {
>  					qcom,glink-channels = "fastrpcglink-apps-dsp";
>  					label = "sdsp";
>  					qcom,non-secure-domain;
> -					qcom,vmids = <0x3 0xF 0x5 0x6>;

Didn't you just add it in previous patch? Don't add incorrect code which
you immediately change.

Best regards,
Krzysztof
Dylan Van Assche April 3, 2023, 3:32 p.m. UTC | #2
Hi Krzysztof,

On Mon, 2023-04-03 at 11:20 +0200, Krzysztof Kozlowski wrote:
> On 01/04/2023 19:35, Dylan Van Assche wrote:
> > Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS
> > instead of hardcoded magic values.
> > 
> > Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> > ---
> >  arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > index 1f25a7f4e02b..dc4b553cbe2e 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > @@ -13,6 +13,7 @@
> >  #include <dt-bindings/clock/qcom,rpmh.h>
> >  #include <dt-bindings/clock/qcom,videocc-sdm845.h>
> >  #include <dt-bindings/dma/qcom-gpi.h>
> > +#include <dt-bindings/firmware/qcom,scm.h>
> >  #include <dt-bindings/gpio/gpio.h>
> >  #include <dt-bindings/interconnect/qcom,osm-l3.h>
> >  #include <dt-bindings/interconnect/qcom,sdm845.h>
> > @@ -3372,7 +3373,8 @@ fastrpc {
> >                                         qcom,glink-channels =
> > "fastrpcglink-apps-dsp";
> >                                         label = "sdsp";
> >                                         qcom,non-secure-domain;
> > -                                       qcom,vmids = <0x3 0xF 0x5
> > 0x6>;
> 
> Didn't you just add it in previous patch? Don't add incorrect code
> which
> you immediately change.
> 

Both are similar, the code is in fact the same. I followed what Konrad
suggested in v3 to make a patch on top:

> Please use the recently-introduced header and depend on (and
make a patch atop)

https://lore.kernel.org/linux-devicetree/20230330165322.118279-1-me@dylanvanassche.be/T/#mab3c3421157acb0a4811dad5bb62d7349a9d4008

I can squash this patch in the FastRPC node one, that would make it
disappear. Let me know what you prefer and I will do it in v5 :)

> Best regards,
> Krzysztof
> 

Kind regards,
Dylan Van Assche
Krzysztof Kozlowski April 3, 2023, 3:47 p.m. UTC | #3
On 03/04/2023 17:32, Dylan Van Assche wrote:
> Hi Krzysztof,
> 
> On Mon, 2023-04-03 at 11:20 +0200, Krzysztof Kozlowski wrote:
>> On 01/04/2023 19:35, Dylan Van Assche wrote:
>>> Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS
>>> instead of hardcoded magic values.
>>>
>>> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
>>> ---
>>>  arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> index 1f25a7f4e02b..dc4b553cbe2e 100644
>>> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> @@ -13,6 +13,7 @@
>>>  #include <dt-bindings/clock/qcom,rpmh.h>
>>>  #include <dt-bindings/clock/qcom,videocc-sdm845.h>
>>>  #include <dt-bindings/dma/qcom-gpi.h>
>>> +#include <dt-bindings/firmware/qcom,scm.h>
>>>  #include <dt-bindings/gpio/gpio.h>
>>>  #include <dt-bindings/interconnect/qcom,osm-l3.h>
>>>  #include <dt-bindings/interconnect/qcom,sdm845.h>
>>> @@ -3372,7 +3373,8 @@ fastrpc {
>>>                                         qcom,glink-channels =
>>> "fastrpcglink-apps-dsp";
>>>                                         label = "sdsp";
>>>                                         qcom,non-secure-domain;
>>> -                                       qcom,vmids = <0x3 0xF 0x5
>>> 0x6>;
>>
>> Didn't you just add it in previous patch? Don't add incorrect code
>> which
>> you immediately change.
>>
> 
> Both are similar, the code is in fact the same. I followed what Konrad
> suggested in v3 to make a patch on top:

I don't understand. Device nodes are similar, but they are different? If
you add a line in patch X and change it in patch X+1, then something is
wrong. Isn't this the case here or these are different device nodes?


Best regards,
Krzysztof
Dylan Van Assche April 3, 2023, 4:22 p.m. UTC | #4
Hi,

On Mon, 2023-04-03 at 17:47 +0200, Krzysztof Kozlowski wrote:
> On 03/04/2023 17:32, Dylan Van Assche wrote:
> > Hi Krzysztof,
> > 
> > On Mon, 2023-04-03 at 11:20 +0200, Krzysztof Kozlowski wrote:
> > > On 01/04/2023 19:35, Dylan Van Assche wrote:
> > > > Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845
> > > > DTS
> > > > instead of hardcoded magic values.
> > > > 
> > > > Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> > > > ---
> > > >  arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-
> > > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > > > b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > > > index 1f25a7f4e02b..dc4b553cbe2e 100644
> > > > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > > > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> > > > @@ -13,6 +13,7 @@
> > > >  #include <dt-bindings/clock/qcom,rpmh.h>
> > > >  #include <dt-bindings/clock/qcom,videocc-sdm845.h>
> > > >  #include <dt-bindings/dma/qcom-gpi.h>
> > > > +#include <dt-bindings/firmware/qcom,scm.h>
> > > >  #include <dt-bindings/gpio/gpio.h>
> > > >  #include <dt-bindings/interconnect/qcom,osm-l3.h>
> > > >  #include <dt-bindings/interconnect/qcom,sdm845.h>
> > > > @@ -3372,7 +3373,8 @@ fastrpc {
> > > >                                         qcom,glink-channels =
> > > > "fastrpcglink-apps-dsp";
> > > >                                         label = "sdsp";
> > > >                                         qcom,non-secure-domain;
> > > > -                                       qcom,vmids = <0x3 0xF
> > > > 0x5
> > > > 0x6>;
> > > 
> > > Didn't you just add it in previous patch? Don't add incorrect
> > > code
> > > which
> > > you immediately change.
> > > 
> > 
> > Both are similar, the code is in fact the same. I followed what
> > Konrad
> > suggested in v3 to make a patch on top:
> 
> I don't understand. Device nodes are similar, but they are different?
> If
> you add a line in patch X and change it in patch X+1, then something
> is
> wrong. Isn't this the case here or these are different device nodes?
> 

They are the same node.
In the original patch the values are hex values, but Konrad asked to
make a patch on top depending on the qcom scm header which has these
magic hex values with defines.
I can make the defines as default, no problem. Will do in v5.

Kind regards,
Dylan

> 
> Best regards,
> Krzysztof
>
Konrad Dybcio April 4, 2023, 6:29 p.m. UTC | #5
On 3.04.2023 18:22, Dylan Van Assche wrote:
> Hi,
> 
> On Mon, 2023-04-03 at 17:47 +0200, Krzysztof Kozlowski wrote:
>> On 03/04/2023 17:32, Dylan Van Assche wrote:
>>> Hi Krzysztof,
>>>
>>> On Mon, 2023-04-03 at 11:20 +0200, Krzysztof Kozlowski wrote:
>>>> On 01/04/2023 19:35, Dylan Van Assche wrote:
>>>>> Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845
>>>>> DTS
>>>>> instead of hardcoded magic values.
>>>>>
>>>>> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
>>>>> ---
>>>>>  arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-
>>>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>>>> b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>>>> index 1f25a7f4e02b..dc4b553cbe2e 100644
>>>>> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>>>> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>>>> @@ -13,6 +13,7 @@
>>>>>  #include <dt-bindings/clock/qcom,rpmh.h>
>>>>>  #include <dt-bindings/clock/qcom,videocc-sdm845.h>
>>>>>  #include <dt-bindings/dma/qcom-gpi.h>
>>>>> +#include <dt-bindings/firmware/qcom,scm.h>
>>>>>  #include <dt-bindings/gpio/gpio.h>
>>>>>  #include <dt-bindings/interconnect/qcom,osm-l3.h>
>>>>>  #include <dt-bindings/interconnect/qcom,sdm845.h>
>>>>> @@ -3372,7 +3373,8 @@ fastrpc {
>>>>>                                         qcom,glink-channels =
>>>>> "fastrpcglink-apps-dsp";
>>>>>                                         label = "sdsp";
>>>>>                                         qcom,non-secure-domain;
>>>>> -                                       qcom,vmids = <0x3 0xF
>>>>> 0x5
>>>>> 0x6>;
>>>>
>>>> Didn't you just add it in previous patch? Don't add incorrect
>>>> code
>>>> which
>>>> you immediately change.
>>>>
>>>
>>> Both are similar, the code is in fact the same. I followed what
>>> Konrad
>>> suggested in v3 to make a patch on top:
>>
>> I don't understand. Device nodes are similar, but they are different?
>> If
>> you add a line in patch X and change it in patch X+1, then something
>> is
>> wrong. Isn't this the case here or these are different device nodes?
>>
> 
> They are the same node.
> In the original patch the values are hex values, but Konrad asked to
> make a patch on top depending on the qcom scm header which has these
> magic hex values with defines.
Sorry if that wasn't clear, but what I meant to ask for is "pick this
patch that will get in soon and add the VMIDs you need on top of it
so that you can send it in parallel and Bjorn can merge both easily"
and had nothing to do with splitting out its inclusion in the dts

Konrad
> I can make the defines as default, no problem. Will do in v5.
> 
> Kind regards,
> Dylan
> 
>>
>> Best regards,
>> Krzysztof
>>
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 1f25a7f4e02b..dc4b553cbe2e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -13,6 +13,7 @@ 
 #include <dt-bindings/clock/qcom,rpmh.h>
 #include <dt-bindings/clock/qcom,videocc-sdm845.h>
 #include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 #include <dt-bindings/interconnect/qcom,sdm845.h>
@@ -3372,7 +3373,8 @@  fastrpc {
 					qcom,glink-channels = "fastrpcglink-apps-dsp";
 					label = "sdsp";
 					qcom,non-secure-domain;
-					qcom,vmids = <0x3 0xF 0x5 0x6>;
+					qcom,vmids = <QCOM_SCM_VMID_HLOS QCOM_SCM_VMID_MSS_MSA
+						      QCOM_SCM_VMID_SSC_Q6 QCOM_SCM_VMID_ADSP_Q6>;
 					memory-region = <&fastrpc_mem>;
 					#address-cells = <1>;
 					#size-cells = <0>;