drivers/modem: Add generic cellular modem driver
The added cellular modem driver is a naive driver, which shall serve as a template for implementing tailored drivers for modems like the UBLOX-R4. It uses only generic at commands, described in 3gpp, and protocols, like CMUX and PPP. A binding for the BG95 has been added, which replaces the quectel,bg9x. This is neccesary since the BG95 does not have a usable reset pin, the reset and powerkey are internally connected to each other. Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
This commit is contained in:
parent
10ac828776
commit
b14c39f2c1
5 changed files with 1525 additions and 0 deletions
|
@ -41,3 +41,5 @@ if (CONFIG_MODEM_SIM7080)
|
||||||
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
|
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
|
||||||
zephyr_library_sources(simcom-sim7080.c)
|
zephyr_library_sources(simcom-sim7080.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_MODEM_CELLULAR modem_cellular.c)
|
||||||
|
|
|
@ -190,6 +190,7 @@ source "drivers/modem/Kconfig.ublox-sara-r4"
|
||||||
source "drivers/modem/Kconfig.quectel-bg9x"
|
source "drivers/modem/Kconfig.quectel-bg9x"
|
||||||
source "drivers/modem/Kconfig.wncm14a2a"
|
source "drivers/modem/Kconfig.wncm14a2a"
|
||||||
source "drivers/modem/Kconfig.gsm"
|
source "drivers/modem/Kconfig.gsm"
|
||||||
|
source "drivers/modem/Kconfig.cellular"
|
||||||
|
|
||||||
source "drivers/modem/Kconfig.hl7800"
|
source "drivers/modem/Kconfig.hl7800"
|
||||||
source "drivers/modem/Kconfig.simcom-sim7080"
|
source "drivers/modem/Kconfig.simcom-sim7080"
|
||||||
|
|
33
drivers/modem/Kconfig.cellular
Normal file
33
drivers/modem/Kconfig.cellular
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Copyright (c) 2023 Bjarki Arge Andreasen
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config MODEM_CELLULAR
|
||||||
|
bool "Generic cellular modem support"
|
||||||
|
select MODEM_MODULES
|
||||||
|
select MODEM_PPP
|
||||||
|
select MODEM_CMUX
|
||||||
|
select MODEM_CHAT
|
||||||
|
select MODEM_PIPE
|
||||||
|
select MODEM_BACKEND_UART
|
||||||
|
select RING_BUFFER
|
||||||
|
select NET_L2_PPP_OPTION_MRU
|
||||||
|
depends on (DT_HAS_QUECTEL_BG95_ENABLED || DT_HAS_ZEPHYR_GSM_PPP_ENABLED || \
|
||||||
|
DT_HAS_SIMCOM_SIM7080_ENABLED || DT_HAS_U_BLOX_SARA_R4_ENABLED || \
|
||||||
|
DT_HAS_SWIR_HL7800_ENABLED)
|
||||||
|
help
|
||||||
|
This driver uses the generic 3gpp AT commands, along
|
||||||
|
with the standard protocols CMUX and PPP, to configure
|
||||||
|
cellular modems to establish a point-to-point
|
||||||
|
network connection. It is a plug-in replacement for the
|
||||||
|
existing GSM_PPP driver, and a template for tailored
|
||||||
|
drivers for the ublox, quectel and other modems, which
|
||||||
|
include power management and more complex device specific
|
||||||
|
features.
|
||||||
|
|
||||||
|
if MODEM_CELLULAR
|
||||||
|
|
||||||
|
config MODEM_CELLULAR_APN
|
||||||
|
string "APN"
|
||||||
|
default "internet"
|
||||||
|
|
||||||
|
endif
|
1476
drivers/modem/modem_cellular.c
Normal file
1476
drivers/modem/modem_cellular.c
Normal file
File diff suppressed because it is too large
Load diff
13
dts/bindings/modem/quectel,bg95.yaml
Normal file
13
dts/bindings/modem/quectel,bg95.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Copyright (c) 2023 Bjarki Arge Andreasen
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
description: Quectel BG95 modem
|
||||||
|
|
||||||
|
compatible: "quectel,bg95"
|
||||||
|
|
||||||
|
include: uart-device.yaml
|
||||||
|
|
||||||
|
properties:
|
||||||
|
mdm-power-gpios:
|
||||||
|
type: phandle-array
|
||||||
|
required: true
|
Loading…
Add table
Add a link
Reference in a new issue