]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: ti: k3-am62-ti-ipc-firmware: Refactor IPC cfg into new dtsi
authorBeleswar Padhi <b-padhi@ti.com>
Mon, 8 Sep 2025 14:28:23 +0000 (19:58 +0530)
committerNishanth Menon <nm@ti.com>
Fri, 12 Sep 2025 04:15:32 +0000 (09:45 +0530)
The TI K3 AM62 SoCs have multiple programmable remote processors like
R5F, M4F etc. The TI SDKs for AM62 SoCs offer sample firmwares which
could be run on these cores to demonstrate an "echo" IPC test. Those
firmware require certain memory carveouts to be reserved from system
memory, timers to be reserved, and certain mailbox configurations for
interrupt based messaging. These configurations could be different for a
different firmware.

While DT is not meant for system configurations, at least refactor these
configurations from board level DTS into a dtsi for now. This dtsi for
TI IPC firmware is board-independent and can be applied to all boards
from the same SoC Family. This gets rid of code duplication and allows
more freedom for users developing custom firmware (or no firmware) to
utilize system resources better; easily by swapping out this dtsi. To
maintain backward compatibility, the dtsi is included in all boards.

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de> # phycore-am62x
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Link: https://patch.msgid.link/20250908142826.1828676-32-b-padhi@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm64/boot/dts/ti/k3-am62-phycore-som.dtsi
arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts
arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi

index 75b7e64f665949cd2c7077794ef2ada444696490..eeca643fedbe997034cfffd7d365e796876a544a 100644 (file)
                        no-map;
                };
 
-               mcu_m4fss_dma_memory_region: memory@9cb00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cb00000 0x00 0x100000>;
-                       no-map;
-               };
-
-               mcu_m4fss_memory_region: memory@9cc00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cc00000 0x00 0xe00000>;
-                       no-map;
-               };
-
                wkup_r5fss0_core0_dma_memory_region: memory@9da00000 {
                        compatible = "shared-dma-pool";
                        reg = <0x00 0x9da00000 0x00 0x100000>;
        };
 };
 
-&mailbox0_cluster0 {
-       status = "okay";
-
-       mbox_m4_0: mbox-m4-0 {
-               ti,mbox-rx = <0 0 0>;
-               ti,mbox-tx = <1 0 0>;
-       };
-
-       mbox_r5_0: mbox-r5-0 {
-               ti,mbox-rx = <2 0 0>;
-               ti,mbox-tx = <3 0 0>;
-       };
-};
-
 &main_pktdma {
        bootph-all;
 };
        };
 };
 
-&mcu_m4fss {
-       mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
-       memory-region = <&mcu_m4fss_dma_memory_region>,
-                       <&mcu_m4fss_memory_region>;
-       status = "okay";
-};
-
 &ospi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&ospi0_pins_default>;
        status = "okay";
 };
 
-&wkup_r5fss0 {
-       status = "okay";
-};
-
-&wkup_r5fss0_core0 {
-       mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
-       memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
-                       <&wkup_r5fss0_core0_memory_region>;
-       status = "okay";
-};
+#include "k3-am62-ti-ipc-firmware.dtsi"
index 621fb6c52db17a0e7b4eb21b1de6d19b76e79f2a..7a4cffc27bda31bb780612708c67f0acded27d80 100644 (file)
                        linux,cma-default;
                };
 
-               mcu_m4fss_dma_memory_region: memory@9cb00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cb00000 0x00 0x100000>;
-                       no-map;
-               };
-
-               mcu_m4fss_memory_region: memory@9cc00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cc00000 0x00 0xe00000>;
-                       no-map;
-               };
-
                secure_tfa_ddr: tfa@9e780000 {
                        reg = <0x00 0x9e780000 0x00 0x80000>;
                        alignment = <0x1000>;
        pinctrl-0 = <&epwm2_pins_default>;
 };
 
-&mailbox0_cluster0 {
-       status = "okay";
-
-       mbox_m4_0: mbox-m4-0 {
-               ti,mbox-rx = <0 0 0>;
-               ti,mbox-tx = <1 0 0>;
-       };
-
-       mbox_r5_0: mbox-r5-0 {
-               ti,mbox-rx = <2 0 0>;
-               ti,mbox-tx = <3 0 0>;
-       };
-};
-
 &main_uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&main_uart0_pins_default>;
        status = "okay";
 };
 
-&mcu_m4fss {
-       mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
-       memory-region = <&mcu_m4fss_dma_memory_region>,
-                       <&mcu_m4fss_memory_region>;
-       status = "okay";
-};
-
-&wkup_r5fss0 {
-       status = "okay";
-};
-
-&wkup_r5fss0_core0 {
-       mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
-       memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
-                       <&wkup_r5fss0_core0_memory_region>;
-       status = "okay";
-};
-
 &mcu_pmx0 {
        wkup_uart0_pins_default: wkup-uart0-default-pins {
                pinctrl-single,pins = <
                };
        };
 };
