chore(nordic): use SPI alias for trezor SPI communication selection
What changed, and why it matters
This is a minor internal cleanup in the Nordic (nRF52) Bluetooth Low Energy firmware for a Trezor hardware wallet. It replaces a hard-coded reference to 'spi0' with a device-tree alias called 'spi-master' so the same code can more easily be reused across different board revisions. There is no security-relevant change visible in the diff.
No security action required. Treat as normal maintenance/refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit changes one line in spi.c from DT_NODELABEL(spi0) to DT_ALIAS(spi_master), and adds an aliases { spi-master = &spi0; } entry in the t3w1_revA_nrf52832 board overlay. This is a Zephyr-style device-tree refactor to decouple driver code from a specific SPI controller instance. No functional behavior, bus parameters, pins, security boundaries, or cryptographic code are modified.
Changed components
nordic/trezor/trezor-ble/src/trz_comm/spi.cnordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlayInspect captured patch +5 / −1
diff --git a/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay b/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay
index 4ca8c2e5..64e83cba 100644
--- a/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay
+++ b/nordic/trezor/trezor-ble/boards/t3w1_revA_nrf52832.overlay
@@ -7,5 +7,9 @@
chosen {
trezor,trz-uart = &uart0;
};
+
+ aliases {
+ spi-master = &spi0;
+ };
};
diff --git a/nordic/trezor/trezor-ble/src/trz_comm/spi.c b/nordic/trezor/trezor-ble/src/trz_comm/spi.c
index 80be37db..8063ee78 100644
--- a/nordic/trezor/trezor-ble/src/trz_comm/spi.c
+++ b/nordic/trezor/trezor-ble/src/trz_comm/spi.c
@@ -35,7 +35,7 @@
#define LOG_MODULE_NAME trz_comm_spi
LOG_MODULE_REGISTER(LOG_MODULE_NAME);
-#define MY_SPI_MASTER DT_NODELABEL(spi0)
+#define MY_SPI_MASTER DT_ALIAS(spi_master)
static K_SEM_DEFINE(spi_comm_ok, 0, 1);
static K_SEM_DEFINE(spi_can_send, 0, 1);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.