diff --git a/qcom/lahaina-cdp.dtsi b/qcom/lahaina-cdp.dtsi index 735be4e52a9f..e6799c18bdcc 100644 --- a/qcom/lahaina-cdp.dtsi +++ b/qcom/lahaina-cdp.dtsi @@ -4,6 +4,7 @@ #include "lahaina-pmic-overlay.dtsi" #include "lahaina-audio-overlay.dtsi" #include "display/lahaina-sde-display-cdp.dtsi" +#include "lahaina-thermal-overlay.dtsi" &spmi_debug_bus { status = "ok"; diff --git a/qcom/lahaina-mtp.dtsi b/qcom/lahaina-mtp.dtsi index 0755a9157f64..3177135db5f6 100644 --- a/qcom/lahaina-mtp.dtsi +++ b/qcom/lahaina-mtp.dtsi @@ -4,6 +4,7 @@ #include "lahaina-pmic-overlay.dtsi" #include "lahaina-audio-overlay.dtsi" #include "display/lahaina-sde-display-mtp.dtsi" +#include "lahaina-thermal-overlay.dtsi" &spmi_debug_bus { status = "ok"; diff --git a/qcom/lahaina-qrd.dtsi b/qcom/lahaina-qrd.dtsi index 28392c7365b8..ca018b00a504 100644 --- a/qcom/lahaina-qrd.dtsi +++ b/qcom/lahaina-qrd.dtsi @@ -2,6 +2,7 @@ #include "display/lahaina-sde-display-qrd.dtsi" #include "camera/lahaina-camera-sensor-mtp.dtsi" #include "lahaina-audio-overlay.dtsi" +#include "lahaina-thermal-overlay.dtsi" &ufsphy_mem { compatible = "qcom,ufs-phy-qmp-v4-lahaina"; diff --git a/qcom/lahaina-thermal-overlay.dtsi b/qcom/lahaina-thermal-overlay.dtsi new file mode 100644 index 000000000000..69093cf1dfb5 --- /dev/null +++ b/qcom/lahaina-thermal-overlay.dtsi @@ -0,0 +1,131 @@ +#include + +&mdss_mdp { + #cooling-cells = <2>; +}; + +&thermal_zones { + socd { + cooling-maps { + socd_cpu4 { + trip = <&socd_trip>; + cooling-device = <&cpu4_isolate 1 1>; + }; + + socd_cpu5 { + trip = <&socd_trip>; + cooling-device = <&cpu5_isolate 1 1>; + }; + + socd_cpu6 { + trip = <&socd_trip>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + socd_cpu7 { + trip = <&socd_trip>; + cooling-device = <&cpu7_isolate 1 1>; + }; + }; + }; + + + pm8350b-bcl-lvl0 { + cooling-maps { + vbat_cpu4 { + trip = <&b_bcl_lvl0>; + cooling-device = <&cpu4_isolate 1 1>; + }; + + vbat_cpu5 { + trip = <&b_bcl_lvl0>; + cooling-device = <&cpu5_isolate 1 1>; + }; + + vbat_gpu0 { + trip = <&b_bcl_lvl0>; + cooling-device = <&msm_gpu 2 2>; + }; + }; + }; + + pm8350b-bcl-lvl1 { + cooling-maps { + vbat_cpu6 { + trip = <&b_bcl_lvl1>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + vbat_cpu7 { + trip = <&b_bcl_lvl1>; + cooling-device = <&cpu7_isolate 1 1>; + }; + + vbat_gpu1 { + trip = <&b_bcl_lvl1>; + cooling-device = <&msm_gpu 4 4>; + }; + }; + }; + + pm8350b-bcl-lvl2 { + cooling-maps { + vbat_gpu2 { + trip = <&b_bcl_lvl2>; + cooling-device = <&msm_gpu THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + }; + }; + + pm8350c-bcl-lvl0 { + disable-thermal-zone; + cooling-maps { + vph_cpu4 { + trip = <&c_bcl_lvl0>; + cooling-device = <&cpu4_isolate 1 1>; + }; + + vph_cpu5 { + trip = <&c_bcl_lvl0>; + cooling-device = <&cpu5_isolate 1 1>; + }; + + vph_gpu0 { + trip = <&c_bcl_lvl0>; + cooling-device = <&msm_gpu 2 2>; + }; + }; + }; + + pm8350c-bcl-lvl1 { + disable-thermal-zone; + cooling-maps { + vph_cpu6 { + trip = <&c_bcl_lvl1>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + vph_cpu7 { + trip = <&c_bcl_lvl1>; + cooling-device = <&cpu7_isolate 1 1>; + }; + + vph_gpu1 { + trip = <&c_bcl_lvl1>; + cooling-device = <&msm_gpu 4 4>; + }; + }; + }; + + pm8350c-bcl-lvl2 { + disable-thermal-zone; + cooling-maps { + vph_gpu2 { + trip = <&c_bcl_lvl2>; + cooling-device = <&msm_gpu THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + }; + }; +}; diff --git a/qcom/pm8350b.dtsi b/qcom/pm8350b.dtsi index e6a21d80e3c8..ad52a160c94f 100644 --- a/qcom/pm8350b.dtsi +++ b/qcom/pm8350b.dtsi @@ -30,6 +30,23 @@ #interrupt-cells = <2>; }; + pm8350b_bcl: bcl@4700 { + compatible = "qcom,bcl-v5"; + reg = <0x4700 0x100>; + interrupts = <0x3 0x47 0x0 IRQ_TYPE_NONE>, + <0x3 0x47 0x1 IRQ_TYPE_NONE>, + <0x3 0x47 0x2 IRQ_TYPE_NONE>; + interrupt-names = "bcl-lvl0", + "bcl-lvl1", + "bcl-lvl2"; + #thermal-sensor-cells = <1>; + }; + + bcl_soc:bcl-soc { + compatible = "qcom,msm-bcl-soc"; + #thermal-sensor-cells = <0>; + }; + pm8350b_haptics: qcom,hv-haptics@f000 { compatible = "qcom,hv-haptics"; reg = <0xf000>, <0xf100>; @@ -176,4 +193,94 @@ }; }; }; + + pm8350b-ibat-lvl0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350b_bcl 0>; + + trips { + ibat_lvl0:ibat-lvl0 { + temperature = <4500>; + hysteresis = <200>; + type = "passive"; + }; + }; + }; + + pm8350b-ibat-lvl1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350b_bcl 1>; + + trips { + ibat_lvl1:ibat-lvl1 { + temperature = <5000>; + hysteresis = <200>; + type = "passive"; + }; + }; + }; + + pm8350b-bcl-lvl0 { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350b_bcl 5>; + + trips { + b_bcl_lvl0: b-bcl-lvl0 { + temperature = <1>; + hysteresis = <1>; + type = "passive"; + }; + }; + }; + + pm8350b-bcl-lvl1 { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350b_bcl 6>; + + trips { + b_bcl_lvl1: b-bcl-lvl1 { + temperature = <1>; + hysteresis = <1>; + type = "passive"; + }; + }; + }; + + pm8350b-bcl-lvl2 { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350b_bcl 7>; + + trips { + b_bcl_lvl2: b-bcl-lvl2 { + temperature = <1>; + hysteresis = <1>; + type = "passive"; + }; + }; + }; + + socd { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&bcl_soc>; + + trips { + socd_trip:socd-trip { + temperature = <90>; + hysteresis = <0>; + type = "passive"; + }; + }; + }; }; diff --git a/qcom/pm8350c.dtsi b/qcom/pm8350c.dtsi index 14ee3081f065..e04bad7ab114 100644 --- a/qcom/pm8350c.dtsi +++ b/qcom/pm8350c.dtsi @@ -71,6 +71,18 @@ }; }; + pm8350c_bcl: bcl@4700 { + compatible = "qcom,bcl-v5"; + reg = <0x4700 0x100>; + interrupts = <0x2 0x47 0x0 IRQ_TYPE_NONE>, + <0x2 0x47 0x1 IRQ_TYPE_NONE>, + <0x2 0x47 0x2 IRQ_TYPE_NONE>; + interrupt-names = "bcl-lvl0", + "bcl-lvl1", + "bcl-lvl2"; + #thermal-sensor-cells = <1>; + }; + pm8350c_flash: qcom,flash_led@ee00 { compatible = "qcom,pm8350c-flash-led"; reg = <0xee00>; @@ -208,4 +220,49 @@ }; }; }; + + pm8350c-bcl-lvl0 { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350c_bcl 5>; + + trips { + c_bcl_lvl0: c-bcl-lvl0 { + temperature = <1>; + hysteresis = <1>; + type = "passive"; + }; + }; + }; + + pm8350c-bcl-lvl1 { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350c_bcl 6>; + + trips { + c_bcl_lvl1: c-bcl-lvl1 { + temperature = <1>; + hysteresis = <1>; + type = "passive"; + }; + }; + }; + + pm8350c-bcl-lvl2 { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pm8350c_bcl 7>; + + trips { + c_bcl_lvl2: c-bcl-lvl2 { + temperature = <1>; + hysteresis = <1>; + type = "passive"; + }; + }; + }; };