铁蜻蜓

铁蜻蜓

0个粉丝

3

问答

0

专栏

0

资料

铁蜻蜓  发布于  2024-12-03 17:42:25
采纳率 0%
3个问答
33

RK3588的DPHY0接lt6911uxe转HDMI抓帧分辨率不对

悬赏金¥ 5
问题最晚将于2024-12-10结题
     

各位大佬好,我在RK3588开发板的dphy0口接lt6911uxe,然后转接摄像头,目前可以抓帧,但是抓到的只有640x480
抓图命令:
sudo v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-to=./myg2_1920x1080yuyv_$(date +%Y%m%d_%H%M%S).out --stream-count=1 --stream-poll
抓帧日志:

root@cz:/home/cz# v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=YUYV --stream-mmap=3 --stream-skip=3 --stream-to=./mylt6911_1920x1080_yuyv.out --stream-count=1 --stream-poll
[  435.068855] stream_cif_mipi_id0: open video, entity use_countt 1
[  435.070332] LT6911UXE 6-002b: find current mode: support_mode[27], 640x480P60fps
[  435.070364] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: mode->mipi_freq_idx(5)
[  435.070388] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: fmt code:8198, w:640, h:480, field code:1
[  435.071311] LT6911UXE 6-002b: find current mode: support_mode[27], 640x480P60fps
[  435.071333] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: mode->mipi_freq_idx(5)
[  435.071345] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: fmt code:8198, w:640, h:480, field code:1
[  435.072841] LT6911UXE 6-002b: find current mode: support_mode[27], 640x480P60fps
[  435.072879] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: mode->mipi_freq_idx(5)
[  435.072907] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: fmt code:8198, w:640, h:480, field code:1
[  435.074334] LT6911UXE 6-002b: find current mode: support_mode[27], 640x480P60fps
[  435.074367] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: mode->mipi_freq_idx(5)
[  435.074378] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: fmt code:8198, w:640, h:480, field code:1
[  435.075302] LT6911UXE 6-002b: find current mode: support_mode[27], 640x480P60fps
[  435.075323] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: mode->mipi_freq_idx(5)
[  435.075334] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: fmt code:8198, w:640, h:480, field code:1
<[  435.076361] LT6911UXE 6-002b: find current mode: support_mode[27], 640x480P60fps
[  435.076397] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: mode->mipi_freq_idx(5)
[  435.076425] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: fmt code:8198, w:640, h:480, field code:1
[  435.079319] rkcif-mipi-lvds2: stream[0] start streaming
[  435.080469] LT6911UXE 6-002b: find current mode: support_mode[27], 640x480P60fps
[  435.080494] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: mode->mipi_freq_idx(5)
[  435.080505] m00_b_LT6911UXE 6-002b: lt6911uxe_get_fmt: fmt code:8198, w:640, h:480, field code:1
[  435.093613] rkcif-mipi-lvds2: Allocate dummy buffer, size: 0x01518000
[  435.095400] rockchip-mipi-csi2 mipi2-csi2: stream on, src_sd: 0000000034414136, sd_name:rockchip-csi2-dphy0
[  435.095421] rockchip-mipi-csi2 mipi2-csi2: stream ON
[  435.095510] rockchip-csi2-dphy0: dphy0, data_rate_mbps 200
[  435.095588] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:1, dphy0, ret 0
[  435.095617] LT6911UXE 6-002b: lt6911uxe_s_stream: on: 1, 640x480P60
[  435.101978] m00_b_LT6911UXE 6-002b: lt6911uxe_config_dphy_timing: dphy timing: hs trail = 7
[  435.105150] m00_b_LT6911UXE 6-002b: lt6911uxe_config_dphy_timing: dphy timing: port0 tx0 delay = 30
[  435.107104] m00_b_LT6911UXE 6-002b: lt6911uxe_config_dphy_timing: dphy timing: port0 lptx = 11
[  435.107118] m00_b_LT6911UXE 6-002b: lt6911uxe_config_dphy_timing: dphy timing config done.
<[  435.138484] m00_b_LT6911UXE 6-002b: enable_stream: enable
[  435.146743] mipi2-csi2-hw ERR1:0x100 (f_seq,vc: 0) 
[  435.267273] rkcif-mipi-lvds2: stream[0] start stopping, total mode 0x1, cur 0x1
<[  435.267307] rkcif-mipi-lvds2: get vblank fail, vblank_def 0, vblank_curr 0
[  435.294656] rockchip-mipi-csi2 mipi2-csi2: stream off, src_sd: 0000000034414136, sd_name:rockchip-csi2-dphy0
[  435.294745] rockchip-mipi-csi2 mipi2-csi2: stream OFF
[  435.294785] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream_stop stream stop, dphy0
[  435.294814] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:0, dphy0, ret 0
[  435.294881] LT6911UXE 6-002b: lt6911uxe_s_stream: on: 0, 640x480P60
[  435.321956] m00_b_LT6911UXE 6-002b: enable_stream: disable
[  435.324706] rkcif-mipi-lvds2: stream[0] stopping finished, dma_en 0x0
[  435.344158] stream_cif_mipi_id0: close video, entity use_count 0

