[7/7] arm64: dts: allwinner: add a523 msgbox and remoteproc nodes
Commit Message
Add the hardware mailbox (CPUX_MSGBOX) node and the XuanTie RISC-V
remoteproc node for Allwinner A523/A527 SoCs. Connect the remoteproc
node to the MCU CCU clocks (bus, core) and resets (cfg, core) to
support remote processor lifecycle management and RPMsg IPC.
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: linux-remoteproc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@lists.linux.dev
Signed-off-by: Tim Michals <tcmichals@gmail.com>
---
.../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
Comments
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] dts: dt-binding schema violation in remoteproc compatible property
- [Low] dts: simple-bus node sorting violation for mailbox@3003000
--
commit 38cf09c8de53fb563929c96a81218691b32c1fef
Author: Tim Michals <tcmichals@gmail.com>
arm64: dts: allwinner: add a523 msgbox and remoteproc nodes
This commit adds the hardware mailbox and XuanTie RISC-V remoteproc nodes for
Allwinner A523/A527 SoCs. It also connects the remoteproc node to the
necessary clocks, resets, and mailboxes for lifecycle management and IPC.
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> index 85ef492ffeae7..7c5c39c568583 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> @@ -1144,5 +1144,44 @@ npu: npu@7122000 {
> resets = <&mcu_ccu RST_BUS_MCU_NPU>;
> power-domains = <&ppu PD_NPU>;
> };
> +
> + msgbox: mailbox@3003000 {
[Severity: Low]
Does this placement violate the device tree simple-bus unit address sorting
conventions? Typically, nodes within a simple-bus are sorted sequentially by
unit address in ascending order. Placing mailbox@3003000 after npu@7122000
breaks this ordering.
Should this node be moved earlier in the file to sit between
dma-controller@3002000 and efuse@3006000 to maintain correct sorting?
> + compatible = "allwinner,sun55i-a523-msgbox";
> + reg = <0x03003000 0x1000>,
> + <0x07094000 0x1000>,
> + <0x07120000 0x1000>,
> + <0x07136000 0x1000>;
> + reg-names = "arm", "dsp", "cpus", "rv";
[ ... ]
> + rproc: remoteproc@7130000 {
> + compatible = "allwinner,sun55i-a523-rproc",
> + "allwinner,sun55i-a527-rproc";
[Severity: Low]
Will this multi-string compatible property pass device tree validation?
The dt-binding for allwinner,sun55i-rproc.yaml defines the compatible
property strictly as an enum containing allwinner,sun55i-a523-rproc,
allwinner,sun55i-a527-rproc, and allwinner,sun55i-t527-rproc.
Since the schema uses enum instead of an items list, it requires the value to
be exactly one of the listed strings. Could this be changed to specify a
single compatible string to prevent dtbs_check warnings?
> + reg = <0x07130000 0x1000>,
> + <0x07280000 0x40000>,
@@ -1144,5 +1144,44 @@ npu: npu@7122000 {
resets = <&mcu_ccu RST_BUS_MCU_NPU>;
power-domains = <&ppu PD_NPU>;
};
+
+ msgbox: mailbox@3003000 {
+ compatible = "allwinner,sun55i-a523-msgbox";
+ reg = <0x03003000 0x1000>,
+ <0x07094000 0x1000>,
+ <0x07120000 0x1000>,
+ <0x07136000 0x1000>;
+ reg-names = "arm", "dsp", "cpus", "rv";
+ clocks = <&ccu CLK_BUS_MSGBOX>;
+ resets = <&ccu RST_BUS_MSGBOX>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+ #mbox-cells = <1>;
+ };
+
+ rproc: remoteproc@7130000 {
+ compatible = "allwinner,sun55i-a523-rproc",
+ "allwinner,sun55i-a527-rproc";
+ reg = <0x07130000 0x1000>,
+ <0x07280000 0x40000>,
+ <0x072c0000 0x40000>,
+ <0x07010364 0x4>;
+ reg-names = "cfg", "r_sram", "r_sram1", "remap";
+ clocks = <&mcu_ccu CLK_BUS_MCU_RISCV_CFG>,
+ <&mcu_ccu CLK_MCU_RISCV>,
+ <&mcu_ccu CLK_BUS_MCU_PUBSRAM>,
+ <&mcu_ccu CLK_BUS_MCU_RISCV_MSGBOX>;
+ clock-names = "bus", "core", "sram", "msgbox";
+ resets = <&mcu_ccu RST_BUS_MCU_RISCV_CFG>,
+ <&mcu_ccu RST_BUS_MCU_RISCV_CORE>,
+ <&mcu_ccu RST_BUS_MCU_PUBSRAM>,
+ <&mcu_ccu RST_BUS_MCU_RISCV_MSGBOX>;
+ reset-names = "cfg", "core", "sram", "msgbox";
+ mboxes = <&msgbox 8>, <&msgbox 9>;
+ mbox-names = "rx", "tx";
+ status = "disabled";
+ };
};
};