【FAQ】全志V853芯片 适配双目GC2053的操作步骤
-
1.主题
Tina V85x 平台适配双目GC2053的操作步骤
2.问题背景
Tina V85x 平台支持多目sensor场景。Tina V85x SDK默认配置一般都是单目sensor,比如SDK V1.0默认是单目GC2053。为方便用户适配双目或多目sensor,下面以V853 perf1方案+双目GC2053为例,介绍适配的操作步骤。
3.解决办法
一、双目GC2053适配
适配双目GC2053主要修改以下几处:1、dts设备树
文件:device/config/chips/v853/configs/perf1/board.dts
修改:- (1)修改csi/isp频率
为节省带宽,可将csi/isp频率由原来默认的300MHz降至200MHz。
vind0:vind@0 { - vind0_clk = <300000000>; + vind0_clk = <200000000>; status = "okay";
- (2)修改成离线模式
因双目场景下,ISP需分时复用,故只能支持离线模式,即work_mode改成1(离线)。
tdm0:tdm@0 { - work_mode = <0>; + work_mode = <1>; }; isp00:isp@0 { - work_mode = <0>; + work_mode = <1>; }; scaler00:scaler@0 { - work_mode = <0>; + work_mode = <1>; }; scaler10:scaler@4 { - work_mode = <0>; + work_mode = <1>; }; scaler20:scaler@8 { - work_mode = <0>; + work_mode = <1>; }; scaler30:scaler@12 { - work_mode = <0>; + work_mode = <1>; };
- (3)修改sensor配置
sensor0默认是gc2053,无需修改。但是需要修改sensor1的配置为gc2053。修改后,sensor0和sensor1的配置如下:
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 = "gc2053_mipi_2"; sensor1_twi_cci_id = <0>; sensor1_twi_addr = <0x7e>; 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"; };
- (4)修改各video节点的配置
双目GC2053场景下,可支持的video节点分别为:
sensor0:video 0/4/8/12
sensor1:video 1/5/9/13
故只需修改以上8个video节点的配置即可。修改后的配置如下:
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 = <0x1>; status = "okay"; }; vinc01:vinc@1 { vinc1_csi_sel = <1>; vinc1_mipi_sel = <1>; vinc1_isp_sel = <1>; vinc1_isp_tx_ch = <0>; vinc1_tdm_rx_sel = <1>; vinc1_rear_sensor_sel = <1>; vinc1_front_sensor_sel = <1>; vinc1_sensor_list = <0>; status = "okay"; }; vinc10:vinc@4 { vinc4_csi_sel = <0>; vinc4_mipi_sel = <0>; vinc4_isp_sel = <0>; vinc4_isp_tx_ch = <0>; vinc4_tdm_rx_sel = <0>; vinc4_rear_sensor_sel = <0>; vinc4_front_sensor_sel = <0>; vinc4_sensor_list = <0>; work_mode = <0x1>; status = "okay"; }; vinc11:vinc@5 { vinc5_csi_sel = <1>; vinc5_mipi_sel = <1>; vinc5_isp_sel = <1>; vinc5_isp_tx_ch = <0>; vinc5_tdm_rx_sel = <1>; vinc5_rear_sensor_sel = <1>; vinc5_front_sensor_sel = <1>; vinc5_sensor_list = <0>; status = "okay"; }; vinc20:vinc@8 { vinc8_csi_sel = <0>; vinc8_mipi_sel = <0x0>; vinc8_isp_sel = <0>; vinc8_isp_tx_ch = <0>; vinc8_tdm_rx_sel = <0>; vinc8_rear_sensor_sel = <0>; vinc8_front_sensor_sel = <0>; vinc8_sensor_list = <0>; work_mode = <0x1>; status = "okay"; }; vinc21:vinc@9 { vinc9_csi_sel = <0>; vinc9_mipi_sel = <0x0>; vinc9_isp_sel = <0>; vinc9_isp_tx_ch = <0>; vinc9_tdm_rx_sel = <0>; vinc9_rear_sensor_sel = <0>; vinc9_front_sensor_sel = <0>; vinc9_sensor_list = <0>; work_mode = <0x1>; status = "okay"; }; vinc30:vinc@12 { vinc12_csi_sel = <0>; vinc12_mipi_sel = <0x0>; vinc12_isp_sel = <0>; vinc12_isp_tx_ch = <0>; vinc12_tdm_rx_sel = <0>; vinc12_rear_sensor_sel = <0>; vinc12_front_sensor_sel = <0>; vinc12_sensor_list = <0>; work_mode = <0x1>; status = "okay"; }; vinc31:vinc@13 { vinc13_csi_sel = <1>; vinc13_mipi_sel = <1>; vinc13_isp_sel = <1>; vinc13_isp_tx_ch = <0>; vinc13_tdm_rx_sel = <1>; vinc13_rear_sensor_sel = <1>; vinc13_front_sensor_sel = <1>; vinc13_sensor_list = <0>; status = "okay"; };
2、内核配置
双mipi sensor场景下,ISP分时复用,需要使用TDM,故需打开TDM。
文件:device/config/chips/v853/configs/perf1/linux/config-4.9
修改:打开TDM配置CONFIG_SUPPORT_ISP_TDM=y CONFIG_TDM_LBC_EN=y
3、mpp middleware
首先,确保mpp配置中选中了gc2053 sensor。检查方法:
make menuconfig,依次进入配置项:Allwinner ---> eyesee-mpp ---> [*] select sensor [*] use sensor gc2053
然后,在ISP效果文件中,为第二个sensor添加效果文件配置。
位置:external/eyesee-mpp/middleware/sun8iw21/media/LIBRARY/libisp/isp_cfg/isp_ini_parse.c
修改:将原来的两组gc2053_mipi配置分别拷贝一份,然后修改名字为gc2053_mipi_2即可,其他参数不用修改。struct isp_cfg_array cfg_arr[] = { ... #ifdef SENSOR_GC2053 {"gc2053_mipi", "gc2053_mipi_isp600_20220511_164617_vlc4_day", 1920, 1088, 20, 0, 0, &gc2053_mipi_v853_isp_cfg}, {"gc2053_mipi", "gc2053_mipi_isp600_20220415_144837_ir", 1920, 1088, 20, 0, 1, &gc2053_mipi_ir_isp_cfg}, {"gc2053_mipi_2", "gc2053_mipi_isp600_20220511_164617_vlc4_day", 1920, 1088, 20, 0, 0, &gc2053_mipi_v853_isp_cfg}, {"gc2053_mipi_2", "gc2053_mipi_isp600_20220415_144837_ir", 1920, 1088, 20, 0, 1, &gc2053_mipi_ir_isp_cfg}, #endif ... }
按以上步骤修改完成后,需重新编译mpp和固件,命令如下:
cleanmpp && mkmpp && mp
二、双目GC2053验证
支持验证双目GC2053的mpp sample有:
sample_rtsp(支持双目采集+编码+RTSP)、sample_smartIPC_demo(支持双目采集+编码+RTSP+人形检测)、sample_smartPreview_demo(支持双目采集+预览)
如果不需要RTSP功能,注释掉代码中的宏 #define SUPPORT_RTSP_TEST 即可。 - (1)修改csi/isp频率
-
-
@q1215200171 烧进去之后是这样的,找不到设备,正常吗? 求解!
-
@q1215200171 配置和楼主是一样的
-
@q1215200171 使用的是全志释放的sdk
-
@lipeitong 摄像头型号匹配吗
-
@yuzukitsuru 买的开发板上的摄像头
-
@yuzukitsuru 官网介绍是gc2063,复用的是gc2053的代码。现在只通了一个。log的i2c地址的值是设备树的一半,不知道是怎么回事?
-
-
此回复已被删除! -
此回复已被删除! -
@yteraa 设备树配置之后,还是报No such device这个错误。i2c依旧不通。
-
@yteraa 使用了1.0版本的sdk就可以了,再次感谢楼主分享
-
-
@q1215200171 你好,请问一下这个地方为什么要这么多个video的?两个GC2053,又不跑wdr,最多不是出两路吗?
(4)修改各video节点的配置
双目GC2053场景下,可支持的video节点分别为:
sensor0:video 0/4/8/12
sensor1:video 1/5/9/13
故只需修改以上8个video节点的配置即可。 -
请教一下,ISP的分时复用大致的框架是怎样的,相比于在线模式会有什么影响不,有没有相关的介绍资料可以分享一下莫?
-
-
-
@q1215200171 在 【FAQ】全志V853芯片 适配双目GC2053的操作步骤 中说:
《MPP_Sample_使用说明》具体位置在哪一我在一号通上找不见
-
-
-
@q1215200171
你好我在哪里可以找到这个 : MPP_Sample_使用说明
-
-
@nimadibaj 【资料】V853&V851 软件开发指南
https://bbs.aw-ol.com/topic/2266/share/1 -
-
-
@q1215200171 都按照你的步骤做了 但是还是只有一路图像 请问下要怎么确认是哪里的问题呢?
-
@lipeitong 您好 请问这个问题您解决了吗? 是双目GC2053是吧?
-
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号