Skip to content

Commit

Permalink
samples: drivers: mbox: fix adp_xc7k/ae350 configuration and overlay
Browse files Browse the repository at this point in the history
This commit fixes the following issues for adp_xc7k/ae350
  1. Incorrect copyright due to copy-paste error
  2. Separate RAM region for the host and remote clusters
  3. Allocate hart 0 for host and hart 1 for remote cluster
  4. Use mbox channel 9, 10 for the sample, leaving channel/irq source
     1 ~ 8 for ae350 8-core IPI

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
  • Loading branch information
jimmyzhe authored and carlescufi committed Oct 23, 2024
1 parent 6658b9c commit 6a3550e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions samples/drivers/mbox/boards/adp_xc7k_ae350.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CONFIG_RV_BOOT_HART=0
CONFIG_MP_MAX_NUM_CPUS=1
21 changes: 6 additions & 15 deletions samples/drivers/mbox/boards/adp_xc7k_ae350.overlay
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* Copyright (c) 2022 Andes Technology Corporation.
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
/*
* shared memory reserved for the inter-processor communication
*/
zephyr,sram = &sram;
};

sram: memory@0 {
compatible = "mmio-sram";
reg = <0x00000000 0x10000000 >;
};

mbox-consumer {
compatible = "vnd,mbox-consumer";
mboxes = <&mbox 1>, <&mbox 0>;
mboxes = <&mbox 9>, <&mbox 10>;
mbox-names = "tx", "rx";
};
};

&dram {
reg = <0x00000000 0x10000000>;
};
2 changes: 2 additions & 0 deletions samples/drivers/mbox/remote/boards/adp_xc7k_ae350.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_RV_BOOT_HART=1
CONFIG_MP_MAX_NUM_CPUS=1
13 changes: 10 additions & 3 deletions samples/drivers/mbox/remote/boards/adp_xc7k_ae350.overlay
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* Copyright (c) 2022 Andes Technology Corporation.
* SPDX-License-Identifier: Apache-2.0
*/

/ {
mbox-consumer {
compatible = "vnd,mbox-consumer";
mboxes = <&mbox 0>, <&mbox 1>;
mboxes = <&mbox 10>, <&mbox 9>;
mbox-names = "tx", "rx";
};
};

&cpu0 {
status = "disabled";
};

&dram {
reg = <0x10000000 0x10000000>;
};

0 comments on commit 6a3550e

Please sign in to comment.