diff mbox series

[v2,4/4] arm64: dts: qcom: sc7180: Add ADSP

Message ID 20230905-sc7180-adsp-rproc-v2-4-8ab7f299600a@trvn.ru (mailing list archive)
State Superseded
Headers show
Series sc7180: Add ADSP | expand

Commit Message

Nikita Travkin Sept. 5, 2023, 10:41 a.m. UTC
sc7180 has an ADSP remoteproc that exclusively controls the audio
hardware on devices that use Qualcomm firmware.

Add it along with the relevant audio services.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
v2: rename service nodes according to the schema, reorder properties
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 122 +++++++++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)

Comments

Konrad Dybcio Sept. 6, 2023, 11:59 a.m. UTC | #1
On 5.09.2023 12:41, Nikita Travkin wrote:
> sc7180 has an ADSP remoteproc that exclusively controls the audio
> hardware on devices that use Qualcomm firmware.
> 
> Add it along with the relevant audio services.
> 
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
> v2: rename service nodes according to the schema, reorder properties
> ---
remoteproc@62400000: glink-edge:apr: 'qcom,domain' is a required property
remoteproc@62400000: glink-edge: Unevaluated properties are not allowed
('apr' was unexpected)
remoteproc@62400000: Unevaluated properties are not allowed ('glink-edge',
'qcom,smem-state-names', 'qcom,smem-states' were unexpected)
apr: 'qcom,domain' is a required property
service@4: Unevaluated properties are not allowed ('cc' was unexpected)

you need to enable the node to get all the warnings

Konrad
Krzysztof Kozlowski Sept. 6, 2023, 1:36 p.m. UTC | #2
On 05/09/2023 12:41, Nikita Travkin wrote:
> sc7180 has an ADSP remoteproc that exclusively controls the audio
> hardware on devices that use Qualcomm firmware.


