2022-11-15 17:07:28

by Srinivas Kandagatla

[permalink] [raw]
Subject: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node

Add GPR node along with APM(Audio Process Manager) and PRM(Proxy
resource Manager) audio services.

Signed-off-by: Srinivas Kandagatla <[email protected]>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index c32bcded2aef..e3cdd8bccb0c 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -12,6 +12,7 @@
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/thermal/thermal.h>
+#include <dt-bindings/soc/qcom,gpr.h>

/ {
interrupt-parent = <&intc>;
@@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP

label = "lpass";
qcom,remote-pid = <2>;
+
+ gpr {
+ compatible = "qcom,gpr";
+ qcom,glink-channels = "adsp_apps";
+ qcom,domain = <GPR_DOMAIN_ID_ADSP>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ qcom,intents = <512 20>;
+
+ q6apm: q6apm {
+ reg = <GPR_APM_MODULE_IID>;
+ compatible = "qcom,q6apm";
+ #sound-dai-cells = <0>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+ q6apmdai: dais {
+ compatible = "qcom,q6apm-dais";
+ #sound-dai-cells = <1>;
+ iommus = <&apps_smmu 0x0c01 0x0>;
+ };
+
+ q6apmbedai: bedais {
+ compatible = "qcom,q6apm-lpass-dais";
+ #sound-dai-cells = <1>;
+ };
+ };
+
+ q6prm: q6prm {
+ reg = <GPR_PRM_MODULE_IID>;
+ compatible = "qcom,q6prm";
+ #clock-cells = <2>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+ q6prmcc: cc {
+ compatible = "qcom,q6prm-lpass-clocks";
+ #clock-cells = <2>;
+ };
+ };
+
+ };
+
};
};

--
2.25.1



2022-11-16 08:22:02

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node

On 15/11/2022 18:02, Srinivas Kandagatla wrote:
> Add GPR node along with APM(Audio Process Manager) and PRM(Proxy
> resource Manager) audio services.
>
> Signed-off-by: Srinivas Kandagatla <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index c32bcded2aef..e3cdd8bccb0c 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -12,6 +12,7 @@
> #include <dt-bindings/power/qcom-rpmpd.h>
> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
> #include <dt-bindings/thermal/thermal.h>
> +#include <dt-bindings/soc/qcom,gpr.h>
>
> / {
> interrupt-parent = <&intc>;
> @@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
>
> label = "lpass";
> qcom,remote-pid = <2>;
> +
> + gpr {
> + compatible = "qcom,gpr";
> + qcom,glink-channels = "adsp_apps";
> + qcom,domain = <GPR_DOMAIN_ID_ADSP>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + qcom,intents = <512 20>;
> +
> + q6apm: q6apm {
> + reg = <GPR_APM_MODULE_IID>;
> + compatible = "qcom,q6apm";
> + #sound-dai-cells = <0>;
> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6apmdai: dais {
> + compatible = "qcom,q6apm-dais";
> + #sound-dai-cells = <1>;

DAI cells are not allowed by binding, so either drop it or update binding.

> + iommus = <&apps_smmu 0x0c01 0x0>;
> + };
> +
> + q6apmbedai: bedais {
> + compatible = "qcom,q6apm-lpass-dais";
> + #sound-dai-cells = <1>;
> + };
> + };
> +
> + q6prm: q6prm {
> + reg = <GPR_PRM_MODULE_IID>;
> + compatible = "qcom,q6prm";
> + #clock-cells = <2>;

Not allowed by binding.

> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6prmcc: cc {

This should be "clock-controller".

> + compatible = "qcom,q6prm-lpass-clocks";
> + #clock-cells = <2>;
> + };
> + };
> +

Drop empty line

> + };
> +

Ditto

> };
> };
>

Best regards,
Krzysztof


2022-11-16 11:46:50

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node

On Tue, Nov 15, 2022 at 05:02:40PM +0000, Srinivas Kandagatla wrote:
> Add GPR node along with APM(Audio Process Manager) and PRM(Proxy

Perhaps spell out GPR as well.

> resource Manager) audio services.
>
> Signed-off-by: Srinivas Kandagatla <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index c32bcded2aef..e3cdd8bccb0c 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -12,6 +12,7 @@
> #include <dt-bindings/power/qcom-rpmpd.h>
> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
> #include <dt-bindings/thermal/thermal.h>
> +#include <dt-bindings/soc/qcom,gpr.h>

