diff --git a/Documentation/devices.md b/Documentation/devices.md index 4aac27957..569120e5b 100644 --- a/Documentation/devices.md +++ b/Documentation/devices.md @@ -158,6 +158,9 @@ - LG V20 - h990 - OnePlus 3T +- Samsung Galaxy Note 7 (2016) - SM-N9300, SM-N9308, SM-N930W8, SM-N930AZ, SM-N930A, SM-N930T1, SM-N930R6, SM-N930R7, SM-N930P, SM-N930T, SM-N930R4, SM-N930V, SM-N930U +- Samsung Galaxy S7 (2016) - SM-G9300, SM-G9308, SM-G930AZ, SM-G930A, SM-G930T1, SM-G930R6, SM-G930R7, SM-G930P, SM-G930T, SM-G930R4, SM-G930V, SM-G930VL, SM-G930U +- Samsung Galaxy S7 Edge (2016) - SM-G9350, SM-G935AZ, SM-G935A, SM-G935T1, SM-G935R6, SM-G935R7, SM-G935P, SM-G935T, SM-G935R4, SM-G935V, SM-G935VL, SM-G935U - Xiaomi Mi5 - Gemini ### lk2nd-msm8960 diff --git a/lk2nd/device/dts/msm8996/msm8996-samsung.dts b/lk2nd/device/dts/msm8996/msm8996-samsung.dts new file mode 100644 index 000000000..7b19e9346 --- /dev/null +++ b/lk2nd/device/dts/msm8996/msm8996-samsung.dts @@ -0,0 +1,212 @@ +// 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 = , + , + , + , + , + , + , + , + , + , + , + , + ; + qcom,pmic-id = <0x20009 0x1000C 0x0 0x0>; + + /* bootloader refuses the dtb if it cannot delete some nodes. */ + soc { + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0x0 0xffffffff>; + compatible = "simple-bus"; + + qcom,memshare { + compatible = "qcom,memshare"; + memory-region = <&modem_shared_mem>; + + qcom,client_1 { + compatible = "qcom,memshare-peripheral"; + qcom,peripheral-size = <0x0>; + qcom,client-id = <1>; + label = "modem"; + }; + }; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + lk_region: lk_region@0 { + compatible = "removed-dma-pool"; + no-map; + reg = <0x0 0x84C00000 0x0 0x00400000>; + + }; + + sec_debug_region: sec_debug_region@0 { + compatible = "removed-dma-pool"; + no-map; + reg = <0x0 0x85000000 0x0 0x00800000>; + }; + + klog_region: klog_region@0 { + compatible = "removed-dma-pool"; + no-map; + reg = <0x0 0x851FF000 0x0 0x00201000>; + }; + + modem_shared_mem: modem_shared_mem_region@0x93000000 { + compatible = "removed-dma-pool"; + no-map; + reg = <0x0 0x93000000 0x0 0x6000000>; + }; + }; +}; + +&lk2nd { + graceqlte { + model = "Samsung Galaxy Note 7"; + compatible = "samsung,graceqlte"; + lk2nd,match-bootloader = "N930*"; + + lk2nd,dtb-files = "msm8996-samsung-graceqlte"; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x66>; + i2c-sda-gpios = <&tlmm 33 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 32 I2C_GPIO_FLAGS>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + home-key { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + vol-up-key { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + panel { + compatible = "samsung,graceqlte-panel", "lk2nd,panel"; + + ss_dsi_panel_PBA_BOOTING_HD { + compatible = "samsung,ea8061v-ams391dt01"; + }; + ss_dsi_panel_S6E3HF4_AMB526JS01_WQHD { + compatible = "samsung,s6e3hf4-amb526js01"; + }; + ss_dsi_panel_S6E3HA5_AMB567MK01_WQHD { + compatible = "samsung,s6e3ha5-amb567mk01"; + }; + }; + }; + + heroqlte { + model = "Samsung Galaxy S7"; + compatible = "samsung,heroqlte"; + lk2nd,match-bootloader = "G930*"; + + lk2nd,dtb-files = "msm8996-samsung-heroqlte"; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x66>; + i2c-sda-gpios = <&tlmm 33 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 32 I2C_GPIO_FLAGS>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + home-key { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + vol-up-key { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + panel { + compatible = "samsung,heroqlte-panel", "lk2nd,panel"; + + ss_dsi_panel_PBA_BOOTING_HD { + compatible = "samsung,ea8061v-ams391dt01"; + }; + ss_dsi_panel_S6E3HA2_AMS509ES01_WQHD { + compatible = "samsung,s6e3ha2-ams509es01"; + }; + ss_dsi_panel_S6E3HA3_AMS567JA01_WQHD { + compatible = "samsung,s6e3ha3-ams567ja01"; + }; + ss_dsi_panel_S6E3HF4_AMB526JS01_WQHD { + compatible = "samsung,s6e3hf4-amb526js01"; + }; + }; + }; + + hero2qlte { + model = "Samsung Galaxy S7 Edge"; + compatible = "samsung,hero2qlte"; + lk2nd,match-bootloader = "G935*"; + + lk2nd,dtb-files = "msm8996-samsung-hero2qlte"; + + muic-reset { + compatible = "samsung,muic-reset"; + i2c-reg = <0x66>; + i2c-sda-gpios = <&tlmm 33 I2C_GPIO_FLAGS>; + i2c-scl-gpios = <&tlmm 32 I2C_GPIO_FLAGS>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + home-key { + lk2nd,code = ; + gpios = <&pmic 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + vol-up-key { + lk2nd,code = ; + gpios = <&pmic 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + panel { + compatible = "samsung,hero2qlte-panel", "lk2nd,panel"; + + ss_dsi_panel_PBA_BOOTING_HD { + compatible = "samsung,ea8061v-ams391dt01"; + }; + ss_dsi_panel_S6E3HA2_AMS509ES01_WQHD { + compatible = "samsung,s6e3ha2-ams509es01"; + }; + ss_dsi_panel_S6E3HA3_AMS567JA01_WQHD { + compatible = "samsung,s6e3ha3-ams567ja01"; + }; + ss_dsi_panel_S6E3HF4_AMB526JS01_WQHD { + compatible = "samsung,s6e3hf4-amb526js01"; + }; + }; + }; +}; diff --git a/lk2nd/device/dts/msm8996/rules.mk b/lk2nd/device/dts/msm8996/rules.mk index e6d5865c0..b0e2ffe37 100644 --- a/lk2nd/device/dts/msm8996/rules.mk +++ b/lk2nd/device/dts/msm8996/rules.mk @@ -4,4 +4,5 @@ LOCAL_DIR := $(GET_LOCAL_DIR) ADTBS += \ $(LOCAL_DIR)/msm8996pro-oneplus3t.dtb \ $(LOCAL_DIR)/msm8996-lg-h990.dtb \ + $(LOCAL_DIR)/msm8996-samsung.dtb \ $(LOCAL_DIR)/msm8996-xiaomi-mi5.dtb \