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.

EZSDK 5.04.00.11 I2C Bus Issues?

Other Parts Discussed in Thread: TVP7002

I'm getting an I2C timeout with EZSDK 5.04.00.11 that is not happening with 5.03.01.15. 

I'm new with TDM8168EVM and I'm trying to do something with gstreamer. I've been unable to get anything to work with 5.03 and when I saw 5.04 is supported on my host OS (U11.10), I decided to see if that works any better. 

After install and setup.sh of EZSDK, both versions were built using the mksdboot.sh script.  I copied /usr/share/ti/ti-media-controller-utils/load-hd-v4l2-firmware.sh to /etc/init.d/load-hd-firmware.sh. And what follows is the boot output from each. I've done some searching and reading, and two possible explanations have been presented: 1. the boards need to be reseated and 2. using the wrong version of drivers. Since I've never had the boards apart and there isn't an issue on the previous version, I doubt #1 is the problem. Since I've built from the canned distribution of EZSDK, how could the drivers be the wrong version? I create the 5.03 SD from a U10.04 VirtualBox VM while the 5.04 SD is done native in U11.10. There is no cross contamination possible. I'd like to stay with EZSDK 5.04, if at all possible.

5.03

SysLink version : 2.00.05.85
SysLink module created on Date:Dec 9 2011 Time:12:47:37
FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [Location of Mem map bin file]
FIRMWARE: Default memory configuration is used
MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.1.1
FIRMWARE: Memory Configuration status : In Progress
FIRMWARE: 1 start Successful
Loading HDVPSS (V4L2) Firmware
FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [Location of Mem map bin file]
FIRMWARE: Default memory configuration is used
MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.1.1
FIRMWARE: Memory Configuration status : In Progress
FIRMWARE: 2 start Successful
tvp7002 2-005d: tvp7002 found @ 0x5d (OMAP I2C adapter)
tvp7002 2-005d: Rev. 02 detected.
ti81xxvin ti81xxvin: registered sub device tvp7002
ti81xxvin ti81xxvin: TI81xx HDVPSS Capture driver initialized
HDMI W1 rev 2.0
Timing Info:
pixel_clk = 148500
x_res = 1920
y_res = 1080
hfp = 88
hsw = 44
hbp = 148
vfp = 4
vsw = 5
vbp = 36
chown: unknown user messagebus

5.04

SysLink version : 2.10.03.20
SysLink module created on Date:Apr 29 2012 Time:20:45:11
FIRMWARE: I2cInit will be done by M3
FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
===Mandatory arguments===
<Processor Id> 0: DSP, 1: Video-M3, 2: Vpss-M3
<Location of Firmware> firmware binary file
<start|stop> to start/stop the firmware
===Optional arguments===
-mmap input memory map bin file name
-i2c 0: i2c init not done by M3, 1(default): i2c init done by M3
FIRMWARE: isI2cInitRequiredOnM3: 1
FIRMWARE: Default memory configuration is used
MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.2.1
FIRMWARE: Memory Configuration status : In Progress
FIRMWARE: 1 start Successful
Loading HDVPSS (V4L2) Firmware
FIRMWARE: I2cInit will be done by M3
FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
===Mandatory arguments===
<Processor Id> 0: DSP, 1: Video-M3, 2: Vpss-M3
<Location of Firmware> firmware binary file
<start|stop> to start/stop the firmware
===Optional arguments===
-mmap input memory map bin file name
-i2c 0: i2c init not done by M3, 1(default): i2c init done by M3
FIRMWARE: isI2cInitRequiredOnM3: 1
FIRMWARE: Default memory configuration is used
MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.2.1
FIRMWARE: Memory Configuration status : In Progress
FIRMWARE: 2 start Successful
tvp7002 2-005d: tvp7002 found @ 0x5d (OMAP I2C adapter)
omap_i2c omap_i2c.2: controller timed out
omap_i2c omap_i2c.2: controller timed out
omap_i2c omap_i2c.2: controller timed out
omap_i2c omap_i2c.2: controller timed out
omap_i2c omap_i2c.2: controller timed out
tvp7002 2-005d: TVP7002 read error -110
tvp7002: probe of 2-005d failed with error -110
ti81xxvin ti81xxvin: Error registering v4l2 subdevice
HDMI W1 rev 2.0

  • This looks like an issue where the VPSS kernel module and the VPSS firmware aren't matching up in terms of who is handling i2c (A8 vs. M3).  You may need to pass a different i2c_mode parameter when loading the vpss kernel module.

    VPSS Driver Command Line Arguments
    ArgumentDescription
    i2c_mode choose the control source for the external i2c-based video devices, by default it is A8. when i2c_mode is set to 1, M3 controls external i2c-based video devices and it requires a special M3 fimrware, which is not part of PSP release.

    You can also see that firmware_loader now takes a parameter to control the i2c mode of the firmware, which is new in this release, I believe.

    Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
    ===Mandatory arguments=== 
    <Processor Id> 0: DSP, 1: Video-M3, 2: Vpss-M3 
    <Location of Firmware> firmware binary file 
    <start|stop> to start/stop the firmware 
    ===Optional arguments=== 
    -mmap input memory map bin file name 
    -i2c 0: i2c init not done by M3, 1(default): i2c init done by M3 

  • Thanks Nick. With that change, the modules load and the video devices are created.

    For future reference, the following line in load-hd-v4l2-firmware.sh:

    firmware_loader $HDVPSS_ID /usr/share/ti/ti-media-controller-utils/dm816x_hdvpss_v4l2.xem3 start

    Needs to change to:

    firmware_loader $HDVPSS_ID /usr/share/ti/ti-media-controller-utils/dm816x_hdvpss_v4l2.xem3 start -i2c 0

    This should have been done as part of the 5.04.00.11 release. 

  • I believe you could also change the following line to:

    modprobe vpss sbufaddr=0xBFB00000 mode=hdmi:1080p-60 i2c_mode=1

    This isn't an area I work with primarily, and I'm not sure I've seen the pros/cons versus handling the i2c on the A8 versus M3. If you notice anything functionally missing, I might try leaving the firmware loader parameter at its default and changing the VPSS parameter. 

    It looks like the non-n4l2 load firmware script sets the i2c_mode on the VPSS module load to 1, so perhaps they inadvertently reversed those numbers for this release.

  • Nick Reed said:

    I believe you could also change the following line to:

    modprobe vpss sbufaddr=0xBFB00000 mode=hdmi:1080p-60 i2c_mode=1

    This isn't an area I work with primarily, and I'm not sure I've seen the pros/cons versus handling the i2c on the A8 versus M3. If you notice anything functionally missing, I might try leaving the firmware loader parameter at its default and changing the VPSS parameter. 

    It looks like the non-n4l2 load firmware script sets the i2c_mode on the VPSS module load to 1, so perhaps they inadvertently reversed those numbers for this release.

    Setting "i2c_mode=1" without using the "-ic2 0" option fails to initialize the I2C bus and the errors are the same. And using both options results in a segmentation fault. I believe the original change (-i2c 0, above) is required to work.