Repository navigation
Expand file tree
/
Copy pathconfig.yaml
More file actions
105 lines (93 loc) · 5.86 KB
/
Copy pathconfig.yaml
File metadata and controls
105 lines (93 loc) · 5.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# meshtasticd config for LILYGO T-Display-K230 (V1.3), Semtech LR2021
#
# DRAFT — the LoRa block is derived from the verified vendor pin map (see BOARD.md).
# Values marked (VERIFY) depend on the Phase 1 DTS bring-up or the V1.3 schematic.
#
# Install as /etc/meshtasticd/config.yaml (or drop the Lora block into
# /etc/meshtasticd/available.d/ and select it). Requires the LR2021 Portduino
# wiring added to meshtasticd (see k230-linux notes: PortduinoGlue + RadioInterface).
Lora:
Module: lr2021 # enabled by the new use_lr2021 Portduino case
# --- SPI ---
# The kernel DTS enables all three DW-SPI controllers (spi0/1/2), so /dev/spidev0.0,
# spidev1.0, spidev2.0 all exist; which one has the QSPI0 pads (IO14-17) muxed to it
# is resolved at runtime. PROBE: set spidev below, `systemctl restart meshtasticd`,
# and check the log for the LR2021 chip-version read; if it fails, try 0.0 then 2.0.
# (GPIO44 Enable must already be set, or every spidev reads a dead/unpowered radio.)
spidev: spidev1.0 # (RUNTIME PROBE) vendor RT-Smart used QSPI0 @ 5 MHz mode0
spiSpeed: 5000000 # vendor clock; QSPI0 verified working at 5 MHz
# --- GPIO lines (libgpiod) ---
# meshtasticd/RadioLib drives CS and Reset as GPIO lines (software CS). U-Boot muxes
# IO14 as plain GPIO (SEL=0), IO15-17 to the SPI function. gpiochip0 = gpio@9140b000
# (IO0-31), so these flat entries resolve to gpiochip0 line=pin (IO14/5/19/20).
gpiochip: 0
CS: 14 # K230 GPIO14 (vendor QSPI0_CS0 pad)
Reset: 5 # K230 GPIO5, active-low reset pulse
Busy: 19 # K230 GPIO19 (V1.0 schematic: SX1262-compatible stamp pin 9)
IRQ: 20 # K230 GPIO20 (schematic: stamp pin 10 IO1/IRQ = DIO1)
# Radio power enable: GPIO44 gates the RT9080 LDO that makes Radio_3V3. Defaults OFF
# (R115 pulldown), so it MUST be driven high before the radio powers up. meshtasticd
# drives Enable_Pins HIGH at init (default_high). GPIO44 is IO32-63 -> gpiochip1.
# CONFIRMED on-device: gpiochip0 = gpio@9140b000 (IO0-31), gpiochip1 = gpio@9140c000
# (IO32-63), each 32 lines. So IO44 = gpiochip1 line 12 (44-32). The explicit `line:`
# is REQUIRED: Enable_Pins parses as a map, where line defaults to pin (44) = out of
# range on a 32-line chip, so the LDO never switches and the radio looks dead.
Enable_Pins:
- pin: 44 # K230 IO44 = LoRa_EN
gpiochip: 1 # gpio@9140c000 (IO32-63)
line: 12 # IO44 - 32
# --- Radio front-end ---
# No TCXO: the LR2021 runs off its XTAL (Semtech docs); schematic IO3_TCXO_EN is NC.
# 0 => RadioLib skips TCXO. (If init ever fails, try 3.0 as a fallback per BOARD.md.)
DIO3_TCXO_VOLTAGE: 3.0
# Power CLAMPS (dBm) on the LR2021 *chip* PA output (datasheet: PA_LF 22, PA_HF 12).
# These are chip-drive limits for a PLAIN board (LR2021 stamp with no external PA).
LR2021_MAX_POWER: 22 # sub-GHz chip max
LR2021_MAX_POWER_HF: 12 # 2.4 GHz chip max (plain board)
# External-PA OFFSET. TX_GAIN_LORA is the PA gain in dB; meshtastic SUBTRACTS it from the
# requested TX power to get the chip drive (RadioInterface.cpp ~1423: power -= tx_gain),
# then clamps to the *_MAX_POWER above. It applies to whichever band is active (not
# band-specific), which is fine here since the board runs one band.
# - Plain T-LR2021 (chip only): leave 0.
# - If the module has a 2.4 GHz PA (LilyGO caps 2.4G at ~8 dBm to protect it): set
# TX_GAIN_LORA to the PA gain AND lower LR2021_MAX_POWER_HF to the PA's safe drive
# (~8) so the LR2021 never overdrives the PA input. Determine the gain from the
# module spec or by measurement.
TX_GAIN_LORA: 0
# ALWAYS attach the antenna before any TX, or the RF module/PA can be damaged.
# --- Region / band ---
# The LR2021 can run sub-GHz OR 2.4 GHz; the band is set by the meshtastic Region
# (LORA_24 selects 2.4 GHz). The V1.0 LoRa sheet shows a single antenna path via an
# on-stamp antenna-diversity front-end (RF3 = BWIPX-3-001); the vendor default is 2450
# MHz. Confirm the stamp/antenna band, then set the region to match and validate against
# a same-band peer. Region is set via the meshtastic client/app or admin, not this file.
# --- Display / Touch / GPS (Phase 3d/3 — placeholders, fill during bring-up) ---
Display:
Panel: FB # native-fb -> /dev/fb0 (DRM-backed fbdev), RM69A10 AMOLED
Width: 1232
Height: 568
Rotate: true # panel is physically portrait; adjust to taste
#
# Touchscreen:
# Module: GT9895 # NOTE: not yet a Portduino Touchscreen option — needs adding;
# # or drive GT9895 via the kernel goodix_berlin driver -> /dev/input/event* and use:
# Input:
# PointerDevice: /dev/input/eventX # evdev from the kernel touch driver
# KeyboardDevice: /dev/input/eventY # TCA8418 keypad via mainline tca8418_keypad
#
# GPS:
# SerialPath: /dev/ttySx # nRF9151 GNSS over UART2 (GPIO5/6) — note GPIO5 conflicts
# # with LoRa Reset; resolve pin ownership per schematic.
Config:
DisplayMode: COLOR # MUI (device-ui). Use TWOCOLOR for BaseUI.
# --- General: node identity ---
# meshtasticd needs a MAC source or it exits ("Blank MAC Address not allowed!"): the Linux
# Portduino build's only automatic source is a BlueZ HCI adapter, which the K230 does not
# expose. enu1 is the on-board RTL8152B Ethernet (SOLDERED to the board, not an external
# USB dongle), so it is always present. MACAddressSource reads the MAC straight from
# /sys/class/net/enu1/address. That this NIC MAC is locally-administered and may change
# across reboots does not matter: since meshtastic 2.8 the node identity is derived from
# the node's public/private keypair (persisted in prefs), not from the MAC/hwid.
# (Alternative for a NIC-less bring-up: a fixed `MACAddress: "02:00:12:30:00:01"`.)
General:
MACAddressSource: enu1