diff --git a/qcom/tuna-atp-overlay.dts b/qcom/tuna-atp-overlay.dts index f11e1579..6c4d6b9a 100644 --- a/qcom/tuna-atp-overlay.dts +++ b/qcom/tuna-atp-overlay.dts @@ -7,6 +7,8 @@ /plugin/; #include "tuna-atp.dtsi" +#include "tuna-pmih010x.dtsi" +#include "pmd802x.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna ATP"; diff --git a/qcom/tuna-pmic-overlay.dtsi b/qcom/tuna-pmic-overlay.dtsi index e6ad7b1b..2c65aeaa 100644 --- a/qcom/tuna-pmic-overlay.dtsi +++ b/qcom/tuna-pmic-overlay.dtsi @@ -11,7 +11,6 @@ #include "pm8550vs.dtsi" #include "pmr735b.dtsi" #include "pm8550ve.dtsi" -#include "pmd802x.dtsi" #include "pm8010.dtsi" &pm8550vs_g { @@ -243,6 +242,25 @@ }; }; }; + + sys-therm-11 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMXR2230_ADC5_GEN3_AMUX_THM5_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; }; &pmk8550_vadc { @@ -342,6 +360,15 @@ qcom,adc-tm-type = <1>; }; + pmxr2230_sys_therm_11 { + reg = ; + label = "pmxr2230_sys_therm_11"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + pm8550vs_d_die_temp { reg = ; label = "pm8550vs_d_die_temp"; diff --git a/qcom/tuna-pmih010x.dtsi b/qcom/tuna-pmih010x.dtsi new file mode 100644 index 00000000..2834f616 --- /dev/null +++ b/qcom/tuna-pmih010x.dtsi @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include "pmih010x.dtsi" +#include +#include + +&pmic_glink_debug { + spmi@0 { + reg = <0>; + #address-cells = <2>; + #size-cells = <0>; + + pmih010x_glink_debug: qcom,pmih010x-debug@7 { + compatible = "qcom,spmi-pmic"; + reg = <7 SPMI_USID>; + qcom,can-sleep; + }; + }; + + i2c@104 { + reg = <0x104>; /* I2C instance 4 in ADSP for SE5 */ + #address-cells = <1>; + #size-cells = <0>; + qcom,bus-type = "i2c"; + + qcom,smb1500@69 { + compatible = "qcom,i2c-pmic"; + reg = <0x69>; + qcom,can-sleep; + }; + }; +}; + +&spmi0_debug_bus { + qcom,pmih010x-debug@7 { + compatible = "qcom,spmi-pmic"; + reg = <7 SPMI_USID>; + #address-cells = <2>; + #size-cells = <0>; + qcom,can-sleep; + }; +}; + +&pmic_glink_adc { + status = "ok"; + + smb1500_1_iin { + reg = <0x1046901>; + label = "smb1393_1_iin"; + }; + + smb1500_1_ichg { + reg = <0x1046902>; + label = "smb1393_1_ichg"; + }; + + smb1500_1_die_temp { + reg = <0x1046903>; + label = "smb1393_1_die_temp"; + }; +}; + +&battery_charger { + qcom,thermal-mitigation-step = <500000>; + #cooling-cells = <2>; +}; + +&pmih010x_haptics { + nvmem-names = "hap_cfg_sdam"; + nvmem = <&pmk8550_sdam_46>; +}; + +&pmih010x_tz { + io-channels = <&pmk8550_vadc PMIH010X_ADC5_GEN4_DIE_TEMP>; + io-channel-names = "thermal"; +}; + +&pmk8550_vadc { + pmih010x_sys_therm_8 { + reg = ; + label = "pmih010x_usb_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + qcom,adc5-gen4; + }; + + pmih010x_sys_therm_7 { + reg = ; + label = "pmih010x_wls_therm"; + qcom,ratiometric; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + qcom,adc5-gen4; + }; + + pmih010x_offset_ref { + reg = ; + label = "pmih010x_offset_ref"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; + + pmih010x_vref_1p25 { + reg = ; + label = "pmih010x_vref_1p25"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; + + pmih010x_die_temp { + reg = ; + label = "pmih010x_die_temp"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; + + pmih010x_vph_pwr { + reg = ; + label = "pmih010x_vph_pwr"; + qcom,pre-scaling = <1 3>; + qcom,adc5-gen4; + }; + + pmih010x_vbat_sns_qbg { + reg = ; + label = "pmih010x_vbat_sns_qbg"; + qcom,pre-scaling = <1 3>; + qcom,adc5-gen4; + }; + + pmih010x_iin { + reg = ; + label = "pmih010x_iin"; + qcom,adc5-gen4; + }; + + pmih010x_ichg_fb { + reg = ; + label = "pmih010x_ichg_fb"; + qcom,adc5-gen4; + }; + + pmih010x_chg_temp { + reg = ; + label = "pmih010x_chg_temp"; + qcom,adc5-gen4; + }; + + pmih010x_lite_die_temp { + reg = ; + label = "pmih010x_lite_die_temp"; + qcom,pre-scaling = <1 1>; + qcom,adc5-gen4; + }; +}; + +&thermal_zones { + sys-therm-7 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMIH010X_ADC5_GEN4_AMUX4_GPIO12_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm-8 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMIH010X_ADC5_GEN4_AMUX_THM4_USB_THERM_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; diff --git a/qcom/tuna-qrd-overlay.dts b/qcom/tuna-qrd-overlay.dts index 571501ce..8ee4d7ae 100644 --- a/qcom/tuna-qrd-overlay.dts +++ b/qcom/tuna-qrd-overlay.dts @@ -7,6 +7,8 @@ /plugin/; #include "tuna-qrd.dtsi" +#include "tuna-pmih010x.dtsi" +#include "pmd802x.dtsi" / { model = "Qualcomm Technologies, Inc. Tuna QRD"; diff --git a/qcom/tuna-qrd.dtsi b/qcom/tuna-qrd.dtsi index 9f3dcf28..86cea255 100644 --- a/qcom/tuna-qrd.dtsi +++ b/qcom/tuna-qrd.dtsi @@ -112,3 +112,6 @@ status = "ok"; }; +&thermal_zones { + /delete-node/ sys-therm-11; +};