ARM: dts: qcom: msm8226: Add ADSP node
authorLuca Weiss <luca@z3ntu.xyz>
Sat, 23 Apr 2022 15:50:57 +0000 (17:50 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 15 Sep 2022 18:44:42 +0000 (13:44 -0500)
Add a node for the adsp found on msm8226.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220423155059.660387-3-luca@z3ntu.xyz
arch/arm/boot/dts/qcom-apq8026-asus-sparrow.dts
arch/arm/boot/dts/qcom-msm8226.dtsi

index ace8cea..818c1a2 100644 (file)
@@ -8,6 +8,8 @@
 #include "qcom-msm8226.dtsi"
 #include "qcom-pm8226.dtsi"
 
+/delete-node/ &adsp_region;
+
 / {
        model = "ASUS ZenWatch 2";
        compatible = "asus,sparrow", "qcom,apq8026";
index 918ad68..cf2d569 100644 (file)
@@ -8,6 +8,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/reset/qcom,gcc-msm8974.h>
 
 / {
                        reg = <0x3000000 0x100000>;
                        no-map;
                };
+
+               adsp_region: adsp@dc00000 {
+                       reg = <0x0dc00000 0x1900000>;
+                       no-map;
+               };
        };
 
        smd {
                hwlocks = <&tcsr_mutex 3>;
        };
 
+       smp2p-adsp {
+               compatible = "qcom,smp2p";
+               qcom,smem = <443>, <429>;
+
+               interrupt-parent = <&intc>;
+               interrupts = <GIC_SPI 158 IRQ_TYPE_EDGE_RISING>;
+
+               qcom,ipc = <&apcs 8 10>;
+
+               qcom,local-pid = <0>;
+               qcom,remote-pid = <2>;
+
+               adsp_smp2p_out: master-kernel {
+                       qcom,entry-name = "master-kernel";
+                       #qcom,smem-state-cells = <1>;
+               };
+
+               adsp_smp2p_in: slave-kernel {
+                       qcom,entry-name = "slave-kernel";
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+       };
+
        soc: soc {
                compatible = "simple-bus";
                #address-cells = <1>;
                        reg = <0xfd484000 0x1000>;
                        #hwlock-cells = <1>;
                };
+
+               adsp: remoteproc@fe200000 {
+                       compatible = "qcom,msm8226-adsp-pil";
+                       reg = <0xfe200000 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";
+
+                       power-domains = <&rpmpd MSM8226_VDDCX>;
+                       power-domain-names = "cx";
+
+                       clocks = <&xo_board>;
+                       clock-names = "xo";
+
+                       memory-region = <&adsp_region>;
+
+                       qcom,smem-states = <&adsp_smp2p_out 0>;
+                       qcom,smem-state-names = "stop";
+
+                       status = "disabled";
+
+                       smd-edge {
+                               interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
+
+                               qcom,ipc = <&apcs 8 8>;
+                               qcom,smd-edge = <1>;
+
+                               label = "lpass";
+                       };
+               };
        };
 
        timer {