Skip to contentSkip to conversation

dts: qcom: arm64: sdm845: SLPI DSP enablement

PATCH Superseded Dylan Van Assche 3 participants 16 messages Mar 30, 2023 – Mar 31, 2023

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover dts: qcom: arm64: sdm845: SLPI DSP enablement

* About *

The Qualcomm SDM845 SoC has a separate SLPI (Sensor Low Power Island) DSP for sensors connected to the SoC which is responsible for exposing sensors to userspace, power saving, and other features.
While sensors are connected to GPIOs of the SoC, they cannot be used because the hypervisor blocks direct access to the sensors, thus the DSP must be used to access any sensor on this SoC. The SLPI DSP uses a GLink edge (dsps) to communicate with the host and has a FastRPC interface to load files from the host filesystem such as sensor configuration files. The FastRPC interface does not use regular FastRPC Compute Banks but instead uses an allocated CMA region through which communication happens.

* Changes *

This patchseries completes support for the SLPI in the Qualcomm SDM845 SoC by adding the SLPI to the SDM845 DTS and enable it for 2 hardware devices:
- Oneplus 6
- SHIFTPHONES SHIFT6mq

* Related patches *

1. Remoteproc changes (v2) to support the SLPI DSP in SDM845:
https://lore.kernel.org/linux-remoteproc/[email protected]/
2. FastRPC changes (v2) to support the SLPI DSP in SDM845:
https://lore.kernel.org/linux-arm-msm/[email protected]/

This serie does not depend on any serie, but all of them are necessary to enable the feature in the end.

* Changelog *

Changes in v2:

- Removed double blank lines
- Enforce alphabetically order for 'slpi_pas'
- Reordered 'slpi_pas' properties
- Fixed FastRPC syntax
- Dropped qcom,assign-all-mem property as this is not necessary anymore

Changes in v3:

- Dropped FastRPC dt-bindings change, unnecessary to relax the bindings
- Add reg property to compute-cb for the SLPI on SDM845

Kind regards,
Dylan Van Assche

Dylan Van Assche (4):
dts: arm64: qcom: sdm845: add SLPI remoteproc
dts: arm64: qcom: sdm845: add SLPI FastRPC support
dts: arm64: qcom: sdm845-oneplus: enable SLPI
dts: arm64: qcom: sdm845-shift-axolotl: enable SLPI

 .../boot/dts/qcom/sdm845-oneplus-common.dtsi  |  5 ++
 .../boot/dts/qcom/sdm845-shift-axolotl.dts    |  5 ++
 arch/arm64/boot/dts/qcom/sdm845.dtsi          | 60 +++++++++++++++++++
 3 files changed, 70 insertions(+)
Signature · 1 line
2.39.2
#1 lore raw

PATCH v3 1/4 dts: arm64: qcom: sdm845: add SLPI remoteproc

Add the SLPI remoteproc to the SDM845 Qualcomm SoC which is responsible for exposing the sensors connected to the SoC. The SLPI communicates over GLink edge 'dsps' and is similar to other DSPs e.g. ADSP or CDSP. This patch allows the SLPI to boot and expose itself over QRTR as service 400.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 36 ++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +36 -0
index 2f32179c7d1b..3b547cb7aeb8 100644
@@ -3311,6 +3311,42 @@ glink-edge {
 			};
 		};
 
