From 60a19458fd6a055ef9055db19be062eba29fd3f0 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 16 Nov 2023 21:13:19 +0500 Subject: [PATCH] dts: Import msm8916-512mb-* Co-developed-by: 185264646 --- .../device/dts/msm8916/msm8916-512mb-mtp.dts | 99 +++++++++++++++++++ .../dts/msm8916/msm8916-512mb-qrd-skuh.dts | 31 ++++++ lk2nd/device/dts/msm8916/rules.mk | 2 + 3 files changed, 132 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8916-512mb-mtp.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-512mb-qrd-skuh.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-512mb-mtp.dts b/lk2nd/device/dts/msm8916/msm8916-512mb-mtp.dts new file mode 100644 index 0000000000..a4e6390d41 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-512mb-mtp.dts @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: BSD-3-Clause +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + zhihe-various { + model = "Unknown 4G Modem Stick"; + compatible = "zhihe,various"; + + /* + * NOTE: It's pretty much impossible for lk2nd to detect which of + * those devices is running, since the cmdline is the same. This + * node detects one of: + * + * - UFI_001B/C + * - UFI003_MB_V02 + * - MF601 + * + * Please use lk1st with fixed dtb/compatible to make use of + * the automatic kernel dtb selection. See below. + */ + + lk2nd,match-cmdline = "* mdss_mdp.panel=1:spi:0:qcom,mdss_spi_st7735s_128128_cmd"; + + gpio-keys { + compatible = "gpio-keys"; + edl { + /* The EDL button is the only one available on UFI-001C */ + lk2nd,code = ; + gpios = <&tlmm 37 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + }; + + /* Following keys are listed for mis-detected MF601 */ + + reset { + /* RESET button on the back of the device */ + lk2nd,code = ; + gpios = <&tlmm 34 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + wps { + /* WPS button near the power button(may not exist on some variants) */ + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + thwc-ufi001c { + model = "ufi-001c/ufi-001b 4G Modem Stick"; + compatible = "thwc,ufi001c"; + + /* + * Use this node with lk1st: + * make ... LK2ND_BUNDLE_DTB="msm8916/msm8916-512mb-mtp.dtb" LK2ND_COMPATIBLE="thwc,ufi001c" + */ + + lk2nd,dtb-files = "msm8916-thwc-ufi001c"; + + gpio-keys { + compatible = "gpio-keys"; + edl { + /* The EDL button is the only one available on UFI-001C */ + lk2nd,code = ; + gpios = <&tlmm 37 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + yiming-uz801-v3 { + model = "uz801 v3.0 4G Modem Stick"; + compatible = "yiming,uz801-v3"; + + /* + * Note: + * Due to some unknown reasons, the stock aboot firmware is incompatible + * with qhypstub and tz firmware from db410c, use lk1st if possible. + * + * Use this node with lk1st: + * make ... LK2ND_BUNDLE_DTB="msm8916/msm8916-512mb-mtp.dtb" LK2ND_COMPATIBLE="yiming,uz801-v3" ... + */ + lk2nd,match-cmdline = "* mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_jdi_1080p_video"; + + lk2nd,dtb-files = "msm8916-yiming-uz801v3"; + + gpio-keys { + compatible = "gpio-keys"; + reset { + lk2nd,code = ; + gpios = <&tlmm 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-512mb-qrd-skuh.dts b/lk2nd/device/dts/msm8916/msm8916-512mb-qrd-skuh.dts new file mode 100644 index 0000000000..e265d74572 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-512mb-qrd-skuh.dts @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: BSD-3-Clause +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + thwc-uf896 { + model = "uf896 4G Modem Stick"; + compatible = "thwc,uf896"; + + /* + * Use this node with lk1st: + * make ... LK2ND_BUNDLE_DTB="msm8916/msm8916-512mb-qrd-skuh.dtb" LK2ND_COMPATIBLE="thwc,uf896" + */ + + lk2nd,dtb-files = "msm8916-thwc-uf896"; + + gpio-keys { + compatible = "gpio-keys"; + reset { + lk2nd,code = ; + gpios = <&tlmm 35 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; + diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index eb89d9a619..7c612b6366 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -5,6 +5,8 @@ QCDTBS += \ $(LOCAL_DIR)/apq8016-samsung.dtb \ $(LOCAL_DIR)/apq8016-sbc.dtb \ $(LOCAL_DIR)/msm8216-samsung.dtb \ + $(LOCAL_DIR)/msm8916-512mb-mtp.dtb \ + $(LOCAL_DIR)/msm8916-512mb-qrd-skuh.dtb \ $(LOCAL_DIR)/msm8916-asus-z00e.dtb \ $(LOCAL_DIR)/msm8916-asus-z00l.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4d.dtb \