当前位置:网站首页>MCLK configuration of Qualcomm platform camera
MCLK configuration of Qualcomm platform camera
2022-06-28 05:09:00 【bobuddy】
Preface
MCLK It's the main control chip Provide to cam sensor The frequency of normal operation ,
Qcom The platform is generally not 24MHz, From other clock sources , Measured at 23.8MHz about .
When turning on the camera , To measure this clock .
cam snesor You can use the clock provided by the platform or the built-in clock source , But the software configuration should be consistent .
Platform clock source frequency can be modified , If not, you can add a new group .
Hardware platform :msm8909、msm8953
software platform :Android8.1、Android9.0
Reference documents :
KBA_170619001341_3__Camera_How_to_change_MCLK_driv.pdf
Catalog
Preface
debugging see cam mclk
debugging see mclk frequency
debugging modify mclk frequency
debugging modify mclk Driving ability
debugging open mclk Related drivers log
debugging see cam mclk
TIMER_CLK Refers to the... Connected by the camera sensor PHY The operating frequency of the interface .
for example ,PHY0 CAMSS_PHY0_CSI0PHYTIMER_CLK.
route :
kernel/arch/arm/boot/dts/msm/msmXXXX-camera.dtsi
You can set... In the above file , among XXX Means in use MSM Chipset .
in addition , It can also be confirmed during camera data streaming , The way is through adb shell Check the corresponding clock information .
The following commands can be issued through the command prompt window to confirm PHY0 Timer clock value : /* msm8909 Android5.0/8.0 */
Instructions :
adb root
adb remount
adb shell
cd /sys/kernel/debug/clk/gcc_camss_csi0phytimer_clk
cd /sys/kernel/debug/clk/gcc_camss_mclk0_clk/
cat measure
200000146
24000292
debugging see mclk frequency
camera When it's running , This value right here is mclk Output clock frequency ( Default 23800000)
adb shell cat sys/kernel/debug/clk/gcc_camss_mclk0_clk/measure
Add :
msm8909 Default 24M The specific configuration is kernel/drivers/clk/qcom/clock-gcc-8909.c
The modification method is as follows , example It is amended as follows 27MHz
View the current mclk Information about
adb shell
/sys/kernel/debug/clk/gcc_camss_mclk0_clk
echo 1 > enable // Give Way mclk Direct output camera A clock of normal operating frequency
cat measure // stay camera When it's working properly You can view the current clock frequency
cat list_rates // View the current mclk List of supported frequencies
debugging modify mclk frequency
camera Change the default mclk Clock configuration // msm8909
Code such as :
Kernel Modify clock source
kernel/drivers/clk/qcom/clock-gcc-8909.c
@@ -837,6 +837,12 @@ static struct rcg_clk camss_gp1_clk_src = {
static struct clk_freq_tbl ftbl_gcc_camss_mclk0_1_clk[] = {
F( 24000000, gpll2, 1, 1, 33),
+ F( 27000000, gpll0, 1, 2, 59),
+/* Begin: add by sys for set camera0 mclk 27MHz */
+ // set cma0_mclk 27MHz add by sys
+ // F(f, s, div, m, n)
+ // target clock=(source clock/div)*(M/N), 27=(800/1)*(2/59)
+/* End: add by sys for set camera0 mclk 27MHz */
F( 66670000, gpll0, 12, 0, 0),
F_END
};
vendor modify lib In drive mclk To configure
/vendor/qcom/proprietary/mm-camera/mm-camera2/
media-controller/modules/sensors/sensor_libs/ov8865_hct/ov8865_hct_lib.c
@@ -143,7 +143,7 @@ static struct msm_sensor_power_setting power_setting[] = {
{
.seq_type = SENSOR_CLK,
.seq_val = SENSOR_CAM_MCLK,
- .config_val = 24000000,
+ .config_val = 27000000, //24000000,
.delay = 10,
},
debugging modify mclk Driving ability
/*sensors */
cam_sensor_mclk0_default: cam_sensor_mclk0_default {
/* MCLK0 */
mux {
/* CLK, DATA */
pins = "gpio26";
function = "cam_mclk";
};
config {
pins = "gpio26";
bias-disable; /* No PULL */
//* 2 mA */ /* change to 4mA, 2, 4, 6, 8, 10… max is 16mA*/
// Default 2ma, The maximum value can be changed to 16ma
drive-strength = <2>; /* 2 MA */
};
};
debugging open mclk Related drivers log
route :
kernel\msm-4.9\drivers\media\platform\msm\camera_v2\common\cam_soc_api.c
Code such as :
-#define CDBG(fmt, args...) pr_debug(fmt, ##args)
+#define CDBG(fmt, args...) pr_err(fmt, ##args)
边栏推荐
- 氨基染料研究:Lumiprobe FAM 胺,6-异构体
- Lumiprobe cell imaging analysis: PKH26 cell membrane labeling kit
- Unity delegate
- Distributed transaction - Final consistency scheme based on message compensation (local message table, message queue)
- !‘ Cat 'is not an internal or external command, nor is it a runnable program or batch file.
- Amino dye research: lumiprobe fam amine, 6-isomer
- metaRTC5.0 API编程指南(一)
- [JVM series] JVM tuning
- 开关电源电压型与电流型控制
- When excel copies the contents of a row, the columns are separated by the tab "\t"
猜你喜欢
随机推荐
cgo+gSoap+onvif学习总结:8、arm平台交叉编译运行及常见问题总结
Severe tire damage: the first rock band in the world to broadcast live on the Internet
刘海屏手机在部分页面通过[[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom得到底部安全区高度为0问题
BioVendor sRAGE蛋白解决方案
信息学奥赛一本通 1360:奇怪的电梯(lift)
[leetcode] 12. Integer to Roman numeral
开关电源电压型与电流型控制
程序员-放羊娃
Biovendor sRAGE antibody solution
二级造价工程师证书含金量到底有多高?看这些就知道了
2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案
2022年安全员-B证考试题库及答案
别卷!如何高质量地复现一篇论文?
Keil C51的Data Overlaying机制导致的函数重入问题
深度强化学习笔记
如何从零设计一款牛逼的高并发架构(建议收藏)
无线传感器网络学习笔记(一)
高通平台 Camera 之 MCLK 配置
2022高处安装、维护、拆除考试题及答案
【SkyWalking】一口气学完分布式链路追踪SkyWalking








