Add support for POCO F5/Redmi Note 12 Turbo (marble|M16T)

Change-Id: I9d0538eeb420eab36f8f1c36d30c9dd312ef7dad
This commit is contained in:
Arian
2024-03-13 00:23:06 +01:00
parent 676e157e58
commit 191fdbc156
4 changed files with 676 additions and 1 deletions

View File

@@ -329,7 +329,8 @@ dtbo-$(CONFIG_ARCH_CAPE) += cape-mtp-pm8008-overlay.dtbo \
unicorn-sm8475-pm8008-overlay.dtbo \
thor-sm8475-pm8008-overlay.dtbo \
mayfly-sm8475-pm8008-overlay.dtbo \
mondrian-sm8475-pm8008-overlay.dtbo
mondrian-sm8475-pm8008-overlay.dtbo \
marble-sm7475-pm8008-overlay.dtbo
cape-mtp-pm8008-overlay.dtbo-base := cape.dtb cape-v2.dtb capep.dtb
cape-mtp-120fps-pm8008-overlay.dtbo-base := cape.dtb cape-v2.dtb capep.dtb
@@ -367,6 +368,7 @@ unicorn-sm8475-pm8008-overlay.dtbo-base := cape.dtb cape-v2.dtb capep.dtb
thor-sm8475-pm8008-overlay.dtbo-base := cape.dtb cape-v2.dtb capep.dtb
mayfly-sm8475-pm8008-overlay.dtbo-base := cape.dtb cape-v2.dtb capep.dtb
mondrian-sm8475-pm8008-overlay.dtbo-base := cape.dtb cape-v2.dtb capep.dtb
marble-sm7475-pm8008-overlay.dtbo-base := ukee.dtb
else
dtb-$(CONFIG_ARCH_CAPE) += cape-mtp-pm8008.dtb \

79
qcom/marble-pinctrl.dtsi Normal file
View File

@@ -0,0 +1,79 @@
/*for marble pinctrl */
&tlmm {
/* TOP Smart PA */
aw882xx_reset_active_top:aw882xx_reset_active_top {
/* active state */
mux {
pins = "gpio1";
function = "gpio";
};
config {
pins = "gpio1";
drive-strength = <2>;
bias-pull-down;
output-high;
};
};
aw882xx_reset_suspend_top:aw882xx_reset_suspend_top {
/* sleep state */
mux {
pins = "gpio1";
function = "gpio";
};
config {
pins = "gpio1";
drive-strength = <2>;
bias-pull-down;
output-low;
};
};
/* TOP Smart PA INT*/
aw882xx_irq_active_top:aw882xx_irq_active_top {
mux {
pins = "gpio88";
function = "gpio";
};
config {
pins = "gpio88";
drive-strength = <2>;
bias-disable;
input-enable;
};
};
/* BOT Smart PA */
aw882xx_reset_active_bot:aw882xx_reset_active_bot {
/* active state */
mux {
pins = "gpio120";
function = "gpio";
};
config {
pins = "gpio120";
drive-strength = <2>;
bias-pull-down;
output-high;
};
};
aw882xx_reset_suspend_bot:aw882xx_reset_suspend_bot {
/* sleep state */
mux {
pins = "gpio120";
function = "gpio";
};
config {
pins = "gpio120";
drive-strength = <2>;
bias-pull-down;
output-low;
};
};
};

View File

