feat(core): wire USE_TOUCH_WAKEUP build flag for T3W1
What changed, and why it matters
This commit is a straightforward build-system wiring change for the Trezor T3W1 hardware wallet. It enables a feature called USE_TOUCH_WAKEUP, which lets the device wake from a low-power suspend state when the touch screen is touched. The change only affects how firmware is compiled for specific T3W1 revisions and does not alter security-critical code, cryptographic operations, or user data handling. There is no indication this is a security fix or vulnerability patch.
No security action required. Treat as normal build/feature enablement commit. If reviewing the broader T3W1 suspend/touch-wakeup implementation, verify that wake-from-touch does not bypass PIN or other lockscreen protections, but that is outside the scope of this diff.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds the ‘touch_wakeup’ feature flag to the SCons build scripts, Rust Cargo features, and Micropython preprocessor substitutions for the T3W1 model revisions A/B/C. Previously, TOUCH_WAKEUP_ENABLED was hardcoded to 0. Now, if the ‘input’ feature is requested, USE_TOUCH_WAKEUP is set to 1 and ‘touch_wakeup’ is advertised as available. The micropython tool also gained a preprocessor substitution for utils.USE_TOUCH_WAKEUP and a minor reordering of existing substitutions. No runtime logic, drivers, or security boundaries are changed.
Changed components
core/SConscript.firmwarecore/SConscript.unixcore/embed/rust/Cargo.tomlcore/site_scons/models/T3W1/trezor_t3w1_revA.pycore/site_scons/models/T3W1/trezor_t3w1_revB.pycore/site_scons/models/T3W1/trezor_t3w1_revC.pycore/site_scons/site_tools/micropython/__init__.pyInspect captured patch +16 / −5
diff --git a/core/SConscript.firmware b/core/SConscript.firmware
index acf7b884..5beee664 100644
--- a/core/SConscript.firmware
+++ b/core/SConscript.firmware
@@ -863,6 +863,7 @@ if FROZEN:
use_button='button' in FEATURES_AVAILABLE,
use_haptic='haptic' in FEATURES_AVAILABLE,
use_rgb_led='rgb_led' in FEATURES_AVAILABLE,
+ use_touch_wakeup='touch_wakeup' in FEATURES_AVAILABLE,
use_touch='touch' in FEATURES_AVAILABLE,
ui_layout=ui.get_ui_layout(TREZOR_MODEL),
thp=THP,
diff --git a/core/SConscript.unix b/core/SConscript.unix
index 38defe3e..34839c0b 100644
--- a/core/SConscript.unix
+++ b/core/SConscript.unix
@@ -882,6 +882,7 @@ if FROZEN:
use_button='button' in FEATURES_AVAILABLE,
use_haptic='haptic' in FEATURES_AVAILABLE,
use_rgb_led='rgb_led' in FEATURES_AVAILABLE,
+ use_touch_wakeup='touch_wakeup' in FEATURES_AVAILABLE,
use_touch='touch' in FEATURES_AVAILABLE,
ui_layout=ui.get_ui_layout(TREZOR_MODEL),
thp=THP,
diff --git a/core/embed/rust/Cargo.toml b/core/embed/rust/Cargo.toml
index 5b61ef49..3644987b 100644
--- a/core/embed/rust/Cargo.toml
+++ b/core/embed/rust/Cargo.toml
@@ -48,6 +48,7 @@ haptic = []
sd_card = []
rgb_led = []
power_manager = []
+touch_wakeup = []
pmic = []
backlight = []
usb = []
diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revA.py b/core/site_scons/models/T3W1/trezor_t3w1_revA.py
index 6bc0674c..18df0e2a 100644
--- a/core/site_scons/models/T3W1/trezor_t3w1_revA.py
+++ b/core/site_scons/models/T3W1/trezor_t3w1_revA.py
@@ -290,7 +290,9 @@ def configure(
"embed/sec/suspend/inc",
]
defines += [("USE_SUSPEND", "1")]
- defines += [("TOUCH_WAKEUP_ENABLED", "0")]
+ if "input" in features_wanted:
+ defines += [("USE_TOUCH_WAKEUP", "1")]
+ features_available.append("touch_wakeup")
if "power_manager" in features_wanted:
sources += [
diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revB.py b/core/site_scons/models/T3W1/trezor_t3w1_revB.py
index d1e5cc44..d4837318 100644
--- a/core/site_scons/models/T3W1/trezor_t3w1_revB.py
+++ b/core/site_scons/models/T3W1/trezor_t3w1_revB.py
@@ -304,7 +304,9 @@ def configure(
"embed/sec/suspend/inc",
]
defines += [("USE_SUSPEND", "1")]
- defines += [("TOUCH_WAKEUP_ENABLED", "0")]
+ if "input" in features_wanted:
+ defines += [("USE_TOUCH_WAKEUP", "1")]
+ features_available.append("touch_wakeup")
if "power_manager" in features_wanted:
sources += [
diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revC.py b/core/site_scons/models/T3W1/trezor_t3w1_revC.py
index 8c1bad2d..7f4c14a8 100644
--- a/core/site_scons/models/T3W1/trezor_t3w1_revC.py
+++ b/core/site_scons/models/T3W1/trezor_t3w1_revC.py
@@ -318,7 +318,9 @@ def configure(
"embed/sec/suspend/inc",
]
defines += [("USE_SUSPEND", "1")]
- defines += [("TOUCH_WAKEUP_ENABLED", "0")]
+ if "input" in features_wanted:
+ defines += [("USE_TOUCH_WAKEUP", "1")]
+ features_available.append("touch_wakeup")
if "power_manager" in features_wanted:
sources += [
diff --git a/core/site_scons/site_tools/micropython/__init__.py b/core/site_scons/site_tools/micropython/__init__.py
index f06d3964..083f38fe 100644
--- a/core/site_scons/site_tools/micropython/__init__.py
+++ b/core/site_scons/site_tools/micropython/__init__.py
@@ -50,7 +50,6 @@ def generate(env):
# replace "utils.BITCOIN_ONLY" or "utils.USE_<FEATURE>" with literal constant (True/False)
# so the compiler can optimize out the things we don't want
backlight = env["backlight"]
- mcu_attestation = env["TREZOR_MODEL"] == "T3W1"
ble = env["use_ble"]
btc_only = env["bitcoin_only"] == "1"
button = env["use_button"]
@@ -60,12 +59,14 @@ def generate(env):
layout_caesar = env["ui_layout"] == "UI_LAYOUT_CAESAR"
layout_delizia = env["ui_layout"] == "UI_LAYOUT_DELIZIA"
layout_eckhart = env["ui_layout"] == "UI_LAYOUT_ECKHART"
+ mcu_attestation = env["TREZOR_MODEL"] == "T3W1"
n4w1 = env["n4w1"]
optiga = env["optiga"]
power_manager = env["power_manager"]
rgb_led = env["use_rgb_led"]
telemetry = env["telemetry"]
thp = env["thp"]
+ touch_wakeup = env["use_touch_wakeup"]
touch = env["use_touch"]
tropic = env["tropic"]
include_source_lines = env["include_source_lines"]
@@ -74,7 +75,6 @@ def generate(env):
rf"-e 's/utils\.USE_BACKLIGHT/{backlight}/g'",
rf"-e 's/utils\.USE_BLE/{ble}/g'",
rf"-e 's/utils\.BITCOIN_ONLY/{btc_only}/g'",
- rf"-e 's/utils\.USE_MCU_ATTESTATION/{mcu_attestation}/g'",
rf"-e 's/utils\.USE_BUTTON/{button}/g'",
rf"-e 's/utils\.USE_HAPTIC/{haptic}/g'",
rf"-e 's/utils\.EMULATOR/{emulator}/g'",
@@ -82,12 +82,14 @@ def generate(env):
rf"-e 's/utils\.UI_LAYOUT == \"CAESAR\"/{layout_caesar}/g'",
rf"-e 's/utils\.UI_LAYOUT == \"DELIZIA\"/{layout_delizia}/g'",
rf"-e 's/utils\.UI_LAYOUT == \"ECKHART\"/{layout_eckhart}/g'",
+ rf"-e 's/utils\.USE_MCU_ATTESTATION/{mcu_attestation}/g'",
rf"-e 's/utils\.USE_N4W1/{n4w1}/g'",
rf"-e 's/utils\.USE_OPTIGA/{optiga}/g'",
rf"-e 's/utils\.USE_POWER_MANAGER/{power_manager}/g'",
rf"-e 's/utils\.USE_RGB_LED/{rgb_led}/g'",
rf"-e 's/utils\.USE_TELEMETRY/{telemetry}/g'",
rf"-e 's/utils\.USE_THP/{thp}/g'",
+ rf"-e 's/utils\.USE_TOUCH_WAKEUP/{touch_wakeup}/g'",
rf"-e 's/utils\.USE_TOUCH/{touch}/g'",
rf"-e 's/utils\.USE_TROPIC/{tropic}/g'",
r"-e 's/if TYPE_CHECKING/if False/'",
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.