Skip to content

Commit

Permalink
msm8974: add HTC One M8 (htc-m8)
Browse files Browse the repository at this point in the history
Support the HTC One (M8) devices.

Like for the htc-memul, the htc,project-id from the vendor device tree
(and used by the bootloader) is used as the qcom,msm-id.

Then, the match is done on the panel compatible, which is also extracted
from the vendor device tree.

Signed-off-by: Alexandre Messier <alex@me.ssier.org>
  • Loading branch information
amessier authored and TravMurav committed Jan 28, 2024
1 parent 68b25e3 commit afc845e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ page on the EFIDroid wiki for an exact mapping of LK targets to SoCs.

### lk2nd-msm8974
- Fairphone 2 - FP2
- HTC One M8 - m8
- LG G3 - D855
- LG Google Nexus 5 - hammerhead D820, D821
- OnePlus One - bacon (use `lk2nd-msm8974-appended-dtb.img`)
Expand Down
61 changes: 61 additions & 0 deletions dts/msm8974/msm8974-htc-m8.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include <skeleton.dtsi>
#include <lk2nd.h>

/ {
/* Actually htc,project-id */
qcom,msm-id = <271 0 0x10000>, <271 1 0x10000>, <271 2 0x10000>,
<271 3 0x10000>, <271 4 0x10000>, <271 5 0x10000>,
<272 0 0x10000>, <272 1 0x10000>, <272 2 0x10000>,
<272 3 0x10000>, <272 4 0x10000>, <272 5 0x10000>,
<273 0 0x10000>, <273 1 0x10000>, <273 2 0x10000>,
<273 3 0x10000>, <273 4 0x10000>, <273 5 0x10000>,
<280 0 0x10000>, <280 1 0x10000>, <280 2 0x10000>,
<280 3 0x10000>, <280 4 0x10000>, <280 5 0x10000>,
<286 1 0x10000>, <286 2 0x10000>, <286 3 0x10000>,
<286 4 0x10000>, <286 5 0x10000>,
<305 0 0x10000>, <305 1 0x10000>, <305 2 0x10000>,
<305 3 0x10000>, <305 4 0x10000>, <305 5 0x10000>;

htc-m8 {
model = "HTC One (M8)";
compatible = "htc,m8", "qcom,msm8974", "lk2nd,device";
lk2nd,match-panel;

lk2nd,keys =
<KEY_VOLUMEDOWN 27 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>,
<KEY_VOLUMEUP 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;

panel {
compatible = "htc,m8-panel";

qcom,mdss_dsi_glu_sharp_1080p_cmd {
compatible = "htc,m8-glu-sharp-cmd";
};
qcom,mdss_dsi_m8_lg_1080p_video {
compatible = "htc,m8-lg-video";
};
qcom,mdss_dsi_m8_lg_novatek_35595_1080p_cmd {
compatible = "htc,m8-lg-nt35595-cmd";
};
qcom,mdss_dsi_m8_lg_novatek_35695_1080p_video {
compatible = "htc,m8-lg-nt35695-video";
};
qcom,mdss_dsi_m8_sharp_novatek_35595_1080p_cmd {
compatible = "htc,m8-sharp-nt35595-cmd";
};
qcom,mdss_dsi_m8_sharp_novatek_35695_1080p_cmd {
compatible = "htc,m8-sharp-nt35695-cmd";
};
qcom,mdss_dsi_m8_sharp_novatek_35695_1080p_video {
compatible = "htc,m8-sharp-nt35695-video";
};
qcom,mdss_dsi_sharp_1080p_video {
compatible = "htc,m8-sharp-video";
};
};
};
};
1 change: 1 addition & 0 deletions dts/msm8974/rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
LOCAL_DIR := $(GET_LOCAL_DIR)

DTBS += \
$(LOCAL_DIR)/msm8974-htc-m8.dtb \
$(LOCAL_DIR)/msm8974-lge-d855.dtb \
$(LOCAL_DIR)/msm8974-lge-hammerhead.dtb \
$(LOCAL_DIR)/msm8974-samsung-r10.dtb \
Expand Down

0 comments on commit afc845e

Please sign in to comment.