diff --git a/arch/arm64/boot/dts/rockchip/rk1808.dtsi b/arch/arm64/boot/dts/rockchip/rk1808.dtsi index 931f6b7e3f4a..facb3499a474 100644 --- a/arch/arm64/boot/dts/rockchip/rk1808.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk1808.dtsi @@ -58,7 +58,7 @@ compatible = "simple-power-model"; ref-leakage = <31>; static-coefficient = <100000>; - ts = <59740 24105 (-245) 7>; + ts = <597400 241050 (-2450) 70>; thermal-zone = "soc-thermal"; }; }; @@ -1702,7 +1702,7 @@ ref-leakage = <31>; static-coefficient = <100000>; dynamic-coefficient = <3080>; - ts = <8861 30312 (-500) 10>; + ts = <88610 303120 (-5000) 100>; thermal-zone = "soc-thermal"; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399pro-npu.dtsi b/arch/arm64/boot/dts/rockchip/rk3399pro-npu.dtsi index e256edbd102f..e98fe9aeff10 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399pro-npu.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399pro-npu.dtsi @@ -39,7 +39,7 @@ compatible = "simple-power-model"; ref-leakage = <31>; static-coefficient = <100000>; - ts = <59740 24105 (-245) 7>; + ts = <597400 241050 (-2450) 70>; thermal-zone = "soc-thermal"; }; }; @@ -579,7 +579,7 @@ ref-leakage = <31>; static-coefficient = <100000>; dynamic-coefficient = <3080>; - ts = <8861 30312 (-500) 10>; + ts = <88610 303120 (-5000) 100>; thermal-zone = "soc-thermal"; }; }; diff --git a/drivers/soc/rockchip/rockchip_ipa.c b/drivers/soc/rockchip/rockchip_ipa.c index 596b14bd944f..b748e734bc03 100644 --- a/drivers/soc/rockchip/rockchip_ipa.c +++ b/drivers/soc/rockchip/rockchip_ipa.c @@ -106,7 +106,8 @@ static u32 calculate_temp_scaling_factor(s32 ts[4], s64 t) + ts[1] * t + ts[0] * 1000LL; - s64 res_unclamped = div_s64(res_big, 1000); + /* ts has beed multiplied by 10 in devicetree */ + s64 res_unclamped = div_s64(res_big, 10000); /* Clamp to range of 0x to 10x the static power */ return clamp(res_unclamped, (s64)0, (s64)10000000);