+		slpi_pas: remoteproc@5c00000 {
+			compatible = "qcom,sdm845-slpi-pas";
+			reg = <0 0x5c00000 0 0x4000>;
+
+			interrupts-extended = <&intc GIC_SPI 494 IRQ_TYPE_EDGE_RISING>,
+						<&slpi_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+						<&slpi_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+						<&slpi_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+						<&slpi_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog", "fatal", "ready",
+						"handover", "stop-ack";
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "xo";
+
+			qcom,qmp = <&aoss_qmp>;
+
+			power-domains = <&rpmhpd SDM845_CX>,
+					<&rpmhpd SDM845_MX>;
+			power-domain-names = "lcx", "lmx";
+
+			memory-region = <&slpi_mem>;
+
+			qcom,smem-states = <&slpi_smp2p_out 0>;
+			qcom,smem-state-names = "stop";
+
+			status = "disabled";
+
+			glink-edge {
+				interrupts = <GIC_SPI 170 IRQ_TYPE_EDGE_RISING>;
+				label = "dsps";
+				qcom,remote-pid = <3>;
+				mboxes = <&apss_shared 24>;
+			};
+		};
+
 		gpucc: clock-controller@5090000 {
 			compatible = "qcom,sdm845-gpucc";
 			reg = <0 0x05090000 0 0x9000>;
Signature · 1 line
2.39.2
#2 lore raw

Re: [PATCH v3 1/4] dts: arm64: qcom: sdm845: add SLPI remoteproc

Quoted 16 lines · Dylan Van Assche

Add the SLPI remoteproc to the SDM845 Qualcomm SoC which is responsible for exposing the sensors connected to the SoC. The SLPI communicates over GLink edge 'dsps' and is similar to other DSPs e.g. ADSP or CDSP. This patch allows the SLPI to boot and expose itself over QRTR as service 400.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 36 ++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 2f32179c7d1b..3b547cb7aeb8 100644

arch/arm64/boot/dts/qcom/sdm845.dtsi glink-edge { · line 3314

Quoted 4 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
@@ -3311,6 +3311,42 @@ glink-edge {
 			};
 		};
 
+		slpi_pas: remoteproc@5c00000 {

This does not look like correct place. Are you sure you followed the order by unit address?

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v3 1/4] dts: arm64: qcom: sdm845: add SLPI remoteproc

Hi Krzysztof,

Quoted 16 lines · Krzysztof Kozlowski
Quoted 15 lines · Dylan Van Assche

Add the SLPI remoteproc to the SDM845 Qualcomm SoC which is responsible
for exposing the sensors connected to the SoC. The SLPI communicates
over GLink edge 'dsps' and is similar to other DSPs e.g. ADSP or CDSP.
This patch allows the SLPI to boot and expose itself over QRTR as service 400.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 36
++++++++++++++++++++++++++++

 1 file changed, 36 insertions(+)
Quoted 15 lines
Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 2f32179c7d1b..3b547cb7aeb8 100644
@@ -3311,6 +3311,42 @@ glink-edge {
                         };
                 };


+               slpi_pas: remoteproc@5c00000 {

This does not look like correct place. Are you sure you followed the order by unit address?

I think I misunderstood...
I sorted them alphabetically by name, but it has to be unit address. Will fix in v4.

Quoted 4 lines

Best regards,
Krzysztof

Kind regards,
Dylan

#4 lore raw

PATCH v3 2/4 dts: arm64: qcom: sdm845: add SLPI FastRPC support

In reply to Dylan Van Assche

Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through an allocated memory region to load files from the host filesystem such as sensor configuration files.

Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar to downstream, to allow userspace to communicate with the SLPI via the FastRPC interface for initializing the sensors on the SLPI.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +24 -0
index 3b547cb7aeb8..8ea4944f3ad6 100644
@@ -878,6 +878,14 @@ mdata_mem: mpss-metadata {
 			size = <0 0x4000>;
 			no-map;
 		};
+
+		fastrpc_mem: fastrpc {
+			compatible = "shared-dma-pool";
+			reusable;
+			alloc-ranges = <0 0x00000000 0 0xffffffff>;
+			alignment = <0 0x400000>;
+			size = <0 0x1000000>;
+		};
 	};
 
 	adsp_pas: remoteproc-adsp {
@@ -3344,6 +3352,22 @@ glink-edge {
 				label = "dsps";
 				qcom,remote-pid = <3>;
 				mboxes = <&apss_shared 24>;
+
+				fastrpc {
+					compatible = "qcom,fastrpc";
+					qcom,glink-channels = "fastrpcglink-apps-dsp";
+					label = "sdsp";
+					qcom,non-secure-domain;
+					qcom,vmids = <0x3 0xF 0x5 0x6>;
+					memory-region = <&fastrpc_mem>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					compute-cb@0 {
+						compatible = "qcom,fastrpc-compute-cb";
+						reg = <0>;
+					};
+				};
 			};
 		};
 