+
+#include "k3-am62-ti-ipc-firmware.dtsi"
diff --git a/arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am62-ti-ipc-firmware.dtsi
new file mode 100644 (file)
index 0000000..ea69fab
--- /dev/null
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/**
+ * Device Tree Source for enabling IPC using TI SDK firmware on AM62 SoCs
+ *
+ * Copyright (C) 2021-2025 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+&reserved_memory {
+       mcu_m4fss_dma_memory_region: memory@9cb00000 {
+               compatible = "shared-dma-pool";
+               reg = <0x00 0x9cb00000 0x00 0x100000>;
+               no-map;
+       };
+
+       mcu_m4fss_memory_region: memory@9cc00000 {
+               compatible = "shared-dma-pool";
+               reg = <0x00 0x9cc00000 0x00 0xe00000>;
+               no-map;
+       };
+};
+
+&mailbox0_cluster0 {
+       status = "okay";
+
+       mbox_m4_0: mbox-m4-0 {
+               ti,mbox-rx = <0 0 0>;
+               ti,mbox-tx = <1 0 0>;
+       };
+
+       mbox_r5_0: mbox-r5-0 {
+               ti,mbox-rx = <2 0 0>;
+               ti,mbox-tx = <3 0 0>;
+       };
+};
+
+&mcu_m4fss {
+       mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
+       memory-region = <&mcu_m4fss_dma_memory_region>,
+                       <&mcu_m4fss_memory_region>;
+       status = "okay";
+};
+
+&wkup_r5fss0 {
+       status = "okay";
+};
+
+&wkup_r5fss0_core0 {
+       mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
+       memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
+                       <&wkup_r5fss0_core0_memory_region>;
+       status = "okay";
+};
index 5ecdd833587e1c4255e95c9e67ace06eb68543a3..dc4b228a9fd7ee60c44017ebfa4ce7d9f1927c72 100644 (file)
                        no-map;
                };
 
-               mcu_m4fss_dma_memory_region: memory@9cb00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cb00000 0x00 0x100000>;
-                       no-map;
-               };
-
-               mcu_m4fss_memory_region: memory@9cc00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cc00000 0x00 0xe00000>;
-                       no-map;
-               };
-
                wkup_r5fss0_core0_dma_memory_region: memory@9da00000 {
                        compatible = "shared-dma-pool";
                        reg = <0x00 0x9da00000 0x00 0x100000>;
        status = "disabled";
 };
 
-&mailbox0_cluster0 {
-       status = "okay";
-
-       mbox_m4_0: mbox-m4-0 {
-               ti,mbox-rx = <0 0 0>;
-               ti,mbox-tx = <1 0 0>;
-       };
-
-       mbox_r5_0: mbox-r5-0 {
-               ti,mbox-rx = <2 0 0>;
-               ti,mbox-tx = <3 0 0>;
-       };
-};
-
-&mcu_m4fss {
-       mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
-       memory-region = <&mcu_m4fss_dma_memory_region>,
-                       <&mcu_m4fss_memory_region>;
-       status = "okay";
-};
-
-&wkup_r5fss0 {
-       status = "okay";
-};
-
-&wkup_r5fss0_core0 {
-       mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
-       memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
-                       <&wkup_r5fss0_core0_memory_region>;
-       status = "okay";
-};
-
 /* Verdin CAN_1 */
 &main_mcan0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_wkup_uart0>;
        status = "disabled";
 };
+
+#include "k3-am62-ti-ipc-firmware.dtsi"
index 05cba3cfc79ee64349e76413f411cb8fca2bc55b..241902fc1cf297966cf4f0e24d6d5c64a1cf2ce9 100644 (file)
                        linux,cma-default;
                };
 
-               mcu_m4fss_dma_memory_region: memory@9cb00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cb00000 0x00 0x100000>;
-                       no-map;
-               };
-
-               mcu_m4fss_memory_region: memory@9cc00000 {
-                       compatible = "shared-dma-pool";
-                       reg = <0x00 0x9cc00000 0x00 0xe00000>;
-                       no-map;
-               };
-
                wkup_r5fss0_core0_dma_memory_region: memory@9da00000 {
                        compatible = "shared-dma-pool";
                        reg = <0x00 0x9da00000 0x00 0x100000>;
        };
 };
 
-&mailbox0_cluster0 {
-       status = "okay";
-
-       mbox_m4_0: mbox-m4-0 {
-               ti,mbox-rx = <0 0 0>;
-               ti,mbox-tx = <1 0 0>;
-       };
-
-       mbox_r5_0: mbox-r5-0 {
-               ti,mbox-rx = <2 0 0>;
-               ti,mbox-tx = <3 0 0>;
-       };
-};
-
-&mcu_m4fss {
-       mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
-       memory-region = <&mcu_m4fss_dma_memory_region>,
-                       <&mcu_m4fss_memory_region>;
-       status = "okay";
-};
-
-&wkup_r5fss0 {
-       status = "okay";
-};
-
-&wkup_r5fss0_core0 {
-       mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
-       memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
-                       <&wkup_r5fss0_core0_memory_region>;
-       status = "okay";
-};
-
 &usbss0 {
        bootph-all;
        status = "okay";
        pinctrl-0 = <&main_epwm1_pins_default>;
        status = "okay";
 };
+
+#include "k3-am62-ti-ipc-firmware.dtsi"