Port Nokia 800 Tough (nokia-coconut), fix microSD detection, and stage upcoming a1120 (cocojamboo) build

- Migrate nokia-tough to canonical nokia-coconut while keeping CLI aliases, add layered bootloader/lk2nd/nokia-coconut.patch, bootfs/bootimg validators, and offline scripts/inspect-stock-msm8905-dump.py

- Complete nokia-coconut Stage 2 hardware bring-up: wire 6-column 22-key keypad (gpio0, gpio3, gpio7, gpio99, gpio6, gpio1), gpio98 KEY_POWER, and pon@800:resin KEY_DOWN (0x6c); split leds-msm8905-torch into GPIO_13 white:torch (dedicated top-edge flashlight) and GPIO_32 camera:flash (rear camera flash for camera.so and bananarchy-photo)

- Restore sdhci@7864000 non-removable across all six DTS/DTB targets, remove unwired gpio38 cd-gpios/sdc2-cd-* states, and harden sxmo_sdcard.sh under flock

- Register upcoming build a1120 (cocojamboo) in scripts/version.sh, scripts/check-rebuild.sh, CHANGELOG.md, AGENTS.md, README.md, and MANUAL.md with verified hashes across nokia-argon, nokia-beatles, and nokia-coconut
This commit is contained in:
Luxferre committed 2026-11-15 18:00:10 +02:00
1 parent fc5c4282f5
commit ab53423e33
60 files changed
+2669 -453

No files matched your search

