1# Copyright (c) 2021 Nordic Semiconductor (ASA)
2# SPDX-License-Identifier: Apache-2.0
3
4# Workaround for not being able to have commas in macro arguments
5DT_CHOSEN_Z_IPC_SHM := zephyr,ipc_shm
6
7menuconfig RPMSG_MULTI_INSTANCE
8	bool "RPMsg multiple instance"
9	select IPM
10	select OPENAMP
11	help
12	  Enables support for RPMsg multiple instance.
13
14if RPMSG_MULTI_INSTANCE
15
16choice RPMSG_ROLE
17	prompt "RPMSG device role"
18	default RPMSG_MULTI_INSTANCE_REMOTE
19
20config RPMSG_MULTI_INSTANCE_REMOTE
21	bool "Remote"
22
23config RPMSG_MULTI_INSTANCE_MASTER
24	bool "Master"
25endchoice
26
27config RPMSG_MULTI_INSTANCES_NO
28	int "Number of RPMSG instances."
29	default 2
30	range 1 8
31	help
32	  How many instances are to be used.
33
34ipm_name_instance_num = 0
35rsource "Kconfig.ipm_name_instance"
36ipm_name_instance_num = 1
37rsource "Kconfig.ipm_name_instance"
38ipm_name_instance_num = 2
39rsource "Kconfig.ipm_name_instance"
40ipm_name_instance_num = 3
41rsource "Kconfig.ipm_name_instance"
42ipm_name_instance_num = 4
43rsource "Kconfig.ipm_name_instance"
44ipm_name_instance_num = 5
45rsource "Kconfig.ipm_name_instance"
46ipm_name_instance_num = 6
47rsource "Kconfig.ipm_name_instance"
48ipm_name_instance_num = 7
49rsource "Kconfig.ipm_name_instance"
50
51config RPMSG_MULTI_INSTANCE_SHM_BASE_ADDRESS
52	hex
53	default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_IPC_SHM))"
54	help
55	  This option specifies base address of the memory region to
56	  be used for the OpenAMP IPC shared memory.
57
58config RPMSG_MULTI_INSTANCE_SHM_SIZE
59	hex
60	default "$(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_IPC_SHM))"
61	help
62	  This option specifies size of the memory region to be used
63	  for the OpenAMP IPC shared memory.
64
65config RPMSG_MULTI_INSTANCE_INIT_PRIORITY
66	int "Initialization priority of RPMsg muliple instances"
67	default 46
68	help
69	  If in doubt, do not modify this value.
70
71module = RPMSG_MULTI_INSTANCE
72module-str = RPMsg multi instance
73source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
74
75endif # RPMSG_MULTI_INSTANCE
76