This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: vpfe failed with error -22

Part Number: AM4378
Other Parts Discussed in Thread: TVP5151, TVP5150, AM4372

I have a custom board with AM4378 connected to tvp5151.

I changed device tree and enabled the support for tvp5151 in the kernel.

A driver of tvp5151 was successfully loaded. But I got vpfe error message during the booting as follows.

[ 1.454108] tvp5150 1-005c: tvp5151 (1.0) chip found @ 0xb8 (OMAP I2C adapter)
[ 1.461372] tvp5150 1-005c: tvp5151 detected.

...

[ 9.016213] vpfe 48326000.vpfe: Invalid bus width.
[ 9.021079] vpfe 48326000.vpfe: No platform data
[ 9.168483] vpfe: probe of 48326000.vpfe failed with error -22

 

The schematic is attached.

TVP5151.pdf

The relevant parts of device tree is as follows

&am43xx_pinmux {
        vpfe0_pins_default: vpfe0_pins_default {
                pinctrl-single,pins = <
                        AM4372_IOPAD(0x9b0, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_hd mode 0*/
                        AM4372_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_vd mode 0*/
                        AM4372_IOPAD(0x9c0, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_pclk mode 0*/
                        AM4372_IOPAD(0xa08, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data0 mode 0*/
                        AM4372_IOPAD(0xa0c, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data1 mode 0*/
                        AM4372_IOPAD(0xa10, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data2 mode 0*/
                        AM4372_IOPAD(0xa14, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data3 mode 0*/
                        AM4372_IOPAD(0xa18, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data4 mode 0*/
                        AM4372_IOPAD(0xa1c, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data5 mode 0*/
                        AM4372_IOPAD(0xa20, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data6 mode 0*/
                        AM4372_IOPAD(0xa24, PIN_INPUT_PULLUP | MUX_MODE0) /* cam0_data7 mode 0*/
                >;
        };

        vpfe0_pins_sleep: vpfe0_pins_sleep {
                pinctrl-single,pins = <
                        AM4372_IOPAD(0x9b0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_hd mode 0*/
                        AM4372_IOPAD(0x9b4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_vd mode 0*/
                        AM4372_IOPAD(0x9c0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_pclk mode 0*/
                        AM4372_IOPAD(0xa08, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data0 mode 0*/
                        AM4372_IOPAD(0xa0c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data1 mode 0*/
                        AM4372_IOPAD(0xa10, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data2 mode 0*/
                        AM4372_IOPAD(0xa14, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data3 mode 0*/
                        AM4372_IOPAD(0xa18, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data4 mode 0*/
                        AM4372_IOPAD(0xa1c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data5 mode 0*/
                        AM4372_IOPAD(0xa20, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data6 mode 0*/
                        AM4372_IOPAD(0xa24, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* cam0_data7 mode 0*/
                >;
        };
};

&i2c1 {
        tvp5150: tvp5150@5c {
                compatible = "ti,tvp5150";
                reg = <0x5c>;
                port {
                        tvp5150_0: endpoint {
                                remote-endpoint = <&vpfe0_ep>;
                        };
                };
        };
};

&vpfe0 {
        status = "okay";
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&vpfe0_pins_default>;
        pinctrl-1 = <&vpfe0_pins_sleep>;

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

                vpfe0_ep: endpoint {
                        slave-mode;
                        remote-endpoint = <&tvp5150_0>;
                        ti,am437x-vpfe-interface = <1>;
                        hsync-active = <1>;
                        vsync-active = <1>;
                        pclk-sample = <0>;
               };
        };
};

SDK Version is 06.03.00.106.

Kernel Version is 4.19.94+

root@am437x-evm:~# uname -a
Linux am437x-evm 4.19.94+ #3 PREEMPT Sat Aug 1 17:22:24 KST 2020 armv7l GNU/Linux

The followings are dmesg logs.

root@am437x-evm:~# echo 0xffff > /sys/class/video4linux/video1/dev_debug
-sh: /sys/class/video4linux/video1/dev_debug: No such file or directory
root@am437x-evm:~# echo 0xffff > /sys/module/am437x_vpfe/parameters/debug
root@am437x-evm:~# cd /sys/module/am437x_vpfe/parameters
root@am437x-evm:/sys/module/am437x_vpfe/parameters# cat debug
65535

To solve the problem, What do I have to do? 

Thanks, kihan.

  • Hello Kihan,

    Is this a follow-up question to https://e2e.ti.com/support/processors/f/791/t/931037 , or is it a separate question?

    Regards,

    Nick

  • Hi Nick,

    This is a follow-up question to  https://e2e.ti.com/support/processors/f/791/t/931037.

    I just separated two problems from each other to tell them apart.

    Thanks kihan.

  • Hi Nick,

    I made some changes to the device tree.

    &vpfe0 {
            compatible = "ti,am437x-vpfe";

            status = "okay"; 

            pinctrl-names = "default", "sleep";
            pinctrl-0 = <&vpfe0_pins_default>;
            pinctrl-1 = <&vpfe0_pins_sleep>;

            port {
                    /* #address-cells = <1>; */    
                    /* #size-cells = <0>;        */    

                    vpfe0_ep: endpoint {
                            slave-mode;
                            remote-endpoint = <&tvp5150_0>;
                            ti,am437x-vpfe-interface = <1>;

                            bus-width = <8>;

                            hsync-active = <1>; 
                            vsync-active = <1>;
                            pclk-sample = <0>; 

                    };
            };
    };

    After this changes, I couldn't see vpfe related messages during the bootup any more.
    But  video* still not listed in  /dev/.

    boot_0814.log

    root@am437x-evm:~# echo 0xffff > /sys/class/video4linux/video1/dev_debug
    -sh: /sys/class/video4linux/video1/dev_debug: No such file or directory
    root@am437x-evm:~# echo 0xffff > /sys/module/am437x_vpfe/parameters/debug
    root@am437x-evm:~# cat /sys/module/am437x_vpfe/parameters/debug
    65535

    Any help will be appreciated.

    Thanks, kihan.

  • Hi

    I write this message to confirm if my previous message was successfully registered. Because I have not received a return mail for my previous message yet.

    Our project is stopped because of this problem.

    You prompt response and helps would be higtly appreciated.

    Thanks kihan.

  • Part Number: AM4378

    Hi TI,

    I have a custom board with AM4378 connected to tvp5151.

    There are two issues. I separately opened threads for them.

    1. vpfe failed with error -22

        https://e2e.ti.com/support/processors/f/791/p/931100/3439766#3439766

    2. i2c i/o error: rc == -121

       https://e2e.ti.com/support/processors/f/791/p/931037/3439757#3439757

    These two issues are not resolved yet.

    For first issue, it seems that device is successfully binded to the driver.

    root@am437x-evm:/sys/bus/i2c/drivers/tvp5150# ls -l
    lrwxrwxrwx 1 root root 0 Aug 15 15:25 1-005c -> ../../../../devices/platform/44000000.ocp/4802a000.i2c/i2c-1/1-005c
    --w------- 1 root root 4096 Aug 15 15:22 bind
    lrwxrwxrwx 1 root root 0 Aug 15 15:15 module -> ../../../../module/tvp5150
    --w------- 1 root root 4096 Aug 15 15:13 uevent
    --w------- 1 root root 4096 Aug 15 15:17 unbind

    root@am437x-evm:/sys/bus/i2c/devices/1-005c# ls -l
    lrwxrwxrwx 1 root root 0 Aug 16 06:58 driver -> ../../../../../../bus/i2c/drivers/tvp5150
    -r--r--r-- 1 root root 4096 Aug 16 06:58 modalias
    -r--r--r-- 1 root root 4096 Aug 16 06:58 name
    lrwxrwxrwx 1 root root 0 Aug 16 06:58 of_node -> ../../../../../../firmware/devicetree/base/ocp@44000000/i2c@4802a000/tvp5150@5c
    drwxr-xr-x 2 root root 0 Aug 16 06:58 power
    lrwxrwxrwx 1 root root 0 Apr 19 02:08 subsystem -> ../../../../../../bus/i2c
    -rw-r--r-- 1 root root 4096 Apr 19 02:08 uevent

    root@am437x-evm:/sys/devices/platform/44000000.ocp/48328000.vpfe# ls -l
    lrwxrwxrwx 1 root root 0 Aug 17 11:37 driver -> ../../../../bus/platform/drivers/vpfe
    -rw-r--r-- 1 root root 4096 Aug 17 11:37 driver_override
    -r--r--r-- 1 root root 4096 Aug 17 11:37 modalias
    lrwxrwxrwx 1 root root 0 Aug 17 11:37 of_node -> ../../../../firmware/devicetree/base/ocp@44000000/vpfe@48328000
    drwxr-xr-x 2 root root 0 Aug 17 11:37 power
    lrwxrwxrwx 1 root root 0 Apr 19 02:08 subsystem -> ../../../../bus/platform
    -rw-r--r-- 1 root root 4096 Apr 19 02:08 uevent


    root@am437x-evm:/sys/bus/platform/drivers/vpfe# ls -l
    lrwxrwxrwx 1 root root 0 Aug 17 11:38 48328000.vpfe -> ../../../../devices/platform/44000000.ocp/48328000.vpfe
    --w------- 1 root root 4096 Aug 17 11:38 bind
    --w------- 1 root root 4096 Apr 19 02:08 uevent
    --w------- 1 root root 4096 Aug 17 11:38 unbind

    But no video* on /dev/ & /sys/class/video4linux/

    Your help for these issues would be appreciated.

    Thanks, kihan.

  • Hello Kihan,

    I am merging this with the vpfe post.

    Regards,

    Nick

  • Hello Kihan,

    Please note that TVP5150/5151 is not recommended for new devices, and support is extremely limited as per post PLEASE READ FIRST -- TVP/THS Support Notification

    I am going to wait to take any more action on this post until I hear back on your other thread.

    Regards,

    Nick