From 8ab24059e3b656c88403085494948a192e43f84b Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Thu, 24 Nov 2016 14:29:56 +0800 Subject: [PATCH] ARM64: dts: rk3399: add clock-latency-ns for each opp We may miss clock-latency-ns when disable some opps, then cpufreq will fallback to performance governor, so add clock-latency-ns for each opp to make disable opp easy. code as below: drivers/cpufreq/cpufreq.c:2010 if (policy->governor->max_transition_latency && policy->cpuinfo.transition_latency > policy->governor->max_transition_latency) { if (!gov) return -EINVAL; else { pr_warn("%s governor failed, too long transition latency of HW, fallback to %s governor\n", policy->governor->name, gov->name); policy->governor = gov; } } Change-Id: I93cff667deb487baa0115b7af0206f0803010d37 Signed-off-by: Chen Liang --- arch/arm64/boot/dts/rockchip/rk3399-box.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-evb-rev2.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-evb-rev3.dtsi | 14 ++++++++++++++ .../dts/rockchip/rk3399-mid-818-android-next.dts | 14 ++++++++++++++ .../boot/dts/rockchip/rk3399-mid-818-android.dts | 14 ++++++++++++++ .../arm64/boot/dts/rockchip/rk3399-rv1-android.dts | 14 ++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts | 14 ++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 +++++++++ 9 files changed, 119 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-box.dtsi index 6b605ca19654..a1fffffbb09a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-box.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-box.dtsi @@ -290,26 +290,32 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <1125000>; + clock-latency-ns = <40000>; }; }; @@ -322,34 +328,42 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <950000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1025000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1175000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; opp-microvolt = <1250000>; + clock-latency-ns = <40000>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2.dtsi index c0a4f71452fc..869a1d805602 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2.dtsi @@ -84,28 +84,34 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; status = "disabeld"; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; status = "disabeld"; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <1075000>; + clock-latency-ns = <40000>; status = "disabeld"; }; }; @@ -119,33 +125,40 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <950000>; + clock-latency-ns = <40000>; status = "disabeld"; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1025000>; + clock-latency-ns = <40000>; status = "disabeld"; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1125000>; + clock-latency-ns = <40000>; status = "disabeld"; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1200000>; + clock-latency-ns = <40000>; status = "disabeld"; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3.dtsi index 335a016b1713..aa30305306f5 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3.dtsi @@ -76,26 +76,32 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; }; }; @@ -108,34 +114,42 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <900000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1000000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1150000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; opp-microvolt = <1225000>; + clock-latency-ns = <40000>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android-next.dts b/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android-next.dts index 89b7fe1531b5..23fe3b15c8e4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android-next.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android-next.dts @@ -317,26 +317,32 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; status="disabled"; }; }; @@ -350,34 +356,42 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <950000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1025000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1175000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; opp-microvolt = <1250000>; + clock-latency-ns = <40000>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts index e049493c71d8..b8b173fb794a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts @@ -305,26 +305,32 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; status="disabled"; }; }; @@ -338,34 +344,42 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <950000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1025000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1175000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; opp-microvolt = <1250000>; + clock-latency-ns = <40000>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts index 18f9fd31ee5e..f457cfd2b772 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts @@ -196,26 +196,32 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1075000>; + clock-latency-ns = <40000>; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; status="disabled"; }; }; @@ -229,34 +235,42 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <900000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1000000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1150000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; opp-microvolt = <1225000>; + clock-latency-ns = <40000>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi index 905687518a57..f6ba3674c551 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi @@ -659,22 +659,27 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; }; @@ -687,34 +692,42 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <950000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1025000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1175000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; opp-microvolt = <1250000>; + clock-latency-ns = <40000>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts index e415a88d6624..25e1b0692474 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts @@ -308,26 +308,32 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1075000>; + clock-latency-ns = <40000>; }; opp@1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <1100000>; + clock-latency-ns = <40000>; status="disabled"; }; }; @@ -341,34 +347,42 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <825000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <900000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1000000>; + clock-latency-ns = <40000>; }; opp@1608000000 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <1050000>; + clock-latency-ns = <40000>; }; opp@1800000000 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1150000>; + clock-latency-ns = <40000>; }; opp@1992000000 { opp-hz = /bits/ 64 <1992000000>; opp-microvolt = <1225000>; + clock-latency-ns = <40000>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index baeaed53cd4d..6b69f83343ee 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -218,22 +218,27 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <875000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; opp@1416000000 { opp-hz = /bits/ 64 <1416000000>; opp-microvolt = <1025000>; + clock-latency-ns = <40000>; }; }; @@ -249,18 +254,22 @@ opp@600000000 { opp-hz = /bits/ 64 <600000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@816000000 { opp-hz = /bits/ 64 <816000000>; opp-microvolt = <800000>; + clock-latency-ns = <40000>; }; opp@1008000000 { opp-hz = /bits/ 64 <1008000000>; opp-microvolt = <850000>; + clock-latency-ns = <40000>; }; opp@1200000000 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <925000>; + clock-latency-ns = <40000>; }; }; -- 2.34.1