From 388044d917dec668ca1206b5dd2772d051c472c0 Mon Sep 17 00:00:00 2001 From: Anjelique Melendez Date: Tue, 31 Oct 2023 11:27:27 -0700 Subject: [PATCH 1/2] ARM: dts: msm: Update PM8550VS and PM8550VE VADC registers for pineapple Currently, PM8550VS and PM8550VE ADC channels are using old macros for register address. Update device nodes so that they use the new PM8550VX_ADC5_GEN3_(sid) macros. Change-Id: I151d965a3eb03ad318deb21dea47170e5806f37a Signed-off-by: Anjelique Melendez --- qcom/pineapple-pmic-overlay.dtsi | 20 ++++++++++---------- qcom/pmk8550.dtsi | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/qcom/pineapple-pmic-overlay.dtsi b/qcom/pineapple-pmic-overlay.dtsi index dbbea970..f37e7492 100644 --- a/qcom/pineapple-pmic-overlay.dtsi +++ b/qcom/pineapple-pmic-overlay.dtsi @@ -92,27 +92,27 @@ }; &pm8550vs_c_tz { - io-channels = <&pmk8550_vadc PM8550VS_C_ADC5_GEN3_DIE_TEMP>; + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(2)>; io-channel-names = "thermal"; }; &pm8550vs_d_tz { - io-channels = <&pmk8550_vadc PM8550VS_D_ADC5_GEN3_DIE_TEMP>; + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(3)>; io-channel-names = "thermal"; }; &pm8550vs_e_tz { - io-channels = <&pmk8550_vadc PM8550VS_E_ADC5_GEN3_DIE_TEMP>; + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(4)>; io-channel-names = "thermal"; }; &pm8550vs_g_tz { - io-channels = <&pmk8550_vadc PM8550VS_G_ADC5_GEN3_DIE_TEMP>; + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(6)>; io-channel-names = "thermal"; }; &pm8550ve_i_tz { - io-channels = <&pmk8550_vadc PM8550VE_ADC5_GEN3_DIE_TEMP>; + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(8)>; io-channel-names = "thermal"; }; @@ -240,31 +240,31 @@ }; pm8550vs_c_die_temp { - reg = ; + reg = ; label = "pm8550vs_c_die_temp"; qcom,pre-scaling = <1 1>; }; pm8550vs_d_die_temp { - reg = ; + reg = ; label = "pm8550vs_d_die_temp"; qcom,pre-scaling = <1 1>; }; pm8550vs_e_die_temp { - reg = ; + reg = ; label = "pm8550vs_e_die_temp"; qcom,pre-scaling = <1 1>; }; pm8550vs_g_die_temp { - reg = ; + reg = ; label = "pm8550vs_g_die_temp"; qcom,pre-scaling = <1 1>; }; pm8550ve_die_temp { - reg = ; + reg = ; label = "pm8550ve_die_temp"; qcom,pre-scaling = <1 1>; }; diff --git a/qcom/pmk8550.dtsi b/qcom/pmk8550.dtsi index 23455f96..f2faa3f0 100644 --- a/qcom/pmk8550.dtsi +++ b/qcom/pmk8550.dtsi @@ -9,7 +9,6 @@ #include #include #include -#define PM8550VE_SID 8 #include &spmi_bus { From a1134d3fc4b52d4d023c4f8b666ce536f63dd605 Mon Sep 17 00:00:00 2001 From: Anjelique Melendez Date: Mon, 23 Oct 2023 17:56:17 -0700 Subject: [PATCH 2/2] ARM: dts: msm: Add PMIC ADC5 GEN3 channels for sun Add VADC channels provided by pmk8550 that are used by thermal clients on Sun. Also, add the corresponding thermal zone devices. Change-Id: Ia3113ff6f5c76cd7f4582808b1672d3ddecadab7 Signed-off-by: Anjelique Melendez --- qcom/sun-pmic-overlay.dtsi | 233 +++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index 114aebe2..9f38df7e 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -108,3 +108,236 @@ enable-active-high; }; }; + +&pm8550_tz { + io-channels = <&pmk8550_vadc PM8550_ADC5_GEN3_DIE_TEMP>; + io-channel-names = "thermal"; +}; + +&pm8550vs_f_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(5)>; + io-channel-names = "thermal"; +}; + +&pm8550vs_j_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(9)>; + io-channel-names = "thermal"; +}; + +&pm8550ve_d_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(3)>; + io-channel-names = "thermal"; +}; + +&pm8550ve_g_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(6)>; + io-channel-names = "thermal"; +}; + +&pm8550ve_i_tz { + io-channels = <&pmk8550_vadc PM8550VX_ADC5_GEN3_DIE_TEMP(8)>; + io-channel-names = "thermal"; +}; + +&pmk8550_vadc { + pm8550_skin_therm { + reg = ; + label = "pm8550_skin_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pm8550_cam_flash_therm { + reg = ; + label = "pm8550_cam_flash_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pm8550_wlan_therm { + reg = ; + label = "pm8550_wlan_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pm8550_pa_therm1 { + reg = ; + label = "pm8550_pa_therm_1"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pm8550_rear_tof_therm { + reg = ; + label = "pm8550_rear_tof_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pmk8550_xo_therm { + reg = ; + label = "pmk8550_xo_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,adc-tm-type = <1>; + }; + + pm8550vs_f_die_temp { + reg = ; + label = "pm8550vs_f_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pm8550vs_j_die_temp { + reg = ; + label = "pm8550vs_j_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pm8550ve_d_die_temp { + reg = ; + label = "pm8550ve_d_die_temp"; + qcom,pre-scaling = <1 1>; + }; + + pm8550ve_g_die_temp { + reg = ; + label = "pm8550ve_g_die_temp"; + qom,pre-scaling = <1 1>; + }; + + pm8550ve_i_die_temp { + reg = ; + label = "pm8550ve_i_die_temp"; + qcom,pre-scaling = <1 1>; + }; +}; + +&thermal_zones { + sys-therm1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PM8550_ADC5_GEN3_AMUX_THM1_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm2 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PM8550_ADC5_GEN3_AMUX_THM2_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm3 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PM8550_ADC5_GEN3_AMUX_THM3_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm4 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PM8550_ADC5_GEN3_AMUX_THM4_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm5 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pmk8550_vadc PM8550_ADC5_GEN3_AMUX_THM5_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + sys-therm6 { + 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"; + }; + + }; + }; +};