mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-23 01:11:23 +00:00
GAT562 cleanup + gps
Cleanups 1–3 (cosmetic): Removed the dead uart1_default/uart1_sleep pinctrl groups + stale "GPS on UART1" comments → gat562_30s-pinctrl.dtsi Removed the QSPI pinctrl groups (board has no QSPI; pins collide with the joystick) and replaced them with a comment explaining why Untangled the GPS UART0-vs-async rationale in the DTS and the &uart1 comment GPS driver switch (functional, you approved the full switch) → gat562_30s.dts, board.conf: gnss-nmea-generic → luatos,air530z with on-off-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH> (matches the sibling rak_wismesh_tag, same AT6558R chip) Deleted the always-on gps_power_en gpio-hog (the driver owns P1.02 now → GPS can be powered down) Removed the CONFIG_UART_ASYNC_API=y override Updated all related comments
This commit is contained in:
1 parent
f0baeae892
commit
9f7029abaa
3 files changed
+41
-72
No files matched your search
@@ -22,13 +22,14 @@ CONFIG_ZEPHCORE_SD_FWID=0x00B6
|
||||
# Compile in the UI display stack; the OLED panel is optional at runtime.
|
||||
CONFIG_ZEPHCORE_UI_DISPLAY=y
|
||||
|
||||
# GPS: AT6558R UART NMEA receiver on UART0 @ 9600 baud (P0.15 RX / P0.16 TX),
|
||||
# powered by the WB_IO2/P1.02 gpio-hog (see gat562_30s.dts). The
|
||||
# gnss-nmea-generic driver is auto-selected from the DTS node; CONFIG_GNSS and
|
||||
# GPS: AT6558R UART NMEA receiver on UART0 @ 9600 baud (P0.15 RX / P0.16 TX).
|
||||
# The luatos,air530z driver is auto-selected from the DTS node; it sends the
|
||||
# AT6558R the CASIC $PCAS03 sentence-select init (and $PMTK869 EASY fast-TTFF)
|
||||
# and owns GPS power via on-off-gpios on WB_IO2/P1.02 (see gat562_30s.dts), so
|
||||
# ZephyrGPSManager can power the receiver down. CONFIG_GNSS and
|
||||
# CONFIG_MODEM_MODULES come from boards/common/zephcore_common.conf.
|
||||
#
|
||||
# Use the async (DMA) UART receive path for the GPS: nRF UARTE's interrupt-
|
||||
# driven RX did not feed modem_backend_uart reliably here, so the modem chat
|
||||
# never saw any NMEA. CONFIG_UART_ASYNC_API switches the backend to its
|
||||
# DMA-based receiver, which delivers the stream correctly.
|
||||
CONFIG_UART_ASYNC_API=y
|
||||
# No CONFIG_UART_ASYNC_API override: the air530z driver powers the module up
|
||||
# only after the UART backend is ready, so the interrupt-driven RX feeds
|
||||
# modem_backend_uart correctly (unlike the previous always-on gpio-hog, which
|
||||
# powered the GPS before the backend existed and lost the opening NMEA burst).
|
||||
@@ -7,10 +7,7 @@
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
/* GPS on UART0: MCU TX P0.16 -> GPS RX, MCU RX P0.15 <- GPS TX.
|
||||
* The GPS is wired to P0.15/P0.16; it runs on UARTE0 because UARTE1's
|
||||
* interrupt-driven RX did not feed the modem backend on this SoC (the
|
||||
* other nRF52 GPS boards in this tree also use uart0 + gnss-nmea-generic). */
|
||||
/* GPS (AT6558R) on UART0: MCU TX P0.16 -> GPS RX, MCU RX P0.15 <- GPS TX. */
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 16)>,
|
||||
@@ -26,22 +23,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
/* GPS on UART1: MCU TX P0.16 -> GPS RX, MCU RX P0.15 <- GPS TX */
|
||||
uart1_default: uart1_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 16)>,
|
||||
<NRF_PSEL(UART_RX, 0, 15)>;
|
||||
};
|
||||
};
|
||||
|
||||
uart1_sleep: uart1_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 16)>,
|
||||
<NRF_PSEL(UART_RX, 0, 15)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
/* I2C0: SSD1306 OLED + sensors (SDA P0.13 / SCL P0.14) */
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
@@ -106,27 +87,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
/* QSPI pins (kept for parity; &qspi is disabled on this board) */
|
||||
qspi_default: qspi_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(QSPI_SCK, 0, 3)>,
|
||||
<NRF_PSEL(QSPI_IO0, 0, 30)>,
|
||||
<NRF_PSEL(QSPI_IO1, 0, 29)>,
|
||||
<NRF_PSEL(QSPI_IO2, 0, 28)>,
|
||||
<NRF_PSEL(QSPI_IO3, 0, 2)>,
|
||||
<NRF_PSEL(QSPI_CSN, 0, 26)>;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_sleep: qspi_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(QSPI_SCK, 0, 3)>,
|
||||
<NRF_PSEL(QSPI_IO0, 0, 30)>,
|
||||
<NRF_PSEL(QSPI_IO1, 0, 29)>,
|
||||
<NRF_PSEL(QSPI_IO2, 0, 28)>,
|
||||
<NRF_PSEL(QSPI_IO3, 0, 2)>,
|
||||
<NRF_PSEL(QSPI_CSN, 0, 26)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
/*
|
||||
* No QSPI pinctrl: the GAT562 core module has no external QSPI flash
|
||||
* (&qspi is disabled in the DTS), and the upstream RAK4631 QSPI pins
|
||||
* P0.26 / P0.28 / P0.30 are reused here as joystick inputs. Defining a
|
||||
* qspi group "for parity" would silently collide with the joystick if
|
||||
* QSPI were ever re-enabled, so it is intentionally omitted.
|
||||
*/
|
||||
};
|
||||
@@ -13,7 +13,8 @@
|
||||
* - DIO3 TCXO at 1.8 V (matches the official MeshCore GAT562 variant)
|
||||
* - Battery multiplier 6232 (vs 6161): 3 * 1.75 * 1.187 * 1000
|
||||
* - Buzzer on P1.01 (PWM0)
|
||||
* - GPS: UART NMEA on UART0 @ 9600 (MCU RX P0.15 / TX P0.16), always-on
|
||||
* - GPS: AT6558R on UART0 @ 9600 (MCU RX P0.15 / TX P0.16), luatos,air530z
|
||||
* driver, power via on-off-gpios on WB_IO2/P1.02
|
||||
* - 6 buttons on GPIO SENSE (sense-edge-mask) so DIO1 keeps a GPIOTE chan
|
||||
* - LEDs active-high: green P1.03 (LoRa TX), blue P1.04
|
||||
* - User button P0.09 (NFC1)
|
||||
@@ -196,16 +197,10 @@
|
||||
line-name = "sx1262-power-en";
|
||||
};
|
||||
|
||||
/* GPS power-enable on WB_IO2 / P1.02: held HIGH so the AT6558R GNSS is
|
||||
* powered and transmitting NMEA at boot. Without this the receiver is
|
||||
* silent (no UART data at all). Hogged (not driven by the GPS manager)
|
||||
* because the module is simply always-on while the board is powered. */
|
||||
gps_power_en {
|
||||
gpio-hog;
|
||||
gpios = <2 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
line-name = "gps-power-en";
|
||||
};
|
||||
/* GPS power-enable on WB_IO2 / P1.02 is NOT hogged here: the AT6558R is
|
||||
* driven by the luatos,air530z driver, which owns this line via
|
||||
* on-off-gpios (see &uart0) so ZephyrGPSManager can power the receiver
|
||||
* down for low-power operation. */
|
||||
};
|
||||
|
||||
&adc {
|
||||
@@ -224,27 +219,35 @@
|
||||
};
|
||||
|
||||
/*
|
||||
* GPS: UART NMEA receiver on UART0 @ 9600 baud (MCU RX P0.15 <- GPS TX,
|
||||
* MCU TX P0.16 -> GPS RX). Multi-constellation (GPS + GLONASS), always
|
||||
* powered — no enable pin. Matches the official MeshCore gat562_30s_mesh_kit
|
||||
* variant (MicroNMEALocationProvider on Serial1, 9600 baud). Runs on UARTE0
|
||||
* (like the other nRF52 GPS boards here): UARTE1's interrupt-driven RX did
|
||||
* not deliver to the modem backend on this SoC. Zephyr's gnss-nmea-generic
|
||||
* driver parses the stream and publishes via the GNSS subsystem.
|
||||
* GPS: AT6558R UART NMEA receiver on UART0 @ 9600 baud (MCU RX P0.15 <- GPS
|
||||
* TX, MCU TX P0.16 -> GPS RX). Multi-constellation (GPS + GLONASS). Matches
|
||||
* the official MeshCore gat562_30s_mesh_kit variant (MicroNMEALocationProvider
|
||||
* on Serial1, 9600 baud).
|
||||
*
|
||||
* Driven by the luatos,air530z driver — the AT6558R is a CASIC-protocol part,
|
||||
* so the driver's $PCAS03 init trims the NMEA stream to GGA+RMC (+GSV when
|
||||
* CONFIG_GNSS_SATELLITES) and $PMTK869 enables EASY fast-TTFF. Same driver and
|
||||
* chip as the rak_wismesh_tag board. GPS power is managed by the driver via
|
||||
* on-off-gpios (WB_IO2 / P1.02, active-high), so ZephyrGPSManager can power
|
||||
* the receiver down — no always-on gpio-hog. Because the driver brings the
|
||||
* module up only after the UART backend is ready, the plain interrupt-driven
|
||||
* RX feeds the modem backend correctly and no CONFIG_UART_ASYNC_API is needed.
|
||||
*/
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uarte";
|
||||
status = "okay";
|
||||
current-speed = <9600>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
gnss: gnss-nmea-generic {
|
||||
compatible = "gnss-nmea-generic";
|
||||
gnss: gnss {
|
||||
compatible = "luatos,air530z";
|
||||
on-off-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; /* WB_IO2 / P1.02 GPS power */
|
||||
};
|
||||
};
|
||||
|
||||
/* UART1 unused — the GPS moved to UART0 (see above). */
|
||||
/* UART1 unused — the GPS is on UART0 (see above). */
|
||||
&uart1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user