> +					q6afe: service@4 {
> +						compatible = "qcom,q6afe";
> +						reg = <APR_SVC_AFE>;
> +						qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> +
> +						q6afedai: dais {
> +							compatible = "qcom,q6afe-dais";
> +							#address-cells = <1>;
> +							#size-cells = <0>;
> +							#sound-dai-cells = <1>;
> +						};
> +
> +						q6afecc: cc {


No improvements.

You need to add ADSP to your board and then test it. Otherwise you won't
see errors and we do not want incorrect, even if disabled, nodes in DTSI.

Best regards,
Krzysztof
Nikita Travkin Sept. 6, 2023, 2:52 p.m. UTC | #3
Krzysztof Kozlowski писал(а) 06.09.2023 18:36:
> On 05/09/2023 12:41, Nikita Travkin wrote:
>> sc7180 has an ADSP remoteproc that exclusively controls the audio
>> hardware on devices that use Qualcomm firmware.
> 
> 
>> +					q6afe: service@4 {
>> +						compatible = "qcom,q6afe";
>> +						reg = <APR_SVC_AFE>;
>> +						qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>> +
>> +						q6afedai: dais {
>> +							compatible = "qcom,q6afe-dais";
>> +							#address-cells = <1>;
>> +							#size-cells = <0>;
>> +							#sound-dai-cells = <1>;
>> +						};
>> +
>> +						q6afecc: cc {
> 
> 
> No improvements.
> 
> You need to add ADSP to your board and then test it. Otherwise you won't
> see errors and we do not want incorrect, even if disabled, nodes in DTSI.
> 

Ah, didn't think the check would (partially) ignore disabled nodes...

Is there any simple way to instruct the checker to ignore disabled
status and test anyway? I'd like to be able to test the "clean"
series as-to-be-sent to have less places for error (and manual action
I guess...)

I will make sure to fix that for v3

Nikita

> Best regards,
> Krzysztof
Konrad Dybcio Sept. 6, 2023, 2:53 p.m. UTC | #4
On 6.09.2023 16:52, Nikita Travkin wrote:
> Krzysztof Kozlowski писал(а) 06.09.2023 18:36:
>> On 05/09/2023 12:41, Nikita Travkin wrote:
>>> sc7180 has an ADSP remoteproc that exclusively controls the audio
>>> hardware on devices that use Qualcomm firmware.
>>
>>
>>> +					q6afe: service@4 {
>>> +						compatible = "qcom,q6afe";
>>> +						reg = <APR_SVC_AFE>;
>>> +						qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>>> +
>>> +						q6afedai: dais {
>>> +							compatible = "qcom,q6afe-dais";
>>> +							#address-cells = <1>;
>>> +							#size-cells = <0>;
>>> +							#sound-dai-cells = <1>;
>>> +						};
>>> +
>>> +						q6afecc: cc {
>>
>>
>> No improvements.
>>
>> You need to add ADSP to your board and then test it. Otherwise you won't
>> see errors and we do not want incorrect, even if disabled, nodes in DTSI.
>>
> 
> Ah, didn't think the check would (partially) ignore disabled nodes...
> 
> Is there any simple way to instruct the checker to ignore disabled
> status and test anyway? I'd like to be able to test the "clean"
> series as-to-be-sent to have less places for error (and manual action
> I guess...)
IDK if schema takes any arguments like that, but search-and-replace
status = "disabled" with nothing sounds like it could work

Konrad
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 9f68b5ff0030..174e7e18bb4d 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -20,6 +20,8 @@ 
 #include <dt-bindings/reset/qcom,sdm845-aoss.h>
 #include <dt-bindings/reset/qcom,sdm845-pdc.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/soc/qcom,apr.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/thermal/thermal.h>
 
 / {
@@ -3781,6 +3783,126 @@  wifi: wifi@18800000 {
 			status = "disabled";
 		};
 
+		remoteproc_adsp: remoteproc@62400000 {
+			compatible = "qcom,sc7180-adsp-pas";
+			reg = <0 0x62400000 0 0x100>;
+
+			interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>,
+					      <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog",
+					  "fatal",
+					  "ready",
+					  "handover",
+					  "stop-ack";
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "xo";
+
+			power-domains = <&rpmhpd SC7180_LCX>,
+					<&rpmhpd SC7180_LMX>;
+			power-domain-names = "lcx", "lmx";
+
+			qcom,qmp = <&aoss_qmp>;
+			qcom,smem-states = <&adsp_smp2p_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			glink-edge {
+				interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
+				label = "lpass";
+				qcom,remote-pid = <2>;
+				mboxes = <&apss_shared 8>;
+
+				apr {
+					compatible = "qcom,apr-v2";
+					qcom,glink-channels = "apr_audio_svc";
+					qcom,apr-domain = <APR_DOMAIN_ADSP>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					service@3 {
+						compatible = "qcom,q6core";
+						reg = <APR_SVC_ADSP_CORE>;
+						qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+					};
+
+					q6afe: service@4 {
+						compatible = "qcom,q6afe";
+						reg = <APR_SVC_AFE>;
+						qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+						q6afedai: dais {
+							compatible = "qcom,q6afe-dais";
+							#address-cells = <1>;
+							#size-cells = <0>;
+							#sound-dai-cells = <1>;
+						};
+
+						q6afecc: cc {
+							compatible = "qcom,q6afe-clocks";
+							#clock-cells = <2>;
+						};
+					};
+
+					q6asm: service@7 {
+						compatible = "qcom,q6asm";
+						reg = <APR_SVC_ASM>;
+						qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+						q6asmdai: dais {
+							compatible = "qcom,q6asm-dais";
+							#address-cells = <1>;
+							#size-cells = <0>;
+							#sound-dai-cells = <1>;
+							iommus = <&apps_smmu 0x1001 0x0>;
+						};
+					};
+
+					q6adm: service@8 {
+						compatible = "qcom,q6adm";
+						reg = <APR_SVC_ADM>;
+						qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+						q6routing: routing {
+							compatible = "qcom,q6adm-routing";
+							#sound-dai-cells = <0>;
+						};
+					};
+				};
+
+				fastrpc {
+					compatible = "qcom,fastrpc";
+					qcom,glink-channels = "fastrpcglink-apps-dsp";
+					label = "adsp";
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					compute-cb@3 {
+						compatible = "qcom,fastrpc-compute-cb";
+						reg = <3>;
+						iommus = <&apps_smmu 0x1003 0x0>;
+					};
+
+					compute-cb@4 {
+						compatible = "qcom,fastrpc-compute-cb";
+						reg = <4>;
+						iommus = <&apps_smmu 0x1004 0x0>;
+					};
+
+					compute-cb@5 {
+						compatible = "qcom,fastrpc-compute-cb";
+						reg = <5>;
+						iommus = <&apps_smmu 0x1005 0x0>;
+						qcom,nsessions = <5>;
+					};
+				};
+			};
+		};
+
 		lpasscc: clock-controller@62d00000 {
 			compatible = "qcom,sc7180-lpasscorecc";
 			reg = <0 0x62d00000 0 0x50000>,