设置对应的含义为:
> status是vin驱动的总开关,对应的是media设备,使用vin时必须设为okay;
> csi_top是vin模块的时钟,实际使用时可以根据sensor的帧率和分辨率来设置;
> csi_isp是isp模块时钟,实际使用时可以根据sensor的帧率和分辨率来设置;
> work_mode: 0:online mode 1:offline mode, 根据使用需求配置;
> flash0_type: 0:FLASH_RELATING, 1:FLASH_EN_INDEPEND, 2:FLASH_POWER
> flash0_en: flash enable gpio, type = 0 of 1
> flash0_mode: flash mode gpio, type = 0 of 1
> flash0_flvdd: flash module io power handle string, pmu power supply, type = 2
> flash0_flvdd_vol: flash module io power voltage, pmu power supply, type = 2
> status: 是否使用flash, disable代表关,okay代表开
> actuator0_name: vcm name
> actuator0_slave: vcm iic slave address
> actuator0_af_pwdn: vcm power down gpio
> actuator0_afvdd: vcm power handle string, pmu power supply
> actuator0_afvdd_vol: vcm power voltage, pmu power supply
> status: vcm if used, disable代表关,okay代表开
> device_type: sensor type
> sensor0_mname: sensor name
> sensor0_twi_cci_id:sensor所使用的twi或者cci的id。
> sensor0_twi_addr:sensor的twi地址
> sensor0_mclk_id:sensor所使用的mclk的id。
> sensor0_pos:sensor的位置,前置还是后置,主要用在平板上。
> sensor0_isp_used: not use isp 1:use isp
> sensor0_fmt: 0:yuv 1:bayer raw rgb
> sensor0_stby_mode: not shut down power at standby 1:shut down power at standby
> sensor0_vflip: flip in vertical direction 0:disable 1:enable
> sensor0_hflip: flip in horizontal direction 0:disable 1:enable
> sensor0_iovdd-supply: camera module io power handle string, pmu power supply
> sensor0_iovdd_vol: camera module io power voltage, pmu power supply
> sensor0_avdd-supply: camera module analog power handle string, pmu power supply
> sensor0_avdd_vol: camera module analog power voltage, pmu power supply
> sensor0_dvdd-supply: camera module core power handle string, pmu power supply
> sensor0_dvdd_vol: camera module core power voltage, pmu power supply
> sensor0_power_en: camera module power enable gpio
> sensor0_reset: camera module reset gpio
> sensor0_pwdn: camera module pwdn gpio
> sensor0_sm_hs: camera module sm_hs gpio
> sensor0_sm_vs: camera module sm_vs gpio
> status: open or close sensor device
> flash/actautor/sensor节点用于对应的外设的开关和配置。这些节点的配置一般需要参考对应方案的原理图和外设的data sheet来完成。
> vinc0_csi_sel:表示该pipeline上parser的id,必须配置,且为有效id。
> vinc0_mipi_sel:表示该pipeline上mipi(sublvds/hispi)的id,不使用时配置为0xff。
> vinc0_isp_sel:表示该pipeline上isp的id,必须配置,当isp为空时,这个isp只是表示路由不做isp的效果处理。
> vinc0_isp_tx_ch表示该pipeline上isp的ch,必须配置,默认为0。当sensor是bt656多通道或者WDR出RAW时,该ch可以配置0~3的值。
> vinc0_tdm_rx_sel: 表示该pipeline上tdm rx的ch,必须配置,默认为0。当不使用tdm功能时,配置为0xff;
> vinc0_rear_sensor_sel表示该pipeline上使用的后置sensor的id。
> vinc0_front_sensor_sel 表示该pipeline上使用的前置sensor的id。
> vinc0_sensor_list表示是否使用sensor_list来时适配不同的模组,1表示使用,0表示不使用。
> work_mode: 0:online mode 1:offline mode, 根据使用需求配置;只有vinc0/4/8/12可以配置。
> status: vipp的使能开关,okay or disable。
这里提供的是使用设备树方案的配置名称,对于使用 sys_config.fex 的方案可以对照这里的设备树检查,配置项差别不大。hispi与mipi软件上只需要修改sensor驱动,不需要修改 V4L2框架,更不需要读写寄存器。具体方法参考 《Linux_MIPI_CSI_开发指南.pdf》(需要FAE提供)。
这里提供设备树的配置:
&vind0 {
csi_top = <336000000>;
csi_isp = <300000000>;
status = "okay";
tdm0:tdm@0 {
work_mode = <0>;
};
isp00:isp@0 {
work_mode = <0>;
};
scaler00:scaler@0 {
work_mode = <0>;
};
scaler10:scaler@4 {
work_mode = <0>;
};
scaler20:scaler@8 {
work_mode = <0>;
};
scaler30:scaler@12 {
work_mode = <0>;
};
actuator0:actuator@0 {
device_type = "actuator0";
actuator0_name = "ad5820_act";
actuator0_slave = <0x18>;
actuator0_af_pwdn = <>;
actuator0_afvdd = "afvcc-csi";
actuator0_afvdd_vol = <2800000>;
status = "disabled";
};
flash0:flash@0 {
device_type = "flash0";
flash0_type = <2>;
flash0_en = <>;
flash0_mode = <>;
flash0_flvdd = "";
flash0_flvdd_vol = <>;
status = "disabled";
};
sensor0:sensor@0 {
device_type = "sensor0";
sensor0_mname = "gc2053_mipi";
sensor0_twi_cci_id = <1>;
sensor0_twi_addr = <0x6e>;
sensor0_mclk_id = <0>;
sensor0_pos = "rear";
sensor0_isp_used = <1>;
sensor0_fmt = <1>;
sensor0_stby_mode = <0>;
sensor0_vflip = <0>;
sensor0_hflip = <0>;
sensor0_iovdd-supply = <®_aldo2>;
sensor0_iovdd_vol = <1800000>;
sensor0_avdd-supply = <®_bldo2>;
sensor0_avdd_vol = <2800000>;
sensor0_dvdd-supply = <®_dldo2>;
sensor0_dvdd_vol = <1200000>;
sensor0_power_en = <>;
sensor0_reset = <&pio PA 18 1 0 1 0>;
sensor0_pwdn = <&pio PA 19 1 0 1 0>;
sensor0_sm_hs = <>;
sensor0_sm_vs = <>;
flash_handle = <&flash0>;
act_handle = <&actuator0>;
status = "okay";
};
sensor1:sensor@1 {
device_type = "sensor1";
sensor1_mname = "imx386_mipi_2";
sensor1_twi_cci_id = <0>;
sensor1_twi_addr = <0x20>;
sensor1_mclk_id = <1>;
sensor1_pos = "front";
sensor1_isp_used = <1>;
sensor1_fmt = <1>;
sensor1_stby_mode = <0>;
sensor1_vflip = <0>;
sensor1_hflip = <0>;
sensor1_iovdd-supply = <®_aldo2>;
sensor1_iovdd_vol = <1800000>;
sensor1_avdd-supply = <®_bldo2>;
sensor1_avdd_vol = <2800000>;
sensor1_dvdd-supply = <®_dldo2>;
sensor1_dvdd_vol = <1200000>;
sensor1_power_en = <>;
sensor1_reset = <&pio PA 20 1 0 1 0>;
sensor1_pwdn = <&pio PA 21 1 0 1 0>;
sensor1_sm_hs = <>;
sensor1_sm_vs = <>;
flash_handle = <>;
act_handle = <>;
status = "okay";
};
vinc00:vinc@0 {
vinc0_csi_sel = <0>;
vinc0_mipi_sel = <0>;
vinc0_isp_sel = <0>;
vinc0_isp_tx_ch = <0>;
vinc0_tdm_rx_sel = <0>;
vinc0_rear_sensor_sel = <0>;
vinc0_front_sensor_sel = <0>;
vinc0_sensor_list = <0>;
work_mode = <0x0>;
status = "okay";
};
vinc01:vinc@1 {
vinc1_csi_sel = <2>;
vinc1_mipi_sel = <0xff>;
vinc1_isp_sel = <1>;
vinc1_isp_tx_ch = <1>;
vinc1_tdm_rx_sel = <1>;
vinc1_rear_sensor_sel = <0>;
vinc1_front_sensor_sel = <0>;
vinc1_sensor_list = <0>;
status = "disabled";
};
vinc02:vinc@2 {
vinc2_csi_sel = <2>;
vinc2_mipi_sel = <0xff>;
vinc2_isp_sel = <2>;
vinc2_isp_tx_ch = <2>;
vinc2_tdm_rx_sel = <2>;
vinc2_rear_sensor_sel = <0>;
vinc2_front_sensor_sel = <0>;
vinc2_sensor_list = <0>;
status = "disabled";
};
vinc03:vinc@3 {
vinc3_csi_sel = <0>;
vinc3_mipi_sel = <0xff>;
vinc3_isp_sel = <0>;
vinc3_isp_tx_ch = <0>;
vinc3_tdm_rx_sel = <0>;
vinc3_rear_sensor_sel = <1>;
vinc3_front_sensor_sel = <1>;
vinc3_sensor_list = <0>;
status = "disabled";
};
…………
};