1# Copyright (c) 2020-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 := zephyr,ipc
6DT_CHOSEN_Z_IPC_TX := zephyr,ipc_tx
7DT_CHOSEN_Z_IPC_RX := zephyr,ipc_rx
8
9config RPMSG_SERVICE_SINGLE_IPM_SUPPORT
10	bool
11	default $(dt_chosen_enabled,$(DT_CHOSEN_Z_IPC))
12	help
13	  This option must be selected when single IPM is used for
14	  both TX and RX communication
15
16config RPMSG_SERVICE_DUAL_IPM_SUPPORT
17	bool
18	default $(dt_chosen_enabled,$(DT_CHOSEN_Z_IPC_TX)) && \
19		$(dt_chosen_enabled,$(DT_CHOSEN_Z_IPC_RX))
20	help
21	  This option must be selected when separate IPMs are used for
22	  TX and RX communication
23
24menuconfig RPMSG_SERVICE
25	bool "RPMsg service for multiple users"
26	select IPM
27	select OPENAMP
28	help
29	  Enables support for a service that can be shared by multiple
30	  users to establish RPMsg endpoints for given channel.
31
32if RPMSG_SERVICE
33
34choice RPMSG_SERVICE_MODE
35	prompt "RPMsg Service mode"
36
37config RPMSG_SERVICE_MODE_MASTER
38	bool "RPMsg master"
39	select OPENAMP_MASTER
40
41config RPMSG_SERVICE_MODE_REMOTE
42	bool "RPMsg remote"
43	select OPENAMP_SLAVE
44
45endchoice
46
47config RPMSG_SERVICE_NUM_ENDPOINTS
48	int "Max number of registered endpoints"
49	default 2
50	help
51	  Maximal number of endpoints that can be registered for given
52	  RPMsg service.
53
54config RPMSG_SERVICE_WORK_QUEUE_STACK_SIZE
55	int "Size of RX work queue stack"
56	default 2048
57	help
58	  Size of stack used by work queue RX thread. This work queue is
59	  created in the RPMsg Service backend module to prevent notifying
60	  service users about received data from the system work queue.
61
62config RPMSG_SERVICE_INIT_PRIORITY
63	int "Initialization priority of RPMsg service"
64	default 48
65	help
66	  The order of RPMsg Service initialization and endpoints registration
67	  is important to avoid race conditions in RPMsg endpoints handshake.
68
69	  If in doubt, do not modify this value.
70
71config RPMSG_SERVICE_EP_REG_PRIORITY
72	int "Initialization priority of modules registering RPMsg endpoints"
73	default 47
74	help
75	  The endpoints must be registered before RPMsg Service is initialized.
76
77	  If in doubt, do not modify this value.
78
79module = RPMSG_SERVICE
80module-str = RPMsg service and backend
81source "subsys/logging/Kconfig.template.log_config"
82
83endif # RPMSG_SERVICE
84