From 82e8963531662ee9a16773b6e535b7a6e155e90c Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 15 Nov 2023 14:35:44 +0500 Subject: [PATCH 01/59] dts: Import msm8916-samsung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Lin, Meng-Bo Co-authored-by: Minecrell Co-authored-by: Raymond Hackley Co-authored-by: Siddharth Manthan Co-authored-by: wonderfulShrineMaidenOfParadise Co-authored-by: Amir Dahan Co-authored-by: Eloy Degen Co-authored-by: Gareth Peoples Co-authored-by: Hello Everyone Co-authored-by: Karl Chan Co-authored-by: RDS5 <32397126+RDS5@users.noreply.github.com> Co-authored-by: Raymond Hackley Co-authored-by: Raymond Hackley Co-authored-by: Siddharth Manthan Co-authored-by: haroldsoixante <102438052+haroldsoixante@users.noreply.github.com> Co-authored-by: mint Co-authored-by: mxpro1996 Co-authored-by: ygor6889 Co-authored-by: 博麗霊夢 Co-authored-by: 박형진 <136290151+pkj-daeam@users.noreply.github.com> --- lk2nd/device/dts/msm8916/msm8916-samsung.dts | 778 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 2 +- lk2nd/device/dts/msm8916/samsung.dts | 93 --- 3 files changed, 779 insertions(+), 94 deletions(-) create mode 100644 lk2nd/device/dts/msm8916/msm8916-samsung.dts delete mode 100644 lk2nd/device/dts/msm8916/samsung.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-samsung.dts b/lk2nd/device/dts/msm8916/msm8916-samsung.dts new file mode 100644 index 000000000..666c4efa9 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-samsung.dts @@ -0,0 +1,778 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +#define I2C_GPIO_FLAGS (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN | GPIO_BIAS_DISABLE) + +/ { + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 0>, + <0xCE08FF01 1>, + <0xCE08FF01 2>, + <0xCE08FF01 3>, + <0xCE08FF01 4>, + <0xCE08FF01 5>, + <0xCE08FF01 6>, + <0xCE08FF01 7>, + <0xCE08FF01 8>, + <0xCE08FF01 11>; +}; + +&lk2nd { + /* rev 0 */ + + gt58lte-aus { + model = "Samsung Galaxy Tab A 8.0 2015 (SM-T355Y)"; + compatible = "samsung,gt58lte-aus", "samsung,gt58"; + lk2nd,match-bootloader = "T355Y*"; + + lk2nd,dtb-files = "msm8916-samsung-gt58"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 0>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + on7lte-kor { + model = "Samsung Galaxy On7 2015 (SM-G600S)"; + compatible = "samsung,on7lte-kor", "samsung,on7"; + lk2nd,match-bootloader = "G600S*"; + + lk2nd,dtb-files = "msm8916-samsung-on7"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 0>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + coreprimelte { + // In the downstream dts it is called Samsung ROSSA PROJECT Rev00 + model = "Samsung Galaxy Core Prime LTE (SM-G360F)"; + compatible = "samsung,coreprimelte", "samsung,cprime"; + lk2nd,match-bootloader = "G360F*"; + + lk2nd,dtb-files = "msm8916-samsung-cprime"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,cprime-panel", "lk2nd,panel"; + + ss_dsi_panel_HX8369B_BV045WVM_WVGA { + compatible = "samsung,hx8369b-bv045wvm"; + }; + ss_dsi_panel_SC7798A_BV045WVM_WVGA { + compatible = "samsung,sc7798a-bv045wvm"; + }; + }; + }; + + /* rev 1 */ + + a3u-eur { + model = "Samsung Galaxy A3U (SM-A300FU)"; + compatible = "samsung,a3u-eur", "samsung,a3"; + lk2nd,match-bootloader = "A300FU*"; + + lk2nd,dtb-files = "msm8916-samsung-a3u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + a3lte { + model = "Samsung Galaxy A3 (SM-A300F)"; + compatible = "samsung,a3lte", "samsung,a3u-eur", "samsung,a3"; + lk2nd,match-bootloader = "A300F*"; + + lk2nd,dtb-files = "msm8916-samsung-a3u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + a5u-eur { + model = "Samsung Galaxy A5U (SM-A500FU)"; + compatible = "samsung,a5u-eur", "samsung,a5"; + lk2nd,match-bootloader = "A500FU*"; + + lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + }; + + gt58lte { + model = "Samsung Galaxy Tab A 8.0 (LTE, SM-T355)"; + compatible = "samsung,gt58lte", "samsung,gt58"; + lk2nd,match-bootloader = "T355*"; + + lk2nd,dtb-files = "msm8916-samsung-gt58"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + j3ltezt { + model = "Samsung Galaxy J3 2016 (SM-J320YZ)"; + compatible = "samsung,j3ltetw"; + lk2nd,match-bootloader = "J320YZ*"; + + lk2nd,dtb-files = "msm8916-samsung-j3ltetw"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 0 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 1 I2C_GPIO_FLAGS>; + }; + }; + + j5ltezm { + model = "Samsung Galaxy J5 2015 (SM-J5008)"; + compatible = "samsung,j5ltechn", "samsung,j5"; + lk2nd,match-bootloader = "J5008*"; + + lk2nd,dtb-files = "msm8916-samsung-j5"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + rossaltedv { + model = "Samsung Galaxy Core Prime LTE (SM-G360GD)"; + compatible = "samsung,rossaltexsa", "samsung,cprime"; + lk2nd,match-bootloader = "G360GD*"; + + lk2nd,dtb-files = "msm8916-samsung-cprime"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,cprime-panel", "lk2nd,panel"; + + ss_dsi_panel_HX8369B_BV045WVM_WVGA { + compatible = "samsung,hx8369b-bv045wvm"; + }; + ss_dsi_panel_SC7798A_BV045WVM_WVGA { + compatible = "samsung,sc7798a-bv045wvm"; + }; + }; + }; + + /* rev 2 */ + + gprimeltecan { + model = "Samsung Galaxy Grand Prime (SM-G530W)"; + compatible = "samsung,gprimeltecan"; + lk2nd,match-bootloader = "G530W*"; + + lk2nd,dtb-files = "msm8916-samsung-gprimeltecan"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 2>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,gprime-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8389c_qhd_video { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_HX8389C_GH9607501A_QHD { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_S6D78A0_GH9607501A_QHD { + compatible = "samsung,s6d78a0-gh9607501a"; + }; + }; + }; + + gprimeltexx { + model = "Samsung Galaxy Grand Prime (SM-G530FZ)"; + compatible = "samsung,gprimeltexx", "samsung,gprimeltecan"; + lk2nd,match-bootloader = "G530FZ*"; + + lk2nd,dtb-files = "msm8916-samsung-gprimeltecan"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 2>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,gprime-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8389c_qhd_video { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_HX8389C_GH9607501A_QHD { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_S6D78A0_GH9607501A_QHD { + compatible = "samsung,s6d78a0-gh9607501a"; + }; + }; + }; + + /* + * Before building for G357FZ, please comment out all dtbs except + * "$(LOCAL_DIR)/msm8916-samsung.dtb" at './rules.mk'. + * heatqlte doesn't work with multi-dtbs; only goes into "Download mode". + */ + heatqlte { + model = "Samsung Galaxy Ace 4 (SM-G357FZ)"; + compatible = "samsung,heatqlte"; + lk2nd,match-bootloader = "G357FZ*"; + + lk2nd,dtb-files = "msm8916-samsung-heatqlte"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 2>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + }; + + /* rev 3 */ + + serranovelte { + model = "Samsung Galaxy S4 Mini Value Edition"; + compatible = "samsung,serranovelte", "samsung,serranove"; + lk2nd,match-bootloader = "I9195I*"; + + lk2nd,dtb-files = "msm8916-samsung-serranove"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + j3xprolte-chnopen { + model = "Samsung Galaxy J3 Pro (SM-J3110)"; + compatible = "samsung,j3xprolte-chnopen", "samsung,j3xpro"; + lk2nd,match-bootloader = "J3110*"; + + // FIXME: lk2nd,dtb-files = "msm8916-samsung-j3xpro"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 0 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 1 I2C_GPIO_FLAGS>; + }; + }; + + j3xprolte-chnctc { + model = "Samsung Galaxy J3 Pro (SM-J3119)"; + compatible = "samsung,j3xprolte-chnctc", "samsung,j3xpro"; + lk2nd,match-bootloader = "J3119*"; + + // FIXME: lk2nd,dtb-files = "msm8916-samsung-j3xpro"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 0 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 1 I2C_GPIO_FLAGS>; + }; + }; + + j5xltecmcc { + model = "Samsung Galaxy J5 2016 (SM-J5108)"; + compatible = "samsung,j5xltecmc", "samsung,j5x"; + lk2nd,match-bootloader = "J5108*"; + + lk2nd,dtb-files = "msm8916-samsung-j5x"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + on7lte-chn { + model = "Samsung Galaxy On7 2015 (SM-G6000)"; + compatible = "samsung,on7lte-chn", "samsung,on7"; + lk2nd,match-bootloader = "G600S*"; + + lk2nd,dtb-files = "msm8916-samsung-on7"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + /* + * Before building for rossaltezt, please comment out all dtbs except + * "$(LOCAL_DIR)/msm8916-samsung.dtb" at './rules.mk'. + * rossaltezt doesn't work with multi-dtbs; only goes into "Download mode". + */ + rossaltezt { + model = "Samsung Galaxy Core Prime LTE (SM-G360GZT)"; + compatible = "samsung,rossaltexsa", "samsung,cprime"; + lk2nd,match-bootloader = "G360GZT*"; + + lk2nd,dtb-files = "msm8916-samsung-cprime"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,cprime-panel", "lk2nd,panel"; + + ss_dsi_panel_HX8369B_BV045WVM_WVGA { + compatible = "samsung,hx8369b-bv045wvm"; + }; + ss_dsi_panel_SC7798A_BV045WVM_WVGA { + compatible = "samsung,sc7798a-bv045wvm"; + }; + }; + }; + + /* rev 4 */ + + j5xnltejv { + model = "Samsung Galaxy J5 2016 (SM-J510F)"; + compatible = "samsung,j5xnlte", "samsung,j5x"; + lk2nd,match-bootloader = "J510F*"; + + lk2nd,dtb-files = "msm8916-samsung-j5x"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 4>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + j5xnlteub { + model = "Samsung Galaxy J5 2016 (SM-J510MN)"; + compatible = "samsung,j5xnlte", "samsung,j5x"; + lk2nd,match-bootloader = "J510MN*"; + + lk2nd,dtb-files = "msm8916-samsung-j5x"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 4>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + grandmaxlteub { + model = "Samsung Galaxy Grand Max (SM-G720AX)"; + compatible = "samsung,grandmaxlteub", "samsung,grandmax"; + lk2nd,match-bootloader = "G720AX*"; + + lk2nd,dtb-files = "msm8916-samsung-grandmax"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 4>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + e5ltexx { + model = "Samsung Galaxy E5 (SM-E500F)"; + compatible = "samsung,e5ltexx", "samsung,e5"; + lk2nd,match-bootloader = "A500FU*"; + + lk2nd,dtb-files = "msm8916-samsung-e5"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 4>; + }; + + /* rev5 */ + + j3lte-chnctc { + model = "Samsung Galaxy J3 2016 (SM-J320YZ)"; + compatible = "samsung,j3lte-chnctc"; + lk2nd,match-bootloader = "J3109*"; + + lk2nd,dtb-files = "msm8916-samsung-j3ltetw"; // FIXME + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 5>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 0 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 1 I2C_GPIO_FLAGS>; + }; + }; + + j5lteub { + model = "Samsung Galaxy J5 2015 (SM-J500M)"; + compatible = "samsung,j5lteub", "samsung,j5"; + lk2nd,match-bootloader = "J500M*"; + + lk2nd,dtb-files = "msm8916-samsung-j5"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 5>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + j5nltexx { + model = "Samsung Galaxy J5 2015 (SM-J500FN)"; + compatible = "samsung,j5nltexx", "samsung,j5"; + lk2nd,match-bootloader = "J500FN*"; + + lk2nd,dtb-files = "msm8916-samsung-j5"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 5>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + j5ltexx { + model = "Samsung Galaxy J5 2015 (SM-J500F)"; + compatible = "samsung,j5ltexx", "samsung,j5"; + lk2nd,match-bootloader = "J500F*"; + + lk2nd,dtb-files = "msm8916-samsung-j5"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 5>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + j5ltezt { + model = "Samsung Galaxy J5 2015 (SM-J5007)"; + compatible = "samsung,j5ltezt", "samsung,j5"; + lk2nd,match-bootloader = "J5007*"; + + lk2nd,dtb-files = "msm8916-samsung-j5"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 5>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + /* rev 6 */ + + e7000 { + model = "Samsung Galaxy E7 (SM-E7000)"; + compatible = "samsung,e7000", "samsung,e7"; + lk2nd,match-bootloader = "E7000*"; + + lk2nd,dtb-files = "msm8916-samsung-e7"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF02 6>; + + panel { + compatible = "samsung,e7-panel", "lk2nd,panel"; + + ss_dsi_panel_EA8061_HD { + compatible = "samsung,ea8061-ams549bu19"; + }; + ss_dsi_panel_EA8061_ID400418_HD { + compatible = "samsung,ea8061-ams549bu19-id400418"; + }; + }; + }; + + gt58ltebmc { + model = "Samsung Galaxy Tab A 8.0 2015 (SM-T357W)"; + compatible = "samsung,gt58ltebmc", "samsung,gt58"; + lk2nd,match-bootloader = "T357W*"; + + lk2nd,dtb-files = "msm8916-samsung-gt58"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 6>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + /* rev 8 */ + + a5lte { + model = "Samsung Galaxy A5U (SM-A500F)"; + compatible = "samsung,a5lte", "samsung,a5u-eur", "samsung,a5"; + lk2nd,match-bootloader = "A500F*"; + + lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 8>; + }; + + gt510lte { + model = "Samsung Galaxy Tab A 9.7 2015 (LTE, SM-T555)"; + compatible = "samsung,gt510lte", "samsung,gt510"; + lk2nd,match-bootloader = "T555*"; + + lk2nd,dtb-files = "msm8916-samsung-gt510"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 7>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + /* + * Before building for G5108Q, please comment out all dtbs except + * "$(LOCAL_DIR)/msm8916-samsung.dtb" at './rules.mk'. + * g5108q doesn't work with multi-dtbs; only goes into "Download mode". + */ + g5108q { + model = "Samsung Galaxy Core Max (SM-G5108Q)"; + compatible = "samsung,g5108q"; + lk2nd,match-bootloader = "G5108Q*"; + + // FIXME: lk2nd,dtb-files = "msm8916-samsung-???"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 8>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + }; + + /* rev 11 */ + + a5ltechn { + model = "Samsung Galaxy A5U (SM-A5000)"; + compatible = "samsung,a5ltechn", "samsung,a5u-eur", "samsung,a5"; + lk2nd,match-bootloader = "A5000*"; + + lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 11>; + }; + + a5ltezt { + model = "Samsung Galaxy A5U (SM-A500YZ)"; + compatible = "samsung,a5ltezt", "samsung,a5u-eur", "samsung,a5"; + lk2nd,match-bootloader = "A500YZ*"; + + lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 11>; + }; + + a5u-canbmc { + model = "Samsung Galaxy A5U (SM-A500W)"; + compatible = "samsung,a5u-canbmc", "samsung,a5"; + lk2nd,match-bootloader = "A500W*"; + + lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + }; + + /* + * Before building for G530Y, please comment out all dtbs except + * "$(LOCAL_DIR)/msm8916-samsung.dtb" at './rules.mk'. + * fortunaltezt doesn't work with multi-dtbs; only goes into "Download mode". + */ + fortunaltezt { + model = "Samsung Galaxy Grand Prime (SM-G530Y)"; + compatible = "samsung,fortunaltezt"; + lk2nd,match-bootloader = "G530Y*"; + + lk2nd,dtb-files = "msm8916-samsung-fortunaltezt"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 11>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,gprime-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8389c_qhd_video { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_HX8389C_GH9607501A_QHD { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_S6D78A0_GH9607501A_QHD { + compatible = "samsung,s6d78a0-gh9607501a"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 78e63071c..d689c6e1f 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -7,4 +7,4 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ $(LOCAL_DIR)/msm8916-qrd-7+12.dtb \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ - $(LOCAL_DIR)/samsung.dtb \ + $(LOCAL_DIR)/msm8916-samsung.dtb \ diff --git a/lk2nd/device/dts/msm8916/samsung.dts b/lk2nd/device/dts/msm8916/samsung.dts deleted file mode 100644 index df41d3975..000000000 --- a/lk2nd/device/dts/msm8916/samsung.dts +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only - -#include -#include - -#define I2C_GPIO_FLAGS (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN | GPIO_BIAS_DISABLE) - -/ { - /* TODO: Add more */ - qcom,msm-id = ; - qcom,board-id = <0xCE08FF01 1>, <0xCE08FF01 3>, <0xCE08FF01 7>; -}; - -&lk2nd { - a3lte { - model = "Samsung Galaxy A3 (SM-A300F)"; - compatible = "samsung,a3lte", "samsung,a3"; - lk2nd,match-bootloader = "A300F*"; - - qcom,msm-id = ; - qcom,board-id = <0xCE08FF01 1>; - - gpio-keys { - compatible = "gpio-keys"; - home { - lk2nd,code = ; - gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - }; - - gt58lte { - model = "Samsung Galaxy Tab A 8.0 (LTE, SM-T355)"; - compatible = "samsung,gt58lte", "samsung,gt58"; - lk2nd,match-bootloader = "T355*"; - - lk2nd,dtb-files = "msm8916-samsung-gt58"; - - qcom,msm-id = ; - qcom,board-id = <0xCE08FF01 1>; - - gpio-keys { - compatible = "gpio-keys"; - home { - lk2nd,code = ; - gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - }; - - gt510lte { - model = "Samsung Galaxy Tab A 9.7 (LTE, SM-T555)"; - compatible = "samsung,gt510lte", "samsung,gt510"; - lk2nd,match-bootloader = "T555*"; - - lk2nd,dtb-files = "msm8916-samsung-gt510"; - - qcom,msm-id = ; - qcom,board-id = <0xCE08FF01 7>; - - gpio-keys { - compatible = "gpio-keys"; - home { - lk2nd,code = ; - gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - }; - - serranovelte { - model = "Samsung Galaxy S4 Mini Value Edition"; - compatible = "samsung,serranovelte", "samsung,serranove"; - lk2nd,match-bootloader = "I9195I*"; - - qcom,msm-id = ; - qcom,board-id = <0xCE08FF01 3>; - - muic-reset { - compatible = "samsung,muic-reset"; - i2c-reg = <0x14>; - i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; - i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; - }; - - gpio-keys { - compatible = "gpio-keys"; - home { - lk2nd,code = ; - gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - }; - }; - }; -}; From a9930ed252e5a4963181e62b7b4ca236d514f701 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 15 Nov 2023 14:51:59 +0500 Subject: [PATCH 02/59] dts: Import apq8016-samsung Co-authored-by: Minecrell Co-authored-by: Nick Reuter Co-authored-by: RDS5 <32397126+RDS5@users.noreply.github.com> Co-authored-by: person4268 <28717044+person4268@users.noreply.github.com> --- lk2nd/device/dts/msm8916/apq8016-samsung.dts | 89 ++++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 90 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/apq8016-samsung.dts diff --git a/lk2nd/device/dts/msm8916/apq8016-samsung.dts b/lk2nd/device/dts/msm8916/apq8016-samsung.dts new file mode 100644 index 000000000..787c36d5e --- /dev/null +++ b/lk2nd/device/dts/msm8916/apq8016-samsung.dts @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +#define I2C_GPIO_FLAGS (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN | GPIO_BIAS_DISABLE) + +/ { + qcom,msm-id = ; + qcom,board-id = <0xF708FF01 1>, + <0xF708FF01 2>, + <0xF708FF01 5>, + <0xF708FF01 7>; +}; + +&lk2nd { + /* rev 2 */ + + gt58lte { + model = "Samsung Galaxy Tab A 8.0 (WiFi, SM-T350)"; + compatible = "samsung,gt58wifi", "samsung,gt58"; + lk2nd,match-bootloader = "T350*"; + + lk2nd,dtb-files = "msm8916-samsung-gt58"; + + qcom,msm-id = ; + qcom,board-id = <0xF708FF01 2>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + matissevewifi { + model = "Samsung Galaxy Tab 4 10.1 (2015) T533"; + compatible = "samsung,matissevewifi"; + lk2nd,match-bootloader = "T533*"; + + lk2nd,dtb-files = "msm8916-samsung-matissevewifi"; + + qcom,msm-id = ; + qcom,board-id = <0xF708FF01 2>; + }; + + /* rev 5 */ + + gtelwifiue { + model = "Samsung Galaxy Tab E 9.6 WiFi (SM-T560NU)"; + compatible = "samsung,gtelwifiue"; + lk2nd,match-bootloader = "T560*"; + + lk2nd,dtb-files = "msm8916-samsung-gtelwifiue"; + + qcom,msm-id = ; + qcom,board-id = <0xF708FF01 1>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + }; + + /* rev 7 */ + + gt510wifi { + model = "Samsung Galaxy Tab A 9.7 2015 (WiFi, SM-T550)"; + compatible = "samsung,gt510wifi", "samsung,gt510"; + lk2nd,match-bootloader = "T550*"; + + lk2nd,dtb-files = "msm8916-samsung-gt510"; + + qcom,msm-id = ; + qcom,board-id = <0xF708FF01 7>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index d689c6e1f..fb1d6c8c0 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -2,6 +2,7 @@ LOCAL_DIR := $(GET_LOCAL_DIR) QCDTBS += \ + $(LOCAL_DIR)/apq8016-samsung.dtb \ $(LOCAL_DIR)/apq8016-sbc.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4d.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ From a8e076c18ad42ba7b84848e20f6f1a9e2b7abd0e Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 15 Nov 2023 14:58:48 +0500 Subject: [PATCH 03/59] dts: Import msm8216-samsung Co-authored-by: Raymond Hackley Co-authored-by: Aria Moradi Co-authored-by: Minecrell Co-authored-by: Siddharth Manthan --- lk2nd/device/dts/msm8916/msm8216-samsung.dts | 84 ++++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 85 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8216-samsung.dts diff --git a/lk2nd/device/dts/msm8916/msm8216-samsung.dts b/lk2nd/device/dts/msm8916/msm8216-samsung.dts new file mode 100644 index 000000000..8cb933a7a --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8216-samsung.dts @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +#define I2C_GPIO_FLAGS (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN | GPIO_BIAS_DISABLE) + +/ { + qcom,msm-id = ; + qcom,board-id = <0xF808FF01 5>, + <0xF808FF01 7>, + <0xF808FF01 8>; +}; + +&lk2nd { + /* rev 5 */ + + j53gxx { + model = "Samsung Galaxy J5 2015 (SM-J500H)"; + compatible = "samsung,j53gxx", "samsung,j5"; + lk2nd,match-bootloader = "J500H*"; + + lk2nd,dtb-files = "msm8916-samsung-j5"; + + qcom,msm-id = ; + qcom,board-id = <0xF808FF01 5>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + /* rev 7 */ + + fortuna3g { + model = "Samsung Galaxy Grand Prime (SM-G530H)"; + compatible = "samsung,fortuna3g"; + lk2nd,match-bootloader = "G530H*"; + + lk2nd,dtb-files = "msm8916-samsung-fortuna3g"; + + qcom,msm-id = ; + qcom,board-id = <0xF808FF01 7>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,gprime-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8389c_qhd_video { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_HX8389C_GH9607501A_QHD { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_S6D78A0_GH9607501A_QHD { + compatible = "samsung,s6d78a0-gh9607501a"; + }; + }; + }; + + /* rev 8 */ + + a53g { + model = "Samsung Galaxy A5 (SM-A500H)"; + compatible = "samsung,a53g", "samsung,a5u-eur", "samsung,a5"; + lk2nd,match-bootloader = "A500H*"; + + lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xF808FF01 8>; + }; + +}; + diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index fb1d6c8c0..dd4a5e998 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -4,6 +4,7 @@ LOCAL_DIR := $(GET_LOCAL_DIR) QCDTBS += \ $(LOCAL_DIR)/apq8016-samsung.dtb \ $(LOCAL_DIR)/apq8016-sbc.dtb \ + $(LOCAL_DIR)/msm8216-samsung.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4d.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ $(LOCAL_DIR)/msm8916-qrd-7+12.dtb \ From f5d8cc5ccf6c7c3a34697e34d2747d488c5e9962 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 15 Nov 2023 15:17:31 +0500 Subject: [PATCH 04/59] dts: Import msm8929-samsung Co-authored-by: Minecrell Co-authored-by: Amir Dahan Co-authored-by: Lin, Meng-Bo Co-authored-by: Raymond Hackley Co-authored-by: Siddharth Manthan Co-authored-by: wonderfulShrineMaidenOfParadise --- lk2nd/device/dts/msm8916/msm8929-samsung.dts | 157 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 158 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8929-samsung.dts diff --git a/lk2nd/device/dts/msm8916/msm8929-samsung.dts b/lk2nd/device/dts/msm8916/msm8929-samsung.dts new file mode 100644 index 000000000..53981272a --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8929-samsung.dts @@ -0,0 +1,157 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +#define I2C_GPIO_FLAGS (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN | GPIO_BIAS_DISABLE) + +/ { + qcom,msm-id = ; + qcom,board-id = <0x0C01FF01 0>, + <0x0C01FF01 4>; +}; + +&lk2nd { + /* rev 0 */ + + j7-spr { + model = "Samsung Galaxy J7 2015 (SM-J700P)"; + compatible = "samsung,j7-spr", "samsung,j7"; + lk2nd,match-bootloader = "J700P*"; + + // FIXME: lk2nd,dtb-files = "msm8929-samsung-j7"; + + qcom,msm-id = ; + qcom,board-id = <0x0C01FF01 0>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 31 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 32 I2C_GPIO_FLAGS>; + }; + }; + + /* rev 4 */ + + j7-chn { + model = "Samsung Galaxy J7 2015 (SM-J7008)"; + compatible = "samsung,j7-chn", "samsung,j7"; + lk2nd,match-bootloader = "J7008*"; + + // FIXME: lk2nd,dtb-files = "msm8929-samsung-j7"; + + qcom,msm-id = ; + qcom,board-id = <0x0C01FF01 4>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 31 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 32 I2C_GPIO_FLAGS>; + }; + }; + + on7lte-chn { + model = "Samsung Galaxy On7 2015 (SM-G6000)"; + compatible = "samsung,on7lte-chn", "samsung,on7"; + lk2nd,match-bootloader = "G600S*"; + + lk2nd,dtb-files = "msm8916-samsung-on7"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + + fortuna3g { + model = "Samsung Galaxy Grand Prime (SM-G530H)"; + compatible = "samsung,fortuna3g"; + lk2nd,match-bootloader = "G530H*"; + + lk2nd,dtb-files = "msm8916-samsung-fortuna3g"; + + qcom,msm-id = ; + qcom,board-id = <0xF808FF01 7>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,gprime-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8389c_qhd_video { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_HX8389C_GH9607501A_QHD { + compatible = "samsung,hx8389c-gh9607501a"; + }; + ss_dsi_panel_S6D78A0_GH9607501A_QHD { + compatible = "samsung,s6d78a0-gh9607501a"; + }; + }; + }; + + a3lte { + model = "Samsung Galaxy A3 (SM-A300F)"; + compatible = "samsung,a3lte", "samsung,a3u-eur", "samsung,a3"; + lk2nd,match-bootloader = "A300F*"; + + lk2nd,dtb-files = "msm8916-samsung-a3u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 1>; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 109 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + a5ltezt { + model = "Samsung Galaxy A5 (SM-A500YZ)"; + compatible = "samsung,a5ltezt", "samsung,a5u-eur", "samsung,a5"; + lk2nd,match-bootloader = "A500YZ*"; + + lk2nd,dtb-files = "msm8916-samsung-a5u-eur"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 11>; + }; + + a7ltezt { + model = "Samsung Galaxy A7 (SM-A700YD)"; + compatible = "samsung,a7ltezt", "samsung,a7"; + lk2nd,match-bootloader = "A700YD*"; + + lk2nd,dtb-files = "msm8916-samsung-a7"; + + qcom,msm-id = ; + qcom,board-id = <0xEF08FF1 1>; + }; + + e5ltexx { + model = "Samsung Galaxy E5 (SM-E500F)"; + compatible = "samsung,e5ltexx", "samsung,e5"; + lk2nd,match-bootloader = "E500F*"; + + lk2nd,dtb-files = "msm8916-samsung-e5"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 4>; + }; +}; + diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index dd4a5e998..4ea558fa5 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -10,3 +10,4 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-qrd-7+12.dtb \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ $(LOCAL_DIR)/msm8916-samsung.dtb \ + $(LOCAL_DIR)/msm8929-samsung.dtb \ From bb101f29c0ab604a77001e41b0d828be9f54a680 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 15 Nov 2023 15:19:55 +0500 Subject: [PATCH 05/59] dts: Import msm8939-samsung Co-authored-by: Lin, Meng-Bo --- lk2nd/device/dts/msm8916/msm8939-samsung.dts | 27 ++++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 28 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8939-samsung.dts diff --git a/lk2nd/device/dts/msm8916/msm8939-samsung.dts b/lk2nd/device/dts/msm8916/msm8939-samsung.dts new file mode 100644 index 000000000..a93fbbcbb --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-samsung.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +#define I2C_GPIO_FLAGS (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN | GPIO_BIAS_DISABLE) + +/ { + qcom,msm-id = ; + qcom,board-id = <0xEF08FF01 1>; +}; + +&lk2nd { + /* rev 1 */ + + a7ltezt { + model = "Samsung Galaxy A7 (SM-A700YD)"; + compatible = "samsung,a7ltezt", "samsung,a7"; + lk2nd,match-bootloader = "A700YD*"; + + lk2nd,dtb-files = "msm8916-samsung-a7"; + + qcom,msm-id = ; + qcom,board-id = <0xEF08FF1 1>; + }; +}; + diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 4ea558fa5..b982b348d 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -11,3 +11,4 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ $(LOCAL_DIR)/msm8916-samsung.dtb \ $(LOCAL_DIR)/msm8929-samsung.dtb \ + $(LOCAL_DIR)/msm8939-samsung.dtb \ From 08103d63c30a78e3b49235aeb83dd2ecd8f8cf2c Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 16 Nov 2023 20:11:33 +0500 Subject: [PATCH 06/59] dts: import msm8916-motorola-* Co-developed-by: Minecrell --- .../dts/msm8916/msm8916-motorola-harpia.dtsi | 2 + .../dts/msm8916/msm8916-motorola-osprey.dts | 27 ++++++++++++++ .../dts/msm8916/msm8916-motorola-surnia.dts | 37 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 2 + 4 files changed, 68 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8916-motorola-osprey.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-motorola-surnia.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-motorola-harpia.dtsi b/lk2nd/device/dts/msm8916/msm8916-motorola-harpia.dtsi index a1cebeea3..c6458a6f3 100644 --- a/lk2nd/device/dts/msm8916/msm8916-motorola-harpia.dtsi +++ b/lk2nd/device/dts/msm8916/msm8916-motorola-harpia.dtsi @@ -5,6 +5,8 @@ model = "Motorola Moto G4 Play (harpia)"; compatible = "motorola,harpia"; + lk2nd,dtb-files = "msm8916-motorola-harpia"; + panel { compatible = "motorola,harpia-panel", "lk2nd,panel"; diff --git a/lk2nd/device/dts/msm8916/msm8916-motorola-osprey.dts b/lk2nd/device/dts/msm8916/msm8916-motorola-osprey.dts new file mode 100644 index 000000000..8a5e6761c --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-motorola-osprey.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "msm8916-motorola.dtsi" + +/ { + qcom,board-id = <0x4a 0x82b0>; +}; + +&lk2nd { + model = "Motorola Moto G 2015 (osprey)"; + compatible = "motorola,osprey"; + + lk2nd,dtb-files = "msm8916-motorola-osprey"; + + panel { + compatible = "motorola,osprey-panel", "lk2nd,panel"; + + qcom,mdss_dsi_mot_inx_500_720p_video_v0 { + compatible = "motorola,osprey-panel-inx"; + }; + qcom,mdss_dsi_mot_tdi_500_720p_video_v0 { + compatible = "motorola,osprey-panel-tdi"; + }; + qcom,mdss_dsi_mot_boe_500_720p_video_v0 { + compatible = "motorola,osprey-panel-boe"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-motorola-surnia.dts b/lk2nd/device/dts/msm8916/msm8916-motorola-surnia.dts new file mode 100644 index 000000000..9571c4c0b --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-motorola-surnia.dts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include "msm8916-motorola.dtsi" + +/ { + qcom,board-id = <0x46 0x8300>; + + /* + * This is not used by lk2nd, for some reason the Motorola bootloader + * wants to update some properties in here. Meh. + */ + soc { + qcom,mdss_dsi_mot_boe_450_qhd_video_v3 { + compatible = "qcom,mdss-dsi-panel"; + }; + qcom,mdss_dsi_mot_inx_450_qhd_video_v1 { + compatible = "qcom,mdss-dsi-panel"; + }; + }; +}; + +&lk2nd { + model = "Motorola Moto E 2015 LTE (surnia)"; + compatible = "motorola,surnia"; + + lk2nd,dtb-files = "msm8916-motorola-harpia"; + + panel { + compatible = "motorola,surnia-panel", "lk2nd,panel"; + + qcom,mdss_dsi_mot_boe_450_qhd_video_v3 { + compatible = "motorola,surnia-panel-boe"; + }; + qcom,mdss_dsi_mot_inx_450_qhd_video_v1 { + compatible = "motorola,surnia-panel-inx"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index b982b348d..28555e527 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -7,6 +7,8 @@ QCDTBS += \ $(LOCAL_DIR)/msm8216-samsung.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4d.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ + $(LOCAL_DIR)/msm8916-motorola-osprey.dtb \ + $(LOCAL_DIR)/msm8916-motorola-surnia.dtb \ $(LOCAL_DIR)/msm8916-qrd-7+12.dtb \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ $(LOCAL_DIR)/msm8916-samsung.dtb \ From 4d31d6a292b0eae93945690cf60dc4372a91cd5a Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 16 Nov 2023 20:19:34 +0500 Subject: [PATCH 07/59] dts: Fixup apq8016-sbc --- lk2nd/device/dts/msm8916/apq8016-sbc.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lk2nd/device/dts/msm8916/apq8016-sbc.dts b/lk2nd/device/dts/msm8916/apq8016-sbc.dts index 9bf29e5ff..9e32052ee 100644 --- a/lk2nd/device/dts/msm8916/apq8016-sbc.dts +++ b/lk2nd/device/dts/msm8916/apq8016-sbc.dts @@ -10,5 +10,7 @@ &lk2nd { model = "APQ8016 SBC"; - compatible = "apq8016,sbc"; + compatible = "qcom,apq8016-sbc"; + + lk2nd,dtb-files = "apq8016-sbc"; }; From a78a275500de887d4aab8907a00fcbd6d6054b12 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 16 Nov 2023 20:31:53 +0500 Subject: [PATCH 08/59] dts: Import msm8916-asus-* Co-developed-by: Minecrell Co-developed-by: Matteo Semenzato Co-developed-by: doomvrr --- .../device/dts/msm8916/msm8916-asus-z00e.dts | 39 +++++++++++++++++++ .../device/dts/msm8916/msm8916-asus-z00l.dts | 39 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 2 + 3 files changed, 80 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8916-asus-z00e.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-asus-z00l.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-asus-z00e.dts b/lk2nd/device/dts/msm8916/msm8916-asus-z00e.dts new file mode 100644 index 000000000..1125be27b --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-asus-z00e.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <24 0>; +}; + +&lk2nd { + model = "Asus Zenfone 2 Laser ZE500KL"; + compatible = "asus,z00e"; + + // FIXME: lk2nd,dtb-files = "msm8916-asus-z00e"; + + gpio-keys { + compatible = "gpio-keys"; + vol-down { + lk2nd,code = ; + gpios = <&tlmm 117 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + vol-up { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + panel { + compatible = "asus,z00e-panel", "lk2nd,panel"; + + qcom,mdss_dsi_otm1284a_720p_video { + compatible = "asus,z00e-otm1284a"; + }; + qcom,mdss_dsi_auo_rm68200_720p_video { + compatible = "asus,z00e-auo-rm68200"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-asus-z00l.dts b/lk2nd/device/dts/msm8916/msm8916-asus-z00l.dts new file mode 100644 index 000000000..7c652cb53 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-asus-z00l.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <21 0>; +}; + +&lk2nd { + model = "Asus Zenfone Laser 2 (720p)"; + compatible = "asus,z00l"; + + lk2nd,dtb-files = "msm8916-asus-z00l"; + + gpio-keys { + compatible = "gpio-keys"; + vol-down { + lk2nd,code = ; + gpios = <&tlmm 117 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + vol-up { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + panel { + compatible = "asus,z00l-panel", "lk2nd,panel"; + + qcom,mdss_dsi_otm1284a_720p_video { + compatible = "asus,z00l-otm1284a"; + }; + qcom,mdss_dsi_cpt5p5_otm1284a_720p_video { + compatible = "asus,z00l-cpt5p5-otm1284a"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 28555e527..eb89d9a61 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-asus-z00e.dtb \ + $(LOCAL_DIR)/msm8916-asus-z00l.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4d.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ $(LOCAL_DIR)/msm8916-motorola-osprey.dtb \ From d45832867e27c6bbd39e3b9b539eb0c814646517 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 16 Nov 2023 21:13:19 +0500 Subject: [PATCH 09/59] 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 000000000..a4e6390d4 --- /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 000000000..e265d7457 --- /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 eb89d9a61..7c612b636 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 \ From a69cbf169f0867c6f66cbc42739b1d6c2c4e338e Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Fri, 17 Nov 2023 18:58:54 +0500 Subject: [PATCH 10/59] dts: import msm8916-huawei-* Co-authored-by: Minecrell Co-authored-by: David Wronek Co-authored-by: lagertonne Co-authored-by: ungeskriptet <40729975+ungeskriptet@users.noreply.github.com> --- .../dts/msm8916/msm8916-huawei-g7-l01.dts | 30 +++++++++++ .../dts/msm8916/msm8916-huawei-hwt1a21l.dts | 16 ++++++ .../device/dts/msm8916/msm8916-huawei-lg.dts | 50 +++++++++++++++++++ .../dts/msm8916/msm8916-huawei-y635-l01.dts | 30 +++++++++++ lk2nd/device/dts/msm8916/rules.mk | 3 ++ 5 files changed, 129 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8916-huawei-g7-l01.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-huawei-hwt1a21l.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-huawei-lg.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-huawei-g7-l01.dts b/lk2nd/device/dts/msm8916/msm8916-huawei-g7-l01.dts new file mode 100644 index 000000000..65e026238 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-huawei-g7-l01.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <8039 4>; +}; + +&lk2nd { + model = "Huawei Ascend G7-L01"; + compatible = "huawei,g7-l01", "huawei,g7"; + + lk2nd,dtb-files = "msm8916-huawei-g7"; + + panel { + compatible = "huawei,g7-panel", "lk2nd,panel"; + + qcom,mdss_dsi_boe_nt35521_5p5_720p_video { + compatible = "huawei,boe-nt35521"; + }; + qcom,mdss_dsi_cmi_nt35521_5p5_720p_video { + compatible = "huawei,cmi-nt35521"; + }; + qcom,mdss_dsi_tianma_nt35521_5p5_720p_video { + compatible = "huawei,tianma-nt35521"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-huawei-hwt1a21l.dts b/lk2nd/device/dts/msm8916/msm8916-huawei-hwt1a21l.dts new file mode 100644 index 000000000..83408752e --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-huawei-hwt1a21l.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <8065 4>; +}; + +&lk2nd { + model = "Huawei Mediapad T1 A21L"; + compatible = "huawei,hwt1a21l", "qcom,msm8916", "lk2nd,device"; + + //FIXME: lk2nd,dtb-files = "msm8916-huawei-hwt1a21l"; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-huawei-lg.dts b/lk2nd/device/dts/msm8916/msm8916-huawei-lg.dts new file mode 100644 index 000000000..4aefac439 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-huawei-lg.dts @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: BSD-3-Clause +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <100 0>; +}; + +&lk2nd { + c50 { + model = "LG Leon LTE"; + compatible = "lg,c50"; + lk2nd,match-cmdline = "* model.name=LG-H34*"; + + lk2nd,dtb-files = "msm8916-lg-c50"; + + gpio-keys { + compatible = "gpio-keys"; + vol-down { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + vol-up { + lk2nd,code = ; + gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + m216 { + model = "LG K10 (K420n)"; + compatible = "lg,m216"; + lk2nd,match-cmdline = "* model.name=LG-K420n *"; + + lk2nd,dtb-files = "msm8916-lg-m216"; + + gpio-keys { + compatible = "gpio-keys"; + vol-down { + lk2nd,code = ; + gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + vol-up { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts b/lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts new file mode 100644 index 000000000..b4cc6e0da --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <8003 4>; +}; + +&lk2nd { + model = "Huawei Y635-L01"; + compatible = "huawei,y635-l01", "huawei,y635"; + + lk2nd,dtb-files = "msm8916-huawei-y635"; + + panel { + compatible = "huawei,y635-panel", "lk2nd,panel"; + + qcom,mdss_dsi_boe_otm8019a_5p0_fwvga_video { + compatible = "huawei,boe-otm8019a"; + }; + qcom,mdss_dsi_cmi_ili9806e_5p0_fwvga_video { + compatible = "huawei,cmi-ili9806e"; + }; + qcom,mdss_dsi_tianma_otm8019a_5p0_fwvga_video { + compatible = "huawei,tianma-otm8019a"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 7c612b636..fb9a5e598 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -9,6 +9,9 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-512mb-qrd-skuh.dtb \ $(LOCAL_DIR)/msm8916-asus-z00e.dtb \ $(LOCAL_DIR)/msm8916-asus-z00l.dtb \ + $(LOCAL_DIR)/msm8916-huawei-g7-l01.dtb \ + $(LOCAL_DIR)/msm8916-huawei-hwt1a21l.dtb \ + $(LOCAL_DIR)/msm8916-huawei-y635-l01.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4d.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ $(LOCAL_DIR)/msm8916-motorola-osprey.dtb \ From 5d2cfde5fcea99d4f78bc4790beeca9582dbe5c0 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Fri, 17 Nov 2023 19:05:50 +0500 Subject: [PATCH 11/59] dts: Import msm8916-lg Co-authored-by: Minecrell Co-authored-by: jenneron --- lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts | 8 ++++++++ .../dts/msm8916/{msm8916-huawei-lg.dts => msm8916-lg.dts} | 0 lk2nd/device/dts/msm8916/rules.mk | 1 + 3 files changed, 9 insertions(+) rename lk2nd/device/dts/msm8916/{msm8916-huawei-lg.dts => msm8916-lg.dts} (100%) diff --git a/lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts b/lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts index b4cc6e0da..0c9669cc3 100644 --- a/lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts +++ b/lk2nd/device/dts/msm8916/msm8916-huawei-y635-l01.dts @@ -8,6 +8,14 @@ qcom,board-id = <8003 4>; }; +/* + * To get a working build for huawei-y635-l01, comment out + * $(LOCAL_DIR)/msm8916-mtp.dtb in rules.mk in this directory. + * y635-l01 does not work with msm8916-mtp.dtb enabled; the bootloader + * gets upset and goes into the phone's fastboot. + */ + + &lk2nd { model = "Huawei Y635-L01"; compatible = "huawei,y635-l01", "huawei,y635"; diff --git a/lk2nd/device/dts/msm8916/msm8916-huawei-lg.dts b/lk2nd/device/dts/msm8916/msm8916-lg.dts similarity index 100% rename from lk2nd/device/dts/msm8916/msm8916-huawei-lg.dts rename to lk2nd/device/dts/msm8916/msm8916-lg.dts diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index fb9a5e598..8e5abf62e 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -12,6 +12,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-huawei-g7-l01.dtb \ $(LOCAL_DIR)/msm8916-huawei-hwt1a21l.dtb \ $(LOCAL_DIR)/msm8916-huawei-y635-l01.dtb \ + $(LOCAL_DIR)/msm8916-lg.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4d.dtb \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ $(LOCAL_DIR)/msm8916-motorola-osprey.dtb \ From 7be382f9435daeffc957bbcee0248e8939651511 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Fri, 17 Nov 2023 19:26:25 +0500 Subject: [PATCH 12/59] dts: Import msm8916-mtp* Co-authored-by: Vincent Knecht Co-authored-by: 185264646 Co-authored-by: Minecrell Co-authored-by: Raymond Hackley Co-authored-by: devajithvs Co-authored-by: pitt4 --- .../dts/msm8916/msm8916-mtp-smb1360.dts | 64 +++++++++++++++++++ lk2nd/device/dts/msm8916/msm8916-mtp.dts | 47 ++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 2 + 3 files changed, 113 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8916-mtp-smb1360.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-mtp.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-mtp-smb1360.dts b/lk2nd/device/dts/msm8916/msm8916-mtp-smb1360.dts new file mode 100644 index 000000000..0a643615b --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-mtp-smb1360.dts @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + /* + * To get a working build for acer-a1-724, comment out all lines + * except $(LOCAL_DIR)/msm8916-mtp-smb1360.dtb in rules.mk in this + * directory. + * a1-724 does not work with all dtbs enabled; the bootloader gets + * upset and goes into the phone's fastboot. + */ + acer-a1-724 { + model = "Acer Iconia Talk S A1-724"; + compatible = "acer,a1-724"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-acer-a1-724"; + + panel { + compatible = "acer,a1-724-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8394d_720p_video { + compatible = "acer,a1-724-hx8394d"; + }; + }; + }; + + alcatel-idol347 { + model = "Alcatel OneTouch Idol 3 (4.7)"; + compatible = "alcatel,idol347"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-alcatel-idol347"; + + panel { + compatible = "alcatel,idol347-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8394d_auo_720p_video { + compatible = "alcatel,auo-hx8394d"; + }; + qcom,mdss_dsi_hx8394f_auo_720p_video { + compatible = "alcatel,auo-hx8394f"; + }; + qcom,mdss_dsi_nt35521s_lg_720p_video { + compatible = "alcatel,lg-nt35521s"; + }; + qcom,mdss_dsi_otm1284a_lg_720p_video { + compatible = "alcatel,lg-otm1284a"; + }; + }; + + smb1360 { + compatible = "alcatel,smb1360-idol347", "qcom,smb1360"; + }; + }; +}; + diff --git a/lk2nd/device/dts/msm8916/msm8916-mtp.dts b/lk2nd/device/dts/msm8916/msm8916-mtp.dts new file mode 100644 index 000000000..7d57f7a43 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-mtp.dts @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + marshall-london { + model = "Marshall London"; + compatible = "marshall,london"; + lk2nd,match-cmdline = "* hw.id=500"; + + //FIXME: lk2nd,dtb-files = "msm8916-marshall-london"; + + }; + + alto5-vdf { + model = "Vodafone Smart prime 6"; + compatible = "alcatel,alto5-vdf"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-alcatel-alto5-vdf"; + + panel { + compatible = "alcatel,alto5-vdf-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8394a_hd_tdt_video { + compatible = "alcatel,hx8394a-tdt"; + }; + qcom,mdss_dsi_hx8394a_hd_truly_video { + compatible = "alcatel,hx8394a-truly"; + }; + }; + }; + + asus-z010d { + model = "Asus Zenfone Max ZC550KL"; + compatible = "asus,z010d"; + lk2nd,match-cmdline = "* mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_r69339_720p_video:1:none"; + + lk2nd,dtb-files = "msm8916-asus-z010d"; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 8e5abf62e..682bd3ed1 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -17,6 +17,8 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-motorola-harpia-p1b-4e.dtb \ $(LOCAL_DIR)/msm8916-motorola-osprey.dtb \ $(LOCAL_DIR)/msm8916-motorola-surnia.dtb \ + $(LOCAL_DIR)/msm8916-mtp.dtb \ + $(LOCAL_DIR)/msm8916-mtp-smb1360.dtb \ $(LOCAL_DIR)/msm8916-qrd-7+12.dtb \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ $(LOCAL_DIR)/msm8916-samsung.dtb \ From 84727be23a48d44c0f77cc43f0fe6338547b1920 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 18 Nov 2023 18:20:14 +0500 Subject: [PATCH 13/59] dts: Import msm8939-asus* Co-authored-by: Minecrell --- lk2nd/device/dts/msm8916/msm8939-asus-z00t.dts | 16 ++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 17 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8939-asus-z00t.dts diff --git a/lk2nd/device/dts/msm8916/msm8939-asus-z00t.dts b/lk2nd/device/dts/msm8916/msm8939-asus-z00t.dts new file mode 100644 index 000000000..5cef01566 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-asus-z00t.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <21 0>; +}; + +&lk2nd { + model = "Asus Zenfone Laser 2 (1080p)"; + compatible = "asus,z00t"; + + //FIXME: lk2nd,dtb-files = "msm8916-asus-z00t"; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 682bd3ed1..1b9b5bf92 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -23,4 +23,5 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ $(LOCAL_DIR)/msm8916-samsung.dtb \ $(LOCAL_DIR)/msm8929-samsung.dtb \ + $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ From f2bcb97114b9ee15cc2c01f020f366530491da99 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 18 Nov 2023 18:26:42 +0500 Subject: [PATCH 14/59] dts: Import msm8939-htc Co-authroed-by: Newbyte --- .../device/dts/msm8916/msm8939-htc-m8qlul.dts | 37 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 38 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts diff --git a/lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts b/lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts new file mode 100644 index 000000000..05864500f --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/* + * To build for htc-m8qlul, comment out all dtbs and add + * $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb to rules.mk in this directory. + * m8qlul does not work with all dtbs enabled; the bootloader gets upset and + * goes into the phone's fastboot. + */ + +/ { + qcom,msm-id = <382 0x10000>; + htc,project-id = <382 0x10000>; + htc,hw-id = <0 0>, <1 0>, <2 0>, <128 0>; + qcom,board-id = <1 0>; +}; + +&lk2nd { + model = "HTC One M8s"; + compatible = "htc,m8qlul"; + + //FIXME: lk2nd,dtb-files = "msm8916-htc-m8qlul"; + + gpio-keys { + compatible = "gpio-keys"; + vol-down { + lk2nd,code = ; + gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + vol-up { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 1b9b5bf92..7dc76faf4 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -24,4 +24,5 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-samsung.dtb \ $(LOCAL_DIR)/msm8929-samsung.dtb \ $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ + $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ From 550f18be40c84660571d0fafa144f2f134eef7be Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 18 Nov 2023 18:31:29 +0500 Subject: [PATCH 15/59] dts: Import msm8939-huawei* Co-authored-by: BO41 Co-authored-by: MarkMuth Co-authored-by: Raymond Hackley Co-authored-by: Vincent Knecht Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com> --- .../dts/msm8916/msm8939-huawei-kiwi.dts | 42 +++++++++++++++++++ .../device/dts/msm8916/msm8939-huawei-rio.dts | 19 +++++++++ lk2nd/device/dts/msm8916/rules.mk | 2 + 3 files changed, 63 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8939-huawei-kiwi.dts create mode 100644 lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts diff --git a/lk2nd/device/dts/msm8916/msm8939-huawei-kiwi.dts b/lk2nd/device/dts/msm8916/msm8939-huawei-kiwi.dts new file mode 100644 index 000000000..a0d8e9639 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-huawei-kiwi.dts @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = + <8001 4>, <8003 4>, <8007 4>, <8017 4>, + <8019 4>, <8023 4>, <8033 4>, <8035 4>, + <8039 4>, <8049 4>, <8051 4>, <8065 4>, + <8067 4>, <8081 4>, <8083 4>, <8097 4>, + <8099 4>, <8103 4>, <8115 4>, <8119 4>, + <8131 4>; +}; + +&lk2nd { + model = "Huawei Honor 5X / GR5 (2016)"; + compatible = "huawei,kiwi"; + + lk2nd,dtb-files = "msm8939-huawei-kiwi"; + + panel { + compatible = "huawei,kiwi-panel", "lk2nd,panel"; + + qcom,mdss_dsi_auo_otm1901a_5p5_1080pxa_video { + compatible = "huawei,kiwi-auo-otm1901a"; + }; + qcom,mdss_dsi_boe_otm1901a_5p5_1080pxa_video { + compatible = "huawei,kiwi-boe-otm1901a"; + }; + qcom,mdss_dsi_cmi_nt35532_5p5_1080pxa_video { + compatible = "huawei,kiwi-cmi-nt35532"; + }; + qcom,mdss_dsi_tianma_nt35596_5p5_1080pxa_video { + compatible = "huawei,kiwi-tianma-nt35596"; + }; + qcom,mdss_dsi_truly_hx8399a_5p5_1080pxa_video { + compatible = "huawei,kiwi-truly-hx8399a"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts b/lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts new file mode 100644 index 000000000..d8e8873fe --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = + <8054 4>, <8055 4>, <8070 4>, <8071 4>, + <8086 4>, <8087 4>, <8102 4>, <8134 4>, + <8135 4>, <8118 4>; +}; + +&lk2nd { + model = "Huawei Honor 5X / GR5 (2016)"; + compatible = "huawei,kiwi"; + + //FIXME: lk2nd,dtb-files = "msm8939-huawei-rio"; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 7dc76faf4..a5593ef32 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -25,4 +25,6 @@ QCDTBS += \ $(LOCAL_DIR)/msm8929-samsung.dtb \ $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb \ + $(LOCAL_DIR)/msm8939-huawei-kiwi.dtb \ + $(LOCAL_DIR)/msm8939-huawei-rio.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ From 31e42c956b38c647a074099dda295d6c9b06e36d Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 18 Nov 2023 18:36:21 +0500 Subject: [PATCH 16/59] dts: Import msm8939-mtp Co-authored-by: Vincent Knecht Co-authored-by: Ketan Mate Co-authored-by: Minecrell --- lk2nd/device/dts/msm8916/msm8939-mtp.dts | 55 ++++++++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 56 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8939-mtp.dts diff --git a/lk2nd/device/dts/msm8916/msm8939-mtp.dts b/lk2nd/device/dts/msm8916/msm8939-mtp.dts new file mode 100644 index 000000000..1f96ae7ac --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-mtp.dts @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + alcatel-idol3 { + model = "Alcatel OneTouch Idol 3 (5.5)"; + compatible = "alcatel,idol3"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-alcatel-idol3"; + + panel { + compatible = "alcatel,idol3-panel", "lk2nd,panel"; + + qcom,mdss_dsi_nt35596_1080p_video { + compatible = "alcatel,idol3-panel-nt35596"; + touchscreen-compatible = "syna,rmi4-i2c"; + }; + qcom,mdss_dsi_nt35596_1080p_video_v03 { + compatible = "alcatel,idol3-panel-nt35596-v03"; + touchscreen-compatible = "syna,rmi4-i2c"; + }; + qcom,mdss_dsi_r63315_1080p_video { + compatible = "alcatel,idol3-panel-r63315"; + touchscreen-compatible = "edt,edt-ft5406"; + }; + }; + }; + + xiaomi-ferrari { + model = "Xiaomi Mi 4i"; + compatible = "xiaomi,ferrari"; + lk2nd,match-panel; + + //FIXME: lk2nd,dtb-files = "msm8916-xiaomi-ferrari"; + + panel { + compatible = "xiaomi,ferrari-panel", "lk2nd,panel"; + qcom,mdss_dsi_sharp_rsp61322_1080p_video { + compatible = "xiaomi,sharp-rsp61322"; + }; + + qcom,mdss_dsi_jdi_nt35595_1080p_video { + compatible = "xiaomi,jdi-nt35595"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index a5593ef32..733328226 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -27,4 +27,5 @@ QCDTBS += \ $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb \ $(LOCAL_DIR)/msm8939-huawei-kiwi.dtb \ $(LOCAL_DIR)/msm8939-huawei-rio.dtb \ + $(LOCAL_DIR)/msm8939-mtp.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ From 14af3f74b319bff3807c0a5121e3dffd68ad5f41 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 18 Nov 2023 18:41:42 +0500 Subject: [PATCH 17/59] dts: Import msm8939-xiaomi* Co-authored-by: reocat <111279389+reocat@users.noreply.github.com> --- .../device/dts/msm8916/msm8939-xiaomi-ido.dts | 40 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 41 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8939-xiaomi-ido.dts diff --git a/lk2nd/device/dts/msm8916/msm8939-xiaomi-ido.dts b/lk2nd/device/dts/msm8916/msm8939-xiaomi-ido.dts new file mode 100644 index 000000000..99ef00d00 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-xiaomi-ido.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = , + ; +}; + +&lk2nd { + model = "Xiaomi Redmi 3"; + compatible = "xiaomi,ido"; + + //FIXME: lk2nd,dtb-files = "msm8916-xiaomi-ido"; + + panel { + compatible = "xiaomi,ido-panel", "lk2nd,panel"; + + qcom,mdss_dsi_ili9881c_tianma_720p_video { + compatible = "xiaomi,tianma-ili9881c"; + }; + qcom,mdss_dsi_nt35521s_ebbg_720p_video { + compatible = "xiaomi,nt35521s-ebbg"; + }; + qcom,mdss_dsi_nt35596_1080p_video { + compatible = "xiaomi,nt35596"; + }; + qcom,mdss_dsi_r63350_1080p_video { + compatible = "xiaomi,r63350"; + }; + qcom,mdss_dsi_nt35596_1080p_skuk_video { + compatible = "mdss,nt35596-skuk"; + }; + qcom,mdss_dsi_hx8394f_boe_720p_video { + compatible = "xiaomi,hx8394f-boe"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 733328226..a68772cd3 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -29,3 +29,4 @@ QCDTBS += \ $(LOCAL_DIR)/msm8939-huawei-rio.dtb \ $(LOCAL_DIR)/msm8939-mtp.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ + $(LOCAL_DIR)/msm8939-xiaomi-ido.dtb \ From fad488f9c283e52993cfa4908d1d396a411b04aa Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 19 Nov 2023 13:39:25 +0500 Subject: [PATCH 18/59] dts: Import msm8916-qrd* Co-authored-by: Minecrell Co-authored-by: jenneron Co-authored-by: Jonathan Albrieux Co-authored-by: Lin, Meng-Bo Co-authored-by: Raymond Hackley Co-authored-by: Robert M Campbell Co-authored-by: SUNGOLDSV <32132530+SUNGOLDSV@users.noreply.github.com> Co-authored-by: entrider --- lk2nd/device/dts/msm8916/msm8916-qrd-4.dts | 30 ++++++++++++ lk2nd/device/dts/msm8916/msm8916-qrd-5.dts | 36 +++++++++++++++ lk2nd/device/dts/msm8916/msm8916-qrd-7+12.dts | 7 ++- lk2nd/device/dts/msm8916/msm8916-qrd-8.dts | 36 +++++++++++++++ lk2nd/device/dts/msm8916/msm8916-qrd-9.dts | 46 +++++++++++++++++++ .../device/dts/msm8916/msm8916-qrd-skut1.dts | 30 ++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 4 ++ 7 files changed, 187 insertions(+), 2 deletions(-) create mode 100644 lk2nd/device/dts/msm8916/msm8916-qrd-4.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-qrd-5.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-qrd-8.dts create mode 100644 lk2nd/device/dts/msm8916/msm8916-qrd-skut1.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-qrd-4.dts b/lk2nd/device/dts/msm8916/msm8916-qrd-4.dts new file mode 100644 index 000000000..3ca747842 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-qrd-4.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + ark-peach { + model = "ARK Benefit A3 (peach)"; + compatible = "ark,peach"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-ark-peach"; + + panel { + compatible = "ark,peach-panel", "lk2nd,panel"; + + qcom,mdss_dsi_nt35521_720p_dj_video { + compatible = "ark,peach-nt35521-dj"; + }; + qcom,mdss_dsi_otm1287a_720p_video { + compatible = "ark,peach-otm1287a"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-qrd-5.dts b/lk2nd/device/dts/msm8916/msm8916-qrd-5.dts new file mode 100644 index 000000000..c68acaed3 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-qrd-5.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + lyf-ls5010 { + model = "LYF Wind 1 (lyf-ls5010)"; + compatible = "lyf,ls5010"; + lk2nd,match-panel; + + //FIXME: lk2nd,dtb-files = "msm8916-lyf-ls5010"; + + panel { + compatible = "lyf,ls5010-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8394_d_hd_video_truly { + compatible = "lyf,truly-hx8394"; + }; + qcom,mdss_dsi_hx8394_d_hd_video_holitech { + compatible = "lyf,holitech-hx8394"; + }; + qcom,mdss_dsi_hx8394_f_hd_video_bitland { + compatible = "lyf,bitland-hx8394"; + }; + qcom,mdss_dsi_kd050m7_hd_video_kd { + compatible = "lyf,kd-kd050m7"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-qrd-7+12.dts b/lk2nd/device/dts/msm8916/msm8916-qrd-7+12.dts index d9a6b8fab..dea1b84a3 100644 --- a/lk2nd/device/dts/msm8916/msm8916-qrd-7+12.dts +++ b/lk2nd/device/dts/msm8916/msm8916-qrd-7+12.dts @@ -5,7 +5,8 @@ / { qcom,msm-id = ; - qcom,board-id = , ; + qcom,board-id = , + ; }; &lk2nd { @@ -14,8 +15,10 @@ compatible = "wingtech,wt88047"; lk2nd,match-panel; + lk2nd,dtb-files = "msm8916-wingtech-wt88047"; + panel { - compatible = "wingtech,wt88047-panel"; + compatible = "wingtech,wt88047-panel", "lk2nd,panel"; qcom,mdss_dsi_r69431_720p_video { compatible = "wingtech,sharp-r69431"; diff --git a/lk2nd/device/dts/msm8916/msm8916-qrd-8.dts b/lk2nd/device/dts/msm8916/msm8916-qrd-8.dts new file mode 100644 index 000000000..c1f3cea96 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-qrd-8.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + lenovo-a6000 { + model = "Lenovo A6000 (Wingtech WT86518)"; + compatible = "wingtech,wt86518"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-wingtech-wt86518"; + + panel { + compatible = "wingtech,wt865x8-panel", "lk2nd,panel"; + + qcom,mdss_dsi_innolux_720p_video { + compatible = "wingtech,innolux-otm1283a"; + }; + qcom,mdss_dsi_hx8394d_720p_video { + compatible = "wingtech,tianma-hx8394d"; + }; + qcom,mdss_dsi_ili9881_720p_video { + compatible = "wingtech,yassy-ili9881"; + }; + qcom,mdss_dsi_ili9881_qimei_720p_video { + compatible = "wingtech,qimei-ili9881"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/msm8916-qrd-9.dts b/lk2nd/device/dts/msm8916/msm8916-qrd-9.dts index 577410d92..3e36c41b6 100644 --- a/lk2nd/device/dts/msm8916/msm8916-qrd-9.dts +++ b/lk2nd/device/dts/msm8916/msm8916-qrd-9.dts @@ -48,6 +48,27 @@ model = "Wileyfox Swift (Longcheer L8150)"; compatible = "wileyfox,crackling", "longcheer,l8150"; lk2nd,match-bootloader = "crackling-*"; + + lk2nd,dtb-files = "msm8916-longcheer-l8150"; + + panel { + compatible = "longcheer,l8150-panel", "lk2nd,panel"; + + /* TODO: qcom,mdss_dsi_truly_otm1288a_720p_video */ + qcom,mdss_dsi_dijing_ILI9881C_720p_video { + compatible = "longcheer,dijing-ili9881c"; + }; + qcom,mdss_dsi_booyi_OTM1287_720p_video { + compatible = "longcheer,booyi-otm1287"; + }; + }; + }; + + google-seed { + model = "Android One Gen 2 SEED (Longcheer L8150)"; + compatible = "google,seed", "longcheer,l8150"; + lk2nd,match-bootloader = "SEED-*"; + lk2nd,dtb-files = "msm8916-longcheer-l8150"; panel { @@ -62,4 +83,29 @@ }; }; }; + + lenovo-a6010 { + model = "Lenovo A6010 (Wingtech WT86528)"; + compatible = "wingtech,wt86528"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-wingtech-wt86528"; + + panel { + compatible = "wingtech,wt865x8-panel", "lk2nd,panel"; + + qcom,mdss_dsi_innolux_720p_video { + compatible = "wingtech,innolux-otm1283a"; + }; + qcom,mdss_dsi_hx8394d_720p_video { + compatible = "wingtech,tianma-hx8394d"; + }; + qcom,mdss_dsi_ili9881_720p_video { + compatible = "wingtech,yassy-ili9881"; + }; + qcom,mdss_dsi_ili9881_qimei_720p_video { + compatible = "wingtech,qimei-ili9881"; + }; + }; + }; }; diff --git a/lk2nd/device/dts/msm8916/msm8916-qrd-skut1.dts b/lk2nd/device/dts/msm8916/msm8916-qrd-skut1.dts new file mode 100644 index 000000000..d00666aec --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-qrd-skut1.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + gplus-fl8005a { + model = "GPLUS FL8005A"; + compatible = "gplus,fl8005a"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-gplus-fl8005a"; + + panel { + compatible = "gplus,fl8005a-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8394d_800p_video { + compatible = "gplus,fl8005a-hx8394d"; + }; + qcom,mdss_dsi_nt35521_wxga_video { + compatible = "gplus,fl8005a-nt35521"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index a68772cd3..71f243ce4 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -19,8 +19,12 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-motorola-surnia.dtb \ $(LOCAL_DIR)/msm8916-mtp.dtb \ $(LOCAL_DIR)/msm8916-mtp-smb1360.dtb \ + $(LOCAL_DIR)/msm8916-qrd-4.dtb \ + $(LOCAL_DIR)/msm8916-qrd-5.dtb \ $(LOCAL_DIR)/msm8916-qrd-7+12.dtb \ + $(LOCAL_DIR)/msm8916-qrd-8.dtb \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ + $(LOCAL_DIR)/msm8916-qrd-skut1.dtb \ $(LOCAL_DIR)/msm8916-samsung.dtb \ $(LOCAL_DIR)/msm8929-samsung.dtb \ $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ From a41b05821e7f324988f95970d0ecefa837a1524b Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 19 Nov 2023 13:44:19 +0500 Subject: [PATCH 19/59] dts: Import msm8916-vivo-y21l Co-authored-by: raihan2000 --- .../device/dts/msm8916/msm8916-vivo-y21l.dts | 31 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 32 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8916-vivo-y21l.dts diff --git a/lk2nd/device/dts/msm8916/msm8916-vivo-y21l.dts b/lk2nd/device/dts/msm8916/msm8916-vivo-y21l.dts new file mode 100644 index 000000000..b6399b289 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8916-vivo-y21l.dts @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + model = "Vivo Y21L"; + compatible = "vivo,y21l"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8916-vivo-y21l"; + + panel { + compatible = "vivo,y21l-panel", "lk2nd,panel"; + + qcom,mdss_dsi_nt35510s_fwvga_cmd_tm { + compatible = "vivo,nt35510s-tm"; + }; + qcom,mdss_dsi_orise8012a_tmfwvga_cmd { + compatible = "vivo,orise8012a-tmfwvga"; + }; + qcom,mdss_dsi_orise8012a_tmfwvga_cmd_bkg { + compatible = "vivo,orise8012a-tmfwvga-bkg"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 71f243ce4..4eeaa3244 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -26,6 +26,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-qrd-9.dtb \ $(LOCAL_DIR)/msm8916-qrd-skut1.dtb \ $(LOCAL_DIR)/msm8916-samsung.dtb \ + $(LOCAL_DIR)/msm8916-vivo-y21l.dtb \ $(LOCAL_DIR)/msm8929-samsung.dtb \ $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb \ From d86b1104565e10ce93fb0523084f1235cbb0f35b Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 19 Nov 2023 13:53:22 +0500 Subject: [PATCH 20/59] dts: Import msm8929-qrd* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adam Słaboń --- .../dts/msm8916/msm8929-qrd-wt82918.dts | 27 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 1 + 2 files changed, 28 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8929-qrd-wt82918.dts diff --git a/lk2nd/device/dts/msm8916/msm8929-qrd-wt82918.dts b/lk2nd/device/dts/msm8916/msm8929-qrd-wt82918.dts new file mode 100644 index 000000000..a8bca00d1 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8929-qrd-wt82918.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + model = "Lenovo Vibe K5 (Wingtech WT82918)"; + compatible = "wingtech,wt82918hd", "wingtech,wt82918"; + + lk2nd,dtb-files = "msm8929-wingtech-wt82918hd"; + + panel { + compatible = "wingtech,wt82918-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8394f_boe_720p_video { + compatible = "wingtech,boe-hx8394f"; + }; + qcom,mdss_dsi_ili9881c_otm_720p_video { + compatible = "wingtech,otm-ili9881c"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 4eeaa3244..e480b1c86 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -28,6 +28,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-samsung.dtb \ $(LOCAL_DIR)/msm8916-vivo-y21l.dtb \ $(LOCAL_DIR)/msm8929-samsung.dtb \ + $(LOCAL_DIR)/msm8929-qrd-wt82918.dtb \ $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb \ $(LOCAL_DIR)/msm8939-huawei-kiwi.dtb \ From a2ae1f4eb540aba959e0e44b135cc725a4bc3f4c Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 19 Nov 2023 14:00:24 +0500 Subject: [PATCH 21/59] dts: Import msm8939-qrd* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Apitzsch Co-authored-by: Minecrell Co-authored-by: Ricky Cheung Co-authored-by: RuizLenato --- lk2nd/device/dts/msm8916/msm8939-qrd-skuk.dts | 55 +++++++++++++++++++ .../dts/msm8916/msm8939-qrd-wt82918.dts | 29 ++++++++++ lk2nd/device/dts/msm8916/rules.mk | 2 + 3 files changed, 86 insertions(+) create mode 100644 lk2nd/device/dts/msm8916/msm8939-qrd-skuk.dts create mode 100644 lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts diff --git a/lk2nd/device/dts/msm8916/msm8939-qrd-skuk.dts b/lk2nd/device/dts/msm8916/msm8939-qrd-skuk.dts new file mode 100644 index 000000000..846b6f73c --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-qrd-skuk.dts @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + bq-piccolo { + model = "BQ Aquaris M5 (Longcheer L9100)"; + compatible = "longcheer,l9100"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8939-longcheer-l9100"; + + panel { + compatible = "longcheer,l9100-panel", "lk2nd,panel"; + + qcom,mdss_dsi_truly_nt35695_1080p_video { + compatible = "longcheer,truly-nt35695"; + }; + qcom,mdss_dsi_truly_nt35695_1080p_cmd { + compatible = "longcheer,truly-nt35695"; + }; + qcom,mdss_dsi_tianma_otm1902a_1080p_cmd { + compatible = "longcheer,tianma-otm1902a"; + }; + qcom,mdss_dsi_yushun_nt35695_1080p_cmd { + compatible = "longcheer,yushun-nt35695"; + }; + }; + + smb1360 { + compatible = "qcom,smb1360"; + qcom,batt-profile-select; + qcom,batt-id-vref-uv = <1800000>; + qcom,batt-id-rpullup-kohm = <100>; + qcom,profile-a-rid-kohm = <50>; + qcom,profile-b-rid-kohm = <200>; + }; + }; + + lenovo-phoenix { + model = "Lenovo PHAB Plus"; + compatible = "lenovo,phoenix"; + lk2nd,match-cmdline = "* mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_nt35532_1080p_skuk_video:1:none*"; + + //FIXME: lk2nd,dtb-files = "msm8939-lenovo-phoenix"; + }; +}; + + diff --git a/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts b/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts new file mode 100644 index 000000000..1896f8a53 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + model = "Lenovo Vibe K5 (Wingtech WT82918)"; + compatible = "wingtech,wt82918"; + + //FIXME: lk2nd,dtb-files = "msm8939-wingtech-wt82918", "msm8929-wingtech-wt82918hd"; + + panel { + compatible = "wingtech,wt82918-panel", "lk2nd,panel"; + + qcom,mdss_dsi_otm1901a_tm_1080p_video { + compatible = "wingtech,tm-otm1901a"; + }; + qcom,mdss_dsi_nt35596_1080p_video { + compatible = "wingtech,nt35595"; + }; + }; + +}; + diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index e480b1c86..cb0e3250d 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -34,5 +34,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8939-huawei-kiwi.dtb \ $(LOCAL_DIR)/msm8939-huawei-rio.dtb \ $(LOCAL_DIR)/msm8939-mtp.dtb \ + $(LOCAL_DIR)/msm8939-qrd-skuk.dtb \ + $(LOCAL_DIR)/msm8939-qrd-wt82918.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ $(LOCAL_DIR)/msm8939-xiaomi-ido.dtb \ From 160a8891f60293e086885321dca10b89e2037e5d Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Mon, 20 Nov 2023 19:33:21 +0500 Subject: [PATCH 22/59] dts: Import apq8026-{asus,huawei,lg} Co-authored-by: Luca Weiss Co-authored-by: Timon Baetz --- .../dts/msm8226/apq8026-asus-sparrow.dts | 16 ++++++++++++ .../dts/msm8226/apq8026-huawei-sturgeon.dts | 25 +++++++++++++++++++ lk2nd/device/dts/msm8226/apq8026-lg-lenok.dts | 20 +++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 9 +++++++ 4 files changed, 70 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/apq8026-asus-sparrow.dts create mode 100644 lk2nd/device/dts/msm8226/apq8026-huawei-sturgeon.dts create mode 100644 lk2nd/device/dts/msm8226/apq8026-lg-lenok.dts diff --git a/lk2nd/device/dts/msm8226/apq8026-asus-sparrow.dts b/lk2nd/device/dts/msm8226/apq8026-asus-sparrow.dts new file mode 100644 index 000000000..a841b6730 --- /dev/null +++ b/lk2nd/device/dts/msm8226/apq8026-asus-sparrow.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + model = "ASUS ZenWatch 2"; + compatible = "asus,sparrow"; + + lk2nd,dtb-files = "apq8026-asus-sparrow"; +}; diff --git a/lk2nd/device/dts/msm8226/apq8026-huawei-sturgeon.dts b/lk2nd/device/dts/msm8226/apq8026-huawei-sturgeon.dts new file mode 100644 index 000000000..f60bb9a52 --- /dev/null +++ b/lk2nd/device/dts/msm8226/apq8026-huawei-sturgeon.dts @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + model = "Huawei Watch"; + compatible = "huawei,sturgeon"; + + lk2nd,dtb-files = "apq8026-huawei-sturgeon"; + + gpio-keys { + compatible = "gpio-keys"; + + power { + lk2nd,code = ; + gpios = <&pmic_pon GPIO_PMIC_PWRKEY 0>; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8226/apq8026-lg-lenok.dts b/lk2nd/device/dts/msm8226/apq8026-lg-lenok.dts new file mode 100644 index 000000000..5e92d9982 --- /dev/null +++ b/lk2nd/device/dts/msm8226/apq8026-lg-lenok.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = <132 0x0a>; + + /* The bootloader checks the compatible too... */ + compatible = "qcom,apq8026"; +}; + +&lk2nd { + model = "LG G Watch R"; + compatible = "lg,lenok"; + + lk2nd,dtb-files = "apq8026-lg-lenok"; +}; + diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index e888eaa7e..342d14520 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -1,5 +1,14 @@ # SPDX-License-Identifier: BSD-3-Clause LOCAL_DIR := $(GET_LOCAL_DIR) +# NOTE: lenok wants to be first to be able to boot. +ADTBS += \ + $(LOCAL_DIR)/apq8026-lg-lenok.dtb \ + +QCDTBS += \ + $(LOCAL_DIR)/apq8026-asus-sparrow.dtb \ + $(LOCAL_DIR)/apq8026-huawei-sturgeon.dtb \ + + DTBS += \ $(LOCAL_DIR)/lumia.dtb \ From eeee45c2e136d3a2da7ab423d0660dfaf65aefee Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 21 Nov 2023 19:48:08 +0500 Subject: [PATCH 23/59] dts: Import apq8016-samsung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Newbyte Co-authored-by: Bryant Mairs Co-authored-by: Matti Lehtimäki --- lk2nd/device/dts/msm8226/apq8016-samsung.dts | 64 ++++++++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 2 files changed, 65 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/apq8016-samsung.dts diff --git a/lk2nd/device/dts/msm8226/apq8016-samsung.dts b/lk2nd/device/dts/msm8226/apq8016-samsung.dts new file mode 100644 index 000000000..ecf40ba80 --- /dev/null +++ b/lk2nd/device/dts/msm8226/apq8016-samsung.dts @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,board-id = <0xC708FF01 3 0x20000>, + <0xC708FF01 9 0x20000>; +}; + +&lk2nd { + /* rev 3 */ + + matissewifi { + model = "Samsung Galaxy Tab 4 10.1 WiFi (SM-T530)"; + compatible = "samsung,matisse-wifi", "samsung,matisse"; + lk2nd,match-bootloader = "T530*"; + + lk2nd,dtb-files = "apq8026-samsung-matisse-wifi"; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + down { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + up { + lk2nd,code = ; + gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + /* rev 9 */ + + milletwifi { + model = "Samsung Galaxy Tab 4 8.0 WiFi (SM-T330)"; + compatible = "samsung,milletwifi", "samsung,millet"; + lk2nd,match-bootloader = "T330*"; + + //FIXME: lk2nd,dtb-files = "apq8026-samsung-millet-wifi"; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + down { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + up { + lk2nd,code = ; + gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + +}; diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index 342d14520..2ef4a3c42 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -8,6 +8,7 @@ ADTBS += \ QCDTBS += \ $(LOCAL_DIR)/apq8026-asus-sparrow.dtb \ $(LOCAL_DIR)/apq8026-huawei-sturgeon.dtb \ + $(LOCAL_DIR)/apq8026-samsung.dtb \ DTBS += \ From 44594076a4ad02f77c3269415bec7e889ecee45d Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 21 Nov 2023 19:51:08 +0500 Subject: [PATCH 24/59] dts: Import msm8226-motorola Co-authored-by: David Wronek --- .../dts/msm8226/msm8226-motorola-falcon.dts | 15 +++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 2 files changed, 16 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/msm8226-motorola-falcon.dts diff --git a/lk2nd/device/dts/msm8226/msm8226-motorola-falcon.dts b/lk2nd/device/dts/msm8226/msm8226-motorola-falcon.dts new file mode 100644 index 000000000..174722fe8 --- /dev/null +++ b/lk2nd/device/dts/msm8226/msm8226-motorola-falcon.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = <0x91 0x42 0x283C0>; +}; + +&lk2nd { + model = "Motorola Moto G 2013"; + compatible = "motorola,falcon"; + + // FIXME: lk2nd,dtb-files = "msm8226-motorola-falcon"; +}; diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index 2ef4a3c42..be24db4a5 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -9,6 +9,7 @@ QCDTBS += \ $(LOCAL_DIR)/apq8026-asus-sparrow.dtb \ $(LOCAL_DIR)/apq8026-huawei-sturgeon.dtb \ $(LOCAL_DIR)/apq8026-samsung.dtb \ + $(LOCAL_DIR)/msm8226-motorola-falcon.dtb \ DTBS += \ From 850181ecb6cfc0d5cdfd4d900c251744fd7cc161 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 21 Nov 2023 19:58:33 +0500 Subject: [PATCH 25/59] dts: Import msm8226-samsung Co-authored-by: anShigenta --- ...pq8016-samsung.dts => apq8026-samsung.dts} | 4 +-- lk2nd/device/dts/msm8226/msm8226-samsung.dts | 32 +++++++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 3 files changed, 35 insertions(+), 2 deletions(-) rename lk2nd/device/dts/msm8226/{apq8016-samsung.dts => apq8026-samsung.dts} (94%) create mode 100644 lk2nd/device/dts/msm8226/msm8226-samsung.dts diff --git a/lk2nd/device/dts/msm8226/apq8016-samsung.dts b/lk2nd/device/dts/msm8226/apq8026-samsung.dts similarity index 94% rename from lk2nd/device/dts/msm8226/apq8016-samsung.dts rename to lk2nd/device/dts/msm8226/apq8026-samsung.dts index ecf40ba80..d4f616aa6 100644 --- a/lk2nd/device/dts/msm8226/apq8016-samsung.dts +++ b/lk2nd/device/dts/msm8226/apq8026-samsung.dts @@ -4,8 +4,8 @@ #include / { - qcom,board-id = <0xC708FF01 3 0x20000>, - <0xC708FF01 9 0x20000>; + qcom,msm-id = <0xC708FF01 3 0x20000>, + <0xC708FF01 9 0x20000>; }; &lk2nd { diff --git a/lk2nd/device/dts/msm8226/msm8226-samsung.dts b/lk2nd/device/dts/msm8226/msm8226-samsung.dts new file mode 100644 index 000000000..f9dcfb4b1 --- /dev/null +++ b/lk2nd/device/dts/msm8226/msm8226-samsung.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = <0x9E08FF01 7 0x20000>; +}; + +&lk2nd { + /* rev 7 */ + + ms013g { + model = "Samsung Galaxy Grand 2"; + compatible = "samsung,ms013g"; + + //FIXME: lk2nd,dtb-files = "apq8026-samsung-ms013g"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + up { + lk2nd,code = ; + gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; + diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index be24db4a5..8bcc03ef2 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -10,6 +10,7 @@ QCDTBS += \ $(LOCAL_DIR)/apq8026-huawei-sturgeon.dtb \ $(LOCAL_DIR)/apq8026-samsung.dtb \ $(LOCAL_DIR)/msm8226-motorola-falcon.dtb \ + $(LOCAL_DIR)/msm8226-samsung.dtb \ DTBS += \ From 1f66cabb3e3f11bf157748a392b8ac1827cdec4a Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 22 Nov 2023 21:06:07 +0500 Subject: [PATCH 26/59] dts: Import msm8926-htc-memul Co-authored-by: Luca Weiss --- .../device/dts/msm8226/msm8926-htc-memul.dts | 42 +++++++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 2 files changed, 43 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/msm8926-htc-memul.dts diff --git a/lk2nd/device/dts/msm8226/msm8926-htc-memul.dts b/lk2nd/device/dts/msm8226/msm8926-htc-memul.dts new file mode 100644 index 000000000..9a39c94f6 --- /dev/null +++ b/lk2nd/device/dts/msm8226/msm8926-htc-memul.dts @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/* + * 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. + */ + +/ { + /* Actually htc,project-id */ + qcom,msm-id = <293 0 0>; +}; + +&lk2nd { + memul { + model = "HTC One Mini 2"; + compatible = "htc,memul"; + lk2nd,match-cmdline = "* mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_mem_lg_novatek_35521_720p_video *"; + + // FIXME: lk2nd,dtb-files = "msm8926-htc-memul"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + up { + lk2nd,code = ; + gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index 8bcc03ef2..370940e5b 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -11,6 +11,7 @@ QCDTBS += \ $(LOCAL_DIR)/apq8026-samsung.dtb \ $(LOCAL_DIR)/msm8226-motorola-falcon.dtb \ $(LOCAL_DIR)/msm8226-samsung.dtb \ + $(LOCAL_DIR)/msm8926-htc-memul.dtb \ DTBS += \ From fa62d8297ff94e4d96cc3b3f8db638ce7d20628f Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 22 Nov 2023 21:08:28 +0500 Subject: [PATCH 27/59] dts: Import msm8926-huawei Co-authored-by: Mirsal --- .../dts/msm8226/msm8926-huawei-g6-l11-vb.dts | 15 +++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 2 files changed, 16 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/msm8926-huawei-g6-l11-vb.dts diff --git a/lk2nd/device/dts/msm8226/msm8926-huawei-g6-l11-vb.dts b/lk2nd/device/dts/msm8226/msm8926-huawei-g6-l11-vb.dts new file mode 100644 index 000000000..2aeb1d8d1 --- /dev/null +++ b/lk2nd/device/dts/msm8226/msm8926-huawei-g6-l11-vb.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = <0xc8 0x1f51 0x00>; +}; + +&lk2nd { + model = "Huawei Ascend G6-L11 vb"; + compatible = "huawei,g6-l11-vb"; + + //FIXME: lk2nd,dtb-files = "msm8926-huawei-g6-l11"; +}; diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index 370940e5b..e371153f4 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -12,6 +12,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8226-motorola-falcon.dtb \ $(LOCAL_DIR)/msm8226-samsung.dtb \ $(LOCAL_DIR)/msm8926-htc-memul.dtb \ + $(LOCAL_DIR)/msm8926-huawei-g6-l11-vb.dtb \ DTBS += \ From 8db0f63e3f5c68745a488bbe6e26e476579227f4 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 22 Nov 2023 21:10:29 +0500 Subject: [PATCH 28/59] dts: Import msm8926-motorola MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Apitzsch --- .../dts/msm8226/msm8926-motorola-peregrine.dts | 17 +++++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 2 files changed, 18 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/msm8926-motorola-peregrine.dts diff --git a/lk2nd/device/dts/msm8226/msm8926-motorola-peregrine.dts b/lk2nd/device/dts/msm8226/msm8926-motorola-peregrine.dts new file mode 100644 index 000000000..ac79071fc --- /dev/null +++ b/lk2nd/device/dts/msm8226/msm8926-motorola-peregrine.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = <0x91 0x44 0x82D0>; +}; + +&lk2nd { + + model = "Motorola Moto G 4G 2013"; + compatible = "motorola,peregrine"; + + //FIXME: lk2nd,dtb-files = "msm8926-motorola-peregrine"; +}; + diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index e371153f4..765abf4ac 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -13,6 +13,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8226-samsung.dtb \ $(LOCAL_DIR)/msm8926-htc-memul.dtb \ $(LOCAL_DIR)/msm8926-huawei-g6-l11-vb.dtb \ + $(LOCAL_DIR)/msm8926-motorola-peregrine.dtb \ DTBS += \ From adc84833960bd3b2ab91653b82a10c51d906ceb1 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 23 Nov 2023 19:54:00 +0500 Subject: [PATCH 29/59] dts: Import msm8926-samsung Co-authored-by: Newbyte --- lk2nd/device/dts/msm8226/msm8926-samsung.dts | 35 ++++++++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 2 files changed, 36 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/msm8926-samsung.dts diff --git a/lk2nd/device/dts/msm8226/msm8926-samsung.dts b/lk2nd/device/dts/msm8226/msm8926-samsung.dts new file mode 100644 index 000000000..92feb31b5 --- /dev/null +++ b/lk2nd/device/dts/msm8226/msm8926-samsung.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = <0xC808FF01 2 0x10001>; +}; + +&lk2nd { + /* rev 2 */ + matisselte { + model = "Samsung Galaxy Tab 4 10.1 LTE (SM-T535)"; + compatible = "samsung,matisselte", "samsung,matisse"; + lk2nd,match-bootloader = "T535*"; + + lk2nd,dtb-files = "msm8926-samsung-matisse", "apq8026-samsung-matisse-wifi"; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&tlmm 108 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + down { + lk2nd,code = ; + gpios = <&tlmm 107 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + up { + lk2nd,code = ; + gpios = <&tlmm 106 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index 765abf4ac..9e0064f42 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -14,6 +14,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8926-htc-memul.dtb \ $(LOCAL_DIR)/msm8926-huawei-g6-l11-vb.dtb \ $(LOCAL_DIR)/msm8926-motorola-peregrine.dtb \ + $(LOCAL_DIR)/msm8926-samsung.dtb \ DTBS += \ From a42e513b2ab36b75f0de7dff398401e959f0250e Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 23 Nov 2023 19:58:39 +0500 Subject: [PATCH 30/59] dts: Import msm8926-mtp Co-autored-by: notfound405 <43387518+185264646@users.noreply.github.com> --- .../dts/msm8226/msm8926-v2-720p-mtp.dts | 30 +++++++++++++++++++ lk2nd/device/dts/msm8226/rules.mk | 1 + 2 files changed, 31 insertions(+) create mode 100644 lk2nd/device/dts/msm8226/msm8926-v2-720p-mtp.dts diff --git a/lk2nd/device/dts/msm8226/msm8926-v2-720p-mtp.dts b/lk2nd/device/dts/msm8226/msm8926-v2-720p-mtp.dts new file mode 100644 index 000000000..8ebf8e6ad --- /dev/null +++ b/lk2nd/device/dts/msm8226/msm8926-v2-720p-mtp.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + coolpad-8730l { + model = "Coolpad 8730L"; + compatible = "coolpad,8730l"; + lk2nd,match-panel; + + //FIXME: lk2nd,dtb-files = "msm8926-coolpad-8730l"; + + panel { + compatible = "lk2nd,panel"; + qcom,mdss_dsi_otm1283a_boyi_hd_video {}; + qcom,mdss_dsi_hx8394a_lide_hd_video {}; + qcom,mdss_dsi_hx8394a_yashi_hd_video {}; + qcom,mdss_dsi_hx8394a_yashi_cmi_hd_video {}; + qcom,mdss_dsi_otm1283a_boyi_auo_hd_video {}; + qcom,mdss_dsi_otm1283a_lide_cpt_hd_video {}; + }; + }; +}; + diff --git a/lk2nd/device/dts/msm8226/rules.mk b/lk2nd/device/dts/msm8226/rules.mk index 9e0064f42..5680194d5 100644 --- a/lk2nd/device/dts/msm8226/rules.mk +++ b/lk2nd/device/dts/msm8226/rules.mk @@ -15,6 +15,7 @@ QCDTBS += \ $(LOCAL_DIR)/msm8926-huawei-g6-l11-vb.dtb \ $(LOCAL_DIR)/msm8926-motorola-peregrine.dtb \ $(LOCAL_DIR)/msm8926-samsung.dtb \ + $(LOCAL_DIR)/msm8926-v2-720p-mtp.dtb \ DTBS += \ From 04bb70279473309690f1de68be4bc2abc5247554 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 13 Dec 2023 20:25:43 +0500 Subject: [PATCH 31/59] dts: Import msm8974-samsung Co-authored-by: Alexey Minnekhanov Co-authored-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com> Co-authored-by: Nikita Travkin --- lk2nd/device/dts/msm8974/samsung.dts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lk2nd/device/dts/msm8974/samsung.dts b/lk2nd/device/dts/msm8974/samsung.dts index 86e4aec0b..cb1b34106 100644 --- a/lk2nd/device/dts/msm8974/samsung.dts +++ b/lk2nd/device/dts/msm8974/samsung.dts @@ -4,15 +4,38 @@ #include / { - qcom,msm-id = <0xC208FF01 14 0x10000>; + qcom,msm-id = <0xC208FF01 10 0x10000>, + <0xC208FF01 14 0x10000>; }; &lk2nd { + /* rev 10 */ + + kltechn { + model = "Samsung Galaxy S5 China Unicom (Duos) (SM-G9006V/W)"; + compatible = "samsung,klte"; + lk2nd,match-bootloader = "G9006*"; + + lk2nd,dtb-files = "msm8974pro-samsung-klte"; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + /* rev 14 */ + klte { model = "Samsung Galaxy S5 (SM-G900F)"; compatible = "samsung,klte"; lk2nd,match-bootloader = "G900F*"; + lk2nd,dtb-files = "msm8974pro-samsung-klte"; + gpio-keys { compatible = "gpio-keys"; home { From b8c2db8ceb9a963ee4e933856353a0c1fc392099 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 13 Dec 2023 20:46:19 +0500 Subject: [PATCH 32/59] dts: Import msm8974pro-* Co-authored-by: Luca Weiss Co-authored-by: Minecrell --- .../dts/msm8974/msm8974pro-ab-pm8941-mtp.dts | 48 ++ .../dts/msm8974/msm8974pro-ac-pm8941-mtp.dts | 71 ++ lk2nd/device/dts/msm8974/rules.mk | 2 + .../dts/msm8974/sony/dsi-panel-leo.dtsi | 775 ++++++++++++++++++ .../msm8974/sony/msm8974-display-stubs.dtsi | 71 ++ .../msm8974pro-ac-shinano_leo-display.dtsi | 3 + .../msm8974pro-ac-shinano_leo_common.dtsi | 87 ++ 7 files changed, 1057 insertions(+) create mode 100644 lk2nd/device/dts/msm8974/msm8974pro-ab-pm8941-mtp.dts create mode 100644 lk2nd/device/dts/msm8974/msm8974pro-ac-pm8941-mtp.dts create mode 100644 lk2nd/device/dts/msm8974/sony/dsi-panel-leo.dtsi create mode 100644 lk2nd/device/dts/msm8974/sony/msm8974-display-stubs.dtsi create mode 100644 lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo-display.dtsi create mode 100644 lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo_common.dtsi diff --git a/lk2nd/device/dts/msm8974/msm8974pro-ab-pm8941-mtp.dts b/lk2nd/device/dts/msm8974/msm8974pro-ab-pm8941-mtp.dts new file mode 100644 index 000000000..de8f1e76f --- /dev/null +++ b/lk2nd/device/dts/msm8974/msm8974pro-ab-pm8941-mtp.dts @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = , + , + , + , + , + , + , + ; + + qcom,board-id = ; +}; + +&lk2nd { + fairphone-fp2 { + model = "Fairphone 2"; + compatible = "fairphone,fp2"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8974pro-fairphone-fp2"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + panel { + compatible = "fairphone,fp2-panel", "lk2nd,panel"; + + qcom,mdss_dsi_otm1902b_1080p_cmd { + compatible = "fairphone,fp2-panel-otm1902b"; + touchscreen-compatible = "syna,rmi4-i2c"; + }; + qcom,mdss_dsi_s6d6fa1_1080p_video { + compatible = "fairphone,fp2-panel-s6d6fa1"; + touchscreen-compatible = "ilitek,ili2120"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8974/msm8974pro-ac-pm8941-mtp.dts b/lk2nd/device/dts/msm8974/msm8974pro-ac-pm8941-mtp.dts new file mode 100644 index 000000000..984a3ebc7 --- /dev/null +++ b/lk2nd/device/dts/msm8974/msm8974pro-ac-pm8941-mtp.dts @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = , + , + , + ; + + qcom,board-id = ; +}; + +&lk2nd { + + oneplus-bacon { + model = "OnePlus One"; + compatible = "oneplus,bacon"; + lk2nd,match-cmdline = "* mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_jdi_1080p_cmd *"; + + //FIXME: lk2nd,dtb-files = "msm8974pro-oneplus-bacon"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + up { + lk2nd,code = ; + gpios = <&pmic 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + sony-leo { + model = "Sony Xperia Z3"; + compatible = "sony,xperia-leo"; + /* + * Probably matches other Sony devices as well, but good enough + * for now. + */ + lk2nd,match-cmdline = "* androidboot.bootloader=s1 *"; + + //FIXME: lk2nd,dtb-files = "msm8974pro-sony-leo"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + up { + lk2nd,code = ; + gpios = <&pmic 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; + +/* + * The stock bootloader of sony-leo uses parts of the dts to initialize the + * screen. So to get continous splash initialized by the first bootloader we + * need to include these dts parts here. + * + * FIXME: This won't work if more Sony devices are added here... + */ +#include "sony/msm8974pro-ac-shinano_leo-display.dtsi" diff --git a/lk2nd/device/dts/msm8974/rules.mk b/lk2nd/device/dts/msm8974/rules.mk index 8e14c5e8c..9be7c539d 100644 --- a/lk2nd/device/dts/msm8974/rules.mk +++ b/lk2nd/device/dts/msm8974/rules.mk @@ -3,3 +3,5 @@ LOCAL_DIR := $(GET_LOCAL_DIR) QCDTBS += \ $(LOCAL_DIR)/samsung.dtb \ + $(LOCAL_DIR)/msm8974pro-ab-pm8941-mtp.dtb \ + $(LOCAL_DIR)/msm8974pro-ac-pm8941-mtp.dtb \ diff --git a/lk2nd/device/dts/msm8974/sony/dsi-panel-leo.dtsi b/lk2nd/device/dts/msm8974/sony/dsi-panel-leo.dtsi new file mode 100644 index 000000000..8ee5d64cb --- /dev/null +++ b/lk2nd/device/dts/msm8974/sony/dsi-panel-leo.dtsi @@ -0,0 +1,775 @@ +/* Copyright (c) 2012, Code Aurora Forum. All rights reserved. + * Copyright (c) 2014 Sony Mobile Communications Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&mdss_mdp { + qcom,mdss-ib-factor = <19 10>; + dsi_novatek_sharp_1080_vid: somc,novatek_sharp_1080p_video_panel { + qcom,mdss-dsi-panel-name = "sharp novatek 1080p video"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <136>; + qcom,mdss-dsi-h-back-porch = <20>; + qcom,mdss-dsi-h-pulse-width = <60>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <3>; + qcom,mdss-dsi-v-front-porch = <4>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [15 01 00 00 00 00 02 BB 03 + 39 01 00 00 00 00 06 3B 03 05 04 50 88 + 15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C4 9A + 15 01 00 00 00 00 02 FF 10]; + qcom,mdss-dsi-on-command = [05 01 00 00 96 00 01 11 + 05 01 00 00 28 00 01 29]; + qcom,mdss-dsi-off-command = [15 01 00 00 00 00 02 FF 10 + 05 01 00 00 14 00 01 28 + 05 01 00 00 50 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6E 2A 3C 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x02>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <1>; + somc,mdss-dsi-wait-time-before-on-cmd = <150>; + somc,lcd-id = <1>; + somc,lcd-id-adc = <215000 256000>; + somc,disp-en-on-pre = <200>; + somc,disp-en-on-post = <10>; + somc,pw-on-rst-seq = <1 1>, <0 1>, <1 20>; + somc,disp-en-off-post = <200>; + somc,pw-off-rst-seq = <0 5>; + somc,pw-down-period = <100>; + + // [...] + }; + + dsi_novatek_sharp_1080_cmd: somc,novatek_sharp_1080p_cmd_panel { + qcom,mdss-dsi-panel-name = "sharp novatek 1080p cmd"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_cmd_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <56>; + qcom,mdss-dsi-h-back-porch = <8>; + qcom,mdss-dsi-h-pulse-width = <8>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <8>; + qcom,mdss-dsi-v-front-porch = <233>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [15 01 00 00 00 00 02 BB 10 + 15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C4 9A + 15 01 00 00 00 00 02 85 05 + 15 01 00 00 00 00 02 93 02 + 15 01 00 00 00 00 02 94 08 + 15 01 00 00 00 00 02 92 95 + 15 01 00 00 00 00 02 FF 10 + 15 01 00 00 00 00 02 FF 20 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 58 82 + 15 01 00 00 00 00 02 59 02 + 15 01 00 00 00 00 02 5A 02 + 15 01 00 00 00 00 02 5B 02 + 15 01 00 00 00 00 02 5C 83 + 15 01 00 00 00 00 02 5D 83 + 15 01 00 00 00 00 02 5E 03 + 15 01 00 00 00 00 02 5F 03 + 15 01 00 00 00 00 02 6D 55 + 15 01 00 00 00 00 02 FF 10 + 15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C4 02 + 15 01 00 00 00 00 02 FF 10 + 15 01 00 00 00 00 02 35 00 + 39 01 00 00 00 00 03 44 03 00 + 15 01 00 00 00 00 02 FF E0 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 B5 86 + 15 01 00 00 00 00 02 B6 77 + 15 01 00 00 00 00 02 B8 AD + 15 01 00 00 00 00 02 FF 20 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 10 04 + 15 01 00 00 00 00 02 FF 10 + 05 01 00 00 1E 00 01 11]; + qcom,mdss-dsi-on-command = [05 01 00 00 28 00 01 29]; + qcom,mdss-dsi-off-command = [15 01 00 00 00 00 02 FF 10 + 05 01 00 00 14 00 01 28 + 05 01 00 00 50 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-te-pin-select = <1>; + qcom,mdss-dsi-wr-mem-start = <0x2c>; + qcom,mdss-dsi-wr-mem-continue = <0x3c>; + qcom,mdss-dsi-te-dcs-command = <1>; + qcom,mdss-dsi-te-check-enable; + qcom,mdss-dsi-te-using-te-pin; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6E 2A 3C 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x21>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <0>; + somc,mdss-dsi-wait-time-before-on-cmd = <150>; + somc,lcd-id = <1>; + somc,lcd-id-adc = <0 57000>; + somc,disp-en-on-pre = <10>; + somc,disp-en-on-post = <20>; + somc,pw-on-rst-seq = <1 1>, <0 1>, <1 20>; + somc,disp-en-off-post = <200>; + somc,pw-off-rst-seq = <0 5>; + somc,pw-down-period = <100>; + + // [...] + }; + + dsi_novatek_jdi_1080_vid: somc,novatek_jdi_1080p_video_panel { + qcom,mdss-dsi-panel-name = "jdi novatek 1080p video"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <112>; + qcom,mdss-dsi-h-back-porch = <76>; + qcom,mdss-dsi-h-pulse-width = <4>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <4>; + qcom,mdss-dsi-v-front-porch = <8>; + qcom,mdss-dsi-v-pulse-width = <4>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [23 01 00 00 00 00 02 FF 10 + 05 01 00 00 14 00 01 01 + 15 01 00 00 00 00 02 BB 03 + 15 01 00 00 00 00 02 35 00 + 39 01 00 00 00 00 05 2A 00 00 04 37 + 39 01 00 00 00 00 05 2B 00 00 07 7F + 39 01 00 00 00 00 04 3B 03 08 08]; + qcom,mdss-dsi-on-command = [05 01 00 00 64 00 01 11 + 05 01 00 00 28 00 01 29]; + qcom,mdss-dsi-off-command = [05 01 00 00 14 00 01 28 + 05 01 00 00 50 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6C 2A 3A 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x02>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <1>; + somc,mdss-dsi-wait-time-before-on-cmd = <150>; + somc,lcd-id = <1>; + somc,lcd-id-adc = <801000 917000>; + somc,disp-en-on-post = <10>; + somc,pw-on-rst-seq = <1 15>; + somc,disp-en-off-post = <200>; + somc,pw-off-rst-seq = <0 0>; + somc,pw-down-period = <100>; + + // [...] + }; + + dsi_novatek_jdi_1080_cmd: somc,novatek_jdi_1080p_cmd_panel { + qcom,mdss-dsi-panel-name = "jdi novatek 1080p cmd"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_cmd_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <56>; + qcom,mdss-dsi-h-back-porch = <8>; + qcom,mdss-dsi-h-pulse-width = <8>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <8>; + qcom,mdss-dsi-v-front-porch = <233>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [23 01 00 00 00 00 02 FF 10 + 05 01 00 00 14 00 01 01 + 23 01 00 00 00 00 02 FF 10 + 23 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 BB 10 + 15 01 00 00 00 00 02 35 00 + 15 01 00 00 00 00 02 44 03 + 23 01 00 00 00 00 02 FF E0 + 23 01 00 00 00 00 02 B5 86 + 23 01 00 00 00 00 02 B6 77 + 23 01 00 00 00 00 02 B8 AD + 23 01 00 00 00 00 02 FB 01 + 23 01 00 00 00 00 02 FF 20 + 23 01 00 00 00 00 02 10 04 + 23 01 00 00 00 00 02 FB 01 + 23 01 00 00 00 00 02 FF 24 + 23 01 00 00 00 00 02 92 95 + 23 01 00 00 00 00 02 FB 01 + 23 01 00 00 00 00 02 C4 20 + 23 01 00 00 00 00 02 FF 10 + 23 01 00 00 00 00 02 FB 01 + 05 01 00 00 64 00 01 11]; + qcom,mdss-dsi-on-command = [05 01 00 00 00 00 01 29]; + qcom,mdss-dsi-off-command = [15 01 00 00 00 00 02 FF 10 + 05 01 00 00 14 00 01 28 + 05 01 00 00 50 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-te-pin-select = <1>; + qcom,mdss-dsi-wr-mem-start = <0x2c>; + qcom,mdss-dsi-wr-mem-continue = <0x3c>; + qcom,mdss-dsi-te-dcs-command = <1>; + qcom,mdss-dsi-te-check-enable; + qcom,mdss-dsi-te-using-te-pin; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6E 2A 3C 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x21>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <0>; + somc,mdss-dsi-wait-time-before-on-cmd = <150>; + somc,lcd-id = <1>; + somc,lcd-id-adc = <565000 653000>; + somc,disp-en-on-post = <20>; + somc,pw-on-rst-seq = <1 15>; + somc,disp-en-off-post = <70>; + somc,pw-off-rst-seq = <0 0>; + somc,pw-down-period = <100>; + + // [...] + }; + + dsi_novatek_auo_1080_cmd: somc,novatek_auo_1080p_cmd_panel { + qcom,mdss-dsi-panel-name = "auo novatek 1080p cmd"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_cmd_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <56>; + qcom,mdss-dsi-h-back-porch = <8>; + qcom,mdss-dsi-h-pulse-width = <8>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <8>; + qcom,mdss-dsi-v-front-porch = <233>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [15 01 00 00 00 00 02 FF E0 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 B5 86 + 15 01 00 00 00 00 02 B6 77 + 15 01 00 00 00 00 02 B8 AD + 15 01 00 00 00 00 02 FF 20 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 10 04 + 15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C6 00 + 15 01 00 00 00 00 02 C5 32 + 15 01 00 00 00 00 02 92 92 + 15 01 00 00 00 00 02 FF 10 + 15 01 00 00 00 00 02 35 00 + 39 01 00 00 00 00 03 44 03 00 + 39 01 00 00 00 00 04 3B 03 30 06 + 15 01 00 00 01 00 02 BB 10 + 05 01 00 00 1E 00 01 11]; + qcom,mdss-dsi-on-command = [05 01 00 00 28 00 01 29]; + qcom,mdss-dsi-off-command = [15 01 00 00 00 00 02 FF 10 + 05 01 00 00 00 00 01 28 + 05 01 00 00 64 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-te-pin-select = <1>; + qcom,mdss-dsi-wr-mem-start = <0x2c>; + qcom,mdss-dsi-wr-mem-continue = <0x3c>; + qcom,mdss-dsi-te-dcs-command = <1>; + qcom,mdss-dsi-te-check-enable; + qcom,mdss-dsi-te-using-te-pin; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6E 2A 3C 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x21>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <0>; + somc,mdss-dsi-wait-time-before-on-cmd = <100>; + somc,lcd-id = <1>; + somc,lcd-id-adc = <1236000 1395000>; + somc,disp-en-on-post = <20>; + somc,pw-on-rst-seq = <1 10>; + somc,disp-en-off-post = <70>; + somc,pw-off-rst-seq = <0 0>; + somc,pw-down-period = <100>; + + // [...] + }; + + dsi_novatek_lgd_1080_cmd: somc,novatek_lgd_1080p_cmd_panel { + qcom,mdss-dsi-panel-name = "lgd novatek 1080p cmd"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_cmd_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <56>; + qcom,mdss-dsi-h-back-porch = <8>; + qcom,mdss-dsi-h-pulse-width = <8>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <8>; + qcom,mdss-dsi-v-front-porch = <233>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C6 00 + 15 01 00 00 00 00 02 92 94 + 15 01 00 00 00 00 02 FF E0 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 B8 AD + 15 01 00 00 00 00 02 B5 86 + 15 01 00 00 00 00 02 B6 77 + 15 01 00 00 00 00 02 FF E0 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 10 00 + 15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C4 24 + 15 01 00 00 00 00 02 FF 10 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 35 00 + 39 01 00 00 00 00 03 44 03 00 + 05 01 00 00 1E 00 01 11]; + qcom,mdss-dsi-on-command = [05 01 00 00 00 00 01 29]; + qcom,mdss-dsi-off-command = [05 01 00 00 14 00 01 28 + 05 01 00 00 64 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-te-pin-select = <1>; + qcom,mdss-dsi-wr-mem-start = <0x2c>; + qcom,mdss-dsi-wr-mem-continue = <0x3c>; + qcom,mdss-dsi-te-dcs-command = <1>; + qcom,mdss-dsi-te-check-enable; + qcom,mdss-dsi-te-using-te-pin; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6E 2A 3C 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x21>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <0>; + somc,mdss-dsi-wait-time-before-on-cmd = <100>; + somc,lcd-id = <1>; + somc,lcd-id-adc = <1420000 1594000>; + somc,disp-en-on-pre = <1>; + somc,pw-on-rst-seq = <0 20>, <1 10>, <0 1>, <1 20>; + somc,disp-en-off-post = <10>; + somc,pw-off-rst-seq = <0 1>; + somc,pw-down-period = <100>; + + // [...] + }; + + dsi_default_gpio_0: somc,default_panel_0 { + qcom,mdss-dsi-panel-name = "default video 0"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <136>; + qcom,mdss-dsi-h-back-porch = <20>; + qcom,mdss-dsi-h-pulse-width = <60>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <3>; + qcom,mdss-dsi-v-front-porch = <4>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [15 01 00 00 00 00 02 BB 03 + 39 01 00 00 00 00 06 3B 03 05 04 50 88 + 15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C4 9A + 15 01 00 00 00 00 02 FF 10]; + qcom,mdss-dsi-on-command = [05 01 00 00 96 00 01 11 + 05 01 00 00 28 00 01 29]; + qcom,mdss-dsi-off-command = [15 01 00 00 00 00 02 FF 10 + 05 01 00 00 14 00 01 28 + 05 01 00 00 50 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6E 2A 3C 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x02>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <1>; + somc,mdss-dsi-wait-time-before-on-cmd = <150>; + somc,lcd-id = <0>; + somc,lcd-id-adc = <0 0x7fffffff>; + somc,disp-en-on-pre = <200>; + somc,disp-en-on-post = <10>; + somc,pw-on-rst-seq = <1 1>, <0 1>, <1 20>; + somc,disp-en-off-post = <200>; + somc,pw-off-rst-seq = <0 5>; + somc,pw-down-period = <100>; + }; + + dsi_default_gpio_1: somc,default_panel_1 { + qcom,mdss-dsi-panel-name = "default video 1"; + qcom,mdss-dsi-panel-controller = <&mdss_dsi0>; + qcom,mdss-dsi-panel-type = "dsi_video_mode"; + qcom,mdss-dsi-panel-destination = "display_1"; + qcom,mdss-dsi-panel-framerate = <60>; + qcom,mdss-dsi-virtual-channel-id = <0>; + qcom,mdss-dsi-stream = <0>; + qcom,mdss-dsi-panel-width = <1080>; + qcom,mdss-dsi-panel-height = <1920>; + qcom,mdss-dsi-h-front-porch = <136>; + qcom,mdss-dsi-h-back-porch = <20>; + qcom,mdss-dsi-h-pulse-width = <60>; + qcom,mdss-dsi-h-sync-skew = <0>; + qcom,mdss-dsi-v-back-porch = <3>; + qcom,mdss-dsi-v-front-porch = <4>; + qcom,mdss-dsi-v-pulse-width = <2>; + qcom,mdss-dsi-h-left-border = <0>; + qcom,mdss-dsi-h-right-border = <0>; + qcom,mdss-dsi-v-top-border = <0>; + qcom,mdss-dsi-v-bottom-border = <0>; + qcom,mdss-dsi-bpp = <24>; + qcom,mdss-dsi-underflow-color = <0x0>; + qcom,mdss-dsi-border-color = <0>; + somc,mdss-dsi-init-command = [15 01 00 00 00 00 02 BB 03 + 39 01 00 00 00 00 06 3B 03 05 04 50 88 + 15 01 00 00 00 00 02 FF 24 + 15 01 00 00 00 00 02 FB 01 + 15 01 00 00 00 00 02 C4 9A + 15 01 00 00 00 00 02 FF 10]; + qcom,mdss-dsi-on-command = [05 01 00 00 96 00 01 11 + 05 01 00 00 28 00 01 29]; + qcom,mdss-dsi-off-command = [15 01 00 00 00 00 02 FF 10 + 05 01 00 00 14 00 01 28 + 05 01 00 00 50 00 01 10]; + qcom,mdss-dsi-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; + qcom,mdss-dsi-h-sync-pulse = <1>; + qcom,mdss-dsi-traffic-mode = "non_burst_sync_event"; + qcom,mdss-dsi-bllp-eof-power-mode; + qcom,mdss-dsi-bllp-power-mode; + qcom,mdss-dsi-lane-0-state; + qcom,mdss-dsi-lane-1-state; + qcom,mdss-dsi-lane-2-state; + qcom,mdss-dsi-lane-3-state; + qcom,mdss-dsi-panel-timings = [E6 38 26 00 68 6E 2A 3C 2C 03 04 00]; + qcom,mdss-dsi-lp11-init; + qcom,mdss-dsi-t-clk-post = <0x02>; + qcom,mdss-dsi-t-clk-pre = <0x2B>; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <4095>; + qcom,mdss-brightness-max-level = <4095>; + qcom,mdss-dsi-dma-trigger = "trigger_sw"; + qcom,mdss-dsi-mdp-trigger = "none"; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode"; + qcom,cont-splash-enabled; + qcom,mdss-dsi-tx-eot-append; + + somc,driver-ic = <0>; + somc,dric-gpio = <&msmgpio 26 0>; + somc,touch-reset-gpio = <&msmgpio 85 0>; + somc,mul-channel-scaling = <3>; + somc,mdss-phy-size-mm = <64 114>; + somc,mdss-dsi-lane-config = [00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 c2 ef 00 00 00 00 01 ff + 00 02 45 00 00 00 00 01 97]; + somc,mdss-dsi-disp-on-in-hs = <1>; + somc,mdss-dsi-wait-time-before-on-cmd = <150>; + somc,lcd-id = <1>; + somc,lcd-id-adc = <0 0x7fffffff>; + somc,disp-en-on-pre = <200>; + somc,disp-en-on-post = <10>; + somc,pw-on-rst-seq = <1 1>, <0 1>, <1 20>; + somc,disp-en-off-post = <200>; + somc,pw-off-rst-seq = <0 5>; + somc,pw-down-period = <100>; + }; +}; diff --git a/lk2nd/device/dts/msm8974/sony/msm8974-display-stubs.dtsi b/lk2nd/device/dts/msm8974/sony/msm8974-display-stubs.dtsi new file mode 100644 index 000000000..b24829589 --- /dev/null +++ b/lk2nd/device/dts/msm8974/sony/msm8974-display-stubs.dtsi @@ -0,0 +1,71 @@ +/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/ { + soc { + msmgpio: gpio { + compatible = "qcom,msm-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + + mdss_mdp: qcom,mdss_mdp { + compatible = "qcom,mdss_mdp"; + }; + + mdss_dsi0: qcom,mdss_dsi { + compatible = "qcom,mdss-dsi-ctrl"; + cell-index = <0>; + qcom,mdss-mdp = <&mdss_mdp>; + qcom,platform-reset-gpio = <&pm8941_gpios 19 0>; + qcom,platform-enable-gpio = <&msmgpio 58 0>; + qcom,platform-te-gpio = <&msmgpio 12 0>; + qcom,platform-strength-ctrl = [ff 06]; + qcom,platform-bist-ctrl = [00 00 b1 ff 00 00]; + qcom,platform-regulator-settings = [07 09 03 00 20 00 01]; + qcom,platform-lane-config = [00 00 00 00 00 00 00 01 97 + 00 00 00 00 00 00 00 01 97 + 00 00 00 00 00 00 00 01 97 + 00 00 00 00 00 00 00 01 97 + 00 c0 00 00 00 00 00 01 bb]; + }; + + spmi_bus: qcom,spmi { + compatible = "qcom,spmi-pmic-arb"; + cell-index = <0>; + #address-cells = <1>; + #size-cells = <0>; + + pm8941_lsid0: qcom,pm8941@0 { + reg = <0x0>; + + pm8941_gpios: gpios { + compatible = "qcom,qpnp-pin"; + gpio-controller; + #gpio-cells = <2>; + }; + }; + + pm8941_lsid1: qcom,pm8941@1 { + reg = <0x1>; + #address-cells = <1>; + #size-cells = <1>; + + pm8941_wled: qcom,leds@d800 { + compatible = "qcom,leds-qpnp"; + reg = <0xd800 0x100>; + label = "wled"; + }; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo-display.dtsi b/lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo-display.dtsi new file mode 100644 index 000000000..edf6daf97 --- /dev/null +++ b/lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo-display.dtsi @@ -0,0 +1,3 @@ +#include "msm8974-display-stubs.dtsi" +#include "msm8974pro-ac-shinano_leo_common.dtsi" +#include "dsi-panel-leo.dtsi" diff --git a/lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo_common.dtsi b/lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo_common.dtsi new file mode 100644 index 000000000..2b85e10e0 --- /dev/null +++ b/lk2nd/device/dts/msm8974/sony/msm8974pro-ac-shinano_leo_common.dtsi @@ -0,0 +1,87 @@ +/* arch/arm/boot/dts/msm8974pro-ac-shinano_leo_common.dtsi + * + * Copyright (C) 2015 Sony Mobile Communications Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * + * NOTE: This file has been modified by Sony Mobile Communications Inc. + * Modifications are licensed under the License. + */ + +// [...] +&spmi_bus { + qcom,pm8941@1 { + // [...] + qcom,leds@d800 { + status = "okay"; + qcom,wled_0 { + label = "wled"; + //linux,name = "wled:backlight"; + //linux,default-trigger = "bkl-trigger"; + qcom,cs-out-en = <1>; + qcom,cabc-en = <0>; + qcom,op-fdbck = <0>; + qcom,default-state = "on"; + qcom,max-current = <24>; + qcom,init-br = <1706>; + somc-s1,br-power-save = <136>; + qcom,ctrl-delay-us = <0>; + qcom,boost-curr-lim = <3>; + qcom,cp-sel = <0>; + qcom,switch-freq = <11>; + qcom,ovp-val = <2>; + qcom,num-strings = <2>; + qcom,id = <0>; + // [...] + }; + }; + }; +}; + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&dsi_default_gpio_0>; + //vdd-supply = <&pm8941_lvs3>; + qcom,platform-enable-gpio = <&pm8941_gpios 20 0>; + qcom,platform-lane-config = []; + qcom,platform-supply-entry1 { + qcom,supply-name = "vdd"; + qcom,supply-min-voltage = <0>; + qcom,supply-max-voltage = <0>; + qcom,supply-enable-load = <100000>; + qcom,supply-disable-load = <100>; + qcom,supply-pre-on-sleep = <0>; + qcom,supply-post-on-sleep = <0>; + qcom,supply-pre-off-sleep = <0>; + qcom,supply-post-off-sleep = <0>; + }; + qcom,platform-supply-entry2 { + qcom,supply-name = "vddio"; + qcom,supply-min-voltage = <1800000>; + qcom,supply-max-voltage = <1800000>; + qcom,supply-enable-load = <100000>; + qcom,supply-disable-load = <100>; + qcom,supply-pre-on-sleep = <0>; + qcom,supply-post-on-sleep = <0>; + qcom,supply-pre-off-sleep = <0>; + qcom,supply-post-off-sleep = <0>; + }; + qcom,platform-supply-entry3 { + qcom,supply-name = "vdda"; + qcom,supply-min-voltage = <1200000>; + qcom,supply-max-voltage = <1200000>; + qcom,supply-enable-load = <100000>; + qcom,supply-disable-load = <100>; + qcom,supply-pre-on-sleep = <0>; + qcom,supply-post-on-sleep = <0>; + qcom,supply-pre-off-sleep = <0>; + qcom,supply-post-off-sleep = <0>; + }; +}; From 9083b135abc457281a1b5c82a3e944b613d67784 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 13 Dec 2023 20:54:32 +0500 Subject: [PATCH 33/59] dts: Import msm8974-lge-* Co-authored-by: Sebastian 'Swift Geek' Grzywna Co-authored-by: wonderfulShrineMaidenOfParadise --- lk2nd/device/dts/msm8974/msm8974-lge-d855.dts | 29 ++++++++++ .../dts/msm8974/msm8974-lge-hammerhead.dts | 56 +++++++++++++++++++ lk2nd/device/dts/msm8974/rules.mk | 2 + 3 files changed, 87 insertions(+) create mode 100644 lk2nd/device/dts/msm8974/msm8974-lge-d855.dts create mode 100644 lk2nd/device/dts/msm8974/msm8974-lge-hammerhead.dts diff --git a/lk2nd/device/dts/msm8974/msm8974-lge-d855.dts b/lk2nd/device/dts/msm8974/msm8974-lge-d855.dts new file mode 100644 index 000000000..ff5a490e3 --- /dev/null +++ b/lk2nd/device/dts/msm8974/msm8974-lge-d855.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; +}; + +&lk2nd { + model = "LG G3 (D855)"; + compatible = "lge,d855"; + lk2nd,match-cmdline = "*LG-D855*"; + + //FIXME: lk2nd,dtb-files = "msm8974-lge-d855"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + up { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8974/msm8974-lge-hammerhead.dts b/lk2nd/device/dts/msm8974/msm8974-lge-hammerhead.dts new file mode 100644 index 000000000..94127c203 --- /dev/null +++ b/lk2nd/device/dts/msm8974/msm8974-lge-hammerhead.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; +}; + +&lk2nd { + hammerhead-d820 { + model = "LG Google Nexus 5 D820"; + compatible = "lge,hammerhead"; + lk2nd,match-cmdline = "* androidboot.hardware.sku=D820 *"; + + lk2nd,dtb-files = "msm8974-lge-nexus5-hammerhead"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + up { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + hammerhead-d821 { + model = "LG Google Nexus 5 D821"; + compatible = "lge,hammerhead"; + lk2nd,match-cmdline = "* androidboot.hardware.sku=D821 *"; + + // Currently unable to use a dedicated device tree because it won't + // load D821 after D820 loaded. + qcom,msm-id = ; + + lk2nd,dtb-files = "msm8974-lge-nexus5-hammerhead"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + up { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8974/rules.mk b/lk2nd/device/dts/msm8974/rules.mk index 9be7c539d..927c18c58 100644 --- a/lk2nd/device/dts/msm8974/rules.mk +++ b/lk2nd/device/dts/msm8974/rules.mk @@ -5,3 +5,5 @@ QCDTBS += \ $(LOCAL_DIR)/samsung.dtb \ $(LOCAL_DIR)/msm8974pro-ab-pm8941-mtp.dtb \ $(LOCAL_DIR)/msm8974pro-ac-pm8941-mtp.dtb \ + $(LOCAL_DIR)/msm8974-lge-hammerhead.dtb \ + $(LOCAL_DIR)/msm8974-lge-d855.dtb \ From 5dc590a58b30f43f16f9cf5ce76659891a222a50 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 13 Dec 2023 21:04:44 +0500 Subject: [PATCH 34/59] fixup! dts: Import msm8939-huawei* --- lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts b/lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts index d8e8873fe..822ef1711 100644 --- a/lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts +++ b/lk2nd/device/dts/msm8916/msm8939-huawei-rio.dts @@ -12,8 +12,8 @@ }; &lk2nd { - model = "Huawei Honor 5X / GR5 (2016)"; - compatible = "huawei,kiwi"; + model = "Huawei G7 Plus / G8 / GX8"; + compatible = "huawei,rio"; //FIXME: lk2nd,dtb-files = "msm8939-huawei-rio"; }; From fc8ee4b2dc5ac1c1236768cd5b2b2b043fb18a39 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 2 Jan 2024 11:14:18 +0500 Subject: [PATCH 35/59] dts: msm8916: Samsung Galaxy On7 2015 (SM-G600FY) Co-authored-by: Guilherme Janczak --- lk2nd/device/dts/msm8916/msm8916-samsung.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lk2nd/device/dts/msm8916/msm8916-samsung.dts b/lk2nd/device/dts/msm8916/msm8916-samsung.dts index 666c4efa9..8dd0bc492 100644 --- a/lk2nd/device/dts/msm8916/msm8916-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8916-samsung.dts @@ -413,6 +413,24 @@ }; }; + on7lte-swa { + model = "Samsung Galaxy On7 2015 (SM-G600FY)"; + compatible = "samsung,on7lte-swa", "samsung,on7"; + lk2nd,match-bootloader = "G600FY*"; + + lk2nd,dtb-files = "msm8916-samsung-on7"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 3>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + /* * Before building for rossaltezt, please comment out all dtbs except * "$(LOCAL_DIR)/msm8916-samsung.dtb" at './rules.mk'. From 74031383486da55432393c9560f49d98550ef2ab Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 7 Jan 2024 14:56:04 +0500 Subject: [PATCH 36/59] dts: Add j510h Co-authored-by: Ilya114 <93242944+Ilya114@users.noreply.github.com> --- lk2nd/device/dts/msm8916/msm8216-samsung.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lk2nd/device/dts/msm8916/msm8216-samsung.dts b/lk2nd/device/dts/msm8916/msm8216-samsung.dts index 8cb933a7a..7d5a970c8 100644 --- a/lk2nd/device/dts/msm8916/msm8216-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8216-samsung.dts @@ -33,6 +33,24 @@ }; }; + j5xn3g { + model = "Samsung Galaxy J5 2016 (SM-J510H)"; + compatible = "samsung,j5xn3g", "samsung,j5"; + lk2nd,match-bootloader = "J500H*"; + + lk2nd,dtb-files = "msm8916-samsung-j5"; + + qcom,msm-id = ; + qcom,board-id = <0xF808FF01 5>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + /* rev 7 */ fortuna3g { From 55270592b6bbef8d465f89906f30739417b69bac Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 28 Jan 2024 15:59:35 +0500 Subject: [PATCH 37/59] dts: Update kltechn --- lk2nd/device/dts/msm8974/samsung.dts | 36 ++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/lk2nd/device/dts/msm8974/samsung.dts b/lk2nd/device/dts/msm8974/samsung.dts index cb1b34106..cd3aa65ed 100644 --- a/lk2nd/device/dts/msm8974/samsung.dts +++ b/lk2nd/device/dts/msm8974/samsung.dts @@ -11,9 +11,9 @@ &lk2nd { /* rev 10 */ - kltechn { + kltechn-unicom { model = "Samsung Galaxy S5 China Unicom (Duos) (SM-G9006V/W)"; - compatible = "samsung,klte"; + compatible = "samsung,kltechn-unicom", "samsung,kltechn", "samsung,klte"; lk2nd,match-bootloader = "G9006*"; lk2nd,dtb-files = "msm8974pro-samsung-klte"; @@ -27,6 +27,38 @@ }; }; + kltechn-mobile { + model = "Samsung Galaxy S5 China Mobile (Duos) (SM-G9008V/W)"; + compatible = "samsung,kltechn-mobile", "samsung,kltechn", "samsung,klte"; + lk2nd,match-bootloader = "G9008*"; + + lk2nd,dtb-files = "msm8974pro-samsung-klte"; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + + kltechn-telecom { + model = "Samsung Galaxy S5 China Telecom LTE (SM-G9009W)"; + compatible = "samsung,kltechn-telecom", "samsung,kltechn", "samsung,klte"; + lk2nd,match-bootloader = "G9009*"; + + lk2nd,dtb-files = "msm8974pro-samsung-klte"; + + gpio-keys { + compatible = "gpio-keys"; + home { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + }; + /* rev 14 */ klte { From d1ed9326f31801d5fa357f18caa4d0495aca7dd2 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 28 Jan 2024 16:02:16 +0500 Subject: [PATCH 38/59] dts: Update j5xn3g --- lk2nd/device/dts/msm8916/msm8216-samsung.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lk2nd/device/dts/msm8916/msm8216-samsung.dts b/lk2nd/device/dts/msm8916/msm8216-samsung.dts index 7d5a970c8..2465aeebc 100644 --- a/lk2nd/device/dts/msm8916/msm8216-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8216-samsung.dts @@ -33,9 +33,9 @@ }; }; - j5xn3g { + j5x3gjv { model = "Samsung Galaxy J5 2016 (SM-J510H)"; - compatible = "samsung,j5xn3g", "samsung,j5"; + compatible = "samsung,j5x3g", "samsung,j5"; lk2nd,match-bootloader = "J500H*"; lk2nd,dtb-files = "msm8916-samsung-j5"; From 2de75faf999a71429a910ee36b20d9906c1048e8 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 28 Jan 2024 16:22:41 +0500 Subject: [PATCH 39/59] dts: Add htc-m8 Co-authored-by: Alexandre Messier --- lk2nd/device/dts/msm8974/msm8974-htc-m8.dts | 71 +++++++++++++++++++++ lk2nd/device/dts/msm8974/rules.mk | 1 + 2 files changed, 72 insertions(+) create mode 100644 lk2nd/device/dts/msm8974/msm8974-htc-m8.dts diff --git a/lk2nd/device/dts/msm8974/msm8974-htc-m8.dts b/lk2nd/device/dts/msm8974/msm8974-htc-m8.dts new file mode 100644 index 000000000..04860884c --- /dev/null +++ b/lk2nd/device/dts/msm8974/msm8974-htc-m8.dts @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + 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>; +}; + +&lk2nd { + htc-m8 { + model = "HTC One (M8)"; + compatible = "htc,m8"; + lk2nd,match-panel; + + //FIXME: lk2nd,dtb-files = "msm8974-htc-m8"; + + gpio-keys { + compatible = "gpio-keys"; + down { + lk2nd,code = ; + gpios = <&tlmm 27 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + up { + lk2nd,code = ; + gpios = <&tlmm 28 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + panel { + compatible = "htc,m8-panel", "lk2nd,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"; + }; + }; + }; +}; + diff --git a/lk2nd/device/dts/msm8974/rules.mk b/lk2nd/device/dts/msm8974/rules.mk index 927c18c58..d8ee4916e 100644 --- a/lk2nd/device/dts/msm8974/rules.mk +++ b/lk2nd/device/dts/msm8974/rules.mk @@ -5,5 +5,6 @@ QCDTBS += \ $(LOCAL_DIR)/samsung.dtb \ $(LOCAL_DIR)/msm8974pro-ab-pm8941-mtp.dtb \ $(LOCAL_DIR)/msm8974pro-ac-pm8941-mtp.dtb \ + $(LOCAL_DIR)/msm8974-htc-m8.dtb \ $(LOCAL_DIR)/msm8974-lge-hammerhead.dtb \ $(LOCAL_DIR)/msm8974-lge-d855.dtb \ From 1eba9695525578859cdf354ad8480b3d5e274a77 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 2 May 2023 21:41:30 +0500 Subject: [PATCH 40/59] lk2nd: hyp: Add qhypstub loader --- lk2nd/device/2nd/partition.c | 4 + lk2nd/device/2nd/rules.mk | 7 ++ lk2nd/hyp/remapper.c | 172 +++++++++++++++++++++++++++++++++++ lk2nd/hyp/rules.mk | 8 ++ lk2nd/hyp/takeover.c | 111 ++++++++++++++++++++++ lk2nd/hyp/takeover.h | 28 ++++++ lk2nd/project/lk2nd.mk | 6 ++ 7 files changed, 336 insertions(+) create mode 100644 lk2nd/hyp/remapper.c create mode 100644 lk2nd/hyp/rules.mk create mode 100644 lk2nd/hyp/takeover.c create mode 100644 lk2nd/hyp/takeover.h diff --git a/lk2nd/device/2nd/partition.c b/lk2nd/device/2nd/partition.c index 5021f88ce..834681240 100644 --- a/lk2nd/device/2nd/partition.c +++ b/lk2nd/device/2nd/partition.c @@ -91,6 +91,10 @@ static void lk2nd_partition_split_mmc(void) #ifdef LK2ND_PARTITION_SIZE partition_split_mmc(LK2ND_PARTITION_BASE, LK2ND_PARTITION_NAME, LK2ND_PARTITION_SIZE / block_size, false); +#ifdef QHYPSTUB_PARTITION_SIZE + partition_split_mmc(QHYPSTUB_PARTITION_BASE, QHYPSTUB_PARTITION_NAME, + QHYPSTUB_PARTITION_SIZE / block_size, true); +#endif #endif } diff --git a/lk2nd/device/2nd/rules.mk b/lk2nd/device/2nd/rules.mk index fb75411d6..66d008573 100644 --- a/lk2nd/device/2nd/rules.mk +++ b/lk2nd/device/2nd/rules.mk @@ -22,6 +22,13 @@ DEFINES += \ LK2ND_PARTITION_SIZE=($(LK2ND_PARTITION_SIZE)) endif +ifneq ($(QHYPSTUB_PARTITION_SIZE),) +DEFINES += \ + QHYPSTUB_PARTITION_BASE="$(QHYPSTUB_PARTITION_BASE)" \ + QHYPSTUB_PARTITION_NAME="$(QHYPSTUB_PARTITION_NAME)" \ + QHYPSTUB_PARTITION_SIZE=($(QHYPSTUB_PARTITION_SIZE)) +endif + include $(if $(BUILD_GPL),$(LOCAL_DIR)/gpl/rules.mk) ifneq ($(OUTBOOTIMG),) diff --git a/lk2nd/hyp/remapper.c b/lk2nd/hyp/remapper.c new file mode 100644 index 000000000..9c395daa2 --- /dev/null +++ b/lk2nd/hyp/remapper.c @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2021-2022 Stephan Gerhold + * Copyright (c) 2023 Nikita Travkin + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "takeover.h" + +/** + * remapper.c - Hyp takeover using the boot remapper feature. + * + * This implementation is based on CVE-2022-22063 [1] which allows the user to + * read and write memory bypassing stage 2 address translation that the usual + * hyp code uses to secure itself from el1. + * + * Implementation uses BOOT_REMAPPER to fill hypervisor image with custom + * exception handler that disables EL2 MMU and caches and sets the vbar_el2, + * then copies the new hypervisor payload to the start of the hyp image. + * + * [1] https://github.com/msm8916-mainline/CVE-2022-22063 + */ + +#define HYP_BASE 0x86400000 + +#define BOOT_REMAP_BASE 0x00000000 +#define BOOT_REMAP_SIZE (128 * 1024) /* 128 KiB */ +#define BOOT_REMAP_END (BOOT_REMAP_BASE + BOOT_REMAP_SIZE) + +/* System Control Register (EL2) */ +#define SCTLR_EL2_I BIT(12) /* Instruction cache enable */ +#define SCTLR_EL2_C BIT(2) /* Global enable for data and unifies caches */ +#define SCTLR_EL2_M BIT(0) /* Global enable for the EL2 MMU */ + +#define APCS_BOOT_START_ADDR_NSEC 0x0b010008 +#define BOOT_128KB_EN BIT(2) +#define REMAP_EN BIT(0) + +typedef uint32_t a64_instruction_t; + +struct aarch64_exc_vec_row { + a64_instruction_t sync[32]; + a64_instruction_t irq[32]; + a64_instruction_t fiq[32]; + a64_instruction_t serror[32]; +}; +struct aarch64_exc_vec_table { + struct aarch64_exc_vec_row current_el_sp_el0; + struct aarch64_exc_vec_row current_el_sp_elx; + struct aarch64_exc_vec_row lower_el_aarch64; + struct aarch64_exc_vec_row lower_el_aarch32; +}; + +static void invalidate_instruction_cache(void) +{ + dsb(); + __asm__ volatile ("mcr p15, 0, %0, c7, c5, 0" : : "r" (0)); /* ICIALLU */ + dsb(); + isb(); +} + +/* + * Inputs: + * x0: Bits to clear in the sctlr_el2 system register + * x1: Vector base address to set into vbar_el2 + * Returns: + * x0: Old vbar_el2 value + */ +static a64_instruction_t hyp_shellcode[] = +{ + /* Disable stage 2 address translation and hypervisor traps */ + LE32(0xd51c111f), /* msr hcr_el2, xzr */ + /* Clear upper 32-bit in 64-bit registers */ + LE32(0x92407c00), /* and x0, x0, #0xffffffff */ + LE32(0x92407c21), /* and x1, x1, #0xffffffff */ + /* Clear system control bits to disable EL2 MMU and caches */ + LE32(0xd53c1002), /* mrs x2, sctlr_el2 */ + LE32(0x8a200042), /* bic x2, x2, x0 */ + LE32(0xd51c1002), /* msr sctlr_el2, x2 */ + /* Save original vector table base address (return in x0) */ + LE32(0xd53cc000), /* mrs x0, vbar_el2 */ + /* Load new vector table base address */ + LE32(0xd51cc001), /* msr vbar_el2, x1 */ + /* Return */ + LE32(0xd69f03e0), /* eret */ +}; + +/** + * get_remapper_reg() - Get remapper register based on the msm-id. + * + * Since multiple platrofms can use the same build, and they may have + * different boot clusters to use, dynamically detect the register. + * + * Returns: Register address or 0 if it's not supported. + */ +static uint64_t get_remapper_reg(void) { + uint32_t msm_id = board_platform_id() & 0x0000ffff; + + switch (msm_id) { + case QCOM_ID_APQ8016: + case QCOM_ID_MSM8216: + case QCOM_ID_MSM8916: + return 0x0b010008; + + case QCOM_ID_APQ8039: + case QCOM_ID_MSM8939: + case QCOM_ID_MSM8976: + return 0x0b110008; + + default: + dprintf(INFO, "qhypstub: This platform is not supported. (msm_id=%d)\n", msm_id); + return 0; + } +} + +int lk2nd_replace_hyp(void *payload, int payload_size, unsigned long vbar_offt) +{ + struct aarch64_exc_vec_table *table; + uint32_t remapper_reg = get_remapper_reg(); + int ret; + + if (!remapper_reg) + return -1; + + /* Set boot remapper to hypervisor memory. */ + writel(HYP_BASE | REMAP_EN | BOOT_128KB_EN, remapper_reg); + dsb(); /* Ensure write has completed before continuing */ + + /* Use boot remapper to copy shell code to hypervisor memory. */ + table = (struct aarch64_exc_vec_table *)BOOT_REMAP_BASE; + for (; table < (struct aarch64_exc_vec_table *)BOOT_REMAP_END; table++) + memcpy(table->lower_el_aarch32.sync, hyp_shellcode, sizeof(hyp_shellcode)); + + /* Ensure CPU does not execute stale code in EL2 */ + invalidate_instruction_cache(); + + /* Call shell code to disable running hypervisor. */ + ret = hvc(SCTLR_EL2_I | SCTLR_EL2_C | SCTLR_EL2_M, HYP_BASE + vbar_offt); + if (ret & (sizeof(*table) - 1)) { + dprintf(INFO, "HVC to shell code failed: %d\n", ret); + return -1; + } + + /* + * Hypervisor stage 2 address translation and cache is now disabled, + * so new code can be directly written to the hypervisor memory. + */ + + if (!lk2nd_mmu_map_ram_wt("hyp", HYP_BASE, payload_size)) + return -1; + + memcpy((void*)HYP_BASE, payload, payload_size); + + /* + * Invalidating the instruction cache is not necessary here. + * The instruction cache in EL2 was disabled by the shell code + * and the hypervisor memory region is mapped as write-through in LK. + */ + return 0; +} + diff --git a/lk2nd/hyp/rules.mk b/lk2nd/hyp/rules.mk new file mode 100644 index 000000000..2ee8879a1 --- /dev/null +++ b/lk2nd/hyp/rules.mk @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: BSD-3-Clause +LOCAL_DIR := $(GET_LOCAL_DIR) + +ifneq ($(filter msm8916 msm8952, $(PLATFORM)),) + OBJS += \ + $(LOCAL_DIR)/takeover.o \ + $(LOCAL_DIR)/remapper.o +endif diff --git a/lk2nd/hyp/takeover.c b/lk2nd/hyp/takeover.c new file mode 100644 index 000000000..92db5bc0e --- /dev/null +++ b/lk2nd/hyp/takeover.c @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* Copyright (c) 2023 Nikita Travkin */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "takeover.h" + +#define QHYPSTUB_SIZE 4096 +#define QHYPSTUB_MAGIC 0x6275747370796871 // "qhypstub" +#define QHYPSTUB_VBAR_OFFT 0x800 + +#define QHYPSTUB_STATE_CALL 0x86004242 +#define QHYPSTUB_STATE_AARCH32 1 +#define QHYPSTUB_STATE_AARCH64 2 + +/* Hypervisor Call */ +int hvc(unsigned long x0, unsigned long x1) +{ + register unsigned long r0 __asm__("r0") = x0; + register unsigned long r1 __asm__("r1") = x1; + + __asm__ volatile( + ".arch_extension virt\n" + "hvc #0\n" + : "+r" (r0), "+r" (r1) : : "r2", "r3" + ); + return r0; +} + +static void hyp_replace(void *payload, int payload_size) +{ + int ret; + + if (!is_scm_armv8_support()) { + dprintf(INFO, "qhypstub: Not loading on 32-bit firmware\n"); + return; + } + + ret = hvc(MAKE_SIP_SCM_CMD(SCM_SVC_MILESTONE_32_64_ID, SCM_SVC_MILESTONE_CMD_ID), 0); + if (ret != -2) { + dprintf(INFO, "qhypstub: Already loaded (hvc ret=%d)\n", ret); + return; + } + + dprintf(INFO, "qhypstub: Trying to load...\n"); + + /* Call platform specific takeover code. */ + ret = lk2nd_replace_hyp(payload, payload_size, QHYPSTUB_VBAR_OFFT); + if (ret) { + dprintf(CRITICAL, "qhypstub: Failed to replace hyp! (ret=%d)\n", ret); + return; + } + + /* Configure state to aarch32 by default, as if qhypstub was booted directly */ + ret = hvc(QHYPSTUB_STATE_CALL, QHYPSTUB_STATE_AARCH32); + if (ret) { + dprintf(CRITICAL, "qhypstub: Failed to change state! (ret=%d)\n", ret); + return; + } + + dprintf(INFO, "qhypstub: Loaded!\n"); +} + +static int lk2nd_load_qhypstub(void *dtb, const char *cmdline, enum boot_type boot_type) +{ + uint64_t *qhypstub_payload = malloc(QHYPSTUB_SIZE); + unsigned long long ptn = 0; + int index = INVALID_PTN; + bool magic_found = false; + + if (boot_type & (BOOT_DOWNSTREAM | BOOT_LK2ND)) + return 0; + + index = partition_get_index("qhypstub"); + ptn = partition_get_offset(index); + if (ptn == 0) { + dprintf(CRITICAL, "qhypstub: No qhypstub partition found!\n"); + return 0; + } + + if (mmc_read(ptn, (unsigned int *)qhypstub_payload, QHYPSTUB_SIZE)) { + dprintf(CRITICAL, "qhypstub: Cannot read the image!\n"); + return 0; + } + + /* Scan image for the magic. */ + for (unsigned int i = 0; i < QHYPSTUB_SIZE / sizeof(uint64_t); ++i) { + if (qhypstub_payload[i] == QHYPSTUB_MAGIC) { + magic_found = true; + break; + } + } + + if (!magic_found) { + dprintf(INFO, "qhypstub: Image lacks magic, not loading\n"); + return 0; + } + + hyp_replace(qhypstub_payload, QHYPSTUB_SIZE); + + return 0; +} +DEV_TREE_UPDATE(lk2nd_load_qhypstub); diff --git a/lk2nd/hyp/takeover.h b/lk2nd/hyp/takeover.h new file mode 100644 index 000000000..abfe5660d --- /dev/null +++ b/lk2nd/hyp/takeover.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +#ifndef LK2ND_HYP_TAKEOVER_H +#define LK2ND_HYP_TAKEOVER_H + +/** + * hvc() - Call hvc instruction with given arguments. + * @x0: Value of x0 register + * @x1: Value of x1 register + * + * Returns: Value of x0 register after return from hvc. + */ +int hvc(unsigned long x0, unsigned long x1); + +/** + * lk2nd_replace_hyp() - Replace the hyp with given payload. + * @payload: Data to replace the hyp with. + * @payload_size: Size of the @payload. + * @vbar_offt: Offset from the start of the payload to vbar_el2 + * + * Platform-specific implementation for hyp takeover. Implementation takes + * over the el2 code by any means then places payload at the start of the + * hyp memory, setting vbar_el2 register to hyp base + @vbar_offt. + * + * Returns: 0 on success and an error code otherwise. + */ +int lk2nd_replace_hyp(void *payload, int payload_size, unsigned long vbar_offt); + +#endif /* LK2ND_HYP_TAKEOVER_H */ diff --git a/lk2nd/project/lk2nd.mk b/lk2nd/project/lk2nd.mk index e34fc3968..03ef962bc 100644 --- a/lk2nd/project/lk2nd.mk +++ b/lk2nd/project/lk2nd.mk @@ -6,6 +6,7 @@ include lk2nd/project/base.mk MODULES += \ lk2nd/device \ lk2nd/device/2nd \ + lk2nd/hyp \ ifneq ($(ENABLE_FBCON_DISPLAY_MSG),1) MODULES += $(if $(filter $(MODULES), lk2nd/display), lk2nd/device/menu) @@ -17,6 +18,11 @@ LK2ND_PARTITION_BASE ?= boot LK2ND_PARTITION_NAME ?= lk2nd LK2ND_PARTITION_SIZE ?= 512*1024 +# 4 KiB qhypstub partition will be placed at the end of lk2nd virtual partition. +QHYPSTUB_PARTITION_BASE ?= lk2nd +QHYPSTUB_PARTITION_NAME ?= qhypstub +QHYPSTUB_PARTITION_SIZE ?= 4*1024 + # The primary bootloader will implement LONG_PRESS_POWER_ON if needed. # If we do it again in lk2nd we might accidentally shutdown the device because # the user needs to keep the power key pressed for *really* long. From d411af42b972fa94f3872e6585442dac2aec0733 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 24 Oct 2023 21:14:13 +0500 Subject: [PATCH 41/59] lib: zlib_inflate: Compile uncompress() too --- lib/zlib_inflate/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/zlib_inflate/rules.mk b/lib/zlib_inflate/rules.mk index 96d238312..fd99af77e 100755 --- a/lib/zlib_inflate/rules.mk +++ b/lib/zlib_inflate/rules.mk @@ -6,4 +6,5 @@ OBJS += \ $(LOCAL_DIR)/inftrees.o \ $(LOCAL_DIR)/inflate.o \ $(LOCAL_DIR)/inffast.o \ + $(LOCAL_DIR)/uncompr.o \ $(LOCAL_DIR)/decompress.o From feb042f033e85e380ac31495f5c3d8210923695b Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 25 Oct 2023 11:40:12 +0500 Subject: [PATCH 42/59] lk2nd: util: cmdline: Add helper for getting cmdline argument value --- lk2nd/include/lk2nd/util/cmdline.h | 15 +++++++++++++++ lk2nd/util/cmdline.c | 27 ++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/lk2nd/include/lk2nd/util/cmdline.h b/lk2nd/include/lk2nd/util/cmdline.h index 19d6d1408..4a020eb8b 100644 --- a/lk2nd/include/lk2nd/util/cmdline.h +++ b/lk2nd/include/lk2nd/util/cmdline.h @@ -4,6 +4,21 @@ #include #include +#include + +/** + * lk2nd_cmdline_scan_arg() - Get cmdline argument value. + * @cmdline: The command line (space-separated parameters) + * @arg: The parameter to search for + * @value: Char array to write value of the argument. + * @vlen: Max size of @value. + * + * Return: true if @arg was found in @cmdline, false otherwise. + * If the value was found but has no parameter ('=' sign and + * trailing value), then @value is unchanged. Otherwise @value + * is populated with the argument after '='. + */ +bool lk2nd_cmdline_scan_arg(const char *cmdline, const char *arg, char *value, size_t vlen); /** * lk2nd_cmdline_scan() - Scan for a space-separated parameter in command line. diff --git a/lk2nd/util/cmdline.c b/lk2nd/util/cmdline.c index 919fe3f80..638cf2df2 100644 --- a/lk2nd/util/cmdline.c +++ b/lk2nd/util/cmdline.c @@ -1,9 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause #include -bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) +bool lk2nd_cmdline_scan_arg(const char *cmdline, const char *arg, char *value, size_t vlen) { const char *argp; + size_t i; while (true) { /* Skip spaces */ @@ -11,8 +12,23 @@ bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) /* Compare argument */ for (argp = arg; *argp && *argp == *cmdline; argp++, cmdline++); - if (*argp == '\0' && (*cmdline == '\0' || *cmdline == ' ')) - return true; + if (*argp == '\0') { + if (*cmdline == '\0' || *cmdline == ' ') { + if (value && vlen) + *value = '\0'; + return true; + } else if (*cmdline == '=') { + cmdline++; + + if (value && vlen) { + i = 0; + while (i++ < (vlen-1) && !(*cmdline == '\0' || *cmdline == ' ')) + *value++ = *cmdline++; + *value = '\0'; + } + return true; + } + } /* Skip non-spaces (the rest of the "wrong argument") */ for (; *cmdline != ' '; cmdline++) @@ -20,3 +36,8 @@ bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) return false; } } + +bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) +{ + return lk2nd_cmdline_scan_arg(cmdline, arg, NULL, 0); +} From a9076b229959f95669fa74bc67a6cc534efc50e5 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 24 Oct 2023 21:14:32 +0500 Subject: [PATCH 43/59] lk2nd: Add basic ramoops module --- lk2nd/project/base.mk | 1 + lk2nd/ramoops/ramoops.c | 246 ++++++++++++++++++++++++++++++++++++++++ lk2nd/ramoops/rules.mk | 6 + 3 files changed, 253 insertions(+) create mode 100644 lk2nd/ramoops/ramoops.c create mode 100644 lk2nd/ramoops/rules.mk diff --git a/lk2nd/project/base.mk b/lk2nd/project/base.mk index deb01f620..09d82215a 100644 --- a/lk2nd/project/base.mk +++ b/lk2nd/project/base.mk @@ -27,6 +27,7 @@ MODULES += \ lk2nd/fastboot/debug \ lk2nd/hw/gpio \ lk2nd/hw/i2c \ + lk2nd/ramoops \ lk2nd/serialno \ lk2nd/smp \ lk2nd/smp/spin-table \ diff --git a/lk2nd/ramoops/ramoops.c b/lk2nd/ramoops/ramoops.c new file mode 100644 index 000000000..39cee71ff --- /dev/null +++ b/lk2nd/ramoops/ramoops.c @@ -0,0 +1,246 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* Copyright (c) 2023 Nikita Travkin */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define PERSISTENT_RAM_SIG (0x43474244) /* DBGC */ + +struct pram_buf { + uint32_t sig; + uint32_t offt; + uint32_t size; + uint8_t data[]; +}; + +struct ramoops_region { + void *base; + size_t size; + size_t ecc_size; + size_t record_size; + + size_t dump_size; + size_t console_size; + size_t ftrace_size; + size_t pmsg_size; +}; + +static void get_ramoops_region(struct ramoops_region *region) +{ + unsigned int scratch_size = target_get_max_flash_size(); + void *scratch = target_get_scratch_address(); + + region->ecc_size = 0; + region->size = 512 * 1024; + + /* + * NOTE: Those should be powers of 2 + */ + region->record_size = 8 * 1024; + region->console_size = 256 * 1024; + region->pmsg_size = 0; + region->ftrace_size = 0; + + region->dump_size = region->size - region->console_size - region->ftrace_size - region->pmsg_size; + region->base = (scratch + scratch_size - region->size); +} + + +static int lk2nd_ramoops_dt_update(void *dtb, const char *cmdline, enum boot_type boot_type) +{ + int ret, rmem_offset, offset; + struct ramoops_region region; + char tmp[32], args[16]; + + if (boot_type & (BOOT_DOWNSTREAM | BOOT_LK2ND)) + return 0; + + if (!lk2nd_cmdline_scan_arg(cmdline, "lk2nd.pass-ramoops", args, sizeof(args))) + return 0; + + get_ramoops_region(®ion); + + if (!strcmp(args, "zap")) + memset(region.base, 0, region.size); + + rmem_offset = fdt_path_offset(dtb, "/reserved-memory"); + if (rmem_offset < 0) + return 0; + + offset = fdt_node_offset_by_compatible(dtb, rmem_offset, "ramoops"); + if (offset < 0 && offset != -FDT_ERR_NOTFOUND) + return 0; + + if (offset == -FDT_ERR_NOTFOUND) { + snprintf(tmp, sizeof(tmp), "ramoops@%08x", (uint32_t)region.base); + offset = fdt_add_subnode(dtb, rmem_offset, tmp); + if (offset < 0) + return 0; + + ret = fdt_setprop_string(dtb, offset, "compatible", "ramoops"); + if (ret < 0) + return 0; + } + + ret = fdt_setprop_empty(dtb, offset, "reg"); + if (ret < 0) + return 0; + + ret = fdt_appendprop_addrrange(dtb, rmem_offset, offset, "reg", + (uint32_t)region.base, region.size); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "console-size", region.console_size); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "record-size", region.record_size); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "ftrace-size", region.ftrace_size); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "pmsg-size", region.pmsg_size); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "ecc-size", region.ecc_size); + if (ret < 0) + return 0; + + return 0; +} +DEV_TREE_UPDATE(lk2nd_ramoops_dt_update); + +static void cmd_oem_ramoops_raw(const char *arg, void *data, unsigned sz) +{ + struct ramoops_region region; + + get_ramoops_region(®ion); + fastboot_stage(region.base, region.size); +} +FASTBOOT_REGISTER("oem ramoops raw", cmd_oem_ramoops_raw); + +#define RAMOOPS_KERNMSG_HDR 0x3d3d3d3d /* ==== */ +struct kmsg_hdr { + uint32_t magic; + char time[17]; + char dash; + char compressed; + char newline; + uint8_t data[]; +} __PACKED; + +static void cmd_oem_ramoops_regions(const char *arg, void *data, unsigned sz) +{ + struct ramoops_region region; + struct pram_buf *record; + uint8_t *record_base; + char response[MAX_RSP_SIZE], header[sizeof(struct kmsg_hdr)]; + int i, count; + + get_ramoops_region(®ion); + + record_base = region.base; + record = (struct pram_buf*)record_base; + + fastboot_info("ramoops regions:"); + if (region.dump_size) { + fastboot_info("DUMP:"); + + count = region.dump_size / region.record_size; + for (i = 0; i < count; ++i) { + if (record->size) { + memcpy(header, record->data, sizeof(header)); + header[sizeof(header) - 1] = '\0'; + snprintf(response, sizeof(response), "- (0x%x) 0x%x @ 0x%x: %s", + record->sig, record->size, (uint32_t)record, header); + fastboot_info(response); + } + + record_base += region.record_size; + record = (struct pram_buf*)record_base; + } + } + + if (region.console_size) { + snprintf(response, sizeof(response), "CONSOLE: (0x%x) 0x%x @ (0x%x + 0x%x)", + record->sig, record->size, (uint32_t)record, record->offt); + fastboot_info(response); + + record_base += region.console_size; + record = (struct pram_buf*)record_base; + } + + fastboot_okay(""); + +} +FASTBOOT_REGISTER("oem ramoops regions", cmd_oem_ramoops_regions); + +static void cmd_oem_ramoops_console(const char *arg, void *data, unsigned sz) +{ + struct ramoops_region region; + struct pram_buf *record; + uint8_t *record_base; + + get_ramoops_region(®ion); + + record_base = region.base + region.dump_size; + record = (struct pram_buf*)record_base; + + fastboot_stage(record->data, record->size); +} +FASTBOOT_REGISTER("oem ramoops console", cmd_oem_ramoops_console); + +static void cmd_oem_ramoops_dump(const char *arg, void *data, unsigned sz) +{ + unsigned long size = target_get_max_flash_size(); + void *scratch = target_get_scratch_address(); + struct ramoops_region region; + char response[MAX_RSP_SIZE]; + struct pram_buf *record; + struct kmsg_hdr *header; + uint8_t *record_base; + int ret; + + get_ramoops_region(®ion); + + record_base = region.base; + record = (struct pram_buf*)record_base; + header = (struct kmsg_hdr*)record->data; + + /* + * FIXME: this is pretty much useless right now. + * 1) This only checks the first record, not all of them. + * 2) This can't really work without ECC... + */ + + memset(scratch, 0, record->size); + + if (header->magic != RAMOOPS_KERNMSG_HDR) + fastboot_fail("Dump corrupted."); + + if (header->compressed == 'C') { + ret = uncompress(scratch, &size, header->data, record->size); + snprintf(response, sizeof(response), "ramoops decompress is %d", ret); + fastboot_info(response); + if (ret < 0) + fastboot_fail("Decompression failed."); + } else { + size = record->size - sizeof(struct kmsg_hdr); + memcpy(scratch, header->data, size); + } + + fastboot_stage(scratch, size); +} +FASTBOOT_REGISTER("oem ramoops dump", cmd_oem_ramoops_dump); diff --git a/lk2nd/ramoops/rules.mk b/lk2nd/ramoops/rules.mk new file mode 100644 index 000000000..d8856fbb8 --- /dev/null +++ b/lk2nd/ramoops/rules.mk @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: BSD-3-Clause +LOCAL_DIR := $(GET_LOCAL_DIR) +MODULES += lib/libfdt + +OBJS += \ + $(LOCAL_DIR)/ramoops.o \ From a94d88ef11587498ceec69e5ff661faf6374f79c Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 17 Feb 2024 16:50:51 +0500 Subject: [PATCH 44/59] dts: add wileyfox-marmite --- lk2nd/device/dts/msm8952/msm8937-mtp.dts | 17 +++++++++++++++++ lk2nd/device/dts/msm8952/rules.mk | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 lk2nd/device/dts/msm8952/msm8937-mtp.dts create mode 100644 lk2nd/device/dts/msm8952/rules.mk diff --git a/lk2nd/device/dts/msm8952/msm8937-mtp.dts b/lk2nd/device/dts/msm8952/msm8937-mtp.dts new file mode 100644 index 000000000..91f166115 --- /dev/null +++ b/lk2nd/device/dts/msm8952/msm8937-mtp.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + marmite { + model = "Wileyfox Swift 2"; + compatible = "wileyfox,marmite"; + lk2nd,match-bootloader = "marmite*"; + }; +}; diff --git a/lk2nd/device/dts/msm8952/rules.mk b/lk2nd/device/dts/msm8952/rules.mk new file mode 100644 index 000000000..3105c86b9 --- /dev/null +++ b/lk2nd/device/dts/msm8952/rules.mk @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause +LOCAL_DIR := $(GET_LOCAL_DIR) + +ADTBS += \ + $(LOCAL_DIR)/msm8937-mtp.dtb \ From eb04664178bf27536cb928509629a8a0d8eb27ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Sun, 18 Feb 2024 12:21:00 +0100 Subject: [PATCH 45/59] dts: Fix boot on BQ M5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Apitzsch --- lk2nd/device/dts/msm8916/rules.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index cb0e3250d..69b15d93f 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -1,6 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause LOCAL_DIR := $(GET_LOCAL_DIR) +ADTBS += \ + $(LOCAL_DIR)/msm8939-qrd-skuk.dtb \ + QCDTBS += \ $(LOCAL_DIR)/apq8016-samsung.dtb \ $(LOCAL_DIR)/apq8016-sbc.dtb \ @@ -34,7 +37,6 @@ QCDTBS += \ $(LOCAL_DIR)/msm8939-huawei-kiwi.dtb \ $(LOCAL_DIR)/msm8939-huawei-rio.dtb \ $(LOCAL_DIR)/msm8939-mtp.dtb \ - $(LOCAL_DIR)/msm8939-qrd-skuk.dtb \ $(LOCAL_DIR)/msm8939-qrd-wt82918.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ $(LOCAL_DIR)/msm8939-xiaomi-ido.dtb \ From 72fe0b2157a0cc893fb03b3043ad9542f942d2d6 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 18 Feb 2024 18:38:30 +0500 Subject: [PATCH 46/59] lk2nd: boot: look for dtb without soc vendor prefix --- lk2nd/boot/extlinux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lk2nd/boot/extlinux.c b/lk2nd/boot/extlinux.c index f9c8ce0f6..e163cc71e 100644 --- a/lk2nd/boot/extlinux.c +++ b/lk2nd/boot/extlinux.c @@ -293,6 +293,10 @@ static bool expand_conf(struct label *label, const char *root) if (!fs_file_exists(path)) snprintf(path, sizeof(path), "%s/%s/qcom-%s.dtb", root, label->dtbdir, dtbfiles[i]); + /* boot-deploy drops the vendor dir when copying dtbs. */ + if (!fs_file_exists(path)) + snprintf(path, sizeof(path), "%s/%s/%s.dtb", root, label->dtbdir, dtbfiles[i]); + if (fs_file_exists(path)) { label->dtb = strndup(path, sizeof(path)); break; From b80af8dada876331894149f2518e31791a7445cf Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 25 Oct 2023 11:40:12 +0500 Subject: [PATCH 47/59] lk2nd: util: cmdline: Add helper for getting cmdline argument value --- lk2nd/include/lk2nd/util/cmdline.h | 15 +++++++++++++++ lk2nd/util/cmdline.c | 27 ++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/lk2nd/include/lk2nd/util/cmdline.h b/lk2nd/include/lk2nd/util/cmdline.h index 19d6d1408..4a020eb8b 100644 --- a/lk2nd/include/lk2nd/util/cmdline.h +++ b/lk2nd/include/lk2nd/util/cmdline.h @@ -4,6 +4,21 @@ #include #include +#include + +/** + * lk2nd_cmdline_scan_arg() - Get cmdline argument value. + * @cmdline: The command line (space-separated parameters) + * @arg: The parameter to search for + * @value: Char array to write value of the argument. + * @vlen: Max size of @value. + * + * Return: true if @arg was found in @cmdline, false otherwise. + * If the value was found but has no parameter ('=' sign and + * trailing value), then @value is unchanged. Otherwise @value + * is populated with the argument after '='. + */ +bool lk2nd_cmdline_scan_arg(const char *cmdline, const char *arg, char *value, size_t vlen); /** * lk2nd_cmdline_scan() - Scan for a space-separated parameter in command line. diff --git a/lk2nd/util/cmdline.c b/lk2nd/util/cmdline.c index 919fe3f80..638cf2df2 100644 --- a/lk2nd/util/cmdline.c +++ b/lk2nd/util/cmdline.c @@ -1,9 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause #include -bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) +bool lk2nd_cmdline_scan_arg(const char *cmdline, const char *arg, char *value, size_t vlen) { const char *argp; + size_t i; while (true) { /* Skip spaces */ @@ -11,8 +12,23 @@ bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) /* Compare argument */ for (argp = arg; *argp && *argp == *cmdline; argp++, cmdline++); - if (*argp == '\0' && (*cmdline == '\0' || *cmdline == ' ')) - return true; + if (*argp == '\0') { + if (*cmdline == '\0' || *cmdline == ' ') { + if (value && vlen) + *value = '\0'; + return true; + } else if (*cmdline == '=') { + cmdline++; + + if (value && vlen) { + i = 0; + while (i++ < (vlen-1) && !(*cmdline == '\0' || *cmdline == ' ')) + *value++ = *cmdline++; + *value = '\0'; + } + return true; + } + } /* Skip non-spaces (the rest of the "wrong argument") */ for (; *cmdline != ' '; cmdline++) @@ -20,3 +36,8 @@ bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) return false; } } + +bool lk2nd_cmdline_scan(const char *cmdline, const char *arg) +{ + return lk2nd_cmdline_scan_arg(cmdline, arg, NULL, 0); +} From 50fb654bb9c595e4890f31582b3909940f992013 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 14 Feb 2024 15:52:12 +0500 Subject: [PATCH 48/59] lk2nd: util: lkfdt: add lkfdt_get_phandle --- lk2nd/include/lk2nd/util/lkfdt.h | 12 ++++++++++++ lk2nd/util/lkfdt.c | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/lk2nd/include/lk2nd/util/lkfdt.h b/lk2nd/include/lk2nd/util/lkfdt.h index 9e943d6a4..998b7bf11 100644 --- a/lk2nd/include/lk2nd/util/lkfdt.h +++ b/lk2nd/include/lk2nd/util/lkfdt.h @@ -77,4 +77,16 @@ int lkfdt_lookup_phandle(const void *fdt, int node, const char *prop) __PURE; */ char **lkfdt_stringlist_get_all(const void *fdt, int node, const char *prop, int *lenp); + +/** + * lkfdt_get_phandle - retrieve the phandle of a given node or add a new phandle to it. + * @fdt: pointer to the device tree blob + * @node: structure block offset of the node + * + * This function will add a new phandle property to the node if it doesn't exist. + * + * Return: The phandle value or 0 on error. + */ +uint32_t lkfdt_get_phandle(void *fdt, int node); + #endif /* LK2ND_UTIL_LKFDT_H */ diff --git a/lk2nd/util/lkfdt.c b/lk2nd/util/lkfdt.c index 015ee4a40..d42bf1363 100644 --- a/lk2nd/util/lkfdt.c +++ b/lk2nd/util/lkfdt.c @@ -145,4 +145,23 @@ char **lkfdt_stringlist_get_all(const void *fdt, int node, } +uint32_t lkfdt_get_phandle(void *fdt, int node) +{ + uint32_t ph = fdt_get_phandle(fdt, node); + int ret; + + if (ph) + return ph; + + ret = fdt_generate_phandle(fdt, &ph); + if (ret) + return 0; + + ret = fdt_setprop_u32(fdt, node, "phandle", ph); + if (ret) + return 0; + + return ph; +} + #endif /* WITH_LIB_LIBFDT */ From 11cbddd17db67bb612598cf9d2343433f7ccc42a Mon Sep 17 00:00:00 2001 From: Affe Null Date: Sun, 2 Oct 2022 16:09:32 +0200 Subject: [PATCH 49/59] lk2nd: device: dts: add MSM8909 MTP and MSM8905 QRD SKUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used e.g. for the Nokia 8000 4G and the Nokia 8110 4G Signed-off-by: Otto Pflüger --- lk2nd/device/dts/msm8909/msm8905-qrd-skub.dts | 19 ++++++++++++- lk2nd/device/dts/msm8909/msm8909-mtp.dts | 28 +++++++++++++++++++ lk2nd/device/dts/msm8909/rules.mk | 1 + 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 lk2nd/device/dts/msm8909/msm8909-mtp.dts diff --git a/lk2nd/device/dts/msm8909/msm8905-qrd-skub.dts b/lk2nd/device/dts/msm8909/msm8905-qrd-skub.dts index 274c3e3e9..02ad9eea6 100644 --- a/lk2nd/device/dts/msm8909/msm8905-qrd-skub.dts +++ b/lk2nd/device/dts/msm8909/msm8905-qrd-skub.dts @@ -5,7 +5,8 @@ / { qcom,msm-id = ; - qcom,board-id = ; + qcom,board-id = , + ; }; &lk2nd { @@ -41,4 +42,20 @@ }; }; }; + + nokia-argon { + model = "Nokia 8110 4G"; + compatible = "nokia,argon"; + lk2nd,match-panel; + + lk2nd,dtb-files = "msm8905-nokia-argon"; + + panel { + compatible = "nokia,argon-panel"; + + qcom,mdss_spi_gc9305_v2_qvga_cmd { + compatible = "nokia,argon-gc9305-v2-panel"; + }; + }; + }; }; diff --git a/lk2nd/device/dts/msm8909/msm8909-mtp.dts b/lk2nd/device/dts/msm8909/msm8909-mtp.dts new file mode 100644 index 000000000..1cea90beb --- /dev/null +++ b/lk2nd/device/dts/msm8909/msm8909-mtp.dts @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + nokia-leo { + model = "Nokia 6300 4G"; + compatible = "nokia,leo"; + lk2nd,match-cmdline = "* androidboot.hw.name=leo *"; + + lk2nd,dtb-files = "msm8909-nokia-leo"; + + }; + + nokia-sparkler { + model = "Nokia 8000 4G"; + compatible = "nokia,sparkler"; + lk2nd,match-cmdline = "* androidboot.hw.name=sparkler *"; + + lk2nd,dtb-files = "msm8909-nokia-sparkler"; + }; +}; diff --git a/lk2nd/device/dts/msm8909/rules.mk b/lk2nd/device/dts/msm8909/rules.mk index 5b9072e11..44a13fda4 100644 --- a/lk2nd/device/dts/msm8909/rules.mk +++ b/lk2nd/device/dts/msm8909/rules.mk @@ -3,3 +3,4 @@ LOCAL_DIR := $(GET_LOCAL_DIR) ADTBS += \ $(LOCAL_DIR)/msm8905-qrd-skub.dtb \ + $(LOCAL_DIR)/msm8909-mtp.dtb \ From ba3b1a96a393611f18f26b87e6464ff3f50ee35e Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 24 Feb 2024 15:52:31 +0500 Subject: [PATCH 50/59] target: msm8909: Implement target_get_second_mmc() --- platform/msm8909/include/platform/iomap.h | 1 + target/msm8909/init.c | 41 ++++++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/platform/msm8909/include/platform/iomap.h b/platform/msm8909/include/platform/iomap.h index 599199726..fdfcdda4b 100755 --- a/platform/msm8909/include/platform/iomap.h +++ b/platform/msm8909/include/platform/iomap.h @@ -170,6 +170,7 @@ #define SDCC1_N (CLK_CTL_BASE + 0x42010) /* n */ #define SDCC1_D (CLK_CTL_BASE + 0x42014) /* d */ +#define SDC2_HDRV_PULL_CTL (TLMM_BASE_ADDR + 0x109000) #define SDCC2_BCR (CLK_CTL_BASE + 0x43000) /* block reset */ #define SDCC2_APPS_CBCR (CLK_CTL_BASE + 0x43018) /* branch control */ #define SDCC2_AHB_CBCR (CLK_CTL_BASE + 0x4301C) diff --git a/target/msm8909/init.c b/target/msm8909/init.c index 7fbdf8558..85ebc3596 100644 --- a/target/msm8909/init.c +++ b/target/msm8909/init.c @@ -127,7 +127,7 @@ static uint32_t mmc_sdhci_base[] = static uint32_t mmc_sdc_pwrctl_irq[] = { SDCC1_PWRCTL_IRQ, SDCC2_PWRCTL_IRQ }; -static void set_sdc_power_ctrl(void); +static void set_sdc_power_ctrl(int slot); static void set_ebi2_config(void); void update_ptable_names(void) @@ -188,7 +188,7 @@ void target_sdc_init(void) struct mmc_config_data config; /* Set drive strength & pull ctrl values */ - set_sdc_power_ctrl(); + set_sdc_power_ctrl(1); config.bus_width = DATA_BUS_WIDTH_8BIT; config.max_clk_rate = MMC_CLK_177MHZ; @@ -202,6 +202,7 @@ void target_sdc_init(void) if (!(dev = mmc_init(&config))) { /* Try slot 2 */ + set_sdc_power_ctrl(2); config.slot = 2; config.max_clk_rate = MMC_CLK_200MHZ; config.sdhc_base = mmc_sdhci_base[config.slot - 1]; @@ -215,6 +216,26 @@ void target_sdc_init(void) } } +struct mmc_device *target_get_sd_mmc(void) +{ + struct mmc_config_data config; + + if (dev->config.slot == 2) + return NULL; + + set_sdc_power_ctrl(2); + + config.slot = 2; + config.bus_width = DATA_BUS_WIDTH_8BIT; + config.max_clk_rate = MMC_CLK_200MHZ; + config.sdhc_base = mmc_sdhci_base[config.slot - 1]; + config.pwrctl_base = mmc_pwrctl_base[config.slot - 1]; + config.pwr_irq = mmc_sdc_pwrctl_irq[config.slot - 1]; + config.hs400_support = 0; + + return mmc_init(&config); +} + void *target_mmc_device(void) { return (void *) dev; @@ -281,22 +302,24 @@ static void target_keystatus(void) } -static void set_sdc_power_ctrl(void) +static void set_sdc_power_ctrl(int slot) { + uint32_t reg = (slot == 1 ? SDC1_HDRV_PULL_CTL : SDC2_HDRV_PULL_CTL); + /* Drive strength configs for sdc pins */ struct tlmm_cfgs sdc1_hdrv_cfg[] = { - { SDC1_CLK_HDRV_CTL_OFF, TLMM_CUR_VAL_16MA, TLMM_HDRV_MASK, SDC1_HDRV_PULL_CTL }, - { SDC1_CMD_HDRV_CTL_OFF, TLMM_CUR_VAL_10MA, TLMM_HDRV_MASK, SDC1_HDRV_PULL_CTL }, - { SDC1_DATA_HDRV_CTL_OFF, TLMM_CUR_VAL_10MA, TLMM_HDRV_MASK, SDC1_HDRV_PULL_CTL }, + { SDC1_CLK_HDRV_CTL_OFF, TLMM_CUR_VAL_16MA, TLMM_HDRV_MASK, reg }, + { SDC1_CMD_HDRV_CTL_OFF, TLMM_CUR_VAL_10MA, TLMM_HDRV_MASK, reg }, + { SDC1_DATA_HDRV_CTL_OFF, TLMM_CUR_VAL_10MA, TLMM_HDRV_MASK, reg }, }; /* Pull configs for sdc pins */ struct tlmm_cfgs sdc1_pull_cfg[] = { - { SDC1_CLK_PULL_CTL_OFF, TLMM_NO_PULL, TLMM_PULL_MASK, SDC1_HDRV_PULL_CTL }, - { SDC1_CMD_PULL_CTL_OFF, TLMM_PULL_UP, TLMM_PULL_MASK, SDC1_HDRV_PULL_CTL }, - { SDC1_DATA_PULL_CTL_OFF, TLMM_PULL_UP, TLMM_PULL_MASK, SDC1_HDRV_PULL_CTL }, + { SDC1_CLK_PULL_CTL_OFF, TLMM_NO_PULL, TLMM_PULL_MASK, reg }, + { SDC1_CMD_PULL_CTL_OFF, TLMM_PULL_UP, TLMM_PULL_MASK, reg }, + { SDC1_DATA_PULL_CTL_OFF, TLMM_PULL_UP, TLMM_PULL_MASK, reg }, }; /* Set the drive strength & pull control values */ From 94129f9e7763eab195578883a6117d5d71575b83 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 27 Feb 2024 14:43:15 +0500 Subject: [PATCH 51/59] dts: msm8916: Add G360T --- lk2nd/device/dts/msm8916/msm8916-samsung.dts | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lk2nd/device/dts/msm8916/msm8916-samsung.dts b/lk2nd/device/dts/msm8916/msm8916-samsung.dts index 8dd0bc492..0481a6c86 100644 --- a/lk2nd/device/dts/msm8916/msm8916-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8916-samsung.dts @@ -626,6 +626,35 @@ /* rev 6 */ + coreprimelte { + model = "Samsung Galaxy Core Prime LTE (SM-G360T)"; + compatible = "samsung,coreprimelte", "samsung,cprime"; + lk2nd,match-bootloader = "G360T*"; + + lk2nd,dtb-files = "msm8916-samsung-cprime"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 6>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x14>; + i2c-sda-gpios = <&tlmm 2 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 3 I2C_GPIO_FLAGS>; + }; + + panel { + compatible = "samsung,cprime-panel", "lk2nd,panel"; + + ss_dsi_panel_HX8369B_BV045WVM_WVGA { + compatible = "samsung,hx8369b-bv045wvm"; + }; + ss_dsi_panel_SC7798A_BV045WVM_WVGA { + compatible = "samsung,sc7798a-bv045wvm"; + }; + }; + }; + e7000 { model = "Samsung Galaxy E7 (SM-E7000)"; compatible = "samsung,e7000", "samsung,e7"; From 86ffbc400cb3c21aaf05a57e2135335e342f63d2 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Thu, 11 May 2023 16:36:54 +0500 Subject: [PATCH 52/59] lk2nd: display: Add simple-framebuffer provisioning --- lk2nd/display/rules.mk | 3 + lk2nd/display/simplefb.c | 138 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 lk2nd/display/simplefb.c diff --git a/lk2nd/display/rules.mk b/lk2nd/display/rules.mk index baa44efc3..7f218ae78 100644 --- a/lk2nd/display/rules.mk +++ b/lk2nd/display/rules.mk @@ -4,6 +4,9 @@ LOCAL_DIR := $(GET_LOCAL_DIR) # Filter out original panel implementation OBJS := $(filter-out target/$(TARGET)/oem_panel.o, $(OBJS)) +OBJS += \ + $(LOCAL_DIR)/simplefb.o + ifeq ($(LK2ND_DISPLAY), cont-splash) include $(LOCAL_DIR)/cont-splash/rules.mk else diff --git a/lk2nd/display/simplefb.c b/lk2nd/display/simplefb.c new file mode 100644 index 000000000..49c2993d0 --- /dev/null +++ b/lk2nd/display/simplefb.c @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* Copyright (c) 2023, Nikita Travkin */ + +#include +#include +#include +#include +#include + +#include +#include + +/* + * simplefb.c - Pass lk2nd's framebuffer to the OS. + * + * It might be useful to pass already enabled framebuffer to + * the next OS. This module creates/fills simple-framebffer + * node if this is requested on the cmdline. + */ + +static int lk2nd_simplefb_dt_update(void *dtb, const char *cmdline, + enum boot_type boot_type) +{ + struct fbcon_config *fb = fbcon_display(); + int ret, resmem_offset, chosen_offset, offset; + uint32_t mem_ph, fb_size; + char tmp[32]; + + if (!fb) + return 0; + + fb_size = fb->stride * fb->bpp/8 * fb->height; + + if (boot_type & (BOOT_DOWNSTREAM | BOOT_LK2ND)) + return 0; + + if (!lk2nd_cmdline_scan(cmdline, "lk2nd.pass-simplefb")) + return 0; + + resmem_offset = fdt_path_offset(dtb, "/reserved-memory"); + if (resmem_offset < 0) + return 0; + + // TODO: Probably want to check if the node already exists + snprintf(tmp, sizeof(tmp), "cont-splash@%08x", (uint32_t)fb->base); + offset = fdt_add_subnode(dtb, resmem_offset, tmp); + if (offset < 0) + return 0; + + ret = fdt_appendprop_addrrange(dtb, resmem_offset, offset, "reg", (uint32_t)fb->base, fb_size); + if (ret < 0) + return 0; + + ret = fdt_setprop_empty(dtb, offset, "no-map"); + if (ret < 0) + return 0; + + mem_ph = lkfdt_get_phandle(dtb, offset); + if (!mem_ph) + return 0; + + chosen_offset = fdt_path_offset(dtb, "/chosen"); + if (chosen_offset < 0) + return 0; + + if (!fdt_getprop(dtb, chosen_offset, "#address-cells", &ret) && ret == -FDT_ERR_NOTFOUND) { + ret = fdt_setprop_u32(dtb, chosen_offset, "#address-cells", fdt_address_cells(dtb, 0)); + if (ret < 0) + return 0; + } + + if (!fdt_getprop(dtb, chosen_offset, "#size-cells", &ret) && ret == -FDT_ERR_NOTFOUND) { + ret = fdt_setprop_u32(dtb, chosen_offset, "#size-cells", fdt_size_cells(dtb, 0)); + if (ret < 0) + return 0; + } + + offset = fdt_node_offset_by_compatible(dtb, -1, "simple-framebuffer"); + if (offset < 0 && offset != -FDT_ERR_NOTFOUND) + return 0; + + if (offset == -FDT_ERR_NOTFOUND) { + snprintf(tmp, sizeof(tmp), "framebuffer@%08x", (uint32_t)fb->base); + offset = fdt_add_subnode(dtb, chosen_offset, tmp); + if (offset < 0) + return 0; + + ret = fdt_setprop_string(dtb, offset, "compatible", "simple-framebuffer"); + if (ret < 0) + return 0; + } + + ret = fdt_setprop_empty(dtb, offset, "reg"); + if (ret < 0) + return 0; + + ret = fdt_appendprop_addrrange(dtb, chosen_offset, offset, "reg", (uint32_t)fb->base, fb_size); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "memory-region", mem_ph); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "width", fb->width); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "height", fb->height); + if (ret < 0) + return 0; + + ret = fdt_setprop_u32(dtb, offset, "stride", fb->stride * fb->bpp/8); + if (ret < 0) + return 0; + + switch (fb->format) { + case FB_FORMAT_RGB565: + ret = fdt_setprop_string(dtb, offset, "format", "r5g6b5"); + break; + + case FB_FORMAT_RGB888: + ret = fdt_setprop_string(dtb, offset, "format", "r8g8b8"); + break; + + default: + return 0; + } + if (ret < 0) + return 0; + + ret = fdt_setprop_string(dtb, offset, "status", "okay"); + if (ret < 0) + return 0; + + return 0; +} +DEV_TREE_UPDATE(lk2nd_simplefb_dt_update); From e529f491045def5b2c268894ef94ac111578ebe5 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Fri, 23 Feb 2024 12:46:22 +0500 Subject: [PATCH 53/59] lk2nd: display: simplefb: Allow enabling autorefresh --- lk2nd/display/cont-splash/cont-splash.h | 1 + lk2nd/display/cont-splash/refresh.c | 37 +++++++++++++++++++++++++ lk2nd/display/simplefb.c | 11 ++++++-- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/lk2nd/display/cont-splash/cont-splash.h b/lk2nd/display/cont-splash/cont-splash.h index dc1564619..2ec3e7938 100644 --- a/lk2nd/display/cont-splash/cont-splash.h +++ b/lk2nd/display/cont-splash/cont-splash.h @@ -7,5 +7,6 @@ struct fbcon_config; bool mdp_read_dma_config(struct fbcon_config *fb); bool mdp_read_pipe_config(struct fbcon_config *fb); bool mdp_setup_refresh(struct fbcon_config *fb); +void mdp_enable_autorefresh(struct fbcon_config *fb); #endif /* LK2ND_DISPLAY_CONT_SPLASH_H */ diff --git a/lk2nd/display/cont-splash/refresh.c b/lk2nd/display/cont-splash/refresh.c index 7e7d1f7d0..099b0693a 100644 --- a/lk2nd/display/cont-splash/refresh.c +++ b/lk2nd/display/cont-splash/refresh.c @@ -106,3 +106,40 @@ bool mdp_setup_refresh(struct fbcon_config *fb) return true; } + +#ifdef MDSS_MDP_REG_PP_AUTOREFRESH_CONFIG /* MDP5 */ + +#define MDP_PP_SYNC_CONFIG_VSYNC 0x004 +#define MDP_PP_AUTOREFRESH_CONFIG 0x030 + +static void mdp5_enable_auto_refresh(struct fbcon_config *fb) +{ + uint32_t vsync_count = 19200000 / (fb->height * 60); /* 60 fps */ + uint32_t mdss_mdp_rev = readl(MDP_HW_REV); + uint32_t pp0_base; + + if (mdss_mdp_rev >= MDSS_MDP_HW_REV_105) + pp0_base = REG_MDP(0x71000); + else if (mdss_mdp_rev >= MDSS_MDP_HW_REV_102) + pp0_base = REG_MDP(0x12D00); + else + pp0_base = REG_MDP(0x21B00); + + writel(vsync_count | BIT(19), pp0_base + MDP_PP_SYNC_CONFIG_VSYNC); + writel(BIT(31) | 1, pp0_base + MDP_PP_AUTOREFRESH_CONFIG); + writel(1, MDP_CTL_0_BASE + CTL_START); +} +#endif + +void mdp_enable_autorefresh(struct fbcon_config *fb) +{ + if (!fb || !fb->update_start) + return; + + fb->update_start = NULL; + thread_sleep(42); + +#ifdef MDSS_MDP_REG_PP_AUTOREFRESH_CONFIG /* MDP5 */ + mdp5_enable_auto_refresh(fb); +#endif +} diff --git a/lk2nd/display/simplefb.c b/lk2nd/display/simplefb.c index 49c2993d0..7d6ac7c16 100644 --- a/lk2nd/display/simplefb.c +++ b/lk2nd/display/simplefb.c @@ -10,6 +10,8 @@ #include #include +#include "cont-splash/cont-splash.h" + /* * simplefb.c - Pass lk2nd's framebuffer to the OS. * @@ -24,7 +26,7 @@ static int lk2nd_simplefb_dt_update(void *dtb, const char *cmdline, struct fbcon_config *fb = fbcon_display(); int ret, resmem_offset, chosen_offset, offset; uint32_t mem_ph, fb_size; - char tmp[32]; + char tmp[32], args[16]; if (!fb) return 0; @@ -34,7 +36,7 @@ static int lk2nd_simplefb_dt_update(void *dtb, const char *cmdline, if (boot_type & (BOOT_DOWNSTREAM | BOOT_LK2ND)) return 0; - if (!lk2nd_cmdline_scan(cmdline, "lk2nd.pass-simplefb")) + if (!lk2nd_cmdline_scan_arg(cmdline, "lk2nd.pass-simplefb", args, sizeof(args))) return 0; resmem_offset = fdt_path_offset(dtb, "/reserved-memory"); @@ -133,6 +135,11 @@ static int lk2nd_simplefb_dt_update(void *dtb, const char *cmdline, if (ret < 0) return 0; + if (!strcmp(args, "autorefresh")) { + dprintf(INFO, "simplefb: Enabling autorefresh\n"); + mdp_enable_autorefresh(fb); + } + return 0; } DEV_TREE_UPDATE(lk2nd_simplefb_dt_update); From 651ce446422c3e02c07bd7ede8490c0dde6819c4 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Tue, 5 Mar 2024 16:21:17 +0500 Subject: [PATCH 54/59] lk2nd: display: cont-splash: Add autorefresh for mdp3 --- lk2nd/display/cont-splash/refresh.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lk2nd/display/cont-splash/refresh.c b/lk2nd/display/cont-splash/refresh.c index 099b0693a..9b71a92ba 100644 --- a/lk2nd/display/cont-splash/refresh.c +++ b/lk2nd/display/cont-splash/refresh.c @@ -131,6 +131,24 @@ static void mdp5_enable_auto_refresh(struct fbcon_config *fb) } #endif +#ifdef MDP_AUTOREFRESH_CONFIG_P /* MDP3/MDP4 */ + +#define MDP_AUTOREFRESH_CONFIG_P REG_MDP(0x34C) +#define MDP_SYNC_CONFIG_0 REG_MDP(0x300) + +static void mdp3_enable_auto_refresh(struct fbcon_config *fb) +{ + uint32_t sync_cfg = 0; + + sync_cfg |= (fb->height - 1) << 21; + sync_cfg |= BIT(19); + sync_cfg |= 19200000 / (fb->height * 60); /* 60 fps */ + + writel(sync_cfg, MDP_SYNC_CONFIG_0); + writel(BIT(28) | 1, MDP_AUTOREFRESH_CONFIG_P); +} +#endif + void mdp_enable_autorefresh(struct fbcon_config *fb) { if (!fb || !fb->update_start) @@ -142,4 +160,7 @@ void mdp_enable_autorefresh(struct fbcon_config *fb) #ifdef MDSS_MDP_REG_PP_AUTOREFRESH_CONFIG /* MDP5 */ mdp5_enable_auto_refresh(fb); #endif +#ifdef MDP_AUTOREFRESH_CONFIG_P /* MDP3/MDP4 */ + mdp3_enable_auto_refresh(fb); +#endif } From a4f60cef48421062eef10c6ff35f70ff9791a06b Mon Sep 17 00:00:00 2001 From: Raymond Hackley Date: Wed, 6 Mar 2024 12:20:08 +0000 Subject: [PATCH 55/59] dts: msm8916-samsung: rename to cprimeltetmo for SM-G360T --- lk2nd/device/dts/msm8916/msm8916-samsung.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lk2nd/device/dts/msm8916/msm8916-samsung.dts b/lk2nd/device/dts/msm8916/msm8916-samsung.dts index 0481a6c86..309cf9203 100644 --- a/lk2nd/device/dts/msm8916/msm8916-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8916-samsung.dts @@ -626,9 +626,9 @@ /* rev 6 */ - coreprimelte { + cprimeltetmo { model = "Samsung Galaxy Core Prime LTE (SM-G360T)"; - compatible = "samsung,coreprimelte", "samsung,cprime"; + compatible = "samsung,cprimeltetmo", "samsung,cprime"; lk2nd,match-bootloader = "G360T*"; lk2nd,dtb-files = "msm8916-samsung-cprime"; From bfa952ef4df883ac77049dfab326795f8f2a0389 Mon Sep 17 00:00:00 2001 From: "Lin, Meng-Bo" Date: Wed, 6 Mar 2024 12:58:05 +0000 Subject: [PATCH 56/59] dts: msm8939-samsung: fix Galaxy A7 dtb --- lk2nd/device/dts/msm8916/msm8929-samsung.dts | 2 +- lk2nd/device/dts/msm8916/msm8939-samsung.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lk2nd/device/dts/msm8916/msm8929-samsung.dts b/lk2nd/device/dts/msm8916/msm8929-samsung.dts index 53981272a..894db629e 100644 --- a/lk2nd/device/dts/msm8916/msm8929-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8929-samsung.dts @@ -137,7 +137,7 @@ compatible = "samsung,a7ltezt", "samsung,a7"; lk2nd,match-bootloader = "A700YD*"; - lk2nd,dtb-files = "msm8916-samsung-a7"; + lk2nd,dtb-files = "msm8939-samsung-a7"; qcom,msm-id = ; qcom,board-id = <0xEF08FF1 1>; diff --git a/lk2nd/device/dts/msm8916/msm8939-samsung.dts b/lk2nd/device/dts/msm8916/msm8939-samsung.dts index a93fbbcbb..e33cc5fc3 100644 --- a/lk2nd/device/dts/msm8916/msm8939-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8939-samsung.dts @@ -18,7 +18,7 @@ compatible = "samsung,a7ltezt", "samsung,a7"; lk2nd,match-bootloader = "A700YD*"; - lk2nd,dtb-files = "msm8916-samsung-a7"; + lk2nd,dtb-files = "msm8939-samsung-a7"; qcom,msm-id = ; qcom,board-id = <0xEF08FF1 1>; From 1680e9b731274229b0b6f71580e126b0a25b9fe2 Mon Sep 17 00:00:00 2001 From: "Lin, Meng-Bo" Date: Wed, 6 Mar 2024 13:06:08 +0000 Subject: [PATCH 57/59] dts: msm8916-samsung: add j5xnltezt --- lk2nd/device/dts/msm8916/msm8916-samsung.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lk2nd/device/dts/msm8916/msm8916-samsung.dts b/lk2nd/device/dts/msm8916/msm8916-samsung.dts index 309cf9203..85f0bbc70 100644 --- a/lk2nd/device/dts/msm8916/msm8916-samsung.dts +++ b/lk2nd/device/dts/msm8916/msm8916-samsung.dts @@ -503,6 +503,24 @@ }; }; + j5xnltezt { + model = "Samsung Galaxy J5 2016 (SM-J510UN)"; + compatible = "samsung,j5xnlte", "samsung,j5x"; + lk2nd,match-bootloader = "J510UN*"; + + lk2nd,dtb-files = "msm8916-samsung-j5x"; + + qcom,msm-id = ; + qcom,board-id = <0xCE08FF01 4>; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x25>; + i2c-sda-gpios = <&tlmm 105 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 106 I2C_GPIO_FLAGS>; + }; + }; + grandmaxlteub { model = "Samsung Galaxy Grand Max (SM-G720AX)"; compatible = "samsung,grandmaxlteub", "samsung,grandmax"; From 6a69b161b6a98fafb34b1af2bb918fe8f3ce72e1 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Wed, 6 Mar 2024 18:28:40 +0500 Subject: [PATCH 58/59] dts: msm8916: don't build m8qlul by default. --- lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts | 4 ++-- lk2nd/device/dts/msm8916/rules.mk | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts b/lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts index 05864500f..45eba4be6 100644 --- a/lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts +++ b/lk2nd/device/dts/msm8916/msm8939-htc-m8qlul.dts @@ -4,8 +4,8 @@ #include /* - * To build for htc-m8qlul, comment out all dtbs and add - * $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb to rules.mk in this directory. + * To build for htc-m8qlul, add LK2ND_QCDTBS="msm8939-htc-m8qlul.dtb" to + * your make cmdline. * m8qlul does not work with all dtbs enabled; the bootloader gets upset and * goes into the phone's fastboot. */ diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 69b15d93f..3766b1b15 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -33,7 +33,6 @@ QCDTBS += \ $(LOCAL_DIR)/msm8929-samsung.dtb \ $(LOCAL_DIR)/msm8929-qrd-wt82918.dtb \ $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ - $(LOCAL_DIR)/msm8939-htc-m8qlul.dtb \ $(LOCAL_DIR)/msm8939-huawei-kiwi.dtb \ $(LOCAL_DIR)/msm8939-huawei-rio.dtb \ $(LOCAL_DIR)/msm8939-mtp.dtb \ From 25a5934d69951f8d66895e0112fc3726252320ad Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sun, 10 Mar 2024 11:34:44 +0500 Subject: [PATCH 59/59] dts: msm8916: Update wt82918 variants --- ...-wt82918.dts => msm8929-qrd-wt82918hd.dts} | 8 ++++- .../dts/msm8916/msm8939-qrd-wt82918.dts | 10 ++++-- .../dts/msm8916/msm8939-qrd-wt82918hd.dts | 33 +++++++++++++++++++ lk2nd/device/dts/msm8916/rules.mk | 3 +- 4 files changed, 49 insertions(+), 5 deletions(-) rename lk2nd/device/dts/msm8916/{msm8929-qrd-wt82918.dts => msm8929-qrd-wt82918hd.dts} (72%) create mode 100644 lk2nd/device/dts/msm8916/msm8939-qrd-wt82918hd.dts diff --git a/lk2nd/device/dts/msm8916/msm8929-qrd-wt82918.dts b/lk2nd/device/dts/msm8916/msm8929-qrd-wt82918hd.dts similarity index 72% rename from lk2nd/device/dts/msm8916/msm8929-qrd-wt82918.dts rename to lk2nd/device/dts/msm8916/msm8929-qrd-wt82918hd.dts index a8bca00d1..83f121a26 100644 --- a/lk2nd/device/dts/msm8916/msm8929-qrd-wt82918.dts +++ b/lk2nd/device/dts/msm8916/msm8929-qrd-wt82918hd.dts @@ -20,8 +20,14 @@ qcom,mdss_dsi_hx8394f_boe_720p_video { compatible = "wingtech,boe-hx8394f"; }; - qcom,mdss_dsi_ili9881c_otm_720p_video { + qcom,mdss_dsi_ili9881c_720p_video { compatible = "wingtech,otm-ili9881c"; }; + qcom,mdss_dsi_otm1901a_tm_1080p_video { + compatible = "wingtech,tm-otm1901a"; + }; + qcom,mdss_dsi_nt35596_1080p_video { + compatible = "wingtech,nt35595"; + }; }; }; diff --git a/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts b/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts index 1896f8a53..e36c75696 100644 --- a/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts +++ b/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918.dts @@ -12,11 +12,17 @@ model = "Lenovo Vibe K5 (Wingtech WT82918)"; compatible = "wingtech,wt82918"; - //FIXME: lk2nd,dtb-files = "msm8939-wingtech-wt82918", "msm8929-wingtech-wt82918hd"; + lk2nd,dtb-files = "msm8939-wingtech-wt82918", "msm8929-wingtech-wt82918hd"; panel { compatible = "wingtech,wt82918-panel", "lk2nd,panel"; + qcom,mdss_dsi_hx8394f_boe_720p_video { + compatible = "wingtech,boe-hx8394f"; + }; + qcom,mdss_dsi_ili9881c_720p_video { + compatible = "wingtech,otm-ili9881c"; + }; qcom,mdss_dsi_otm1901a_tm_1080p_video { compatible = "wingtech,tm-otm1901a"; }; @@ -24,6 +30,4 @@ compatible = "wingtech,nt35595"; }; }; - }; - diff --git a/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918hd.dts b/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918hd.dts new file mode 100644 index 000000000..e6c442962 --- /dev/null +++ b/lk2nd/device/dts/msm8916/msm8939-qrd-wt82918hd.dts @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include +#include + +/ { + qcom,msm-id = ; + qcom,board-id = ; +}; + +&lk2nd { + model = "Lenovo Vibe K5 (Wingtech WT82918)"; + compatible = "wingtech,wt82918"; + + lk2nd,dtb-files = "msm8939-wingtech-wt82918", "msm8929-wingtech-wt82918hd"; + + panel { + compatible = "wingtech,wt82918-panel", "lk2nd,panel"; + + qcom,mdss_dsi_hx8394f_boe_720p_video { + compatible = "wingtech,boe-hx8394f"; + }; + qcom,mdss_dsi_ili9881c_720p_video { + compatible = "wingtech,otm-ili9881c"; + }; + qcom,mdss_dsi_otm1901a_tm_1080p_video { + compatible = "wingtech,tm-otm1901a"; + }; + qcom,mdss_dsi_nt35596_1080p_video { + compatible = "wingtech,nt35595"; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8916/rules.mk b/lk2nd/device/dts/msm8916/rules.mk index 3766b1b15..7d550696e 100644 --- a/lk2nd/device/dts/msm8916/rules.mk +++ b/lk2nd/device/dts/msm8916/rules.mk @@ -31,11 +31,12 @@ QCDTBS += \ $(LOCAL_DIR)/msm8916-samsung.dtb \ $(LOCAL_DIR)/msm8916-vivo-y21l.dtb \ $(LOCAL_DIR)/msm8929-samsung.dtb \ - $(LOCAL_DIR)/msm8929-qrd-wt82918.dtb \ + $(LOCAL_DIR)/msm8929-qrd-wt82918hd.dtb \ $(LOCAL_DIR)/msm8939-asus-z00t.dtb \ $(LOCAL_DIR)/msm8939-huawei-kiwi.dtb \ $(LOCAL_DIR)/msm8939-huawei-rio.dtb \ $(LOCAL_DIR)/msm8939-mtp.dtb \ $(LOCAL_DIR)/msm8939-qrd-wt82918.dtb \ + $(LOCAL_DIR)/msm8939-qrd-wt82918hd.dtb \ $(LOCAL_DIR)/msm8939-samsung.dtb \ $(LOCAL_DIR)/msm8939-xiaomi-ido.dtb \