diff --git a/qcom/tuna-pmic-overlay.dtsi b/qcom/tuna-pmic-overlay.dtsi index 8c01f32c..e6ad7b1b 100644 --- a/qcom/tuna-pmic-overlay.dtsi +++ b/qcom/tuna-pmic-overlay.dtsi @@ -4,6 +4,7 @@ */ #include +#include #include "pmk8550.dtsi" #include "pmxr2230.dtsi" @@ -82,6 +83,13 @@ power-source = <1>; }; }; + + sys_therm_6_gpio7 { + sys_therm_6_gpio7_default: sys_therm_6_gpio7_default { + pins = "gpio7"; + bias-high-impedance; + }; + }; }; &soc { @@ -101,3 +109,270 @@ }; }; }; + +&thermal_zones { + sys-therm-0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMK8550_ADC5_GEN3_AMUX_THM1_XO_THERM_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm-1 { + 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"; + }; + }; + }; + + sys-therm-2 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMXR2230_ADC5_GEN3_AMUX_THM1_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm-3 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMXR2230_ADC5_GEN3_AMUX_THM4_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm-5 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMXR2230_ADC5_GEN3_AMUX_THM2_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm-4 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMXR2230_ADC5_GEN3_AMUX_THM3_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm-6 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PMXR2230_ADC5_GEN3_AMUX3_GPIO7_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; + +&pmk8550_vadc { + pinctrl-names = "default"; + pinctrl-0 = <&sys_therm_6_gpio7_default>; + + /delete-node/ pm8550_offset_ref; + /delete-node/ pm8550_vref_1p25; + /delete-node/ pm8550_die_temp; + /delete-node/ pm8550_vph_pwr; + + /* PMXR2230 Channel nodes */ + pmxr2230_offset_ref { + reg = ; + label = "pmxr2230_offset_ref"; + qcom,pre-scaling = <1 1>; + }; + + pmxr2230_vref_1p25 { + reg = ; + label = "pmxr2230_vref_1p25"; + qcom,pre-scaling = <1 1>; + }; + + pmxr2230_die_temp { + reg = ; + label = "pmxr2230_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pmxr2230_vph_pwr { + reg = ; + label = "pmxr2230_vph_pwr"; + qcom,pre-scaling = <1 3>; + }; + + pmk8550_sys_therm_0 { + reg = ; + label = "pmk8550_sys_therm_0"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmxr2230_sys_therm_1 { + reg = ; + label = "pmxr2230_sys_therm_1"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmxr2230_sys_therm_2 { + reg = ; + label = "pmxr2230_sys_therm_2"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmxr2230_sys_therm_3 { + reg = ; + label = "pmxr2230_sys_therm_3"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmxr2230_sys_therm_4 { + reg = ; + label = "pmxr2230_sys_therm_4"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmxr2230_sys_therm_5 { + reg = ; + label = "pmxr2230_sys_therm_5"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmxr2230_sys_therm_6 { + reg = ; + label = "pmxr2230_sys_therm_6"; + 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"; + qcom,pre-scaling = <1 1>; + }; + + pm8550vs_g_die_temp { + reg = ; + label = "pm8550vs_j_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pm8550ve_f_die_temp { + reg = ; + label = "pm8550ve_d_die_temp"; + qcom,pre-scaling = <1 1>; + }; + +}; + +&pm8550vs_g_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(6)>; + io-channel-names = "thermal"; +}; + +&pm8550vs_d_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(3)>; + io-channel-names = "thermal"; +}; + +&pm8550ve_f_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(5)>; + io-channel-names = "thermal"; +};