Skip to content

Add HL78XX Modem Driver Implementation Using Modem Chat Framework #89541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/shields/swir_hl78xx_ev_kit/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Netfeasa Ltd.
# SPDX-License-Identifier: Apache-2.0

config SHIELD_SWIR_HL78XX_EV_KIT
def_bool $(shields_list_contains,swir_hl78xx_ev_kit)
Binary file not shown.
79 changes: 79 additions & 0 deletions boards/shields/swir_hl78xx_ev_kit/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
.. _swir_hl78xx_ev_kit:

HL/RC Module Evaluation Kit Shield
##################################

Overview
********

Welcome to the HL78 module getting started guide.
This guide will help you set up the evaluation kit (eval kit)
for sending AT commands to the HL78 module and initiating data transmission.

.. figure:: img/SW-Dev-RC76.3.webp
:align: center
:alt: HL/RC Module Evaluation Kit Shield Shield

HL/RC Module Evaluation Kit Shield Shield (Credit: Sierrra Wireless)

More information about the shield can be found at the `HL/RC Module Evaluation Kit Shield guide website`_.

Pins Assignment of HL/RC Module Evaluation Kit Shield Shield
============================================================
+--------------------------+----------------------------------------------------------+
| Shield Connector Pin | Function |
+==========================+==========================================================+
| CN403 alias | UART 1 (with CTS and RTS pins) |
+--------------------------+----------------------------------------------------------+
| CN303 alias | SPI / UART 3 |
+--------------------------+----------------------------------------------------------+
| CN1000 alias | GPIO Test Pins |
+--------------------------+----------------------------------------------------------+
| GPIO6 CN1000_3 | LOW POWER MONITORING |
+--------------------------+----------------------------------------------------------+
| VGPIO alias | Indirect indicator of hibernate mode entry/exit |
+--------------------------+----------------------------------------------------------+
| RESET CN1000_12 | RESET SIGNAL |
+--------------------------+----------------------------------------------------------+
| WAKE-UP CN1000_8 | SPI / UART 3 |
+--------------------------+----------------------------------------------------------+

Please refer to the website for more information about HL/RC Module Evaluation Kit Shield Shield setup.
.. _HL/RC Module Evaluation Kit Shield guide website:

Checking Your Basic Configurations in PuTTY
===========================================
Before trying to set up a wired connection between the board and a host MCU,
it's a good idea to first go through this list of basic AT commands over a
USB COM port on a PC. For reference, you can find all the AT commands for the
HL78xx modules in the Source.

Requirements
************

This shield can be used with any boards which provides a configuration for
header connectors and defines node aliases for UART, SPI and USB interfaces (see
:ref:`shields` for more details).

Programming
***********

Set ``--shield swir_hl78xx_ev_kit`` when you invoke ``west build``. For
example:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/modem/hello_hl78xx
:board: st/nucleo_u575zi_q
:shield: swir_hl78xx_ev_kit
:goals: build

References
**********

.. target-notes::

.. _HL/RC Module Evaluation Kit Shield guide website:
https://source.sierrawireless.com/resources/airprime/development_kits/hl78xx-hl7900-development-kit-guide/

.. _HL/RC Module Evaluation Kit Shield specification website:
https://info.sierrawireless.com/iot-modules-evaluation-kit#guide-for-the-hl78-series-evaluation-kit
34 changes: 34 additions & 0 deletions boards/shields/swir_hl78xx_ev_kit/swir_hl78xx_ev_kit.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2025 Netfeasa Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
aliases {
modem-uart = &usart2;
modem = &modem;
};
};

&usart2 {
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3 &usart2_rts_pd4 &usart2_cts_pd3 >;
pinctrl-1 = <&analog_pa2 &analog_pa3 &analog_pd4 &analog_pd3 >;
dmas = <&gpdma1 0 27 STM32_DMA_PERIPH_TX
&gpdma1 1 26 STM32_DMA_PERIPH_RX>;
dma-names = "tx", "rx";
pinctrl-names = "default", "sleep";
current-speed = <115200>;
status = "okay";
hw-flow-control;
modem: hl_modem {
compatible = "swir,hl7812";
status = "okay";
mdm-reset-gpios = <&gpiod 5 (GPIO_ACTIVE_LOW)>;
mdm-wake-gpios = <&gpioe 15 (GPIO_ACTIVE_HIGH)>;
mdm-vgpio-gpios = <&gpiob 2 0>;
mdm-uart-cts-gpios = <&gpiod 3 0>;
mdm-gpio6-gpios = <&gpioa 8 0>;
};

};
2 changes: 2 additions & 0 deletions drivers/modem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ if (CONFIG_MODEM_SIM7080)
zephyr_library_sources(simcom-sim7080.c)
endif()

add_subdirectory_ifdef(CONFIG_MODEM_HL78XX hl78xx)

zephyr_library_sources_ifdef(CONFIG_MODEM_CELLULAR modem_cellular.c)
zephyr_library_sources_ifdef(CONFIG_MODEM_AT_SHELL modem_at_shell.c)
2 changes: 1 addition & 1 deletion drivers/modem/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ source "drivers/modem/Kconfig.quectel-bg9x"
source "drivers/modem/Kconfig.wncm14a2a"
source "drivers/modem/Kconfig.cellular"
source "drivers/modem/Kconfig.at_shell"

source "drivers/modem/hl78xx/Kconfig.hl78xx"
source "drivers/modem/Kconfig.hl7800"
source "drivers/modem/Kconfig.simcom-sim7080"

Expand Down
18 changes: 18 additions & 0 deletions drivers/modem/hl78xx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (c) 2025 Netfeasa Ltd.
#
# SPDX-License-Identifier: Apache-2.0
#
zephyr_library()

zephyr_library_sources(
hl78xx.c
hl78xx_sockets.c
hl78xx_utility.c
hl78xx_apis.c
)

add_subdirectory_ifdef(CONFIG_HL78XX_EVT_MONITOR hl78xx_evt_monitor)

zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/lib/sockets)
Loading