@@ -0,0 +1,43 @@
/dts-v1/;
/plugin/;
#include "marble-sm7475.dtsi"
#include "waipio-pm8008.dtsi"
/ {
model = "Marble based on Qualcomm Technologies, Inc SM7475";
compatible = "qcom,ukee-mtp", "qcom,ukee", "qcom,mtp";
qcom,msm-id = <591 0x10000>;
qcom,board-id = <0x10008 0>;
xiaomi,miboard-id = <0xf 0>;
};
&L1J {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
};
&L2J {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
};
&L3J {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
&L4J {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
&L6J {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
&L7J {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};

551
qcom/marble-sm7475.dtsi Normal file
View File

@@ -0,0 +1,551 @@
/*
this file is for attribution only of marble
And public attribution of xiaomi platforms(like K2 and so and)
*/
#include "marble-pinctrl.dtsi"
#include "xiaomi-sm7475-common.dtsi"
&qupv3_se15_i2c {
status = "ok";
/* TOP Smart PA */
aw882xx_smartpa@34 {
compatible = "awinic,aw882xx_smartpa";
reg = <0x34>;
irq-gpio = <&tlmm 88 0x2008>;
reset-gpio = <&tlmm 1 0x2008>;
pinctrl-names = "default","sleep";
pinctrl-0 = <&aw882xx_reset_active_top &aw882xx_irq_active_top>;
pinctrl-1 = <&aw882xx_reset_suspend_top>;
dc-flag = <0>;
sync-flag = <1>;
sound-channel = <0>;
aw-cali-mode = "aw_none ";
spksw-gpio = <&tlmm 52 0>;
status = "ok";
};
/* BOT Smart PA */
aw882xx_smartpa@35 {
compatible = "awinic,aw882xx_smartpa";
reg = <0x35>;
irq-gpio = <&tlmm 63 0x2008>;
reset-gpio = <&tlmm 120 0x2008>;
pinctrl-names = "default","sleep";
pinctrl-0 = <&aw882xx_reset_active_bot>;
pinctrl-1 = <&aw882xx_reset_suspend_bot>;
dc-flag = <0>;
sync-flag = <1>;
sound-channel = <1>;
aw-cali-mode = "aw_none ";
status = "ok";
};
};
&soc {
xiaomi_touch {
compatible = "xiaomi-touch";
status = "ok";
touch,name = "xiaomi-touch";
};
fingerprint_fpc {
status = "ok";
compatible = "fpc,fpc1020";
interrupt-parent = <&tlmm>;
interrupts = <40 0x0>;
fpc,gpio_rst = <&tlmm 41 0x0>;
fpc,gpio_irq = <&tlmm 40 0x0>;
fp_vdd_vreg-supply = <&L1C>;
pinctrl-names = "fpc1020_reset_reset",
"fpc1020_reset_active",
"fpc1020_irq_active";
pinctrl-0 = <&msm_gpio_reset>;
pinctrl-1 = <&msm_gpio_reset_output_high>;
pinctrl-2 = <&msm_gpio_irq>;
};
fingerprint_goodix {
compatible = "goodix,fingerprint";
l6c_vdd-supply = <&L6C>;
goodix,gpio-reset = <&tlmm 41 0x0>;
goodix,gpio-irq = <&tlmm 40 0x0>;
status = "ok";
};
xiaomi_fingerprint {
compatible = "xiaomi-fingerprint";
status = "ok";
fingerprint,name = "xiaomi-fingerprint";
};
adsp_sleepmon: adsp-sleepmon {
compatible = "qcom,adsp-sleepmon";
qcom,wait_time_lpm = <45>;
qcom,wait_time_lpi = <45>;
};
};
&tlmm {
mi_ts_active: mi_ts_active {
mux {
pins = "gpio20", "gpio21";
function = "gpio";
};
config {
pins = "gpio20", "gpio21";
drive-strength = <8>;
bias-pull-up;
};
};
mi_ts_cs_active: mi_ts_cs_active {
mux {
pins = "gpio19";
function = "qup4";
};
config {
pins = "gpio19";
drive-strength = <16>;
bias-pull-up;
};
};
mi_ts_cs_suspend: mi_ts_cs_suspend {
mux {
pins = "gpio19";
function = "gpio";
};
config {
pins = "gpio19";
drive-strength = <16>;
bias-pull-up;
};
};
pmx_ts_reset_suspend: pmx_ts_reset_suspend {
ts_reset_suspend: ts_reset_suspend {
mux {
pins = "gpio20";
function = "gpio";
};
config {
pins = "gpio20";
drive-strength = <2>;
bias-pull-down;
};
};
};
pmx_ts_int_suspend: pmx_ts_int_suspend {
ts_int_suspend: ts_int_suspend {
mux {
pins = "gpio21";
function = "gpio";
};
config {
pins = "gpio21";
drive-strength = <2>;
bias-pull-down;
};
};
};
mi_ts_spi_active: qupv3_se4_spi_active {
mux {
pins = "gpio16", "gpio17", "gpio18";
function = "qup4";
};
config {
pins = "gpio16", "gpio17", "gpio18";
drive-strength = <6>;
bias-disable;
};
};
mi_ts_spi_suspend: qupv3_se4_spi_sleep {
mux {
pins = "gpio16", "gpio17", "gpio18";
function = "gpio";
};
config {
pins = "gpio16", "gpio17", "gpio18";
drive-strength = <6>;
bias-disable;
};
};
/* FP_RESET_N */
msm_gpio_reset: msm_gpio_reset {
mux {
pins = "gpio41";
function = "gpio";
};
config {
pins = "gpio41";
drive-strength = <2>;
bias-disable;
output-low;
};
};
/* FP_RESET_N, state device active*/
msm_gpio_reset_output_high: msm_gpio_reset_output_high {
mux {
pins = "gpio41";
function = "gpio";
};
config {
pins = "gpio41";
drive-strength = <2>;
bias-disable;
output-high;
};
};
/* FP_INT_N */
msm_gpio_irq: msm_gpio_irq {
mux {
pins = "gpio40";
function = "gpio";
};
config {
pins = "gpio40";
drive-strength = <2>;
bias-pull-down;
};
};
};
&L1C {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,init-voltage = <1800000>;
};
&L2C {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,init-voltage = <1800000>;
};
&L6C {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
qcom,init-voltage = <3300000>;
};
&L9C {
regulator-min-microvolt = <3224000>;
regulator-max-microvolt = <3224000>;
qcom,init-voltage = <3224000>;
};
&qupv3_se4_spi {
status = "ok";
qcom,rt;
pinctrl-0 = <&mi_ts_spi_active &mi_ts_cs_active>;
pinctrl-1 = <&mi_ts_spi_suspend &mi_ts_cs_suspend>;
m16t-touch@0 {
status = "ok";
compatible = "goodix,9916r-spi";
reg = <0>;
spi-max-frequency = <15000000>;
interrupt-parent = <&tlmm>;
interrupts = <21 0x2008>;
pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
pinctrl-0 = <&mi_ts_active>;
pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
iovdd-supply = <&L2C>;
avdd-supply = <&L9C>;
goodix,iovdd-name = "iovdd";
goodix,avdd-name = "avdd";
goodix,irq-gpio = <&tlmm 21 0x2008>;
goodix,irq-flags = <2>;
goodix,reset-gpio = <&tlmm 20 0x00>;
goodix,panel-max-x = <1080>;
goodix,panel-max-y = <2400>;
goodix,panel-max-w = <255>;
goodix,panel-max-p = <4096>;
goodix,firmware-namea = "goodix_firmware_TM.bin";
goodix,firmware-nameb = "goodix_firmware_TM_Second.bin";
goodix,config-namea = "goodix_cfg_group_TM.bin";
goodix,config-nameb = "goodix_cfg_group_TM_Second.bin";
goodix,touch-expert-array = <2 3 2 2
4 3 3 2
3 3 4 2>;
goodix,sleep-enable;
};
};
&pmk8350_vadc {
pinctrl-names = "default";
pinctrl-0 = <&pm8350b_rear_tof_therm_default>;
pm8350_msm_therm {
reg = <PM8350_ADC7_AMUX_THM1_100K_PU>;
label = "pm8350_msm_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350_cam_flash_therm {
reg = <PM8350_ADC7_AMUX_THM2_100K_PU>;
label = "pm8350_cam_flash_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350_hot_pocket_therm {
reg = <PM8350_ADC7_AMUX_THM3_100K_PU>;
label = "pm8350_hot_pocket_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350_wide_rfc_therm {
reg = <PM8350B_ADC7_GPIO4_100K_PU>;
label = "pm8350_wide_rfc_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350b_rear_tof_therm {
reg = <PM8350B_ADC7_AMUX_THM4_100K_PU>;
label = "pm8350b_rear_tof_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350b_usb_conn_therm {
reg = <PMR735A_ADC7_GPIO1_100K_PU>;
label = "pm8350b_usb_conn_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350b_wl_chg_therm {
reg = <PMR735A_ADC7_GPIO2_100K_PU>;
label = "pm8350b_wl_chg_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pmk8350_xo_therm {
reg = <PMR735A_ADC7_GPIO3_100K_PU>;
label = "pmk8350_xo_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};
&pmk8350_adc_tm {
io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU>,
<&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU>,
<&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU>,
<&pmk8350_vadc PM8350B_ADC7_GPIO4_100K_PU>,
<&pmk8350_vadc PM8350B_ADC7_AMUX_THM4_100K_PU>,
<&pmk8350_vadc PMR735A_ADC7_GPIO1_100K_PU>,
<&pmk8350_vadc PMR735A_ADC7_GPIO2_100K_PU>,
<&pmk8350_vadc PMR735A_ADC7_GPIO3_100K_PU>;
pm8350_msm_therm {
reg = <PM8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350_cam_flash_therm {
reg = <PM8350_ADC7_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350_hot_pocket_therm {
reg = <PM8350_ADC7_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350_wide_rfc_therm {
reg = <PM8350B_ADC7_GPIO4_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350b_rear_tof_therm {
reg = <PM8350B_ADC7_AMUX_THM4_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350b_usb_conn_therm {
reg = <PMR735A_ADC7_GPIO1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350b_wl_chg_therm {
reg = <PMR735A_ADC7_GPIO2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pmk8350_xo_therm {
reg = <PMR735A_ADC7_GPIO3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
&thermal_zones {
cpu_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM1_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
flash_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM2_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
quiet_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM3_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
charger_therm0 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PM8350B_ADC7_GPIO4_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
conn_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PM8350B_ADC7_AMUX_THM4_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
pa_therm0 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PMR735A_ADC7_GPIO1_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
pa_therm1 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PMR735A_ADC7_GPIO2_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
wifi_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PMR735A_ADC7_GPIO3_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
};
&nxp_eusb2_repeater {
qcom,param-override-seq =
<0x61 0x08
0x00 0x07>;
qcom,param-override-seq-host =
<0x62 0x08
0x10 0x07
0x1 0xa>;
};
&battery_charger {
mi,support-soc-update;
};
&ufshc_mem {
qcom,iommu-dma = "bypass";
};