Please keep the include directives sorted.

>
> / {
> interrupt-parent = <&intc>;
> @@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
>
> label = "lpass";
> qcom,remote-pid = <2>;
> +
> + gpr {
> + compatible = "qcom,gpr";
> + qcom,glink-channels = "adsp_apps";
> + qcom,domain = <GPR_DOMAIN_ID_ADSP>;
> + #address-cells = <1>;
> + #size-cells = <0>;

I'd move the address and size cells properties above the vendor ones.

> + qcom,intents = <512 20>;
> +
> + q6apm: q6apm {
> + reg = <GPR_APM_MODULE_IID>;
> + compatible = "qcom,q6apm";

Please move compatible before reg throughout.

> + #sound-dai-cells = <0>;
> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6apmdai: dais {
> + compatible = "qcom,q6apm-dais";
> + #sound-dai-cells = <1>;
> + iommus = <&apps_smmu 0x0c01 0x0>;
> + };
> +
> + q6apmbedai: bedais {
> + compatible = "qcom,q6apm-lpass-dais";
> + #sound-dai-cells = <1>;
> + };
> + };
> +
> + q6prm: q6prm {
> + reg = <GPR_PRM_MODULE_IID>;
> + compatible = "qcom,q6prm";
> + #clock-cells = <2>;
> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6prmcc: cc {
> + compatible = "qcom,q6prm-lpass-clocks";
> + #clock-cells = <2>;
> + };
> + };
> +

Stray new line.

> + };
> +

Same here.

> };
> };

Johan

2022-11-19 17:26:00

by Srinivas Kandagatla

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node



On 16/11/2022 08:06, Krzysztof Kozlowski wrote:
> On 15/11/2022 18:02, Srinivas Kandagatla wrote:
>> Add GPR node along with APM(Audio Process Manager) and PRM(Proxy
>> resource Manager) audio services.
>>
>> Signed-off-by: Srinivas Kandagatla <[email protected]>
>> ---
>> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
>> 1 file changed, 40 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> index c32bcded2aef..e3cdd8bccb0c 100644
>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> @@ -12,6 +12,7 @@
>> #include <dt-bindings/power/qcom-rpmpd.h>
>> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>> #include <dt-bindings/thermal/thermal.h>
>> +#include <dt-bindings/soc/qcom,gpr.h>
>>
>> / {
>> interrupt-parent = <&intc>;
>> @@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
>>
>> label = "lpass";
>> qcom,remote-pid = <2>;
>> +
>> + gpr {
>> + compatible = "qcom,gpr";
>> + qcom,glink-channels = "adsp_apps";
>> + qcom,domain = <GPR_DOMAIN_ID_ADSP>;
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + qcom,intents = <512 20>;
>> +
>> + q6apm: q6apm {
>> + reg = <GPR_APM_MODULE_IID>;
>> + compatible = "qcom,q6apm";
>> + #sound-dai-cells = <0>;
>> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>> + q6apmdai: dais {
>> + compatible = "qcom,q6apm-dais";
>> + #sound-dai-cells = <1>;
>
> DAI cells are not allowed by binding, so either drop it or update binding.

Thanks Krzystof, Konrad and Johan for reviewing.

I agree with all of the comments and they are fixed now.
it will be part of v2.

--srini

>
>> + iommus = <&apps_smmu 0x0c01 0x0>;
>> + };
>> +
>> + q6apmbedai: bedais {
>> + compatible = "qcom,q6apm-lpass-dais";
>> + #sound-dai-cells = <1>;
>> + };
>> + };
>> +
>> + q6prm: q6prm {
>> + reg = <GPR_PRM_MODULE_IID>;
>> + compatible = "qcom,q6prm";
>> + #clock-cells = <2>;
>
> Not allowed by binding.
>
>> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>> + q6prmcc: cc {
>
> This should be "clock-controller".
>
>> + compatible = "qcom,q6prm-lpass-clocks";
>> + #clock-cells = <2>;
>> + };
>> + };
>> +
>
> Drop empty line
>
>> + };
>> +
>
> Ditto
>
>> };
>> };
>>
>
> Best regards,
> Krzysztof
>