dts: qcom: arm64: sdm845: SLPI DSP enablement
v4 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 (v3) 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
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.
Kind regards,
Dylan Van Assche
Dylan Van Assche (6):
dts: arm64: qcom: sdm845: add SLPI remoteproc
dts: arm64: qcom: sdm845: add SLPI FastRPC support
dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs
dts: qcom: arm64: qcom: sdm845: use defines for VMIDs
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 | 62 +++++++++++++++++++ include/dt-bindings/firmware/qcom,scm.h | 2 + 4 files changed, 74 insertions(+)
Signature · 1 line
2.39.2
PATCH v4 1/6 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
@@ -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>,
Signature · 1 line
2.39.2
PATCH v4 2/6 dts: arm64: qcom: sdm845: add SLPI FastRPC support
In reply to Dylan Van AsscheQualcomm 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
@@ -878,6 +878,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 +3366,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
PATCH v4 3/6 dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs
In reply to Dylan Van AsscheSSC_Q6 and ADSP_Q6 are used in the FastRPC driver for accessing the secure world.
--- include/dt-bindings/firmware/qcom,scm.h | 2 ++ 1 file changed, 2 insertions(+)
include/dt-bindings/firmware/qcom,scm.h +2 -0
@@ -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
Signature · 1 line
2.39.2
Re: [PATCH v4 3/6] dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs
Quoted 6 lines · Dylan Van Assche
SSC_Q6andADSP_Q6are used in the FastRPC driver for accessing the secure world.Signed-off-by Dylan Van Assche <[email protected]>--- include/dt-bindings/firmware/qcom,scm.h | 2 ++
Best regards,
Krzysztof
PATCH v4 4/6 dts: qcom: arm64: qcom: sdm845: use defines for VMIDs
In reply to Dylan Van AsscheUse VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS instead of hardcoded magic values.
--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -1
@@ -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>
@@ -3372,7 +3373,8 @@ fastrpc { qcom,glink-channels = "fastrpcglink-apps-dsp"; label = "sdsp"; qcom,non-secure-domain; - qcom,vmids = <0x3 0xF 0x5 0x6>; + 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>;
Signature · 1 line
2.39.2
Re: [PATCH v4 4/6] dts: qcom: arm64: qcom: sdm845: use defines for VMIDs
Quoted 21 lines · Dylan Van Assche
Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS instead of hardcoded magic values.
Signed-off-by Dylan Van Assche <[email protected]>--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sdm845.dtsi +1
-0@@ -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>
arch/arm64/boot/dts/qcom/sdm845.dtsi fastrpc { · line 3375
Quoted 4 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +0
-1@@ -3372,7 +3373,8 @@ fastrpc { qcom,glink-channels = "fastrpcglink-apps-dsp"; label = "sdsp"; qcom,non-secure-domain; - qcom,vmids = <0x3 0xF 0x5 0x6>;
Didn't you just add it in previous patch? Don't add incorrect code which you immediately change.
Best regards,
Krzysztof
Re: [PATCH v4 4/6] dts: qcom: arm64: qcom: sdm845: use defines for VMIDs
Hi Krzysztof,
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Dylan Van Assche
Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS instead of hardcoded magic values.
Signed-off-by Dylan Van Assche <[email protected]>---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sdm845.dtsi +1
-0@@ -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>@@ -3372,7 +3373,8 @@ fastrpc {qcom,glink-channels = "fastrpcglink-apps-dsp";
Quoted 9 lines
Quoted 4 lines
label = "sdsp"; qcom,non-secure-domain; - qcom,vmids = <
0x30xF0x50x6>;Didn't you just add it in previous patch? Don't add incorrect code which
you immediately change.
Both are similar, the code is in fact the same. I followed what Konrad suggested in v3 to make a patch on top:
Quoted 1 line
Please use the recently-introduced header and depend on (and
make a patch atop)
I can squash this patch in the FastRPC node one, that would make it disappear. Let me know what you prefer and I will do it in v5 :)
Quoted 3 lines
Best regards,
Krzysztof
Kind regards,
Dylan Van Assche
Re: [PATCH v4 4/6] dts: qcom: arm64: qcom: sdm845: use defines for VMIDs
Quoted 38 lines · Dylan Van Assche
Hi Krzysztof,
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Dylan Van Assche
Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS instead of hardcoded magic values.
Signed-off-by Dylan Van Assche <[email protected]>---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sdm845.dtsi +1
-0@@ -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>@@ -3372,7 +3373,8 @@ fastrpc {qcom,glink-channels = "fastrpcglink-apps-dsp";
Quoted 9 lines
Quoted 4 lines
label = "sdsp"; qcom,non-secure-domain; - qcom,vmids = <
0x30xF0x50x6>;Didn't you just add it in previous patch? Don't add incorrect code which
you immediately change.
Quoted 2 lines
Both are similar, the code is in fact the same. I followed what Konrad suggested in v3 to make a patch on top:
I don't understand. Device nodes are similar, but they are different? If you add a line in patch X and change it in patch X+1, then something is wrong. Isn't this the case here or these are different device nodes?
Best regards,
Krzysztof
Re: [PATCH v4 4/6] dts: qcom: arm64: qcom: sdm845: use defines for VMIDs
Hi,
Quoted 46 lines · Krzysztof Kozlowski
Quoted 41 lines · Dylan Van Assche
Hi Krzysztof,
Quoted 28 lines · Krzysztof Kozlowski
Quoted 27 lines · Dylan Van Assche
Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS
instead of hardcoded magic values.Signed-off-by Dylan Van Assche <[email protected]>---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sdm845.dtsi +1
-0@@ -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>@@ -3372,7 +3373,8 @@ fastrpc {qcom,glink-channels = "fastrpcglink-apps-dsp";
label = "sdsp"; qcom,non-secure-domain;Quoted 9 lines
Quoted 3 lines
- qcom,vmids = <
0x30xF0x50x6>;Didn't you just add it in previous patch? Don't add incorrect code
which
you immediately change.Quoted 3 lines
Both are similar, the code is in fact the same. I followed what Konrad
suggested in v3 to make a patch on top:
Quoted 6 lines
I don't understand. Device nodes are similar, but they are different? If
you add a line in patch X and change it in patch X+1, then something is
wrong. Isn't this the case here or these are different device nodes?
They are the same node.
In the original patch the values are hex values, but Konrad asked to make a patch on top depending on the qcom scm header which has these magic hex values with defines.
I can make the defines as default, no problem. Will do in v5.
Kind regards,
Dylan
Quoted 4 lines
Best regards,
Krzysztof
Re: [PATCH v4 4/6] dts: qcom: arm64: qcom: sdm845: use defines for VMIDs
Quoted 56 lines · Dylan Van Assche
Hi,
Quoted 46 lines · Krzysztof Kozlowski
Quoted 41 lines · Dylan Van Assche
Hi Krzysztof,
Quoted 28 lines · Krzysztof Kozlowski
Quoted 27 lines · Dylan Van Assche
Use VMID defines for SLPI's FastRPC node in the Qualcomm SDM845 DTS
instead of hardcoded magic values.Signed-off-by Dylan Van Assche <[email protected]>---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sdm845.dtsi +1
-0@@ -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>@@ -3372,7 +3373,8 @@ fastrpc {qcom,glink-channels = "fastrpcglink-apps-dsp";
label = "sdsp"; qcom,non-secure-domain;Quoted 9 lines
Quoted 3 lines
- qcom,vmids = <
0x30xF0x50x6>;Didn't you just add it in previous patch? Don't add incorrect code
which
you immediately change.Quoted 3 lines
Both are similar, the code is in fact the same. I followed what Konrad
suggested in v3 to make a patch on top:Quoted 6 lines
I don't understand. Device nodes are similar, but they are different? If
you add a line in patch X and change it in patch X+1, then something is
wrong. Isn't this the case here or these are different device nodes?
Quoted 4 lines
They are the same node.
In the original patch the values are hex values, but Konrad asked to make a patch on top depending on the qcom scm header which has these magic hex values with defines.
Sorry if that wasn't clear, but what I meant to ask for is "pick this patch that will get in soon and add the VMIDs you need on top of it so that you can send it in parallel and Bjorn can merge both easily" and had nothing to do with splitting out its inclusion in the dts
Konrad
Quoted 10 lines
I can make the defines as default, no problem. Will do in v5.
Kind regards,
DylanQuoted 4 lines
Best regards,
Krzysztof
PATCH v4 5/6 dts: arm64: qcom: sdm845-oneplus: enable SLPI
In reply to Dylan Van AsscheEnable 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
@@ -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
PATCH v4 6/6 dts: arm64: qcom: sdm845-shift-axolotl: enable SLPI
In reply to Dylan Van AsscheEnable 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
@@ -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