diff --git a/qcom/Makefile b/qcom/Makefile index a6a022d8..4a2f4812 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -326,7 +326,8 @@ dtbo-$(CONFIG_ARCH_CAPE) += cape-mtp-pm8008-overlay.dtbo \ ukee-mtp-nodisplay-pm8010-overlay.dtbo \ ukee-qrd-pm8008-overlay.dtbo \ ukee-qrd-pm8010-overlay.dtbo \ - unicorn-sm8475-pm8008-overlay.dtbo + unicorn-sm8475-pm8008-overlay.dtbo \ + thor-sm8475-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 @@ -361,6 +362,7 @@ ukee-mtp-nodisplay-pm8010-overlay.dtbo-base := ukee.dtb ukee-qrd-pm8008-overlay.dtbo-base := ukee.dtb ukee-qrd-pm8010-overlay.dtbo-base := ukee.dtb 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 else dtb-$(CONFIG_ARCH_CAPE) += cape-mtp-pm8008.dtb \ diff --git a/qcom/thor-8475-pinctrl.dtsi b/qcom/thor-8475-pinctrl.dtsi new file mode 100644 index 00000000..72f0999b --- /dev/null +++ b/qcom/thor-8475-pinctrl.dtsi @@ -0,0 +1,116 @@ +/*for thor pinctrl */ + +&tlmm { + cirrus_reset_default_0: cirrus_reset_default_0 { + mux { + pins = "gpio24"; + function = "gpio"; + }; + + config { + pins = "gpio24"; + drive-strength = <16>; /* 16 mA */ + bias-disable; + output-high; + }; + }; + + cirrus_reset_default_1: cirrus_reset_default_1 { + mux { + pins = "gpio66"; + function = "gpio"; + }; + + config { + pins = "gpio66"; + drive-strength = <16>; /* 16 mA */ + bias-disable; + output-high; + }; + }; + + cirrus_irq_default { + cirrus_irq_default_0: cirrus_irq_default_0 { + mux { + pins = "gpio63"; + function = "gpio"; + }; + config { + pins = "gpio63"; + drive-strength = <2>; + input-enable; + bias-pull-up; + }; + }; + cirrus_irq_default_1: cirrus_irq_default_1 { + mux { + pins = "gpio88"; + function = "gpio"; + }; + config { + pins = "gpio88"; + drive-strength = <2>; + input-enable; + bias-pull-up; + }; + }; + }; + + cam_sensor_mclk3_active: cam_sensor_mclk3_active { + /* MCLK3 */ + mux { + pins = "gpio103"; + function = "cam_mclk"; + }; + + config { + pins = "gpio103"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + cam_sensor_mclk3_suspend: cam_sensor_mclk3_suspend { + /* MCLK3 */ + mux { + pins = "gpio103"; + function = "cam_mclk"; + }; + + config { + pins = "gpio103"; + bias-pull-down; /* PULL DOWN */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + md_mode_ctrl_irq { + ant4_ctrl_irq: ant4_ctrl_irq { + mux { + pins = "gpio83"; + function = "gpio"; + }; + + config { + pins = "gpio83"; + drive-strength = <2>; + bias-disable; + input-enable; + }; + }; + + ant3_ctrl_irq: ant3_ctrl_irq { + mux { + pins = "gpio159"; + function = "gpio"; + }; + + config { + pins = "gpio159"; + drive-strength = <2>; + bias-disable; + input-enable; + }; + }; + }; +}; diff --git a/qcom/thor-pm8010-spmi.dtsi b/qcom/thor-pm8010-spmi.dtsi new file mode 100644 index 00000000..e82ef3b1 --- /dev/null +++ b/qcom/thor-pm8010-spmi.dtsi @@ -0,0 +1,235 @@ +/* Waipio configurations for PM8010I and PM8010J connected via SPMI */ + +#include +#include +#include + +/ { + qcom,pmic-id = <0x2f 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x41 0x41>; + qcom,pmic-id-size = <10>; +}; + +&apps_rsc { + /delete-node/ rpmh-regulator-ldoi2; + /delete-node/ rpmh-regulator-ldoi3; + /delete-node/ rpmh-regulator-ldoi4; + /delete-node/ rpmh-regulator-ldoi6; + /delete-node/ rpmh-regulator-ldoi7; + + rpmh-regulator-ldoj1 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj1"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 30000>; + L1J: pm8010j_l1: regulator-pm8010j-l1 { + regulator-name = "pm8010j_l1"; + qcom,set = ; + regulator-min-microvolt = <1152000>; + regulator-max-microvolt = <1152000>; + qcom,init-voltage = <1152000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj2 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj2"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 30000>; + L2J: pm8010j_l2: regulator-pm8010j-l2 { + regulator-name = "pm8010j_l2"; + qcom,set = ; + regulator-min-microvolt = <1104000>; + regulator-max-microvolt = <1104000>; + qcom,init-voltage = <1104000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj3 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj3"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L3J: pm8010j_l3: regulator-pm8010j-l3 { + regulator-name = "pm8010j_l3"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj4 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj4"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L4J: pm8010j_l4: regulator-pm8010j-l4 { + regulator-name = "pm8010j_l4"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj5 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj5"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L5J: pm8010j_l5: regulator-pm8010j-l5 { + regulator-name = "pm8010j_l5"; + qcom,set = ; + regulator-min-microvolt = <2904000>; + regulator-max-microvolt = <2904000>; + qcom,init-voltage = <2904000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj6 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj6"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L6J: pm8010j_l6: regulator-pm8010j-l6 { + regulator-name = "pm8010j_l6"; + qcom,set = ; + regulator-min-microvolt = <3104000>; + regulator-max-microvolt = <3104000>; + qcom,init-voltage = <3104000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj7 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj7"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L7J: pm8010j_l7: regulator-pm8010j-l7 { + regulator-name = "pm8010j_l7"; + qcom,set = ; + regulator-min-microvolt = <3104000>; + regulator-max-microvolt = <3104000>; + qcom,init-voltage = <3104000>; + qcom,init-mode = ; + }; + }; +}; + +&spmi_bus { + #address-cells = <2>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <4>; + + qcom,pm8010@8 { + compatible = "qcom,spmi-pmic"; + reg = <8 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm8010i_tz: qcom,temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x8 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + }; + + qcom,pm8010@9 { + compatible = "qcom,spmi-pmic"; + reg = <9 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm8010j_tz: qcom,temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x9 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + }; +}; + +&thermal_zones { + pm8010i_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8010i_tz>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "critical"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + pm8010j_tz { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8010j_tz>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "critical"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; +}; diff --git a/qcom/thor-sm8475-pm8008-overlay.dts b/qcom/thor-sm8475-pm8008-overlay.dts new file mode 100644 index 00000000..186f34d3 --- /dev/null +++ b/qcom/thor-sm8475-pm8008-overlay.dts @@ -0,0 +1,13 @@ +/dts-v1/; +/plugin/; +#include "thor-sm8475.dtsi" +#include "thor-sm8475-pm8008.dtsi" +#include "thor-pm8010-spmi.dtsi" + +/ { + model = "thor based on Qualcomm Technologies, Inc SM8475"; + compatible = "qcom,cape-mtp", "qcom,cape", "qcom,mtp"; + qcom,msm-id = <530 0x10000>, <531 0x10000>, <540 0x10000>; + qcom,board-id = <0x10008 0>; + xiaomi,miboard-id = <0x6 0>; +}; diff --git a/qcom/thor-sm8475-pm8008.dtsi b/qcom/thor-sm8475-pm8008.dtsi new file mode 100644 index 00000000..72324d0a --- /dev/null +++ b/qcom/thor-sm8475-pm8008.dtsi @@ -0,0 +1,141 @@ +/* Waipio configurations for PM8008I and PM8008J connected via I2C */ + +/ { + qcom,pmic-id = <0x2f 0x0 0x0 0x0 0x0 0x0 0x0 0x0>; + qcom,pmic-id-size = <8>; +}; + +/* + * Each QUP device that's a parent to PMIC must be listed as a critical device + * to GCC. + */ +&clock_gcc { + qcom,critical-devices = <&qupv3_se5_i2c>; +}; + +&tlmm { + pm8008i_active: pm8008i_active { + mux { + pins = "gpio6"; + function = "gpio"; + }; + + config { + pins = "gpio6"; + bias-disable; + output-high; + drive-strength = <2>; + }; + }; +}; + +&qupv3_se5_i2c { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + + pm8008i@8 { + compatible = "qcom,i2c-pmic"; + reg = <0x8>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pm8008i_active>; + + pm8008-chip@900 { + compatible = "qcom,pm8008-chip"; + reg = <0x900>; + + PM8008I_EN: qcom,pm8008-chip-en { + regulator-name = "pm8008i-chip-en"; + }; + }; + + qcom,revid@100 { + compatible = "qcom,qpnp-revid"; + reg = <0x100>; + }; + }; + + pm8008i@9 { + compatible = "qcom,i2c-pmic"; + reg = <0x9>; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm8008i-regulator { + compatible = "qcom,pm8008-regulator"; + #address-cells = <1>; + #size-cells = <0>; + + pm8008_en-supply = <&PM8008I_EN>; + vdd_l1_l2-supply = <&S12B>; + vdd_l3_l4-supply = <&S1C>; + vdd_l5-supply = <&BOB>; + vdd_l6-supply = <&BOB>; + vdd_l7-supply = <&BOB>; + + L1I: pm8008i_l1: regulator@4000 { + reg = <0x4000>; + regulator-name = "pm8008i_l1"; + regulator-min-microvolt = <1104000>; + regulator-max-microvolt = <1104000>; + qcom,min-dropout-voltage = <24000>; + qcom,hpm-min-load = <30000>; + }; + + L2I: pm8008i_l2: regulator@4100 { + reg = <0x4100>; + regulator-name = "pm8008i_l2"; + regulator-min-microvolt = <1152000>; + regulator-max-microvolt = <1152000>; + qcom,min-dropout-voltage = <24000>; + qcom,hpm-min-load = <30000>; + }; + + L3I: pm8008i_l3: regulator@4200 { + reg = <0x4200>; + regulator-name = "pm8008i_l3"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <56000>; + }; + + L4I: pm8008i_l4: regulator@4300 { + reg = <0x4300>; + regulator-name = "pm8008i_l4"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <56000>; + }; + + L5I: pm8008i_l5: regulator@4400 { + reg = <0x4400>; + regulator-name = "pm8008i_l5"; + regulator-min-microvolt = <2808000>; + regulator-max-microvolt = <2808000>; + qcom,min-dropout-voltage = <192000>; + }; + + L6I: pm8008i_l6: regulator@4500 { + reg = <0x4500>; + regulator-name = "pm8008i_l6"; + regulator-min-microvolt = <2808000>; + regulator-max-microvolt = <2808000>; + qcom,min-dropout-voltage = <192000>; + }; + + L7I: pm8008i_l7: regulator@4600 { + reg = <0x4600>; + regulator-name = "pm8008i_l7"; + regulator-min-microvolt = <2808000>; + regulator-max-microvolt = <2808000>; + qcom,min-dropout-voltage = <192000>; + }; + }; + }; + + /delete-node/ pm8008j@c; + /delete-node/ pm8008j@d; +}; diff --git a/qcom/thor-sm8475.dtsi b/qcom/thor-sm8475.dtsi new file mode 100644 index 00000000..cc95fd49 --- /dev/null +++ b/qcom/thor-sm8475.dtsi @@ -0,0 +1,855 @@ +/* + this file is for attribution only of thor + And public attribution of xiaomi platforms +*/ +#include "thor-8475-pinctrl.dtsi" +#include "xiaomi-sm8475-common.dtsi" +// CHECK ME! +#include +#include + +&tlmm { + /* AW8697_RESET_N */ + aw8697_gpio_reset: aw8697_gpio_reset { + mux { + pins = "gpio89"; + unction = "gpio"; + }; + + config { + pins = "gpio89"; + drive-strength = <2>; + bias-disable; + output-low; + }; + }; + /* AW8697_RESET_N, state device active*/ + aw8697_gpio_reset_output_high: aw8697_gpio_reset_output_high { + mux { + pins = "gpio89"; + function = "gpio"; + }; + + config { + pins = "gpio89"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + /* AW8697_INTERRUPT_N */ + aw8697_gpio_int: aw8697_gpio_int { + mux { + pins = "gpio90"; + function = "gpio"; + }; + + config { + pins = "gpio90"; + drive-strength = <2>; + bias-pull-up; + input-enable; + }; + }; + + /* RCV HANDSET CTL */ + rcv_gpio_high: rcv_gpio_high { + mux { + pins = "gpio52"; + function = "gpio"; + }; + + config { + pins = "gpio52"; + drive-strength = <2>; + bias-pull-up; + output-high; + }; + }; + rcv_gpio_low: rcv_gpio_low { + mux { + pins = "gpio52"; + function = "gpio"; + }; + + config { + pins = "gpio52"; + drive-strength = <2>; + bias-disable; + output-low; + }; + }; +}; + +&soc { + xiaomi_touch { + compatible = "xiaomi-touch"; + status = "ok"; + touch,name = "xiaomi-touch"; + }; + + fingerprint_goodix { + compatible = "goodix,fingerprint"; + l11c_vdd-supply = <&L11C>; + goodix,gpio-reset = <&tlmm 41 0x0>; + goodix,gpio-irq = <&tlmm 40 0x0>; + status = "ok"; + }; +}; + +&L11C { + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3008000>; + qcom,init-voltage = <3008000>; +}; + +&tlmm { + mi_ts_active: mi_ts_active { + mux { + pins = "gpio21", "gpio20"; + function = "gpio"; + }; + + config { + pins = "gpio21", "gpio20"; + drive-strength = <8>; + bias-pull-up; + }; + }; +}; + +&L9C { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + qcom,init-voltage = <3300000>; +}; + +&qupv3_se4_spi { + status = "ok"; + qcom,rt; + fts@0 { + status = "ok"; + compatible = "st,spi"; + reg = <0x0>; + 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>; + avdd-supply = <&L9C>; + vdd-supply = <&L2C>; + /*panel = <&dsi_k8_42_02_0a_dsc_cmd>;*/ + fts,pwr-reg-name = "avdd"; + fts,bus-reg-name = "vdd"; + fts,irq-gpio = <&tlmm 21 0x2008>; + fts,irq-gpio-name = "fts_irq"; + fts,reset-gpio-enable; + fts,reset-gpio = <&tlmm 20 0x00>; + fts,reset-gpio-name = "fts_rst"; + fts,irq-flags = <0x2008>; + fts,x-max = <14400>; + fts,y-max = <32000>; + fts,fod-lx = <5860>; + fts,fod-ly = <23460>; + fts,fod-x-size = <2680>; + fts,fod-y-size = <2660>; + fts,support-fod; + spi-max-frequency = <12000000>; + fts,support-super-resolution = <1>; + /*1--480hz,2--240hz*/ + fts,touch-gamemode-report-rate = <2>; + fts,default-fw-name = "st_fts_l1.ftb"; + fts,thp-fw-name = "st_fts_l1_thp.ftb"; + fts,config-array-size = <1>; + fts,touch-follow-performance-def = <3>; + fts,touch-tap-sensitivity-def = <4>; + fts,touch-aim-sensitivity-def = <3>; + fts,touch-tap-stability-def = <3>; + fts,cornerfilter-area-step1 = <150>; + fts,cornerfilter-area-step2 = <280>; + fts,cornerfilter-area-step3 = <400>; + fts,touch-deadzone-filter-ver = <2 0 0 0 0 0 0 0 + 2 1 0 0 0 0 0 0 + 2 2 0 0 1 3199 0 0 + 2 3 1438 0 1439 3199 0 0>; + fts,touch-deadzone-filter-hor = <2 0 0 0 0 0 0 0 + 2 1 0 0 0 0 0 0 + 2 2 0 0 0 0 0 0 + 2 3 0 0 0 0 0 0>; + fts,touch-edgezone-filter-ver = <1 0 0 0 0 0 0 0 + 1 1 0 0 0 0 0 0 + 1 2 0 0 60 3199 0 0 + 1 3 1379 0 1439 3199 0 0>; + fts,touch-edgezone-filter-hor = <1 0 0 0 1439 60 0 0 + 1 1 0 3139 1439 3199 0 0 + 1 2 0 0 60 3199 0 0 + 1 3 1379 0 1439 3199 0 0>; + fts,touch-cornerzone-filter-ver = <0 0 0 0 0 0 0 0 + 0 1 0 0 0 0 0 0 + 0 2 0 2799 250 3199 0 0 + 0 3 1189 2799 1439 3199 0 0>; + fts,touch-cornerzone-filter-hor1 = <0 0 0 0 280 280 0 0 + 0 1 0 0 0 0 0 0 + 0 2 0 2919 280 3199 0 0 + 0 3 0 0 0 0 0 0>; + fts,touch-cornerzone-filter-hor2 = <0 0 0 0 0 0 0 0 + 0 1 1159 0 1439 280 0 0 + 0 2 0 0 0 0 0 0 + 0 3 1159 2919 1439 3199 0 0>; + fts,touch-follow-performance = <10 15 1 + 8 15 1 + 6 15 1 + 4 15 1 + 2 15 1>; + fts,touch-tap-sensitivity = <160 150 140 120 100>; + fts,touch-aim-sensitivity = <13 11 8 5 3>; + fts,touch-tap-stability = <11 16 20 24 33>; + fts,touch-expert-array = <6 15 1 120 8 20 + 2 15 1 120 5 20 + 4 15 1 120 3 20>; + fts,cfg_0 { + fts,tp-vendor = <0x38>; + fts,fw-name = "st_fts_l1.ftb"; + fts,limit-name = "stm_fts_production_limits.csv"; + }; + }; +}; + +&qupv3_se15_i2c { + status = "ok"; + cs35l41_0: cs35l41@42 { + status = "ok"; + compatible = "cirrus,cs35l41"; + reset-gpios = <&tlmm 24 0>; + reg = <0x42>; + interrupt-parent = <&tlmm>; + interrupts = <63 0x2008>; + pinctrl-names = "default"; + pinctrl-0 = <&cirrus_reset_default_0 &cirrus_irq_default_0>; + cirrus,temp-warn_threshold = <3>; + cirrus,boost-peak-milliamp = <4000>; + cirrus,boost-ind-nanohenry = <1000>; + cirrus,boost-cap-microfarad = <15>; + cirrus,asp-sdout-hiz = <3>; + cirrus,right-channel-amp; + sound-name-prefix = "B"; + cirrus,fast-switch = "B-music.txt", "B-handfree.txt"; + cirrus,gpio-config2 { + cirrus,gpio-src-select = <0x4>; + cirrus,gpio-output-enable; + }; + }; + cs35l41_1: cs35l41@43 { + status = "ok"; + compatible = "cirrus,cs35l41"; + reset-gpios = <&tlmm 66 0>; + spk-sw-gpios = <&tlmm 52 0>; + reg = <0x43>; + interrupt-parent = <&tlmm>; + interrupts = <88 0x2008>; + pinctrl-names = "default", "rcv_gpio_high", "rcv_gpio_low"; + pinctrl-0 = <&cirrus_reset_default_1 &cirrus_irq_default_1>; + pinctrl-1 = <&rcv_gpio_high>; + pinctrl-2 = <&rcv_gpio_low>; + cirrus,temp-warn_threshold = <3>; + cirrus,boost-peak-milliamp = <4000>; + cirrus,boost-ind-nanohenry = <1000>; + cirrus,boost-cap-microfarad = <15>; + cirrus,asp-sdout-hiz = <3>; + sound-name-prefix = "T"; + cirrus,fast-switch = "T-music.txt", "T-handset.txt", "T-handfree.txt"; + cirrus,gpio-config2 { + cirrus,gpio-src-select = <0x4>; + cirrus,gpio-output-enable; + }; + }; +}; + +&qupv3_se2_i2c { + #address-cells = <1>; + #size-cells = <0>; + + status = "ok"; + aw8697_haptic@5A { + compatible = "awinic,aw8697_haptic"; + reg = <0x5a>; + reset-gpio = <&tlmm 89 0x00>; + irq-gpio = <&tlmm 90 0x00>; + vib_mode = < 0 >; /*mode: RAM mode->0; CONT mode -> 1*/ + vib_f0_pre = < 1700 >; + vib_f0_cali_percen = < 7 >; + vib_cont_drv_lev = < 62 >; + vib_cont_drv_lvl_ov = < 62 >; + vib_cont_td = < 0xf06c >; + vib_cont_zc_thr = < 0x08f8 >; /*hq 0x08F8 */ + vib_cont_num_brk = < 3 >; + vib_f0_coeff = < 260 >; /*Don't modify it 2.604167*/ + vib_f0_trace_parameter = < 9 3 1 31 >; + vib_bemf_config = < 0 0x08 0x03 0xf8 >; + vib_sw_brake = < 0x2c >; + vib_tset = < 0x12 >; + vib_r_spare = < 0x68 >; + vib_bstdbg = < 0x30 0xeb 0xd4 0 0 0 >; + vib_effect_id_boundary = < 10 >; + vib_effect_max = < 192 >; /*vib_effect_max must bigger than vib_effect_id*/ + vib_trig_config = < 0 1 0 1 2 + 0 1 0 1 2 + 0 1 0 1 2 >; + vib_bst_vol_default = < 0x0e >; + vib_bst_vol_ram = < 0x0e >; + vib_bst_vol_rtp = < 0x0e >; + vib_rtp_time = < 20 20 20 20 20 20 20 20 20000 15000 + 15000 20000 25000 15000 30000 25000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 + 20000 20000 20000 20000 20000 >; + pinctrl-names = "aw8697_reset_reset","aw8697_reset_active","aw8697_interrupt_active"; + pinctrl-0 = <&aw8697_gpio_reset>; + pinctrl-1 = <&aw8697_gpio_reset_output_high>; + pinctrl-2 = <&aw8697_gpio_int>; + status = "ok"; + wf_0 { + /*CLICK*/ + qcom,effect-id = <0>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_1 { + /*DOUBLE CLICK*/ + qcom,effect-id = <1>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 3e]; + qcom,wf-brake-pattern = [03 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_2 { + /*TICK*/ + qcom,effect-id = <2>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_3 { + /*THUD*/ + qcom,effect-id = <3>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_4 { + /*POP*/ + qcom,effect-id = <4>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <28000>; + }; + wf_5 { + /*HEAVY CLICK*/ + qcom,effect-id = <5>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [7e 7e 7e]; + qcom,wf-brake-pattern = [03 03 01 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_6 { + /*id 6*/ + qcom,effect-id = <6>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_7 { + /*id 7*/ + qcom,effect-id = <7>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_8 { + /*id 8*/ + qcom,effect-id = <8>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + wf_9 { + /*id 9*/ + qcom,effect-id = <9>; + qcom,wf-vmax-mv = <3600>; + qcom,wf-pattern = [3e 3e]; + qcom,wf-brake-pattern = [02 01 00 00]; + qcom,wf-play-rate-us = <20000>; + }; + }; +}; +&qupv3_se0_spi { + status = "ok"; + stmvl53l5@0 { + compatible = "st,stmvl53l5"; + reg = <0>; + _1P8_power-supply = <&L8C>; + _3P0_power-supply = <&L7C>; + spi-max-frequency = <8000000>; + stm,firmware_name = "stmvl53l5.bin"; + status = "ok"; + }; +}; +&L7C { + regulator-max-microvolt = <3304000>; + qcom,init-voltage = <3304000>; +}; + +&pmk8350_vadc { + pm8350_msm_therm { + reg = ; + label = "pm8350_msm_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350_cam_flash_therm { + reg = ; + label = "pm8350_cam_flash_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350_hot_pocket_therm { + reg = ; + label = "pm8350_hot_pocket_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350_wide_rfc_therm { + reg = ; + label = "pm8350_wide_rfc_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350b_rear_tof_therm { + reg = ; + label = "pm8350b_rear_tof_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350b_usb_conn_therm { + reg = ; + label = "pm8350b_usb_conn_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350b_wl_chg_therm { + reg = ; + label = "pm8350b_wl_chg_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pm8350b_cam_therm { + reg = ; + label = "pm8350b_cam_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pmk8350_xo_therm { + reg = ; + 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 PM8350_ADC7_AMUX_THM4_100K_PU>, + <&pmk8350_vadc PM8350B_ADC7_GPIO2_100K_PU>, + <&pmk8350_vadc PMR735A_ADC7_GPIO1_100K_PU>, + <&pmk8350_vadc PMR735A_ADC7_GPIO2_100K_PU>, + <&pmk8350_vadc PM8350B_ADC7_GPIO4_100K_PU>; + + pm8350_msm_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm8350_cam_flash_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm8350_hot_pocket_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm8350_wide_rfc_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm8350b_rear_tof_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm8350b_usb_conn_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm8350b_wl_chg_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + pm8350b_cam_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&pmk8350 { + pm8350_adc_tm_iio: adc_tm_e { + compatible = "qcom,adc-tm7-iio"; + reg = <0x3400>; + #thermal-sensor-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + + io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>; + + pmk8350_xo_therm { + reg = ; + 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 PM8350_ADC7_AMUX_THM4_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + wireless_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PM8350B_ADC7_GPIO2_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"; + }; + }; + }; + + cam_therm0 {// for camera isp therm + 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"; + }; + }; + }; + + + xo-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm8350_adc_tm_iio PMK8350_ADC7_AMUX_THM1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; + +&qseecom_ta_mem { + size = <0x0 0x2000000>; +}; + +&qseecom_mem { + size = <0x0 0x3000000>; +}; + +&L12C { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; +}; + +&soc { + ispv3_vdd1_ldo:ispv3_vdd1_ldo{ + compatible = "regulator-fixed"; + regulator-name = "ispv3_vdd1_ldo"; + enable-active-high; + gpio = <&tlmm 125 0>; + }; + + ispv3_vdd2_ldo:ispv3_vdd2_ldo{ + compatible = "regulator-fixed"; + regulator-name = "ispv3_vdd2_ldo"; + enable-active-high; + gpio = <&tlmm 84 0>; + }; + + ispv3_vddr_ldo:ispv3_vddr_ldo{ + compatible = "regulator-fixed"; + regulator-name = "ispv3_vddr_ldo"; + enable-active-high; + gpio = <&tlmm 93 0>; + }; + + // At sm8475, l10c is changed to s12b + ispv3_l10c_ldo:ispv3_l10c_ldo{ + compatible = "regulator-fixed"; + regulator-name = "ispv3_s12b_ldo"; + enable-active-high; + gpio = <&tlmm 186 0>; + }; +}; + +&pcie1 { + status = "ok"; +}; + +&pcie1_rp { + #address-cells = <5>; + #size-cells = <0>; + + ispv3_pci: ispv3_pci { + reg = <0 0 0 0 0>; + qcom,iommu-group = <&ispv3_pci_iommu_group>; + + #address-cells = <1>; + #size-cells = <1>; + + ispv3_pci_iommu_group: ispv3_pci_iommu_group { + qcom,iommu-msi-size = <0x1000>; + qcom,iommu-dma-addr-pool = <0x60000000 0xa0000000>; + qcom,iommu-dma = "fastmap"; + qcom,iommu-pagetable = "coherent"; + qcom,iommu-faults = "stall-disable", "HUPCF", "no-CFRE", + "non-fatal"; + }; + }; +}; + +&qupv3_se5_i2c { + status = "ok"; + ispv3_i2c: ispv3_i2c@60 { + compatible = "fcs,fan53526"; + reg = <0x60>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "ispv3_vdd_08"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1230000>; + regulator-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + status = "ok"; + }; +}; + +&qupv3_se18_spi { + status = "ok"; + ispv3_spi@0 { + compatible = "xiaomi,ispv3_spi"; + sm8475; + reg = <0>; + qcom,ispv3-rc-index = <1>; + spi-max-frequency = <50000000>; + ispv3_gpio_14 = <&tlmm 175 0x0>; + ispv3_gpio_15 = <&tlmm 176 0x0>; + ispv3_gpio_int0 = <&tlmm 177 0x0>; + ispv3_gpio_int1 = <&tlmm 118 0x0>; + ispv3_gpio_reset = <&tlmm 178 0x0>; + ispv3_gpio_fan_en = <&tlmm 109 0x0>; + ispv3_vdd1-supply = <&ispv3_vdd1_ldo>; + ispv3_l12c-supply = <&L12C>; + ispv3_vdd2-supply = <&ispv3_vdd2_ldo>; + ispv3_vdd-supply = <&L3I>; + ispv3_vddr-supply = <&ispv3_vddr_ldo>; + /* For sm8450 */ + // ispv3_l10c-supply = <&L10C>; + /* For sm8475 */ + ispv3_l10c-supply = <&ispv3_l10c_ldo>; + ispv3_mclk-supply = <&cam_cc_titan_top_gdsc>; + ispv3_s11-supply = <&S11B>; + ispv3_s12-supply = <&S12B>; + regulator-names = "ispv3_vdd1", "ispv3_l12c", + "ispv3_vdd2", "ispv3_vdd", + "ispv3_vddr", "ispv3_l10c", + "ispv3_mclk", "ispv3_s11", + "ispv3_s12"; + rgltr-min-voltage = <0 1800000 0 1800000 0 1200000 0 950000 1300000>; + rgltr-max-voltage = <0 1800000 0 1800000 0 1200000 0 1100000 1400000>; + pinctrl-names = "ispv3_default", "ispv3_suspend"; + pinctrl-0 = <&cam_sensor_mclk3_active>; + pinctrl-1 = <&cam_sensor_mclk3_suspend>; + clocks = <&clock_camcc CAM_CC_MCLK3_CLK>; + clock-names = "ispv3_clk"; + clock-rates = <19200000>; + status = "ok"; + }; +}; + +&nxp_eusb2_repeater { + qcom,param-override-seq = + <0x62 0x08 + 0x00 0x07>; + qcom,param-override-seq-host = + <0x63 0x08 + 0x22 0x07>; +}; + +&battery_charger { + mi,support-soc-update; + qcom,shutdown-voltage = <3350>; +};