Signature · 1 line
2.39.2
#5 lore raw

Re: [PATCH v3 2/4] dts: arm64: qcom: sdm845: add SLPI FastRPC support

Quoted 18 lines · Dylan Van Assche

Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through an allocated memory region to load files from the host filesystem such as sensor configuration files.

Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar to downstream, to allow userspace to communicate with the SLPI via the FastRPC interface for initializing the sensors on the SLPI.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 3b547cb7aeb8..8ea4944f3ad6 100644

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 884

Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +4 -0
@@ -878,6 +878,14 @@ mdata_mem: mpss-metadata {
 			size = <0 0x4000>;
 			no-map;
 		};
+
+		fastrpc_mem: fastrpc {
+			compatible = "shared-dma-pool";
+			reusable;

Please move it last to get a nice reverse-Christmas-tree layout.

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 885

Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+			alloc-ranges = <0 0x00000000 0 0xffffffff>;

Would there be any issues with it starting over (1<<31 - 1)?

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 886

Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+			alignment = <0 0x400000>;

Please use 0x0 for the 0 here, as it's essentially reg.size with size-cells = 2

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 887

Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+			size = <0 0x1000000>;

Ditto

Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+		};
 	};
 
 	adsp_pas: remoteproc-adsp {

arch/arm64/boot/dts/qcom/sdm845.dtsi glink-edge { · line 3361

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +7 -0
@@ -3344,6 +3352,22 @@ glink-edge {
 				label = "dsps";
 				qcom,remote-pid = <3>;
 				mboxes = <&apss_shared 24>;
+
+				fastrpc {
+					compatible = "qcom,fastrpc";
+					qcom,glink-channels = "fastrpcglink-apps-dsp";
+					label = "sdsp";
+					qcom,non-secure-domain;
+					qcom,vmids = <0x3 0xF 0x5 0x6>;

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

https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

Konrad

Quoted 12 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +9 -0
+					memory-region = <&fastrpc_mem>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					compute-cb@0 {
+						compatible = "qcom,fastrpc-compute-cb";
+						reg = <0>;
+					};
+				};
 			};
 		};
 
#6 lore raw

Re: [PATCH v3 2/4] dts: arm64: qcom: sdm845: add SLPI FastRPC support

Hi Konrad,

Quoted 17 lines · Konrad Dybcio
Quoted 14 lines · Dylan Van Assche

Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through an allocated memory region to load files from the host filesystem such as sensor configuration files.

Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar to
downstream, to allow userspace to communicate with the SLPI via the FastRPC interface for initializing the sensors on the SLPI.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 24 ++++++++++++++++++++++++

 1 file changed, 24 insertions(+)
Quoted 15 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 884

Quoted 13 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +4 -0
index 3b547cb7aeb8..8ea4944f3ad6 100644
@@ -878,6 +878,14 @@ mdata_mem: mpss-metadata {
                         size = <0 0x4000>;
                         no-map;
                 };
+
+               fastrpc_mem: fastrpc {
+                       compatible = "shared-dma-pool";
+                       reusable;

Please move it last to get a nice reverse-Christmas-tree layout.

Will fix in v4.

Quoted 3 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 885

Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alloc-ranges = <0 0x00000000 0 0xffffffff>;

Would there be any issues with it starting over (1<<31 - 1)?

You mean a bigger region then, like the whole CMA region then? AFAIK, the SLPI always use the same region expecting it to be in this range. However, I cannot confirm more, as I have no insights in the firmware running on there, this all comes from finding out what it exactly does on downstream.

Quoted 3 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 886

Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alignment = <0 0x400000>;

Please use 0x0 for the 0 here, as it's essentially reg.size with size-cells = 2

Will fix in v4.

Quoted 3 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 887

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       size = <0 0x1000000>;

Ditto

Will fix in v4.

Quoted 22 lines
Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+               };
         };


        adsp_pas: remoteproc-adsp {

arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
@@ -3344,6 +3352,22 @@ glink-edge {
                                 label = "dsps";
                                 qcom,remote-pid = <3>;
                                 mboxes = <&apss_shared 24>;

arch/arm64/boot/dts/qcom/sdm845.dtsi glink-edge { · line 3364

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +7 -0
+
+                               fastrpc {
+                                       compatible =
 "qcom,fastrpc";
+                                       qcom,glink-channels =
 "fastrpcglink-apps-dsp";
+                                       label = "sdsp";
+                                       qcom,non-secure-domain;
+                                       qcom,vmids = <0x3 0xF 0x5
 0x6>;

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

Quoted 18 lines

https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

Konrad

Quoted 14 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                                       memory-region =

<&fastrpc_mem>;
+                                       #address-cells = <1>; +                                       #size-cells = <0>; +
+                                       compute-cb@0 { +                                               compatible = "qcom,fastrpc-compute-cb";
+                                               reg = <0>; +                                       };
+                               };
                        };
                };

Kind regards,
Dylan

#7 lore raw

Re: [PATCH v3 2/4] dts: arm64: qcom: sdm845: add SLPI FastRPC support

Quoted 39 lines · Dylan Van Assche

Hi Konrad,

Quoted 17 lines · Konrad Dybcio
Quoted 14 lines · Dylan Van Assche

Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through an allocated memory region to load files from the host filesystem such as sensor configuration files.

Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar to
downstream, to allow userspace to communicate with the SLPI via the FastRPC interface for initializing the sensors on the SLPI.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 24 ++++++++++++++++++++++++

 1 file changed, 24 insertions(+)
Quoted 15 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 884

Quoted 13 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +4 -0
index 3b547cb7aeb8..8ea4944f3ad6 100644
@@ -878,6 +878,14 @@ mdata_mem: mpss-metadata {
                         size = <0 0x4000>;
                         no-map;
                 };
+
+               fastrpc_mem: fastrpc {
+                       compatible = "shared-dma-pool";
+                       reusable;

Please move it last to get a nice reverse-Christmas-tree layout.

Will fix in v4.

Quoted 1 line
Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alloc-ranges = <0 0x00000000 0 0xffffffff>;
Quoted 8 lines
Quoted 2 lines

Would there be any issues with it starting over (1<<31 - 1)?

You mean a bigger region then, like the whole CMA region then? AFAIK, the SLPI always use the same region expecting it to be in this range. However, I cannot confirm more, as I have no insights in the firmware running on there, this all comes from finding out what it exactly does on downstream.

I was asking about the <.. 0 0xfff.f> part specifically, as that means it can't be allocated above 4 gigs. But I guess it's just how qcom envisioned it.

Also, please use 0x0 in alloc-ranges as well, this is all addresses/ reg sizes.

Konrad

Quoted 56 lines
Quoted 4 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 886

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alignment = <0 0x400000>;

Please use 0x0 for the 0 here, as it's essentially reg.size with size-cells = 2

Will fix in v4.

Quoted 3 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 887

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       size = <0 0x1000000>;

Ditto

Will fix in v4.

Quoted 22 lines
Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+               };
         };


        adsp_pas: remoteproc-adsp {

arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
@@ -3344,6 +3352,22 @@ glink-edge {
                                 label = "dsps";
                                 qcom,remote-pid = <3>;
                                 mboxes = <&apss_shared 24>;

arch/arm64/boot/dts/qcom/sdm845.dtsi glink-edge { · line 3364

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +7 -0
+
+                               fastrpc {
+                                       compatible =
 "qcom,fastrpc";
+                                       qcom,glink-channels =
 "fastrpcglink-apps-dsp";
+                                       label = "sdsp";
+                                       qcom,non-secure-domain;
+                                       qcom,vmids = <0x3 0xF 0x5
 0x6>;

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

Quoted 18 lines

https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

Konrad

Quoted 14 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                                       memory-region =

<&fastrpc_mem>;
+                                       #address-cells = <1>; +                                       #size-cells = <0>; +
+                                       compute-cb@0 { +                                               compatible = "qcom,fastrpc-compute-cb";
+                                               reg = <0>; +                                       };
+                               };
                        };
                };

Kind regards,
Dylan

#8 lore raw

Re: [PATCH v3 2/4] dts: arm64: qcom: sdm845: add SLPI FastRPC support

Quoted 60 lines · Konrad Dybcio
Quoted 48 lines · Dylan Van Assche

Hi Konrad,

Quoted 22 lines · Konrad Dybcio
Quoted 19 lines · Dylan Van Assche

Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through
an allocated memory region to load files from the host filesystem
such as sensor configuration files.

Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar
to
downstream, to allow userspace to communicate with the SLPI via the
FastRPC interface for initializing the sensors on the SLPI.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 24
++++++++++++++++++++++++

 1 file changed, 24 insertions(+)
Quoted 15 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 884

Quoted 13 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +4 -0
index 3b547cb7aeb8..8ea4944f3ad6 100644
@@ -878,6 +878,14 @@ mdata_mem: mpss-metadata {
                         size = <0 0x4000>;
                         no-map;
                 };
+
+               fastrpc_mem: fastrpc {
+                       compatible = "shared-dma-pool";
+                       reusable;

Please move it last to get a nice reverse-Christmas-tree layout.

Will fix in v4.

Quoted 4 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 886

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alloc-ranges = <0 0x00000000 0
 0xffffffff>;

Would there be any issues with it starting over (1<<31 - 1)?

Quoted 9 lines

You mean a bigger region then, like the whole CMA region then? AFAIK,
the SLPI always use the same region expecting it to be in this range.
However, I cannot confirm more, as I have no insights in the firmware
running on there, this all comes from finding out what it exactly does
on downstream.

Quoted 5 lines

I was asking about the <.. 0 0xfff.f> part specifically, as that means
it can't be allocated above 4 gigs. But I guess it's just how qcom envisioned it.

I think it is limited by qcom, but I cannot be entirely sure :) In any case, for v4, do I keep 0xffffffff?

Quoted 4 lines

Also, please use 0x0 in alloc-ranges as well, this is all addresses/ reg sizes.

Konrad

Yes, will use 0x0 instead of 0.

Dylan

Quoted 57 lines
Quoted 57 lines
Quoted 4 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 886

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alignment = <0 0x400000>;

Please use 0x0 for the 0 here, as it's essentially reg.size with size-cells = 2

Will fix in v4.

Quoted 3 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 887

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       size = <0 0x1000000>;

Ditto

Will fix in v4.

Quoted 23 lines
Quoted 18 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+               };
         };


        adsp_pas: remoteproc-adsp {

arch/arm64/boot/dts/qcom/sdm845.dtsi +7 -0
@@ -3344,6 +3352,22 @@ glink-edge {
                                 label = "dsps";
                                 qcom,remote-pid = <3>;
                                 mboxes = <&apss_shared 24>;
+
+                               fastrpc {
+                                       compatible =
 "qcom,fastrpc";
+                                       qcom,glink-channels =
 "fastrpcglink-apps-dsp";
+                                       label = "sdsp";
+                                       qcom,non-secure-domain;
+                                       qcom,vmids = <0x3 0xF
Quoted 2 lines

0x5
0x6>;

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

Quoted 18 lines

https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

Konrad

Quoted 14 lines

+                                       memory-region = <&fastrpc_mem>;
+                                       #address-cells = <1>; +                                       #size-cells = <0>; +
+                                       compute-cb@0 { +                                               compatible = "qcom,fastrpc-compute-cb";
+                                               reg = <0>; +                                       };
+                               };
                        };
                };

