Add latest dts. Seems there's something wrong with touchscreen

This commit is contained in:
strongtz 2020-05-30 21:27:20 +08:00
parent b0fb513726
commit d5c384c22c
4 changed files with 464 additions and 16 deletions

View File

@ -1 +0,0 @@
WIP dummy

Binary file not shown.

View File

@ -0,0 +1,449 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2020, Sophon Wu <strongtz@yeah.net>
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include "sdm845.dtsi"
#include "pm8998.dtsi"
#include "pm8005.dtsi"
/ {
model = "Xiaomi MIX 2s";
compatible = "xiaomi,polaris", "qcom,sdm845";
aliases {
serial0 = &uart9;
hsuart0 = &uart6;
};
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
};
vreg_tp_vddio: tp-vddio-vreg {
regulator-always-on;
compatible = "regulator-fixed";
regulator-name = "vreg_tp_vddio";
regulator-boot-on;
enable-active-high;
gpio = <&tlmm 23 0>;
startup-delay-us = <4000>;
};
/*
* Apparently RPMh does not provide support for PM8150 S4 because it
* is always-on; model it as a fixed regulator.
*/
vreg_s4a_1p8: pm8998-smps4 {
compatible = "regulator-fixed";
regulator-name = "vreg_s4a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vph_pwr>;
};
};
&apps_rsc {
pm8998-rpmh-regulators {
compatible = "qcom,pm8998-rpmh-regulators";
qcom,pmic-id = "a";
vdd-s1-supply = <&vph_pwr>;
vdd-s2-supply = <&vph_pwr>;
vdd-s3-supply = <&vph_pwr>;
vdd-s4-supply = <&vph_pwr>;
vdd-s5-supply = <&vph_pwr>;
vdd-s6-supply = <&vph_pwr>;
vdd-s7-supply = <&vph_pwr>;
vdd-s8-supply = <&vph_pwr>;
vdd-s9-supply = <&vph_pwr>;
vdd-s10-supply = <&vph_pwr>;
vdd-s11-supply = <&vph_pwr>;
vdd-s12-supply = <&vph_pwr>;
vdd-s13-supply = <&vph_pwr>;
vdd-l1-l27-supply = <&vreg_s7a_1p025>;
vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
vdd-l3-l11-supply = <&vreg_s7a_1p025>;
vdd-l4-l5-supply = <&vreg_s7a_1p025>;
vdd-l6-supply = <&vph_pwr>;
vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
vdd-l9-supply = <&vreg_bob>;
vdd-l10-l23-l25-supply = <&vreg_bob>;
vdd-l13-l19-l21-supply = <&vreg_bob>;
vdd-l16-l28-supply = <&vreg_bob>;
vdd-l18-l22-supply = <&vreg_bob>;
vdd-l20-l24-supply = <&vreg_bob>;
vdd-l26-supply = <&vreg_s3a_1p35>;
vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
vreg_s2a_1p1: smps2 {
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
};
vreg_s3a_1p35: smps3 {
regulator-min-microvolt = <1352000>;
regulator-max-microvolt = <1352000>;
};
// vreg_s4a_1p8: smps4 {
// regulator-min-microvolt = <1800000>;
// regulator-max-microvolt = <1800000>;
// };
vreg_s5a_2p04: smps5 {
regulator-always-on;
regulator-min-microvolt = <1904000>;
regulator-max-microvolt = <2040000>;
};
vreg_s7a_1p025: smps7 {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1028000>;
};
vdda_ufs1_core:
vreg_l1a_0p875: ldo1 {
regulator-min-microvolt = <880000>;
regulator-max-microvolt = <880000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l2a_0p875: ldo2 {
// regulator-min-microvolt = <1200000>;
// regulator-max-microvolt = <1200000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// regulator-always-on;
// };
// vreg_l3a_0p875: ldo3 {
// regulator-min-microvolt = <1000000>;
// regulator-max-microvolt = <1000000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l5a_0p8: ldo5 {
// regulator-min-microvolt = <800000>;
// regulator-max-microvolt = <800000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l6a_1p8: ldo6 {
// regulator-min-microvolt = <1856000>;
// regulator-max-microvolt = <1856000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l7a_1p8: ldo7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l8a_1p2: ldo8 {
// regulator-min-microvolt = <1200000>;
// regulator-max-microvolt = <1248000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l9a_2p95: ldo9 {
// regulator-min-microvolt = <1704000>;
// regulator-max-microvolt = <2928000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l10a_2p95: ldo10 {
// regulator-min-microvolt = <1704000>;
// regulator-max-microvolt = <2928000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l11a_1p05: ldo11 {
// regulator-min-microvolt = <1000000>;
// regulator-max-microvolt = <1048000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l12a_1p8: ldo12 {
// regulator-min-microvolt = <1800000>;
// regulator-max-microvolt = <1800000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l13a_2p95: ldo13 {
// regulator-min-microvolt = <1800000>;
// regulator-max-microvolt = <2960000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// dsi and touchscreen maybe
vreg_l14a_1p8: ldo14 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1880000>;
regulator-always-on;
regulator-boot-on;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l15a_1p8: ldo15 {
// regulator-min-microvolt = <1800000>;
// regulator-max-microvolt = <1800000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l16a_2p7: ldo16 {
// regulator-min-microvolt = <2704000>;
// regulator-max-microvolt = <2704000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l17a_1p3: ldo17 {
regulator-always-on;
regulator-min-microvolt = <1304000>;
regulator-max-microvolt = <1304000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l18a_2p9: ldo18 {
// regulator-min-microvolt = <2704000>;
// regulator-max-microvolt = <2960000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l19a_3p1: ldo19 {
// regulator-min-microvolt = <2856000>;
// regulator-max-microvolt = <3104000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l20a_2p95: ldo20 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l21a_2p95: ldo21 {
// regulator-min-microvolt = <2704000>;
// regulator-max-microvolt = <2960000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l22a_3p3: ldo22 {
// regulator-min-microvolt = <2864000>;
// regulator-max-microvolt = <3312000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l23a_3p3: ldo23 {
// regulator-min-microvolt = <3000000>;
// regulator-max-microvolt = <3312000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l24a_3p075: ldo24 {
// regulator-min-microvolt = <3088000>;
// regulator-max-microvolt = <3088000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l25a_3p3: ldo25 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3312000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vdda_ufs1_1p2:
vreg_l26a_1p2: ldo26 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l28a_3p1: ldo28 {
// regulator-min-microvolt = <3100000>;
// regulator-max-microvolt = <3100000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_lvs1a_1p8: lvs1 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
vreg_lvs2a_1p8: lvs2 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
};
pmi8998-rpmh-regulators {
compatible = "qcom,pmi8998-rpmh-regulators";
qcom,pmic-id = "b";
vdd-bob-supply = <&vph_pwr>;
vreg_bob: bob {
regulator-min-microvolt = <3312000>;
regulator-max-microvolt = <3600000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
regulator-allow-bypass;
};
};
pm8005-rpmh-regulators {
compatible = "qcom,pm8005-rpmh-regulators";
qcom,pmic-id = "c";
vreg_smp3c_0p6: smps3 {
regulator-always-on;
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <600000>;
};
};
};
&apps_smmu {
/* Fuck this stupid thing */
status = "disabled";
};
&gcc {
protected-clocks = <GCC_QSPI_CORE_CLK>,
<GCC_QSPI_CORE_CLK_SRC>,
<GCC_QSPI_CNOC_PERIPH_AHB_CLK>;
};
// &i2c3 {
// status = "okay";
// clock-frequency = <400000>;
// };
// &i2c5 {
// status = "okay";
// clock-frequency = <400000>;
// };
// &i2c10 {
// status = "okay";
// clock-frequency = <400000>;
// };
&i2c14 {
status = "okay";
clock-frequency = <400000>;
rmi4-i2c-dev@20 {
compatible = "syna,rmi4-i2c";
reg = <0x20>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&tlmm>;
interrupts = <125 8200>;
vdd-supply = <&vreg_l14a_1p8>;
vio-supply = <&vreg_tp_vddio>;
rmi4-f01@1 {
reg = <0x1>;
syna,nosleep-mode = <0x1>;
};
rmi4-f12@12 {
reg = <0x12>;
syna,sensor-type = <1>;
syna,clip-x-low = <0>;
syna,clip-x-high = <1080>;
syna,clip-y-low = <0>;
syna,clip-y-high = <2160>;
};
};
};
&qup_i2c12_default {
drive-strength = <2>;
bias-disable;
};
&qup_i2c14_default {
drive-strength = <2>;
bias-disable;
};
&qup_uart6_default {
pinmux {
pins = "gpio45", "gpio46", "gpio47", "gpio48";
function = "qup6";
};
cts {
pins = "gpio45";
bias-pull-down;
};
rts-tx {
pins = "gpio46", "gpio47";
drive-strength = <2>;
bias-disable;
};
rx {
pins = "gpio48";
bias-pull-up;
};
};
&qupv3_id_0 {
status = "okay";
};
&qupv3_id_1 {
status = "okay";
};
&tlmm {
gpio-reserved-ranges = <0 4>, <81 4>;
};
&uart6 {
status = "okay";
bluetooth {
compatible = "qcom,wcn3990-bt";
vddio-supply = <&vreg_s4a_1p8>;
vddxo-supply = <&vreg_l7a_1p8>;
vddrf-supply = <&vreg_l17a_1p3>;
vddch0-supply = <&vreg_l25a_3p3>;
max-speed = <3200000>;
};
};
&ufs_mem_hc {
status = "okay";
reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
vcc-supply = <&vreg_l20a_2p95>;
vcc-max-microamp = <600000>;
};
&ufs_mem_phy {
status = "okay";
vdda-phy-supply = <&vdda_ufs1_core>;
vdda-pll-supply = <&vdda_ufs1_1p2>;
};

View File

@ -274,25 +274,25 @@ READ_LOCK_STATUS = TRUE
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
# INF RuleOverride = ACPITABLE sdm845Pkg/AcpiTables/AcpiTables.inf
FILE FREEFORM = 7E374E25-8E01-4FEE-87F2-390C23C606CD {
# FILE FREEFORM = 7E374E25-8E01-4FEE-87F2-390C23C606CD {
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/DBG2.aml
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/DSDT.aml
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/FACP.aml
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/GTDT.aml
# SECTION RAW = sdm845Pkg/AcpiTables/minimal/APIC.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/DBG2.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/DSDT.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/CSRT.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/FADT.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/FACS.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/GTDT.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/IORT.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/MCFG.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/MADT.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/PPTT.aml
SECTION RAW = sdm845Pkg/AcpiTables/testing/TPM2.aml
SECTION UI = "AcpiTables"
}
#SECTION RAW = sdm845Pkg/AcpiTables/testing/DBG2.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/DSDT.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/CSRT.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/FADT.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/FACS.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/GTDT.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/IORT.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/MCFG.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/MADT.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/PPTT.aml
#SECTION RAW = sdm845Pkg/AcpiTables/testing/TPM2.aml
#SECTION UI = "AcpiTables"
#}
#
# FDT support
@ -300,7 +300,7 @@ READ_LOCK_STATUS = TRUE
INF EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf
FILE FREEFORM = 25462CDA-221F-47DF-AC1D-259CFAA4E326 {
SECTION RAW = sdm845Pkg/FdtBlob/polaris.dtb
SECTION RAW = sdm845Pkg/FdtBlob/sdm845-xiaomi-polaris.dtb
}
#