- mclk频率修改
static struct clk_freq_tbl ftbl_gcc_camss_mclk0_1_clk[] = {
F( 24000000, gpll2, 1, 1, 33),
F( 66670000, gpll0, 12, 0, 0),
F_END
};
- mclk驱动能力修改
第一步,找到mclk输出的gpio口:
gpios = <&tlmm 27 0>,
<&tlmm 33 0>,
<&tlmm 38 0>;
qcom,gpio-vana= <1>;
qcom,gpio-reset = <2>;
qcom,gpio-req-tbl-num = <0 1 2>;
qcom,gpio-req-tbl-flags = <1 0 0>;
qcom,gpio-req-tbl-label = "CAMIF_MCLK1",
"CAM_AVDD1",
"CAM_RESET1";
qcom,sensor-position = <0x1>;
qcom,sensor-mode = <0>;
qcom,cci-master = <1>;
clocks = <&clock_gcc clk_mclk1_clk_src>,
<&clock_gcc clk_gcc_camss_mclk1_clk>;
clock-names = "cam_src_clk", "cam_clk";
qcom,clock-rates = <24000000 0>;
第二步,修改gpio驱动能力,修改xxx-pinctrl.dtsi
cam_sensor_mclk1_default: cam_sensor_mclk1_default {
/* MCLK1 */
mux {
/* CLK, DATA */
pins = "gpio27";
function = "cam_mclk";
};
config {
pins = "gpio27";
bias-disable; /* No PULL */
drive-strength = <2>; /* 2 MA */
};
};
- 修改mipi频率
1)参考芯片手册,分频系数,调整寄存器值。
2)修改op_pixel_clk,data_rate
{
.x_output = 1296,
.y_output = 972,
.line_length_pclk = 750,
.frame_length_lines = 2000,
.op_pixel_clk = 165600000,//clk = 448Mhz ,mipi_speed = 896Mbps = 180Mx10bit/2lane
.binning_factor = 2,
.min_fps = 10.00,
.max_fps = 30.00,
.mode = SENSOR_DEFAULT_MODE,
.offset_x = 0,
.offset_y = 0,
.scale_factor = 0,
.data_rate =1656000000ULL,
},
网友评论