Kind regards,
Dylan

#9 lore raw

Re: [PATCH v3 2/4] dts: arm64: qcom: sdm845: add SLPI FastRPC support

Quoted 61 lines · Dylan Van Assche
Quoted 60 lines · Konrad Dybcio
Quoted 57 lines · Dylan Van Assche

Hi Konrad,

Quoted 22 lines · Konrad Dybcio
Quoted 19 lines · Dylan Van Assche

Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through
an allocated memory region to load files from the host filesystem
such as sensor configuration files.

Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar
to
downstream, to allow userspace to communicate with the SLPI via the
FastRPC interface for initializing the sensors on the SLPI.

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 24
++++++++++++++++++++++++

 1 file changed, 24 insertions(+)
Quoted 15 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 884

Quoted 13 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +4 -0
index 3b547cb7aeb8..8ea4944f3ad6 100644
@@ -878,6 +878,14 @@ mdata_mem: mpss-metadata {
                         size = <0 0x4000>;
                         no-map;
                 };
+
+               fastrpc_mem: fastrpc {
+                       compatible = "shared-dma-pool";
+                       reusable;

Please move it last to get a nice reverse-Christmas-tree layout.

Will fix in v4.

Quoted 4 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 886

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alloc-ranges = <0 0x00000000 0
 0xffffffff>;

Would there be any issues with it starting over (1<<31 - 1)?

You mean a bigger region then, like the whole CMA region then? AFAIK,
the SLPI always use the same region expecting it to be in this range.
However, I cannot confirm more, as I have no insights in the firmware
running on there, this all comes from finding out what it exactly does
on downstream.

Quoted 8 lines
Quoted 5 lines

I was asking about the <.. 0 0xfff.f> part specifically, as that means
it can't be allocated above 4 gigs. But I guess it's just how qcom envisioned it.

I think it is limited by qcom, but I cannot be entirely sure :) In any case, for v4, do I keep 0xffffffff?

