* [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc
@ 2023-04-06 17:31 Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 1/5] " Dylan Van Assche
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Dylan Van Assche @ 2023-04-06 17:31 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
Cc: Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
~postmarketos/upstreaming, phone-devel, Dylan Van Assche
* 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 (v3) to support the SLPI DSP in SDM845:
https://lore.kernel.org/linux-remoteproc/20230330164633.117335-1-me@dylanvanassche.be
2. FastRPC changes (v2) to support the SLPI DSP in SDM845:
https://lore.kernel.org/linux-arm-msm/20230327184204.498032-1-me@dylanvanassche.be/
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
Changes in v4:
- Moved SLPI node in sdm845.dtsi to honor sorting by unit address
- Reordered FastRPC memory nodes to have a reverse-Christmas-tree layout
- Use 0x0 instead of 0 for memory addresses
- Add SSC_Q6 (0x5) and ADSP_Q6 (0x6) VMIDs to qcom,scm.h
- Replace magic VMID values by the qcom,scm.h in sdm845.dtsi
- Added Reviewed-by tags for patches:
- 'dts: arm64: qcom: sdm845-oneplus: enable SLPI'
- 'dts: arm64: qcom: sdm845-shift-axolotl: enable SLPI'
as these are unchanged in v4.
Changes in v5:
- Squashed patch 'dts: qcom: arm64: qcom: sdm845: use defines for VMIDs'
into 'dts: arm64: qcom: sdm845: add SLPI FastRPC support'.
- Reordered patches do make sure we first define the additional VMIDs
in dt-bindings before using them.
- Added Acked-by for
'dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs'.
- Fix order of 'arm64' and 'dts' in patch subjects to match tree.
Kind regards,
Dylan Van Assche
Dylan Van Assche (5):
arm64: dts: qcom: sdm845: add SLPI remoteproc
dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs
arm64: dts: qcom: sdm845: add SLPI FastRPC support
arm64: dts: qcom: sdm845-oneplus: enable SLPI
arm64: dts: 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 | 62 +++++++++++++++++++
include/dt-bindings/firmware/qcom,scm.h | 2 +
4 files changed, 74 insertions(+)
--
2.39.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 1/5] arm64: dts: qcom: sdm845: add SLPI remoteproc
2023-04-06 17:31 [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Dylan Van Assche
@ 2023-04-06 17:31 ` Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 2/5] dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs Dylan Van Assche
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Dylan Van Assche @ 2023-04-06 17:31 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
Cc: Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
~postmarketos/upstreaming, phone-devel, 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.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 36 ++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 2f32179c7d1b..338a715d110a 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -3325,6 +3325,42 @@ gpucc: clock-controller@5090000 {
"gcc_gpu_gpll0_div_clk_src";
};
+ 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>;
+ };
+ };
+
stm@6002000 {
compatible = "arm,coresight-stm", "arm,primecell";
reg = <0 0x06002000 0 0x1000>,
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 2/5] dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs
2023-04-06 17:31 [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 1/5] " Dylan Van Assche
@ 2023-04-06 17:31 ` Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 3/5] arm64: dts: qcom: sdm845: add SLPI FastRPC support Dylan Van Assche
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Dylan Van Assche @ 2023-04-06 17:31 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
Cc: Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
~postmarketos/upstreaming, phone-devel, Dylan Van Assche,
Krzysztof Kozlowski
SSC_Q6 and ADSP_Q6 are used in the FastRPC driver for accessing
the secure world.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
include/dt-bindings/firmware/qcom,scm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/dt-bindings/firmware/qcom,scm.h b/include/dt-bindings/firmware/qcom,scm.h
index 1a4e68fa0744..d1dc09e72923 100644
--- a/include/dt-bindings/firmware/qcom,scm.h
+++ b/include/dt-bindings/firmware/qcom,scm.h
@@ -8,6 +8,8 @@
#define _DT_BINDINGS_FIRMWARE_QCOM_SCM_H
#define QCOM_SCM_VMID_HLOS 0x3
+#define QCOM_SCM_VMID_SSC_Q6 0x5
+#define QCOM_SCM_VMID_ADSP_Q6 0x6
#define QCOM_SCM_VMID_MSS_MSA 0xF
#define QCOM_SCM_VMID_WLAN 0x18
#define QCOM_SCM_VMID_WLAN_CE 0x19
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 3/5] arm64: dts: qcom: sdm845: add SLPI FastRPC support
2023-04-06 17:31 [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 1/5] " Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 2/5] dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs Dylan Van Assche
@ 2023-04-06 17:31 ` Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 4/5] arm64: dts: qcom: sdm845-oneplus: enable SLPI Dylan Van Assche
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Dylan Van Assche @ 2023-04-06 17:31 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
Cc: Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
~postmarketos/upstreaming, phone-devel, 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.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 338a715d110a..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>
@@ -878,6 +879,14 @@ mdata_mem: mpss-metadata {
size = <0 0x4000>;
no-map;
};
+
+ fastrpc_mem: fastrpc {
+ compatible = "shared-dma-pool";
+ alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
+ alignment = <0x0 0x400000>;
+ size = <0x0 0x1000000>;
+ reusable;
+ };
};
adsp_pas: remoteproc-adsp {
@@ -3358,6 +3367,23 @@ 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 = <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>;
+
+ compute-cb@0 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <0>;
+ };
+ };
};
};
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 4/5] arm64: dts: qcom: sdm845-oneplus: enable SLPI
2023-04-06 17:31 [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Dylan Van Assche
` (2 preceding siblings ...)
2023-04-06 17:31 ` [PATCH v5 3/5] arm64: dts: qcom: sdm845: add SLPI FastRPC support Dylan Van Assche
@ 2023-04-06 17:31 ` Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 5/5] arm64: dts: qcom: sdm845-shift-axolotl: " Dylan Van Assche
2023-04-07 18:36 ` [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Bjorn Andersson
5 siblings, 0 replies; 7+ messages in thread
From: Dylan Van Assche @ 2023-04-06 17:31 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
Cc: Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
~postmarketos/upstreaming, phone-devel, Dylan Van Assche,
Krzysztof Kozlowski
Enable the SLPI DSP on the Oneplus 6 phone with a Qualcomm SDM845 SoC.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index b01542d79ae2..3bd15984990c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -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>;
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 5/5] arm64: dts: qcom: sdm845-shift-axolotl: enable SLPI
2023-04-06 17:31 [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Dylan Van Assche
` (3 preceding siblings ...)
2023-04-06 17:31 ` [PATCH v5 4/5] arm64: dts: qcom: sdm845-oneplus: enable SLPI Dylan Van Assche
@ 2023-04-06 17:31 ` Dylan Van Assche
2023-04-07 18:36 ` [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Bjorn Andersson
5 siblings, 0 replies; 7+ messages in thread
From: Dylan Van Assche @ 2023-04-06 17:31 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
Cc: Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
~postmarketos/upstreaming, phone-devel, Dylan Van Assche,
Krzysztof Kozlowski
Enable the SLPI DSP on the SHIFTPHONES SHIFT6mq phone with a
Qualcomm SDM845 SoC.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
index b54e304abf71..bd9571a258cf 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
@@ -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>;
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc
2023-04-06 17:31 [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Dylan Van Assche
` (4 preceding siblings ...)
2023-04-06 17:31 ` [PATCH v5 5/5] arm64: dts: qcom: sdm845-shift-axolotl: " Dylan Van Assche
@ 2023-04-07 18:36 ` Bjorn Andersson
5 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2023-04-07 18:36 UTC (permalink / raw)
To: Rob Herring, Andy Gross, Dylan Van Assche, Krzysztof Kozlowski
Cc: phone-devel, devicetree, linux-kernel, ~postmarketos/upstreaming,
linux-arm-msm, Konrad Dybcio
On Thu, 6 Apr 2023 19:31:43 +0200, Dylan Van Assche wrote:
> * 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.
>
> [...]
Applied, thanks!
[1/5] arm64: dts: qcom: sdm845: add SLPI remoteproc
commit: 74588aada59a9870139ef4c39d640939dcc08381
[2/5] dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs
commit: 77c7a41e052502f0d8827c63eddae6dd5d717b20
[3/5] arm64: dts: qcom: sdm845: add SLPI FastRPC support
commit: 755b5e094feb974f65cc51371c3482042d5fbadc
[4/5] arm64: dts: qcom: sdm845-oneplus: enable SLPI
commit: c3998dc09f0e70c1e359b819b1b5d0c482f30500
[5/5] arm64: dts: qcom: sdm845-shift-axolotl: enable SLPI
commit: 48bd05786ec72b991430d5493743293df5da56a8
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-07 18:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06 17:31 [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 1/5] " Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 2/5] dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 3/5] arm64: dts: qcom: sdm845: add SLPI FastRPC support Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 4/5] arm64: dts: qcom: sdm845-oneplus: enable SLPI Dylan Van Assche
2023-04-06 17:31 ` [PATCH v5 5/5] arm64: dts: qcom: sdm845-shift-axolotl: " Dylan Van Assche
2023-04-07 18:36 ` [PATCH v5 0/5] arm64: dts: qcom: sdm845: add SLPI remoteproc Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox