dts: qcom: arm64: sdm845: SLPI DSP enablement
Subsystems (4)
v2 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 to support the SLPI DSP in SDM845 (v2):
https://lore.kernel.org/linux-remoteproc/[email protected]/
2. FastRPC changes to support the SLPI DSP in SDM845 (v2):
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
Kind regards,
Dylan Van Assche
Dylan Van Assche (5):
dts: arm64: qcom: sdm845: add SLPI remoteproc
dt-bindings: misc: qcom,fastrpc: allow FastRPC node without reg entry
dts: arm64: qcom: sdm845: add SLPI FastRPC support
dts: arm64: qcom: sdm845-oneplus: enable SLPI
dts: arm64: qcom: sdm845-shift-axolotl: enable SLPI
.../bindings/misc/qcom,fastrpc.yaml | 3 +- .../boot/dts/qcom/sdm845-oneplus-common.dtsi | 5 ++ .../boot/dts/qcom/sdm845-shift-axolotl.dts | 5 ++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 59 +++++++++++++++++++ 4 files changed, 70 insertions(+), 2 deletions(-)
Signature · 1 line
2.39.2
PATCH v2 1/5 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
@@ -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
Re: [PATCH v2 1/5] 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.
Signed-off-by Dylan Van Assche <[email protected]>--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)arch/arm64/boot/dts/qcom/sdm845.dtsi +0
-0
arch/arm64/boot/dts/qcom/sdm845.dtsi glink-edge { · line 3315
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +2
-0@@ -3311,6 +3311,42 @@ glink-edge { }; }; + slpi_pas: remoteproc@5c00000 { + compatible = "qcom,sdm845-slpi-pas";
Undocumented compatible.
Best regards,
Krzysztof
Re: [PATCH v2 1/5] dts: arm64: qcom: sdm845: add SLPI remoteproc
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 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.
Signed-off-by Dylan Van Assche <[email protected]>--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)arch/arm64/boot/dts/qcom/sdm845.dtsi +0
-0@@ -3311,6 +3311,42 @@ glink-edge { }; };
Quoted 4 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi glink-edge { · line 3315
Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +2
-0+ slpi_pas: remoteproc@5c00000 { + compatible = "qcom,sdm845-slpi-pas";Undocumented compatible.
Ah, no, I see you linked bindings in separate patches.
Best regards,
Krzysztof
PATCH v2 2/5 dt-bindings: misc: qcom,fastrpc: allow FastRPC node without reg entry
In reply to Dylan Van AsscheFastRPC nodes may exist without a registry property and actual Compute Banks in some cases such as the SLPI on the Qualcomm SDM845 SoC. Relax the regex to allow such FastRPC nodes and remove 'reg' as a required property.
--- Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml +1 -2
@@ -64,7 +64,7 @@ properties: const: 0 patternProperties: - "(compute-)?cb@[0-9]*$": + "(compute-)?cb(@[0-9]*)?$": type: object description: >
@@ -89,7 +89,6 @@ patternProperties: required: - compatible - - reg additionalProperties: false
Signature · 1 line
2.39.2
Re: [PATCH v2 2/5] dt-bindings: misc: qcom,fastrpc: allow FastRPC node without reg entry
Quoted 1 line · Dylan Van Assche
FastRPC nodes may exist without a registry property and actual
Why would they exist without unit address?
Quoted 1 line
Compute Banks in some cases such as the SLPI on the Qualcomm SDM845 SoC.
I do not see there anything disallowing unit address yet...
Quoted 2 lines
Relax the regex to allow such FastRPC nodes and remove 'reg' as a required property.
No, at least not without proper explanation why unit address is not allowed for these.
Best regards,
Krzysztof
PATCH v2 3/5 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 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +23 -0
@@ -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,21 @@ 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 { + compatible = "qcom,fastrpc-compute-cb"; + }; + }; }; };
Signature · 1 line
2.39.2
Re: [PATCH v2 3/5] dts: arm64: qcom: sdm845: add SLPI FastRPC support
Quoted 36 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-sdspand 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 <[email protected]>--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/arm64/boot/dts/qcom/sdm845.dtsi +8
-0@@ -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,21 @@ 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 +10
-0+ + 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>;
This does not make sense now with children nodes not having unit addresses... but anyway, I do not understand why this one compute node cannot have unit address.
Best regards,
Krzysztof
PATCH v2 4/5 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 v2 5/5 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