1# Copyright (c) 2023 Bjarki Arge Andreasen
2# SPDX-License-Identifier: Apache-2.0
3
4config MODEM_CELLULAR
5	bool "Generic cellular modem support"
6	select MODEM_MODULES
7	select MODEM_PPP
8	select MODEM_CMUX
9	select MODEM_CHAT
10	select MODEM_PIPE
11	select MODEM_PIPELINK
12	select MODEM_BACKEND_UART
13	select RING_BUFFER
14	select NET_L2_PPP_OPTION_MRU
15	select NET_L2_PPP_PAP
16	depends on (DT_HAS_QUECTEL_BG95_ENABLED || \
17		    DT_HAS_SIMCOM_SIM7080_ENABLED || DT_HAS_U_BLOX_SARA_R4_ENABLED || \
18		    DT_HAS_U_BLOX_SARA_R5_ENABLED || DT_HAS_SWIR_HL7800_ENABLED || \
19		    DT_HAS_TELIT_ME910G1_ENABLED || DT_HAS_TELIT_ME310G1_ENABLED || \
20		    DT_HAS_QUECTEL_EG25_G_ENABLED || DT_HAS_NORDIC_NRF91_SLM_ENABLED || \
21		    DT_HAS_SQN_GM02S_ENABLED || DT_HAS_U_BLOX_LARA_R6_ENABLED)
22	help
23	  This driver uses the generic 3gpp AT commands, along
24	  with the standard protocols CMUX and PPP, to configure
25	  cellular modems to establish a point-to-point
26	  network connection. It is a template for tailored
27	  drivers for the ublox, quectel and other modems, which
28	  include power management and more complex device specific
29	  features.
30
31if MODEM_CELLULAR
32
33config MODEM_CELLULAR_APN
34	string "APN"
35	default "internet"
36
37config MODEM_CELLULAR_PERIODIC_SCRIPT_MS
38	int "Periodic script interval in milliseconds"
39	default 2000
40
41config MODEM_CELLULAR_UART_BUFFER_SIZES
42	int "The UART receive and transmit buffer sizes in bytes."
43	default 512
44
45config MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE
46	int "The maximum CMUX frame size in bytes."
47	default 32 if DT_HAS_U_BLOX_LARA_R6_ENABLED
48	default 128
49	help
50	  This value affects the size of buffers used to receive and transmit CMUX frames.
51
52config MODEM_CELLULAR_CHAT_BUFFER_SIZES
53	int "The size of the buffers used for the chat scripts in bytes."
54	default 128
55
56config MODEM_CELLULAR_USER_PIPE_BUFFER_SIZES
57	int "The size of the buffers used for each user pipe in bytes."
58	default 128
59
60config MODEM_CELLULAR_NEW_BAUDRATE
61	int "New baudrate to configure modem to, if supported"
62	range 9600 4000000
63	default 3000000 if DT_HAS_U_BLOX_LARA_R6_ENABLED
64	default 115200
65
66config MODEM_CELLULAR_NEW_BAUDRATE_DELAY
67	int "Time modem takes to change baudrate, in milliseconds"
68	range 0 1000
69	default 100 if DT_HAS_U_BLOX_LARA_R6_ENABLED
70	default 300
71
72endif
73