当前位置:网站首页>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)
边栏推荐
- Realizing color detection with OpenCV
- Excel将一行的内容进行复制时,列与列之间是用制表符“\t”进行分隔的
- Voltage mode and current mode control of switching power supply
- Biovendor sRAGE antibody solution
- 【LeetCode】12、整数转罗马数字
- 电源插座是如何传输电的?困扰小伙伴这么多年的简单问题
- Analysis of distributed transaction solution Seata golang
- 摄像头基础知识
- JS 文本框失去焦点修改全半角文字和符号
- Keil C51的Data Overlaying机制导致的函数重入问题
猜你喜欢

学习太极创客 — MQTT 第二章(四)ESP8266 保留消息应用

学习太极创客 — MQTT 第二章(六)MQTT 遗嘱

cgo+gSoap+onvif学习总结:8、arm平台交叉编译运行及常见问题总结

2022新版nft源码中国元宇宙数字藏品艺术品交易平台源码

机器人学DH参数及利用matlab符号运算推导

Dart learning - functions, classes

Leetcode 88: merge two ordered arrays

并发之wait/notify说明
![[noip2002 popularization group] cross the river pawn](/img/6c/31fa210e08c7fd07691a1c5320154e.png)
[noip2002 popularization group] cross the river pawn

Where does the storm go? Whose pot is the weather forecast wrong?
随机推荐
How long will the PMP test results come out? You must know this!
IP datagram sending and forwarding process
2022年材料员-通用基础(材料员)操作证考试题库及答案
2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案
吴恩达深度学习测验题:deeplearning.ai-week1-quiz
[JVM series] JVM tuning
项目经理考完PMP就够了?不是的!
机器人学DH参数及利用matlab符号运算推导
无线传感器网络学习笔记(一)
BioVendor sRAGE Elisa试剂盒化学性质和技术研究
Biovendor sRAGE protein solution
Store inventory management system source code
Standard particle swarm optimization C language program
Hundreds of lines of code to implement a script interpreter
基于微信小程序的婚纱影楼门户小程序
Performance degradation during dpdk source code testing
metaRTC5.0编程之p2p网络穿透(stun)指南
Lumiprobe细胞成像分析:PKH26 细胞膜标记试剂盒
The latest examination questions and answers for the eight members (standard members) of Liaoning architecture in 2022
!‘cat‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。