Bring up nokia-sparkler SMP/cpufreq/lk2nd/cam/haptics, fix timer and EDL USB timeout

- Add 0013 early-SCM 4-core SMP + cpufreq kernel patch and clock-frequency DT nodes
- Complete nokia-sparkler lk2nd port, boot/X11 session startup, 180-deg cached camera, and 157 Hz haptic audio
- Replace root-only timer backend with permissionless sxmo_timer.sh and keypad/hook cancellation
- Fix EDL Firehose rawmode ACK, USB active-config preservation, *+# hint, and 30 s default USB timeout
- Sync a1120 (cocojamboo) prebuilts, docs, tests, and verified checksums in check-rebuild.sh
This commit is contained in:
Luxferre committed 2026-11-16 11:45:38 +02:00
1 parent ab53423e33
commit d7992904bf
56 files changed
+31850 -28281

No files matched your search

+37
View File
@@ -299,3 +299,40 @@ sudo ./flash-edl.sh nokia-coconut --only-backup --dump-diagnostics --backup-dir
python3 scripts/inspect-stock-msm8905-dump.py ./backup/nokia-coconut/boot-nokia-coconut.img \
./backup/nokia-coconut/recovery-nokia-coconut.img --aboot ./backup/nokia-coconut/aboot-nokia-coconut.img
```
---
## Nokia 8000 4G (`nokia-sparkler`) layered port
Nokia 8000 4G (`nokia-sparkler`, MSM8909 MTP `0xf5`/`0x8`/`0x100`/`0`, PMIC
`0x1000d`, 512 MiB RAM, cmdline `androidboot.hw.name=sparkler`, 2.8" 240x320
SPI display on BLSP1 QUP5 `0x078b9000` with `dc-gpio=110`) builds through a
third layered patch `bootloader/lk2nd/nokia-sparkler.patch` applied after
`nokia-beatles.patch` and `nokia-coconut.patch`, keeping `nokia-beatles` and
`nokia-coconut` `lk2nd` images byte-for-byte untouched.
- **Device node, panel init streams, and boot menu keys**: `nokia-sparkler.dtsi`
adds `/lk2nd/nokia-sparkler` (`nokia,sparkler`, matching
`androidboot.hw.name=sparkler` without requiring `lk2nd,match-panel;` so
both GC9307 HLT 15-command and ST7789VX2 CTC 11-command panels match) to
`msm8909-mtp.dts`, wires `*` (`gpio90`) as `KEY_VOLUMEUP` (`0x115`) alongside
`#` (`pm8941_resin`) and Top Power for `lk2nd` boot menu navigation, and
adds `"nokia,sparkler"` / `"nokia,leo"` to `spi-display.c`.
- **Building and validating**:
```sh
./scripts/build-lk2nd-sparkler.sh
python3 scripts/check-lk2nd-sparkler.py --image images/boot-lk2nd-nokia-sparkler-display.img --expect-display 1
python3 scripts/test-lk2nd-sparkler-port.py
python3 scripts/test-sparkler-port.py
```
- **Pre-flash backup (physical hardware verification pending)**: back up stock
partitions over EDL first (using `bootloader/loaders/8k.mbn` signed
`Nokia_leo`) before flashing any physical Nokia 8000 4G unit:
```sh
sudo ./flash-edl.sh nokia-sparkler --only-backup --dump-diagnostics --backup-dir ./backup/nokia-sparkler
python3 scripts/inspect-stock-msm8905-dump.py ./backup/nokia-sparkler/boot-nokia-sparkler.img \
./backup/nokia-sparkler/recovery-nokia-sparkler.img --aboot ./backup/nokia-sparkler/aboot-nokia-sparkler.img
```
+141
View File
@@ -0,0 +1,141 @@
diff --git a/lk2nd/device/2nd/spi-display.c b/lk2nd/device/2nd/spi-display.c
index c123a39..37c94d4 100644
--- a/lk2nd/device/2nd/spi-display.c
+++ b/lk2nd/device/2nd/spi-display.c
@@ -252,7 +252,9 @@ static int spi_display_setup(void)
* even when fastboot boot replaced the original cmdline. */
if(lk2nd_dev.compatible &&
(!strcmp(lk2nd_dev.compatible, "nokia,beatles") ||
- !strcmp(lk2nd_dev.compatible, "nokia,coconut")) &&
+ !strcmp(lk2nd_dev.compatible, "nokia,coconut") ||
+ !strcmp(lk2nd_dev.compatible, "nokia,sparkler") ||
+ !strcmp(lk2nd_dev.compatible, "nokia,leo")) &&
(!lk2nd_dev.panel.intf || strcmp(lk2nd_dev.panel.intf, "spi")))
lk2nd_dev.panel.intf = "spi";
diff --git a/lk2nd/device/dts/msm8909/msm8909-mtp.dts b/lk2nd/device/dts/msm8909/msm8909-mtp.dts
index 1cea90b..e9a6edc 100644
--- a/lk2nd/device/dts/msm8909/msm8909-mtp.dts
+++ b/lk2nd/device/dts/msm8909/msm8909-mtp.dts
@@ -26,3 +26,5 @@
lk2nd,dtb-files = "msm8909-nokia-sparkler";
};
};
+
+#include "nokia-sparkler.dtsi"
diff --git a/lk2nd/device/dts/msm8909/nokia-sparkler.dtsi b/lk2nd/device/dts/msm8909/nokia-sparkler.dtsi
new file mode 100644
index 0000000..59714b8
--- /dev/null
+++ b/lk2nd/device/dts/msm8909/nokia-sparkler.dtsi
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Nokia 8000 4G (nokia-sparkler) lk2nd device node.
+ *
+ * The 8000 4G uses an MSM8909 MTP SoC/board variant and drives a 2.8"
+ * 240x320 RGB565 command-mode SPI panel on BLSP1 QUP5 (GC9307 HLT or
+ * ST7789VX2 CTC).
+ *
+ * lk2nd,panel-init holds the downstream KaiOS 2.5.4 qcom,mdss-spi-on-command
+ * byte stream in [wait dlen payload...] format so lk2nd can initialize the
+ * panel deterministically when booted directly or chain-loaded.
+ */
+
+&lk2nd {
+ nokia-sparkler {
+ model = "Nokia 8000 4G";
+ compatible = "nokia,sparkler";
+ lk2nd,dtb-files = "msm8909-nokia-sparkler";
+ lk2nd,menu-key-strings = "* and # keys", "Top power key";
+
+ panel {
+ compatible = "nokia,sparkler-panel";
+
+ qcom,mdss_spi_gc9307_hlt_28_qvga_cmd {
+ compatible = "nokia,sparkler-gc9307-hlt-28-panel";
+ lk2nd,panel-init = [
+ 78 01 11
+ 00 01 fe
+ 00 01 ef
+ 00 01 13
+ 00 01 38
+ 00 01 20
+ 00 02 36 00
+ 00 02 3a 05
+ 00 02 35 00
+ 00 02 89 0b
+ 00 02 eb 02
+ 00 05 2a 00 00 00 ef
+ 00 05 2b 00 00 01 3f
+ 00 01 29
+ 00 01 2c
+ ];
+ };
+
+ qcom,mdss_spi_gc9307_hlt_28_qvga_spi_cmd {
+ compatible = "nokia,sparkler-gc9307-hlt-28-panel";
+ lk2nd,panel-init = [
+ 78 01 11
+ 00 01 fe
+ 00 01 ef
+ 00 01 13
+ 00 01 38
+ 00 01 20
+ 00 02 36 00
+ 00 02 3a 05
+ 00 02 35 00
+ 00 02 89 0b
+ 00 02 eb 02
+ 00 05 2a 00 00 00 ef
+ 00 05 2b 00 00 01 3f
+ 00 01 29
+ 00 01 2c
+ ];
+ };
+
+ qcom,mdss_spi_st7789vx2_ctc_28_qvga_cmd {
+ compatible = "nokia,sparkler-st7789vx2-ctc-28-panel";
+ lk2nd,panel-init = [
+ 78 01 11
+ 00 01 29
+ 00 02 36 00
+ 00 02 3a 05
+ 00 02 35 00
+ 00 01 13
+ 00 01 38
+ 00 01 20
+ 00 05 2a 00 00 00 ef
+ 00 05 2b 00 00 01 3f
+ 00 01 2c
+ ];
+ };
+
+ qcom,mdss_spi_st7789vx2_ctc_28_qvga_spi_cmd {
+ compatible = "nokia,sparkler-st7789vx2-ctc-28-panel";
+ lk2nd,panel-init = [
+ 78 01 11
+ 00 01 29
+ 00 02 36 00
+ 00 02 3a 05
+ 00 02 35 00
+ 00 01 13
+ 00 01 38
+ 00 01 20
+ 00 05 2a 00 00 00 ef
+ 00 05 2b 00 00 01 3f
+ 00 01 2c
+ ];
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ volume-up {
+ lk2nd,code = <KEY_VOLUMEUP>;
+ gpios = <&tlmm 90 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ };
+ };
+ };
+};