Files
bananarchy/bootloader/lk2nd/nokia-sparkler.patch
T

141 lines
4.0 KiB
Diff
Raw Normal View History

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)>;
+ };
+ };
+ };
+};