Add the hardware mailbox (CPUX_MSGBOX) node and the XuanTie E907 RISC-V
remoteproc node for Allwinner A523/A527/T527 SoCs.

Connect the remoteproc node to the MCU CCU clocks (bus, core, sram,
msgbox) and resets (cfg, core, sram, msgbox) and mailbox channels 8 & 9
for bidirectional host-coprocessor IPC.

Signed-off-by: Tim Michals <[email protected]>
---
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi 
b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index 85ef492ffeae..b4699c4df5e9 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -605,6 +605,23 @@ dma: dma-controller@3002000 {
                        #dma-cells = <1>;
                };
 
+               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>;
+                       interrupt-names = "arm", "dsp", "cpus", "rv";
+                       #mbox-cells = <1>;
+               };
+
                sid: efuse@3006000 {
                        compatible = "allwinner,sun55i-a523-sid",
                                     "allwinner,sun50i-a64-sid";
@@ -1144,5 +1161,27 @@ npu: npu@7122000 {
                        resets = <&mcu_ccu RST_BUS_MCU_NPU>;
                        power-domains = <&ppu PD_NPU>;
                };
+
+               rproc: remoteproc@7130000 {
+                       compatible = "allwinner,sun55i-a523-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";
+               };
        };
 };
-- 
2.43.0


Reply via email to