|
【应用开发】
rv1126适配ov13850摄像头
发表于 2023-3-13 09:47:48
浏览:5897
|
回复:4
打印
只看该作者
[复制链接]
楼主
开发板:CORE-1109/1126-JD4核心板及配套的底板
目前进行了一下修改:
1.从维基教程拉下的sdk,/oem/etc/iqfiles/下默认没有ov13850的xml文件,直接从原厂rk3399pro sdk里面拷了一份(原厂rk3399pro开发板及sdk是适配过ov13850的,确认rk3399pro上ov13850可用)。
2.内核配置中打开ov13850驱动。
3.设备树修改如下:
rv1126-firefly-rk809.dtsi文件&i2c1添加如下:(参考rk3399pro设备树里面的配置,并参考rv1126已经适配的os摄像头的配置修改)
- vm149c: vm149c@0c {
- compatible = "silicon touch,vm149c";
- status = "okay";
- reg = <0x0c>;
- rockchip,camera-module-index = <0>;
- rockchip,camera-module-facing = "back";
- };
- ov13850: ov13850@10 {
- compatible = "ovti,ov13850";
- status = "okay";
- reg = <0x10>;
- clocks = <&cru CLK_MIPICSI_OUT>;
- clock-names = "xvclk";
- /* conflict with csi-ctl-gpios */
- reset-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
- pwdn-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
- power-domains = <&power RV1126_PD_VI>;
- pinctrl-names = "rockchip,camera_default";
- pinctrl-0 = <&mipicsi_clk1>;
- rockchip,camera-module-index = <1>;
- rockchip,camera-module-facing = "back";
- rockchip,camera-module-name = "CMK-CT0116";
- rockchip,camera-module-lens-name = "Largan-50013A1";
- lens-focus = <&vm149c>;
- port {
- ucam_out0: endpoint {
- remote-endpoint = <&mipi_in_ucam0>;
- data-lanes = <1 2 3 4>;
- };
- };
- };
复制代码 上述修改之后,编译内核烧板子进行测试,开机log:
[root@RV1126_RV1109:~]# dmesg | grep ov13
[ 0.615137] ov13850 1-0010: driver version: 00.01.04
[ 0.615216] ov13850 1-0010: GPIO lookup for consumer power
[ 0.615221] ov13850 1-0010: using device tree for GPIO lookup
[ 0.615241] of_get_named_gpiod_flags: can't parse 'power-gpios' property of node '/i2c@ff510000/ov13850@10[0]'
[ 0.615253] of_get_named_gpiod_flags: can't parse 'power-gpio' property of node '/i2c@ff510000/ov13850@10[0]'
[ 0.615263] ov13850 1-0010: using lookup tables for GPIO lookup
[ 0.615269] ov13850 1-0010: No GPIO consumer power found
[ 0.615275] ov13850 1-0010: Failed to get power-gpios, maybe no use
[ 0.615307] ov13850 1-0010: GPIO lookup for consumer reset
[ 0.615311] ov13850 1-0010: using device tree for GPIO lookup
[ 0.615338] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/i2c@ff510000/ov13850@10[0]' - status (0)
[ 0.615379] ov13850 1-0010: GPIO lookup for consumer pwdn
[ 0.615383] ov13850 1-0010: using device tree for GPIO lookup
[ 0.615397] of_get_named_gpiod_flags: parsed 'pwdn-gpios' property of node '/i2c@ff510000/ov13850@10[0]' - status (0)
[ 0.615456] ov13850 1-0010: 1-0010 supply avdd not found, using dummy regulator
[ 0.615570] ov13850 1-0010: Linked as a consumer to regulator.0
[ 0.615624] ov13850 1-0010: 1-0010 supply dovdd not found, using dummy regulator
[ 0.615715] ov13850 1-0010: 1-0010 supply dvdd not found, using dummy regulator
[ 0.615850] ov13850 1-0010: could not get sleep pinstate
[ 0.620541] ov13850 1-0010: Detected OV00d850 sensor, REVISION 0xb2
[ 0.620585] rockchip-mipi-dphy-rx ff4b0000.csi-dphy: match m01_b_ov13850 1-0010:bus type 4
从这个log,认为ov13850驱动已经跑起来了,并且查看板子的/sys目录如下:
[root@RV1126_RV1109:~]# grep ov13850 /sys/class/video4linux/v*/name
/sys/class/video4linux/v4l-subdev3/name:m01_b_ov13850 1-0010
也能看到ov13850, 但是看/dev/目录下有很多video节点,如下:
[root@RV1126_RV1109:~]# grep '' /sys/class/video4linux/v*/name
/sys/class/video4linux/v4l-subdev0/name:rkispp-subdev
/sys/class/video4linux/v4l-subdev1/name:rockchip-mipi-csi2
/sys/class/video4linux/v4l-subdev2/name:rockchip-mipi-dphy-rx
/sys/class/video4linux/v4l-subdev3/name:m01_b_ov13850 1-0010
/sys/class/video4linux/v4l-subdev4/name:rkisp-isp-subdev
/sys/class/video4linux/v4l-subdev5/name:rkisp-csi-subdev
/sys/class/video4linux/v4l-subdev6/name:rkcif_mipi_lvds
/sys/class/video4linux/video0/name:stream_cif_mipi_id0
/sys/class/video4linux/video1/name:stream_cif_mipi_id1
/sys/class/video4linux/video10/name:rkisp_rawwr3
/sys/class/video4linux/video11/name:rkisp_rawrd0_m
/sys/class/video4linux/video12/name:rkisp_rawrd2_s
/sys/class/video4linux/video13/name:rkisp_rawrd1_l
/sys/class/video4linux/video14/name:rkisp-statistics
/sys/class/video4linux/video15/name:rkisp-input-params
/sys/class/video4linux/video16/name:rkisp-mipi-luma
/sys/class/video4linux/video17/name:rkispp_input_image
/sys/class/video4linux/video18/name:rkispp_m_bypass
/sys/class/video4linux/video19/name:rkispp_scale0
/sys/class/video4linux/video2/name:stream_cif_mipi_id2
/sys/class/video4linux/video20/name:rkispp_scale1
/sys/class/video4linux/video21/name:rkispp_scale2
/sys/class/video4linux/video22/name:rkispp_iqtool
/sys/class/video4linux/video23/name:rkispp_input_params
/sys/class/video4linux/video24/name:rkispp-stats
/sys/class/video4linux/video3/name:stream_cif_mipi_id3
/sys/class/video4linux/video4/name:rkcif-mipi-luma
/sys/class/video4linux/video5/name:rkisp_mainpath
/sys/class/video4linux/video6/name:rkisp_selfpath
/sys/class/video4linux/video7/name:rkisp_rawwr0
/sys/class/video4linux/video8/name:rkisp_rawwr1
/sys/class/video4linux/video9/name:rkisp_rawwr2
没找到确定哪个节点的方法,我用rkispp_scale的几个节点试了下,v4l2-ctl拉流的时候都提示select timeout,麻烦了解的大佬给指点一下,少了哪些配置或者如何排查下?多谢
|
|