Skip to content

Add Quectel lx6 GNSS driver #92310

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 4 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
1 change: 1 addition & 0 deletions drivers/gnss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ zephyr_library_sources_ifdef(CONFIG_GNSS_NMEA0183 gnss_nmea0183.c)
zephyr_library_sources_ifdef(CONFIG_GNSS_NMEA0183_MATCH gnss_nmea0183_match.c)
zephyr_library_sources_ifdef(CONFIG_GNSS_NMEA_GENERIC gnss_nmea_generic.c)
zephyr_library_sources_ifdef(CONFIG_GNSS_QUECTEL_LCX6G gnss_quectel_lcx6g.c)
zephyr_library_sources_ifdef(CONFIG_GNSS_QUECTEL_LX6 gnss_quectel_lx6.c)
zephyr_library_sources_ifdef(CONFIG_GNSS_U_BLOX_F9P gnss_u_blox_f9p.c
gnss_ubx_common.c)
zephyr_library_sources_ifdef(CONFIG_GNSS_U_BLOX_M8 gnss_u_blox_m8.c
Expand Down
1 change: 1 addition & 0 deletions drivers/gnss/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ source "subsys/logging/Kconfig.template.log_config"
rsource "Kconfig.emul"
rsource "Kconfig.generic"
rsource "Kconfig.quectel_lcx6g"
rsource "Kconfig.quectel_lx6"
rsource "Kconfig.u_blox_f9p"
rsource "Kconfig.u_blox_m8"
rsource "Kconfig.luatos_air530z"
Expand Down
62 changes: 62 additions & 0 deletions drivers/gnss/Kconfig.quectel_lx6
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright (c) 2025 Nick Ward <nix.ward@gmail.com>
# SPDX-License-Identifier: Apache-2.0

config GNSS_QUECTEL_LX6
bool "Quectel LX6 GNSS modem driver"
default y
depends on GNSS
depends on DT_HAS_QUECTEL_L96_ENABLED
depends on GNSS_REFERENCE_FRAME_WGS84
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),i2c)
select SERIAL if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),uart)
select WARN_EXPERIMENTAL if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),uart)
select MODEM_MODULES
select MODEM_BACKEND_QUECTEL_I2C if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),i2c)
select MODEM_BACKEND_UART if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),uart)
select MODEM_CHAT
select GNSS_PARSE
select GNSS_NMEA0183
select GNSS_NMEA0183_MATCH
help
Enable Quectel LX6 series GNSS modem driver.

if GNSS_QUECTEL_LX6

config GNSS_QUECTEL_LX6_RX_BUF_SIZE
int "Size of backend receive buffer"
default 256

config GNSS_QUECTEL_LX6_TX_BUF_SIZE
int "Size of backend transmit buffer"
default 64

config GNSS_QUECTEL_LX6_I2C_POLL_MS
int "GNSS I2C polling interval (ms)"
range 2 500
default 500
depends on $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),i2c)
help
The interval in milliseconds at which the GNSS module is polled via I2C
to read NMEA data. This value should be less than the GNSS fix interval
to avoid data loss.

if GNSS_SATELLITES

config GNSS_QUECTEL_LX6_SAT_ARRAY_SIZE
int "Size of GNSS satellites array"
default 24

endif # GNSS_SATELLITES

config GNSS_QUECTEL_LX6_RESET_ON_INIT
bool "Reset Quectel lx6 module during initialization"
depends on GPIO
help
If enabled, the driver will toggle the reset pin during initialization.
The reset pin must be defined in the device tree as reset-gpios.
This will issue a hardware reset to the lx6 module by pulling the
RESET pin low for at least 10ms, then releasing it. This may clear
volatile RAM data but will preserve backup RAM content, allowing
faster TTFF after reset.

endif # GNSS_QUECTEL_LX6
Loading