我的设备树:

/
{
    vcc_mipicsi0: vcc-mipicsi0-regulator {
        compatible = "regulator-fixed";
        gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&mipicsi0_pwr>;
        regulator-name = "vcc_mipicsi0";
        enable-active-high;
        regulator-boot-on;
        regulator-always-on;
    };

    ext_cam_clk: external-camera-clock {
        compatible = "fixed-clock";
        clock-frequency = <24000000>;
        clock-output-names = "CLK_CAMERA_24MHZ";
        #clock-cells = <0>;
    };
};

&i2c6 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&i2c6m0_xfer>;

    lt6911uxe: lt6911uxe@2b {
        compatible = "lontium,lt6911uxe";
        status = "okay";
        reg = <0x2b>;        //I2C地址

        clocks = <&ext_cam_clk>;
        clock-names = "xvclk";
        pinctrl-names = "default";
        pinctrl-0 = <&cz_lt6911uxe_pin>;

        interrupt-parent = <&gpio1>;
        interrupts = <RK_PD6 IRQ_TYPE_LEVEL_LOW>;            //GPIO1_D6_u

        power-domains = <&power RK3588_PD_VI>;
        reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;        //HDMI_RST_CTRL=GPIO1_A4_d, 低电平有效
        // power-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;        //HDMI直连电源,CAMERA_PWR_CTRL=GPIO3_A7_u, 高电平有效
        // plugin-det-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;    //定义了一个 GPIO 用于检测设备是否插好,没接通

        rockchip,camera-module-index = <0>;        //模组编号,该编号不要重复
        rockchip,camera-module-facing = "back";
        rockchip,camera-module-name = "HDMI-MIPI0";
        rockchip,camera-module-lens-name = "LT6911UXE-2";

        port {
            lt6911uxe_out1: endpoint {
                remote-endpoint = <&hdmi_mipi2_in>;
                data-lanes = <1 2 3 4>;
            };
        };
    };
};


&csi2_dphy0_hw {
    status = "okay";
};

&csi2_dphy0 {
    status = "okay";

    ports {
        #address-cells = <1>;
        #size-cells = <0>;
        port@0 {
            reg = <0>;
            #address-cells = <1>;
            #size-cells = <0>;

            hdmi_mipi2_in: endpoint@1 {
                reg = <1>;
                remote-endpoint = <&lt6911uxe_out1>;
                data-lanes = <1 2 3 4>;
            };
        };
        port@1 {
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            csidphy0_out: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&mipi2_csi2_input>;
            };
        };
    };
};

&mipi2_csi2 {
    status = "okay";

    ports {
        #address-cells = <1>;
        #size-cells = <0>;

        port@0 {
            reg = <0>;
            #address-cells = <1>;
            #size-cells = <0>;

            mipi2_csi2_input: endpoint@1 {
                reg = <1>;
                remote-endpoint = <&csidphy0_out>;
            };
        };

        port@1 {
            reg = <1>;
            #address-cells = <1>;
            #size-cells = <0>;

            mipi2_csi2_output: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&cif_mipi_in2>;
            };
        };
    };
};

&rkcif {
    status = "okay";
};

&rkcif_mipi_lvds2 {
    status = "okay";

    port {
        cif_mipi_in2: endpoint {
            remote-endpoint = <&mipi2_csi2_output>;
        };
    };
};

&rkcif_mmu {
    status = "okay";
};

&pinctrl {
    hdmiin {
        cz_lt6911uxe_pin: cz-lt6911uxe-pin {
            rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>,    /* IRQ */
                            <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;    /* reset */ 
        };

        mipicsi0_pwr: mipicsi0-pwr {    //2.CAMERA_PWR_CTRL  GPIO3_A7_u, H=ON
            rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
        };

        //3.sony camra reset, CAMERA_RST_CTRL=GPIO1_A5_d,未接
    };
};

经查看,抓出来的图片分辨率只有640x480。
期间,我修改过lt6911uxe的supported_modes_dphy[]数组,只留下大于1080p的分辨率,重新编译后抓帧仍是640x480。
有哪位大佬解决过类似问题?不吝指导,多谢

我来回答
回答0个
时间排序
认可量排序
易百纳技术社区暂无数据
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区