From 42ef3f1d216d288df6d62a744019395df058417c Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Fri, 15 Sep 2023 21:14:53 +0200 Subject: [PATCH] dts: msm8226: Add HTC One Mini 2 (memul) In the current code the display is not drawn correctly, this is fixed through PR #299. --- README.md | 1 + dts/msm8226/msm8926-htc-memul.dts | 32 +++++++++++++++++++++++++++++++ dts/msm8226/rules.mk | 1 + 3 files changed, 34 insertions(+) create mode 100644 dts/msm8226/msm8926-htc-memul.dts diff --git a/README.md b/README.md index 8be7313cf..fbfdb7120 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ page on the EFIDroid wiki for an exact mapping of LK targets to SoCs. ### lk2nd-msm8226 - ASUS ZenWatch 2 - sparrow - Coolpad 8730L - 8730l +- HTC One Mini 2 - memul (quirky - see comment in `dts/msm8226/msm8926-htc-memul.dts`) - Huawei Ascend G6 4G - G6-L11 (quirky - see comment in `dts/msm8226/msm8926-huawei-g6-l11-vb.dts`) - Huawei Watch - sturgeon - LG G Watch R - lenok (use `lk2nd-appended-dtb.img`) diff --git a/dts/msm8226/msm8926-htc-memul.dts b/dts/msm8226/msm8926-htc-memul.dts new file mode 100644 index 000000000..5ef1ce89f --- /dev/null +++ b/dts/msm8226/msm8926-htc-memul.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +/* + * Compile lk2nd with the following flags so that various lk2nd functionality + * works fine, e.g. fastboot oem lk_log && fastboot get_staged /dev/stdout + * + * SCRATCH_ADDR=0x20000000 SCRATCH_ADDR_512MAP=0x20000000 SCRATCH_SIZE_512MAP=0x10000000 + * + * On this device the memory at 0x10000000 (default scratch memory address) + * allows writes but any read just returns zeroes. From Linux perspective this + * is reserved memory so we need to choose a different memory address. + */ + +#include +#include + +/ { + /* Actually htc,project-id */ + qcom,msm-id = <293 0 0>; + + memul { + model = "HTC One Mini 2"; + compatible = "htc,memul", "qcom,msm8926", "lk2nd,device"; + lk2nd,match-cmdline = "* mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_mem_lg_novatek_35521_720p_video *"; + + lk2nd,keys = + , + ; + }; +}; diff --git a/dts/msm8226/rules.mk b/dts/msm8226/rules.mk index 83c39e99c..4b51f5a18 100644 --- a/dts/msm8226/rules.mk +++ b/dts/msm8226/rules.mk @@ -8,6 +8,7 @@ DTBS += \ $(LOCAL_DIR)/apq8026-samsung-r03.dtb \ $(LOCAL_DIR)/msm8226-motorola-falcon.dtb \ $(LOCAL_DIR)/msm8226-samsung-ms013g.dtb \ + $(LOCAL_DIR)/msm8926-htc-memul.dtb \ $(LOCAL_DIR)/msm8926-huawei-g6-l11-vb.dtb \ $(LOCAL_DIR)/msm8926-samsung-r02.dtb \ $(LOCAL_DIR)/msm8926-v2-720p-mtp.dtb