Skip to content

Commit 5d80da9

Browse files
committed
drivers: gnss: add Quectel lx6 driver
Add Quectel lx6 driver, tested with L96 on I2C bus. Signed-off-by: Nick Ward <nix.ward@gmail.com>
1 parent e38e997 commit 5d80da9

File tree

8 files changed

+897
-0
lines changed

8 files changed

+897
-0
lines changed

drivers/gnss/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ zephyr_library_sources_ifdef(CONFIG_GNSS_NMEA0183 gnss_nmea0183.c)
1010
zephyr_library_sources_ifdef(CONFIG_GNSS_NMEA0183_MATCH gnss_nmea0183_match.c)
1111
zephyr_library_sources_ifdef(CONFIG_GNSS_NMEA_GENERIC gnss_nmea_generic.c)
1212
zephyr_library_sources_ifdef(CONFIG_GNSS_QUECTEL_LCX6G gnss_quectel_lcx6g.c)
13+
zephyr_library_sources_ifdef(CONFIG_GNSS_QUECTEL_LX6 gnss_quectel_lx6.c)
1314
zephyr_library_sources_ifdef(CONFIG_GNSS_U_BLOX_F9P gnss_u_blox_f9p.c
1415
gnss_ubx_common.c)
1516
zephyr_library_sources_ifdef(CONFIG_GNSS_U_BLOX_M8 gnss_u_blox_m8.c

drivers/gnss/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ source "subsys/logging/Kconfig.template.log_config"
8282
rsource "Kconfig.emul"
8383
rsource "Kconfig.generic"
8484
rsource "Kconfig.quectel_lcx6g"
85+
rsource "Kconfig.quectel_lx6"
8586
rsource "Kconfig.u_blox_f9p"
8687
rsource "Kconfig.u_blox_m8"
8788
rsource "Kconfig.luatos_air530z"

drivers/gnss/Kconfig.quectel_lx6

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright (c) 2025 Nick Ward <nix.ward@gmail.com>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config GNSS_QUECTEL_LX6
5+
bool "Quectel LX6 GNSS modem driver"
6+
default y
7+
depends on GNSS
8+
depends on DT_HAS_QUECTEL_L96_ENABLED
9+
depends on GNSS_REFERENCE_FRAME_WGS84
10+
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),i2c)
11+
select SERIAL if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),uart)
12+
select MODEM_MODULES
13+
select MODEM_BACKEND_QUECTEL_I2C if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),i2c)
14+
select MODEM_BACKEND_UART if $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),uart)
15+
select MODEM_CHAT
16+
select GNSS_PARSE
17+
select GNSS_NMEA0183
18+
select GNSS_NMEA0183_MATCH
19+
help
20+
Enable Quectel LX6 series GNSS modem driver.
21+
22+
if GNSS_QUECTEL_LX6
23+
24+
config GNSS_QUECTEL_LX6_RX_BUF_SIZE
25+
int "Size of backend receive buffer"
26+
default 256
27+
28+
config GNSS_QUECTEL_LX6_TX_BUF_SIZE
29+
int "Size of backend transmit buffer"
30+
default 64
31+
32+
config GNSS_QUECTEL_LX6_I2C_POLL_MS
33+
int "GNSS I2C polling interval (ms)"
34+
range 2 500
35+
default 500
36+
depends on $(dt_compat_on_bus,$(DT_COMPAT_QUECTEL_L96),i2c)
37+
help
38+
The interval in milliseconds at which the GNSS module is polled via I2C
39+
to read NMEA data. This value should be less than the GNSS fix interval
40+
to avoid data loss.
41+
42+
if GNSS_SATELLITES
43+
44+
config GNSS_QUECTEL_LX6_SAT_ARRAY_SIZE
45+
int "Size of GNSS satellites array"
46+
default 24
47+
48+
endif # GNSS_SATELLITES
49+
50+
config GNSS_QUECTEL_LX6_RESET_ON_INIT
51+
bool "Reset Quectel lx6 module during initialization"
52+
depends on GPIO
53+
help
54+
If enabled, the driver will toggle the reset pin during initialization.
55+
The reset pin must be defined in the device tree as reset-gpios.
56+
This will issue a hardware reset to the lx6 module by pulling the
57+
RESET pin low for at least 10ms, then releasing it. This may clear
58+
volatile RAM data but will preserve backup RAM content, allowing
59+
faster TTFF after reset.
60+
61+
endif # GNSS_QUECTEL_LX6

0 commit comments

Comments
 (0)