[RK3399][Android7.1] 调试笔记 --- DDR动态调节功能开启

OS: Android 7.1
Board: Firefly-RK3399
Kernel: v4.4.55

功能开启

sdk默认是关闭此功能的,如下三步使能。

  1. 打开dmc(Dynamic Memory Controller)和dfi功能,dfi负责监测ddr loading.
kris@eco:~/firefly_rk3399$ g df kernel/
diff --git a/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-edp.dts b/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-edp.dts
index 7640a59..28d83d7 100644
--- a/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-edp.dts
+++ b/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-edp.dts
@@ -197,3 +197,14 @@
                };
        };
 };
+
+&dfi {
+status = "okay";
+};
+
+&dmc {
+status = "okay";
+center-supply = <&vdd_center>;
+};
  1. 将dfi驱动的加载放在dmc之前,dmc会读取dfi
diff --git a/kernel/drivers/devfreq/Makefile b/kernel/drivers/devfreq/Makefile
index c3f4da8..613bf8b 100644
--- a/kernel/drivers/devfreq/Makefile
+++ b/kernel/drivers/devfreq/Makefile
@@ -5,11 +5,14 @@ obj-$(CONFIG_DEVFREQ_GOV_PERFORMANCE) += governor_performance.o
 obj-$(CONFIG_DEVFREQ_GOV_POWERSAVE)    += governor_powersave.o
 obj-$(CONFIG_DEVFREQ_GOV_USERSPACE)    += governor_userspace.o
 
+
+# DEVFREQ Event Drivers
+obj-$(CONFIG_PM_DEVFREQ_EVENT)         += event/
+
 # DEVFREQ Drivers
 obj-$(CONFIG_ARM_EXYNOS4_BUS_DEVFREQ)  += exynos/
 obj-$(CONFIG_ARM_EXYNOS5_BUS_DEVFREQ)  += exynos/
 obj-$(CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ) += rockchip_dmc.o
 obj-$(CONFIG_ARM_TEGRA_DEVFREQ)                += tegra-devfreq.o
 
-# DEVFREQ Event Drivers
-obj-$(CONFIG_PM_DEVFREQ_EVENT)         += event/
+
  1. 移除defconfig中的CONFIG_LCDC_RK322X, rk3399使用DRM
diff --git a/kernel/arch/arm64/configs/firefly_defconfig b/kernel/arch/arm64/configs/firefly_defconfig
index 12cece9..a80d8ad 100644
--- a/kernel/arch/arm64/configs/firefly_defconfig
+++ b/kernel/arch/arm64/configs/firefly_defconfig
@@ -473,7 +473,7 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BACKLIGHT_PWM=y
 CONFIG_FB_ROCKCHIP=y
 CONFIG_LCDC_RK3368=y
-CONFIG_LCDC_RK322X=y
+#CONFIG_LCDC_RK322X=y

调试接口

rk3399_firefly_edp_box:/sys/class/devfreq/dmc # ls
available_frequencies device   max_freq         power       trans_stat 
available_governors   governor min_freq         subsystem   uevent     
cur_freq              load     polling_interval target_freq 


测试结果:
目前用Firefly的板子测试下来起来后一直是200MHz, 界面会比较卡,后面等拿rk release版再看看情况,理论上不应该这样。


在rockchip rk3399 sdk上运行使用正常。 ---- 2018.12.25

你可能感兴趣的:(RK3399,子类__DDR_DVFS)