drivers: modem: add Wistron WNC-M14A2A LTE-M Modem Driver
The WNC-M14A2A (LTE / LTE-M) modem is presented as an Arduino- compatible shield via AT&T's IoT Starter Kit v1.0. It was originally intended to work with the FRDM-K64F board, but in theory as long as the right pins are configured it can work with any board that supports Arduino-compatible headers. The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the normal handling of IP packets, and instead uses a socket-like UART interface to handle incoming and outgoing data. Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
parent
9182d2e59c
commit
042d79e86c
4 changed files with 1938 additions and 0 deletions
|
@ -1 +1,2 @@
|
|||
zephyr_sources_ifdef(CONFIG_MODEM_RECEIVER modem_receiver.c)
|
||||
zephyr_sources_ifdef(CONFIG_MODEM_WNCM14A2A wncm14a2a.c)
|
||||
|
|
|
@ -32,6 +32,50 @@ config MODEM_RECEIVER_MAX_CONTEXTS
|
|||
Maximum number of modem receiver contexts to handle. For most
|
||||
purposes this should stay at 1.
|
||||
|
||||
config MODEM_WNCM14A2A
|
||||
bool "Enable Wistron LTE-M modem driver"
|
||||
depends on UART_INTERRUPT_DRIVEN
|
||||
select MODEM_RECEIVER
|
||||
select NET_OFFLOAD
|
||||
help
|
||||
Choose this setting to enable Wistron WNC-M14A2A LTE-M modem driver.
|
||||
NOTE: Currently the pin settings only work with FRDM K64F shield.
|
||||
|
||||
config MODEM_WNCM14A2A_RX_STACK_SIZE
|
||||
int "Size of the stack for the WNC-M14A2A modem driver RX thread"
|
||||
depends on MODEM_WNCM14A2A
|
||||
default 1028
|
||||
help
|
||||
This stack is used by the WNCM14A2A RX thread.
|
||||
|
||||
config MODEM_WNCM14A2A_RX_WORKQ_STACK_SIZE
|
||||
int "Size of the stack for the WNC-M14A2A modem driver work queue"
|
||||
depends on MODEM_WNCM14A2A
|
||||
default 2048
|
||||
help
|
||||
This stack is used by the work queue to pass off net_pkt data
|
||||
to the rest of the network stack, letting the rx thread continue
|
||||
processing data.
|
||||
|
||||
config MODEM_WNCM14A2A_APN_NAME
|
||||
string "APN name for establishing network connection"
|
||||
depends on MODEM_WNCM14A2A
|
||||
default "m2m.com.attz"
|
||||
help
|
||||
This setting is used in the AT%PDNSET command to set the APN name
|
||||
for the network connection context. Normally, don't need to change
|
||||
this value.
|
||||
|
||||
config MODEM_WNCM14A2A_INIT_PRIORITY
|
||||
int "WNC-M14A2A driver init priority"
|
||||
depends on MODEM_WNCM14A2A
|
||||
default 80
|
||||
help
|
||||
WNC-M14A2A device driver initialization priority.
|
||||
Do not mess with it unless you know what you are doing.
|
||||
Note that the priority needs to be lower than the net stack
|
||||
so that it can start before the networking sub-system.
|
||||
|
||||
config SYS_LOG_MODEM_LEVEL
|
||||
int "Modem driver log level"
|
||||
depends on SYS_LOG
|
||||
|
|
1838
drivers/modem/wncm14a2a.c
Normal file
1838
drivers/modem/wncm14a2a.c
Normal file
File diff suppressed because it is too large
Load diff
55
dts/bindings/modem/wnc,m14a2a.yaml
Normal file
55
dts/bindings/modem/wnc,m14a2a.yaml
Normal file
|
@ -0,0 +1,55 @@
|
|||
#
|
||||
# Copyright (c) 2018, Foundries.io
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
---
|
||||
title: WNC-M14A2A LTE-M Modem
|
||||
id: wnc,m14a2a
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This is a representation of the WNC-M14A2A LTE-M modem.
|
||||
|
||||
inherits:
|
||||
!include uart-device.yaml
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
type: string
|
||||
category: required
|
||||
constraint: "wnc,m14a2a"
|
||||
|
||||
mdm-boot-mode-sel-gpios:
|
||||
type: compound
|
||||
category: required
|
||||
generation: define, use-prop-name
|
||||
|
||||
mdm-power-gpios:
|
||||
type: compound
|
||||
category: required
|
||||
generation: define, use-prop-name
|
||||
|
||||
mdm-keep-awake-gpios:
|
||||
type: compound
|
||||
category: required
|
||||
generation: define, use-prop-name
|
||||
|
||||
mdm-reset-gpios:
|
||||
type: compound
|
||||
category: required
|
||||
generation: define, use-prop-name
|
||||
|
||||
mdm-shld-trans-ena-gpios:
|
||||
type: compound
|
||||
category: required
|
||||
generation: define, use-prop-name
|
||||
|
||||
mdm-send-ok-gpios:
|
||||
type: compound
|
||||
category: optional
|
||||
description: UART RTS pin if no HW flow control (set to always enabled)
|
||||
generation: define, use-prop-name
|
||||
|
||||
base_label: WNCM14A2A
|
||||
...
|
Loading…
Add table
Add a link
Reference in a new issue