SOLVED 多通道相机设备树设置
-
开发板为OK3588-C,现在想将相机修改为4lane*2,测试i2c7直接指定data-lanes = <1 2 3 4>;是可以的,另外一个将cam4和cam5的时钟都引出来作为第二个4lane,但是无法使用相机采图,是需要修改cam5的设备树吗?cam4设备树修改如下:
&csi2_dphy1_hw { status = "okay"; }; &i2c3 { status = "okay"; clock-frequency = <400000>;//400K cam4_ar0234m_3b: cam4_ar0234m@3b { compatible = "veye,mvcam"; status = "okay"; reg = <0x3b>; clocks = <&ext_cam_clk>; clock-names = "xclk"; clock-frequency = <24000000>;//24M pwdn-gpios = <&extio EXTIO_GPIO_P07 GPIO_ACTIVE_HIGH>;//high leavel value reset-gpios = <&extio EXTIO_GPIO_P06 GPIO_ACTIVE_HIGH>; rockchip,camera-module-index = <4>; rockchip,camera-module-facing = "front"; rockchip,camera-module-name = "NC"; rockchip,camera-module-lens-name = "NC"; port { cam4_ar0234m_3b_out: endpoint { remote-endpoint = <&mipi_in_ucam4_3b>; data-lanes = <1 2 3 4>; }; }; }; }; &csi2_dphy4 { status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; mipi_in_ucam4_3b: endpoint@1 { reg = <1>; remote-endpoint = <&cam4_ar0234m_3b_out>; data-lanes = <1 2 3 4>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; mipi4_csi2_csidphy1_out0: endpoint@0 { reg = <0>; remote-endpoint = <&mipi4_csi2_input>; }; }; }; }; &mipi4_csi2 { status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; mipi4_csi2_input: endpoint@1 { reg = <1>; remote-endpoint = <&mipi4_csi2_csidphy1_out0>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; mipi4_csi2_output: endpoint@0 { reg = <0>; remote-endpoint = <&cif_mipi_in4>; }; }; }; }; &rkcif_mipi_lvds4 { status = "okay"; port { cif_mipi_in4: endpoint { remote-endpoint = <&mipi4_csi2_output>; }; }; }; &rkcif_mipi_lvds4_sditf { status = "disabled"; };
cam5的设备树:
&i2c4 { status = "okay"; cam5_ov5645: cam5_ov5645@3c { status = "okay"; compatible = "ovti,ov5645"; reg = <0x3c>; clocks = <&ext_cam_clk>; clock-names = "xclk"; clock-frequency = <24000000>; reset-gpios = <&extio EXTIO_GPIO_P10 GPIO_ACTIVE_LOW>; enable-gpios = <&extio EXTIO_GPIO_P11 GPIO_ACTIVE_HIGH>; rockchip,camera-module-index = <2>; rockchip,camera-module-facing = "front"; rockchip,camera-module-name = "NC"; rockchip,camera-module-lens-name = "NC"; port { cam5_ov5645_out: endpoint { remote-endpoint = <&mipi_in_ucam5>; data-lanes = <1 2>; }; }; }; }; &csi2_dphy5 { status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; mipi_in_ucam5: endpoint@1 { reg = <1>; remote-endpoint = <&cam5_ov5645_out>; data-lanes = <1 2>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; mipi5_csi2_csidphy1_out1: endpoint@0 { reg = <0>; remote-endpoint = <&mipi5_csi2_input>; }; }; }; }; &mipi5_csi2 { status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; mipi5_csi2_input: endpoint@1 { reg = <1>; remote-endpoint = <&mipi5_csi2_csidphy1_out1>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; mipi5_csi2_output: endpoint@0 { reg = <0>; remote-endpoint = <&cif_mipi_in5>; }; }; }; }; &rkcif_mipi_lvds5 { status = "okay"; port { cif_mipi_in5: endpoint { remote-endpoint = <&mipi5_csi2_output>; }; }; }; &rkcif_mipi_lvds5_sditf { status = "disabled"; };
-
@lin said in 多通道相机设备树设置:
ovti,ov5645
你这个cam5接的是ovti,ov5645,这个我不太懂。
原理上,dts需要跟硬件匹配——用的那个csidphy口,哪几个lane——这个信息dts是要跟硬件原理图匹配的。 -
@veye_xumm cam5支持2lane,cam4也支持2lane,我将cam5的mipi信号线和cam4的全部引出,作为了4lane的一个相机,cam3\4\5都是支持5645的,我使用的i2c3下的所有引脚加上cam5的mipi信号线设置的第二个4lane,我不知道cam5的mipi信号线现在能否可以被相机使用,因为我并没有对cam5以及dphy5做任何修改
-
@lin 我有一个疑问,你只修改mipi接收端的配置,ov5645配了吗?
-
@veye_xumm 解决了,dphy4不支持4lane