Skip to content

Commit

Permalink
dts: nordic: nrf5340: Change nRF5340 IPC backend to icbmsg
Browse files Browse the repository at this point in the history
Change the default IPC backend of nRF5340 to icbmsg.

Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
  • Loading branch information
dchat-nordic committed Oct 2, 2024
1 parent c89bca6 commit 7808c74
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
reg = <0x20040000 0x30000>;
};

/* Include shared RAM configuration file */
#include "bl5340_dvk_nrf5340_shared_sram_planning_conf.dtsi"
/* Include default shared RAM configuration file */
#include <common/nordic/nrf5340_shared_sram_partition.dtsi>
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
};
};

/* Include shared RAM configuration file */
#include "bl5340_dvk_nrf5340_shared_sram_planning_conf.dtsi"
/* Include default shared RAM configuration file */
#include <common/nordic/nrf5340_shared_sram_partition.dtsi>

This file was deleted.

10 changes: 6 additions & 4 deletions dts/arm/nordic/nrf5340_cpuapp_ipc.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
*/

ipc0: ipc0 {
compatible = "zephyr,ipc-openamp-static-vrings";
memory-region = <&sram0_shared>;
compatible = "zephyr,ipc-icbmsg";
status = "okay";
mboxes = <&mbox 0>, <&mbox 1>;
mbox-names = "tx", "rx";
role = "host";
status = "okay";
tx-region = <&cpuapp_cpunet_ipc_shm>;
rx-region = <&cpunet_cpuapp_ipc_shm>;
tx-blocks = <32>;
rx-blocks = <32>;

bt_hci_ipc0: bt_hci_ipc0 {
compatible = "zephyr,bt-hci-ipc";
Expand Down
10 changes: 6 additions & 4 deletions dts/arm/nordic/nrf5340_cpunet.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,14 @@
/* Default IPC description */
ipc {
ipc0: ipc0 {
compatible = "zephyr,ipc-openamp-static-vrings";
memory-region = <&sram0_shared>;
compatible = "zephyr,ipc-icbmsg";
status = "okay";
mboxes = <&mbox 0>, <&mbox 1>;
mbox-names = "rx", "tx";
role = "remote";
status = "okay";
tx-region = <&cpunet_cpuapp_ipc_shm>;
rx-region = <&cpuapp_cpunet_ipc_shm>;
tx-blocks = <32>;
rx-blocks = <32>;
};
};
};
Expand Down
14 changes: 13 additions & 1 deletion dts/common/nordic/nrf5340_shared_sram_partition.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
* the memory range allocated to the non-secure image (sram0_ns).
*
* By default the last 64 kB of application core SRAM is allocated as shared
* memory (sram0_shared).
* memory (sram0_shared) which is divided in:
* - 32 kB CPUAPP to CPUNET communication (cpuapp_cpunet_ipc_shm)
* - 32 kB CPUNET to CPUAPP communication (cpunet_cpuapp_ipc_shm)
*/

/ {
Expand All @@ -28,8 +30,18 @@
ranges;

sram0_shared: memory@20070000 {
#address-cells = <1>;
#size-cells = <1>;
/* Last 64 kB of sram0 */
reg = <0x20070000 0x10000>;

cpuapp_cpunet_ipc_shm: memory@20070000 {
reg = <0x20070000 DT_SIZE_K(32)>;
};

cpunet_cpuapp_ipc_shm: memory@20078000 {
reg = <0x20078000 DT_SIZE_K(32)>;
};
};
};
};

0 comments on commit 7808c74

Please sign in to comment.