SOLVED roc-rk3588s-pc怎么驱动两个ar0234M
-
添加两个设备树节点,ox3b和0x3c,每次只能加载到其中一个摄像头
怎么回事呢?应该如何加载两个摄像头呢 -
@lin
roc-rk3588s-pc 这个板子只有一个mipi接口,无法支持两个摄像头啊。 -
@veye_xumm 我们做了扩展pcb板,将4通道的dhpy0关闭,扩展成2个两通道的dphy1和dphy2,两个相机单独使用都是可以的,都是连接两个提供的ar0234m驱动就会报错,报错代码如下:
[ 10.394286] mvcam 7-003c: veye mv series camera driver version: 01.01.04
[ 11.397980] mvcam 7-003c: camera is: RAW_MIPI_AR0234M
[ 11.398962] mvcam 7-003c: firmware version: 0x1060000
[ 11.402539] mvcam 7-003c: mvcam_get_mipifeature: lane num 2, datarate 720000000 bps
[ 11.402585] mvcam 7-003c: Success to get mvcam endpoint data lanes, dts uses 2 lanes
[ 11.414798] mvcam 7-003c: mvcam_enum_controls success
[ 11.415829] rockchip-csi2-dphy csi2-dphy2: dphy2 matches m01_f_mvcam 7-003c:bus type 5
[ 16.264839] veye_mvcam1: loading out-of-tree module taints kernel.
[ 16.265429] mvcam1 7-003b: Error applying setting, reverse things back
[ 16.265445] mvcam1: probe of 7-003b failed with error -22 -
@lin said in roc-rk3588s-pc怎么驱动两个ar0234M:
mvcam1 7-003b: Error applying setting, reverse things back
看起来你的dts触发了一个错误,这个错误是camera相机外的驱动报出的。建议你根据这错误,驱动源码,确定一下问题。
-
@veye_xumm said in roc-rk3588s-pc怎么驱动两个ar0234M:
驱动源码,确定一下问题
你好,这个我们现在不确定是是驱动问题还是设备树的问题,设备树代码如下,麻烦帮忙看一下
设备树修改:
&i2c7 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c7m2_xfer>;cam1_mvcam: cam1_mvcam@3c { compatible = "veye,mvcam"; reg = <0x3c>; clocks = <&cru CLK_MIPI_CAMARAOUT_M1>; clock-names = "xvclk"; pinctrl-names = "default"; pinctrl-0 = <&mipim1_camera1_clk>; power-domains = <&power RK3588_PD_VI>; //power-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>; reset-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; pwdn-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>; //avdd-supply = <&vcc_mipidcphy0>; //firefly,clkout-enabled-index = <0>; rockchip,camera-module-index = <1>; rockchip,camera-module-facing = "front"; rockchip,camera-module-name = "NC"; rockchip,camera-module-lens-name = "NC"; port { mvcam_out1: endpoint { remote-endpoint = <&mipi_in_ucam3>; data-lanes = <1 2>; }; }; }; mvcam: mvcam1@3b{ compatible = "veye,mvcam"; reg = <0x3b>; clocks = <&cru CLK_MIPI_CAMARAOUT_M1>; clock-names = "xvclk"; pinctrl-names = "default"; pinctrl-0 = <&mipim1_camera1_clk>; power-domains = <&power RK3588_PD_VI>; //power-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>; reset-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; pwdn-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; //avdd-supply = <&vcc_mipidcphy0>; //firefly,clkout-enabled-index = <0>; rockchip,camera-module-index = <0>; rockchip,camera-module-facing = "back"; rockchip,camera-module-name = "NC"; rockchip,camera-module-lens-name = "NC"; port { mvcam_out0: endpoint { remote-endpoint = <&mipi_in_ucam2>; data-lanes = <1 2>; }; }; };
};
-
@lin
从这一部分看的话,clk是用的同一个。我不确定rk的驱动逻辑中,这个会不会引起问题。
你可以改成不同的尝试一下。 -
@veye_xumm 将两个相机节点分别放在i2c3和i2c7节点下,用同一个时钟,内核信息可以检测到两个驱动,没有报错,i2c7下的相机可以正常使用,为什么两个相机不可以使用同一个i2c7节点?
-
@lin 从我们相机的角度来看,ar0234m是支持修改i2c地址的,在一个i2c bus上挂载也没有问题。 虽然你这个用法比较特别吧。
@lin said in roc-rk3588s-pc怎么驱动两个ar0234M:
mvcam1 7-003b: Error applying setting, reverse things back
我觉得你还是得从这个报错入手去找一下。
-
@veye_xumm
请问,我们烧录ROC-RK3588S-PC_Ubuntu20.04-Gnome-r30028_v1.1.1b_230914.img这个镜像,然后添加veye_mvcam.ko进去,怎么还是没有mediax节点和videox节点?不是加载的这个驱动吗?
[1_1703832258652_veye_mvcam.c](正在上传 100%) [0_1703832258652_veye_mvcam.h](正在上传 100%) [1_1703832296851_veye_mvcam.h](正在上传 100%) [0_1703832296850_veye_mvcam.c](正在上传 100%) -
@lin 你的图片我看不到。但是根据你的描述,似乎没有更新dtb。
另外我们提供了一个现成的镜像,在这个链接:
https://github.com/veyeimaging/rk35xx_firefly/releases