提示:高通平台 qcom camera dtsi
目录
前言
本文介绍camera dtsi配置相关内容。
参考平台:qcom sdm660
一、CCI介绍
高通平台camera 也是一个I2C设备,但其封装了一个相机控制接口,成为CCI(Camera Control Interface)。
CCI与I2C基本一致,是一个双线、双向、半双工、串行接口。
CCI可支持的clk速率(Hz)有四种:100K 400K 定制 和1M
一般高通平台一路CCI会配置两组I2C 可通过cci-master<0/1>选择不同的I2C。例如:sdm660-camera.dtsi
gpios = <&tlmm 36 0>,<&tlmm 37 0>,<&tlmm 38 0>,<&tlmm 39 0>;
有时我们可以根据硬件原理图上的camera i2c 对应的gpio号,找到平台代码上对应的CCI,添加调试的camera的硬件信息配置。
cci: qcom,cci@ca0c000 {
cell-index = <0>;
compatible = "qcom,cci";
reg = <0xca0c000 0x4000>;
#address-cells = <1>;
#size-cells = <0>;
reg-names = "cci";
interrupts = <0 295 0>;
interrupt-names = "cci";
status = "ok";
mmagic-supply = <&gdsc_bimc_smmu>;
gdscr-supply = <&gdsc_camss_top>;
qcom,cam-vreg-name = "mmagic", "gdscr";
clocks = <&clock_rpmcc RPM_SMD_MMSSNOC_AXI_CLK>,
<&clock_mmss MMSS_MNOC_AHB_CLK>,
<&clock_mmss MMSS_BIMC_SMMU_AHB_CLK>,
<&clock_mmss MMSS_BIMC_SMMU_AXI_CLK>,
<&clock_mmss MMSS_CAMSS_AHB_CLK>,
<&clock_mmss MMSS_CAMSS_TOP_AHB_CLK>,
<&clock_mmss CCI_CLK_SRC>,
<&clock_mmss MMSS_CAMSS_CCI_AHB_CLK>,
<&clock_mmss MMSS_CAMSS_CCI_CLK>;
clock-names = "mmssnoc_axi", "mnoc_ahb", "smmu_ahb", "smmu_axi",
"camss_ahb_clk", "camss_top_ahb_clk",
"cci_src_clk", "cci_ahb_clk", "camss_cci_clk";
qcom,clock-rates = <0 0 0 0 0 0 19200000 0 0>,
<0 0 0 0 0 0 37500000 0 0>;
pinctrl-names = "cci_default", "cci_suspend";
pinctrl-0 = <&cci0_a