@@ -88,7 +88,24 @@
reg = <0x00>;
backlight = <0x6b>;
reset-gpios = <0x27 0x19 0x00>;
@@ -2287,30 +2312,36 @@
@@ -1886,6 +1911,15 @@
clock-frequency = "", "#(";
};
};
+
+ /* External (cover) GC9305 shares the QUP5 SPI lines.
+ * bananarchy-coverd drives gpio13 to route them to the cover
+ * panel, then talks to it through /dev/spidev0.1. spi-qup
+ * has 4 native chip selects and toggles the single physical
+ * CS line, so reg=1 gives the daemon a second logical device. */
+ spidev@1 {
+ compatible = "rohm,dh2228fv";
+ reg = <0x01>;
+ spi-max-frequency = <0x2faf080>;
+ status = "okay";
+ };
};
@@ -2287,30 +2312,36 @@
pinctrl-0 = <0x86 0x87>;
pinctrl-names = "default";
@@ -171,8 +188,8 @@
leds {
--- a/devices/nokia-argon/qcom-msm8905-nokia-argon.dts
+++ b/devices/nokia-tough/qcom-msm8905-nokia-coconut.dts
@@ -4,8 +4,8 @@
+++ b/devices/nokia-coconut/qcom-msm8905-nokia-coconut.dts
@@ -4,9 +4,18 @@
#address-cells = <0x01>;
#size-cells = <0x01>;
interrupt-parent = <0x01>;
@@ -181,9 +198,62 @@
+ model = "Nokia 800 Tough";
+ compatible = "nokia,coconut", "nokia,argon", "qcom,msm8905", "qcom,msm8909";
chassis-type = "handset";
+
+ /* Stock MSM8905 QRD SKUB identifiers from Nokia 800 Tough firmware so
+ * lk2nd and stock aboot match the appended DTB reliably. */
+ qcom,msm-id = <0x14b 0x00>;
+ qcom,board-id = <0x1000b 0x100>;
+ qcom,pmic-id = <0x1000d 0x00 0x00 0x00>;
aliases {
@@ -1838,7 +1838,7 @@
@@ -216,7 +219,9 @@
memory@80000000 {
device_type = "memory";
- reg = <0x80000000 0x00>;
+ /* Ship the 512 MiB fallback alongside SMEM patching. */
+ reg = <0x80000000 0x20000000>;
};
pmu {
@@ -1056,34 +1059,28 @@
};
gpio-key-active-state {
- pins = "gpio90", "gpio98";
+ pins = "gpio98";
function = "gpio";
drive-strength = <0x02>;
bias-pull-up;
phandle = <0x86>;
};
- lid-switch-active-state {
- pins = "gpio36", "gpio92";
- function = "gpio";
- drive-strength = <0x06>;
- bias-pull-up;
- phandle = <0x87>;
- };
-
matrix-keypad-row-gpio-state {
pins = "gpio94", "gpio95", "gpio96", "gpio97";
function = "gpio";
drive-strength = <0x02>;
bias-pull-up;
phandle = <0x88>;
};
matrix-keypad-col-default-state {
- pins = "gpio52", "gpio56", "gpio7", "gpio99", "gpio6";
+ pins = "gpio0", "gpio3", "gpio7", "gpio99", "gpio6", "gpio1";
function = "gpio";
drive-strength = <0x02>;
bias-disable;
phandle = <0x89>;
};
+ /* Note: pon@800:resin inherits KEY_DOWN (0x6c) from argon for D-pad Down. */
@@ -1905,7 +1900,7 @@
status = "okay";
display@0 {
@@ -192,21 +262,87 @@
reg = <0x00>;
backlight = <0x6b>;
reset-gpios = <0x27 0x19 0x00>;
@@ -1886,6 +1911,15 @@
clock-frequency = "", "#(";
};
};
+
+ /* External (cover) GC9305 shares the QUP5 SPI lines.
+ * bananarchy-coverd drives gpio13 to route them to the cover
+ * panel, then talks to it through /dev/spidev0.1. spi-qup
+ * has 4 native chip selects and toggles the single physical
+ * CS line, so reg=1 gives the daemon a second logical device. */
+ spidev@1 {
+ compatible = "rohm,dh2228fv";
+ reg = <0x01>;
+ spi-max-frequency = <0x2faf080>;
+ status = "okay";
+ };
@@ -2348,8 +2343,8 @@
compatible = "simple-battery";
voltage-min-design-microvolt = <0x33e140>;
voltage-max-design-microvolt = <0x432380>;
- energy-full-design-microwatt-hours = <0x594390>;
- charge-full-design-microamp-hours = <0x16e360>;
+ energy-full-design-microwatt-hours = <0x79c3e0>; /* 2,100 mAh battery */
+ charge-full-design-microamp-hours = <0x200b20>;
ocv-capacity-celsius = <0x19>;
ocv-capacity-table-0 = <0x42d560 0x64 0x417da0 0x5f 0x409b10 0x5a 0x3fef30 0x55 0x3f7230 0x50 0x3ef148 0x4b 0x3e6890 0x46 0x3da540 0x41 0x3cda20 0x3c 0x3c45b0 0x37 0x3be408 0x32 0x3b3440 0x2d 0x3a9800 0x28 0x39fbc0 0x23 0x39bd40 0x1e 0x396368 0x19 0x391d18 0x14 0x38cb10 0x10 0x387cf0 0x0d 0x384e10 0x0b 0x384640 0x0a 0x384258 0x09 0x383a88 0x08 0x3832b8 0x07 0x381b48 0x06 0x37c940 0x05 0x371d60 0x04 0x363ad0 0x03 0x34d370 0x02 0x32b090 0x01 0x2dc6c0 0x00>;
phandle = <0x29>;
@@ -2357,7 +2352,7 @@
gpio-keys {
compatible = "gpio-keys";
- pinctrl-0 = <0x86 0x87>;
+ pinctrl-0 = <0x86>;
pinctrl-names = "default";
key-up {
@@ -2368,26 +2363,13 @@
linux,can-disable;
};
- key-back {
+ /* gpio98 is the red end/power key. */
+ key-end {
wakeup-source;
gpios = <0x27 0x62 0x01>;
- linux,code = <0x0e>;
+ linux,code = <0x74>; /* KEY_POWER -> XF86PowerOff */
debounce-interval = <0x0f>;
linux,can-disable;
};
-
- switch-lid-close {
- wakeup-source;
- gpios = <0x27 0x5c 0x01>;
- linux,input-type = <0x05>;
- linux,code = <0x00>;
- };
-
- switch-lid-open {
- gpios = <0x27 0x24 0x01>;
- linux,input-type = <0x05>;
- linux,code = <0x0a>;
- };
};
keypad {
@@ -2398,8 +2380,35 @@
pinctrl-0 = <0x88 0x89>;
pinctrl-names = "default";
row-gpios = <0x27 0x61 0x01 0x27 0x60 0x01 0x27 0x5f 0x01 0x27 0x5e 0x01>;
- col-gpios = <0x27 0x34 0x01 0x27 0x38 0x01 0x27 0x07 0x01 0x27 0x63 0x01 0x27 0x06 0x01>;
- linux,keymap = <0x1bd 0x10002 0x20005 0x30008 0x4020a 0x1000069 0x1010003 0x1020006 0x1030009 0x104000b 0x20002b8 0x2010004 0x2020007 0x203000a 0x204020b 0x300001c 0x301006a 0x30202b9>;
+ col-gpios = <0x27 0x00 0x01 0x27 0x03 0x01 0x27 0x07 0x01 0x27 0x63 0x01 0x27 0x06 0x01 0x27 0x01 0x01>;
+ /* Physical matrix from the Nokia 800 Tough downstream DTS (4 rows x 6 cols).
+ * See X_KEYPAD_MAPPING.md for the canonical keycodes. */
+ linux,keymap = <
+ 0x1bd /* (0,0) call KEY_PICKUP_PHONE */
+ 0x10002 /* (0,1) 1 */
+ 0x20005 /* (0,2) 4 */
+ 0x30008 /* (0,3) 7 */
+ 0x4020a /* (0,4) * KEY_NUMERIC_STAR */
+ 0x500d4 /* (0,5) camera KEY_CAMERA -> XF86WebCam */
+ 0x1000069 /* (1,0) D-pad left KEY_LEFT */
+ 0x1010003 /* (1,1) 2 */
+ 0x1020006 /* (1,2) 5 */
+ 0x1030009 /* (1,3) 8 */
+ 0x104000b /* (1,4) 0 */
+ 0x105000e /* (1,5) clear KEY_BACKSPACE */
+ 0x200007f /* (2,0) soft left KEY_COMPOSE -> XK_Menu */
+ 0x2010004 /* (2,1) 3 */
+ 0x2020007 /* (2,2) 6 */
+ 0x203000a /* (2,3) 9 */
+ 0x204020b /* (2,4) # KEY_NUMERIC_POUND */
+ 0x300001c /* (3,0) D-pad OK KEY_ENTER -> Return */
+ 0x301006a /* (3,1) D-pad right KEY_RIGHT */
+ 0x302009e /* (3,2) soft right KEY_BACK -> XF86Back */
+ 0x3030067 /* (3,3) D-pad up KEY_UP */
+ 0x304006c /* (3,4) D-pad down KEY_DOWN */
+ >;
};