Yep, let's not stray into the unknown..

Konrad

Quoted 68 lines
Quoted 5 lines

Also, please use 0x0 in alloc-ranges as well, this is all addresses/ reg sizes.

Konrad

Yes, will use 0x0 instead of 0.

Dylan

Quoted 57 lines
Quoted 57 lines
Quoted 4 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 886

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       alignment = <0 0x400000>;

Please use 0x0 for the 0 here, as it's essentially reg.size with size-cells = 2

Will fix in v4.

Quoted 3 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi mdata_mem: mpss-metadata { · line 887

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+                       size = <0 0x1000000>;

Ditto

Will fix in v4.

Quoted 23 lines
Quoted 18 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -0
+               };
         };


        adsp_pas: remoteproc-adsp {

arch/arm64/boot/dts/qcom/sdm845.dtsi +7 -0
@@ -3344,6 +3352,22 @@ glink-edge {
                                 label = "dsps";
                                 qcom,remote-pid = <3>;
                                 mboxes = <&apss_shared 24>;
+
+                               fastrpc {
+                                       compatible =
 "qcom,fastrpc";
+                                       qcom,glink-channels =
 "fastrpcglink-apps-dsp";
+                                       label = "sdsp";
+                                       qcom,non-secure-domain;
+                                       qcom,vmids = <0x3 0xF
Quoted 2 lines

0x5
0x6>;

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

Quoted 18 lines

https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

Konrad

Quoted 14 lines

+                                       memory-region = <&fastrpc_mem>;
+                                       #address-cells = <1>; +                                       #size-cells = <0>; +
+                                       compute-cb@0 { +                                               compatible = "qcom,fastrpc-compute-cb";
+                                               reg = <0>; +                                       };
+                               };
                        };
                };

