Re: [PATCH v2 1/2] dt-bindings: interrupt-controller: mpm: Pass MSG RAM slice through phandle

From: Stephan Gerhold
Date: Fri Apr 07 2023 - 07:37:16 EST


On Thu, Apr 06, 2023 at 09:55:40PM +0200, Konrad Dybcio wrote:
> [...]
> I don't really know what kind.. I can add something like:
>
> rpm {
> compatible = "qcom,rpm", "simple-mfd";
>
> mpm: interrupt-controller {
> ...
> };
>

IMO we should indeed add something like this, because the current
representation of the RPM below the top level /smd node is misleading.
"SMD" is not a device, bus, component or anything like that. It is just
the communication protocol. There should not be a top-level DT node for
this.

Instead there should be a dedicated device tree node for the RPM like in
your example above, which will allow adding properties and subnodes to
it as needed.

For unrelated reasons I actually have some patches for this, that switch
the /smd top-level node to a "remoteproc-like" node dedicated to the
RPM, similar to how WCNSS/ADSP/Modem/etc are represented. I need this to
add additional (optional) properties like "resets" and "iommus" for the
RPM, but it would allow adding arbitrary subnodes as well:

https://github.com/msm8916-mainline/linux/commit/35231ac28703805daa8220f1233847c7df34589e

I could finish those up and post them if that would help...

Thanks,
Stephan

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index dcbc5972248b22..1c24b01bd268c8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -310,10 +310,10 @@
};
};

- smd {
- compatible = "qcom,smd";
+ rpm: remoteproc-rpm {
+ compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc";

- rpm {
+ smd-edge {
interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
qcom,ipc = <&apcs 8 0>;
qcom,smd-edge = <15>;