Kind regards,
Dylan

#10 lore raw

PATCH v3 3/4 dts: arm64: qcom: sdm845-oneplus: enable SLPI

In reply to Dylan Van Assche

Enable the SLPI DSP on the Oneplus 6 phone with a Qualcomm SDM845 SoC.

---
 arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +5 -0
index b01542d79ae2..3bd15984990c 100644
@@ -552,6 +552,11 @@ &qup_uart9_tx {
 	bias-disable;
 };
 
+&slpi_pas {
+	firmware-name = "qcom/sdm845/oneplus6/slpi.mbn";
+	status = "okay";
+};
+
 &sound {
 	compatible = "qcom,sdm845-sndcard";
 	pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
Signature · 1 line
2.39.2
Reviewed-by on v3 3/4
#11 lore raw

Re: [PATCH v3 3/4] dts: arm64: qcom: sdm845-oneplus: enable SLPI

Quoted 4 lines · Dylan Van Assche

Enable the SLPI DSP on the Oneplus 6 phone with a Qualcomm SDM845 SoC.

---

Konrad

Quoted 19 lines
 arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +5 -0
index b01542d79ae2..3bd15984990c 100644
@@ -552,6 +552,11 @@ &qup_uart9_tx {
 	bias-disable;
 };
 
+&slpi_pas {
+	firmware-name = "qcom/sdm845/oneplus6/slpi.mbn";
+	status = "okay";
+};
+
 &sound {
 	compatible = "qcom,sdm845-sndcard";
 	pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
#13 lore raw

PATCH v3 4/4 dts: arm64: qcom: sdm845-shift-axolotl: enable SLPI

In reply to Dylan Van Assche

Enable the SLPI DSP on the SHIFTPHONES SHIFT6mq phone with a Qualcomm SDM845 SoC.

---
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts +5 -0
index b54e304abf71..bd9571a258cf 100644
@@ -572,6 +572,11 @@ &qupv3_id_1 {
 	status = "okay";
 };
 
+&slpi_pas {
+	firmware-name = "qcom/sdm845/axolotl/slpi.mbn";
+	status = "okay";
+};
+
 &tlmm {
 	gpio-reserved-ranges = <0 4>, <81 4>;
 
Signature · 1 line
2.39.2
Reviewed-by on v3 4/4
#14 lore raw

Re: [PATCH v3 4/4] dts: arm64: qcom: sdm845-shift-axolotl: enable SLPI

Quoted 5 lines · Dylan Van Assche

Enable the SLPI DSP on the SHIFTPHONES SHIFT6mq phone with a Qualcomm SDM845 SoC.

---

Konrad

Quoted 19 lines
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts +5 -0
index b54e304abf71..bd9571a258cf 100644
@@ -572,6 +572,11 @@ &qupv3_id_1 {
 	status = "okay";
 };
 
+&slpi_pas {
+	firmware-name = "qcom/sdm845/axolotl/slpi.mbn";
+	status = "okay";
+};
+
 &tlmm {
 	gpio-reserved-ranges = <0 4>, <81 4>;
 
Reviewed-by on v3 4/4
#15 lore raw

Re: [PATCH v3 4/4] dts: arm64: qcom: sdm845-shift-axolotl: enable SLPI

In reply to Dylan Van Assche
Quoted 7 lines · Dylan Van Assche

Enable the SLPI DSP on the SHIFTPHONES SHIFT6mq phone with a Qualcomm SDM845 SoC.

---
 arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 5 +++++
 1 file changed, 5 insertions(+)

Best regards,
Krzysztof