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.

DS90UB964-Q1: Interface forum connect 964 to the i2c address of 933933

Part Number: DS90UB964-Q1

I want to connect 964 to the i2c address of 933933, which is 0x20. Currently, I am not connected. Attached is my configuration of 964. Please help me check if it is correct.

  • This is my configuration for 964

    # rx0 en
    i2c_write 0 0x60 0x4c 0x01 0x01 0x01
    # rx0 datatype yuv422_raw10
    i2c_write 0 0x60 0x70 0x1F 0x01 0x01
    # rx1 en
    i2c_write 0 0x60 0x4c 0x12 0x01 0x01
    # rx1 datatype yuv422_raw10
    i2c_write 0 0x60 0x70 0x5F 0x01 0x01
    # rx2 en
    i2c_write 0 0x60 0x4c 0x24 0x01 0x01
    # rx2 datatype yuv422_raw10
    i2c_write 0 0x60 0x70 0x9F 0x01 0x01
    # rx3 en
    i2c_write 0 0x60 0x4c 0x38 0x01 0x01
    # rx3 datatype yuv422_raw10
    i2c_write 0 0x60 0x70 0xDF 0x01 0x01

    # CSI0 select
    i2c_write 0 0x60 0x32 0x03 0x01 0x01
    # CSI0 800mbps
    i2c_write 0 0x60 0x1f 0x02 0x01 0x01
    # 使能CSI0输出 4lane 连续时钟
    i2c_write 0 0x60 0x33 0x03 0x01 0x01
    # 数据同步转发到CSI0 CSI0数据复制到CSI1
    i2c_write 0 0x60 0x21 0x94 0x01 0x01
    # 转发rx所有数据到CSI0
    i2c_write 0 0x60 0x20 0x00 0x01 0x01


    # enable I2C pass throu
    i2c_write 0 0x60 0x58 0x58 0x01 0x01
    #SER_ALIAS_ID
    i2c_write 0 0x60 0x5c 0x40 0x01 0x01
    #SlaveID
    i2c_write 0 0x60 0x5d 0x40 0x01 0x01
    #SlaveAlias
    i2c_write 0 0x60 0x65 0x40 0x01 0x01
    # FV active low LOW 8 BIT
    i2c_write 0 0x60 0x7c 0xC1 0x01 0x01
    # yuv422_row10
    i2c_write 0 0x60 0x6d 0x7f 0x01 0x01

  • Hi Qiuzhi,

    When you say you are not connected, do you mean there is no lock? Or are you not getting any video? If you read Register 0x4D multiple times, are LOCK and PASS (bits 0 and 1) always high?

    I noticed in the script that you selected YUV422 10-bit as the data type by setting Register 0x70[0:5] = 0x1F. However, it looks like you also configure Register 0x7C = 0xC1 to process the lower 8 bits. This is done if you are using YUV422 8-bit mode, so are you trying to use 8-bit mode? Also Register 0x7C is port specific, so you would configure this register for each port.

    The SER alias programmed in 0x60 is also port specific, so you will need to configure a unique SER alias to be used in I2C communication for each RX port.

    Regards,

    Cindy

  • I have checked register 0x4D, where LOCK and PASS have always been 0. Here is my latest configuration for 964. May I ask if there are any further issues

    #digital reset
    i2c_write    0  0x60 0x01 0x01  0x01 0x01

    # rx0  en
    i2c_write    0  0x60 0x4c 0x01  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx0 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0x1E  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01


    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01

    # rx1  en
    i2c_write    0  0x60 0x4c 0x12  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx1 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0x5E  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01

    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01


    # rx2  en
    i2c_write    0  0x60 0x4c 0x24  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx2 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0x9E  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01

    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01


    # rx3  en
    i2c_write    0  0x60 0x4c 0x38  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx3 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0xDE  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01

    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01

    # 使能四个rx和两个端口的中断
    i2c_write    0  0x60 0x23 0xBF  0x01 0x01
    # 使能rx中断
    i2c_write    0  0x60 0x36 0x10  0x01 0x01

    # gpio0 out en  rx端口锁定指示  输出源为rx0
    i2c_write    0  0x60 0x10 0x81  0x01 0x01
    # gpio1 out en  rx端口锁定指示  输出源为rx1
    i2c_write    0  0x60 0x11 0x85  0x01 0x01
    # gpio2 out en  rx端口锁定指示  输出源为rx2
    i2c_write    0  0x60 0x12 0x89  0x01 0x01
    # gpio3 out en  rx端口锁定指示  输出源为rx3
    i2c_write    0  0x60 0x13 0x8D  0x01 0x01
    # 帧有效最短时间
    i2c_write    0  0x60 0xBC 0x00  0x01 0x01

    # CSI0  select
    i2c_write    0  0x60 0x32 0x01  0x01 0x01
    # 使能CSI0输出  4lane  不连续时钟
    i2c_write    0  0x60 0x33 0x01  0x01 0x01
    # 转发rx所有数据到CSI0
    i2c_write    0  0x60 0x20 0x00  0x01 0x01



  • Fortunately, the camera data is connected and I can see it on the display screen. But I want CSI1 of 964 to copy the data of CSI0 and output it. I set the seventh position of register 0x21 to 1, which resulted in both CSI output ports running out of data. Why is this? Here are my latest configurations.

    #!/bin/sh
    #ds964_1  ->I2C0_SDA
    bspmm  0x017c7010c  0x1201
    #ds964_1  ->I2C0_SCL
    bspmm  0x017c70110  0x1201

    bspmm  0x017c70114  0x1201
    bspmm  0x017c70118  0x1201

    #ds964_1    PDB
    bspmm  0x017c70048  0x1060
    echo  68  > /sys/class/gpio/export
    echo out  > /sys/class/gpio/gpio68/direction
    echo 1  > /sys/class/gpio/gpio68/value

    #digital reset
    i2c_write    0  0x60 0x01 0x01  0x01 0x01

    # rx0  en
    i2c_write    0  0x60 0x4c 0x01  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx0 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0x1E  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01


    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01

    # rx1  en
    i2c_write    0  0x60 0x4c 0x12  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx1 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0x5E  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01

    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01


    # rx2  en
    i2c_write    0  0x60 0x4c 0x24  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx2 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0x9E  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01

    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01


    # rx3  en
    i2c_write    0  0x60 0x4c 0x38  0x01 0x01
    # enable I2C pass throu
    i2c_write    0  0x60 0x58 0x58  0x01 0x01
    # FV active low  LOW 8 BIT
    i2c_write    0  0x60 0x7c 0xC0  0x01 0x01
    # rx3 datatype  yuv422_raw10
    i2c_write    0  0x60 0x70 0xDE  0x01 0x01
    # yuv422_row10
    i2c_write    0  0x60 0x6d 0x7f  0x01 0x01

    # 启用指示位表示中断状态
    i2c_write    0  0x60 0xD8 0x07  0x01 0x01
    # 启用缓冲器以及检测数据
    i2c_write    0  0x60 0xD9 0x17  0x01 0x01

    # 使能四个rx和两个端口的中断
    i2c_write    0  0x60 0x23 0xBF  0x01 0x01
    # 使能rx中断
    i2c_write    0  0x60 0x36 0x10  0x01 0x01

    # 数据同步转发到CSI0   CSI0数据复制到CSI1
    i2c_write    0  0x60 0x21 0x80  0x01 0x01

    # gpio0 out en  rx端口锁定指示  输出源为rx0
    i2c_write    0  0x60 0x10 0x81  0x01 0x01
    # gpio1 out en  rx端口锁定指示  输出源为rx1
    i2c_write    0  0x60 0x11 0x85  0x01 0x01
    # gpio2 out en  rx端口锁定指示  输出源为rx2
    i2c_write    0  0x60 0x12 0x89  0x01 0x01
    # gpio3 out en  rx端口锁定指示  输出源为rx3
    i2c_write    0  0x60 0x13 0x8D  0x01 0x01
    # 帧有效最短时间
    i2c_write    0  0x60 0xBC 0x00  0x01 0x01

    # CSI0  select
    i2c_write    0  0x60 0x32 0x01  0x01 0x01
    # 使能CSI0输出  4lane  不连续时钟
    i2c_write    0  0x60 0x33 0x03  0x01 0x01
    # 转发rx所有数据到CSI0
    i2c_write    0  0x60 0x20 0x00  0x01 0x01
  • Hello,

    I will look over your script and get back to you in a few business days.

    Regards,

    Cindy

  • Hi Qiuzhi,

    Thank you for your patience. To properly enable replication from CSI0 to CSI1, you will need to also configure the CSI-2 lane settings for CSI1 in register 0x33. Also, it looks like you did not select a forwarding method in 0x21.

    Here is a script example: 

    # "CSI_PORT_SEL"
    WriteI2C(0x32,0x01) # CSI0 select
    # "CSI_EN"
    WriteI2C(0x33,0x03) # CSI_EN, CSI0 4lane, Cont Clock
    # "CSI_PORT_SEL"
    WriteI2C(0x32,0x12) # CSI1 select
    # "CSI_EN"
    WriteI2C(0x33,0x03) # CSI_EN & CSI1 4lane, Cont Clock
    # CSI2 port replicate setting
    WriteI2C(0x21,0x83) # enable replicate, CSI0 and CSI1 RR_FWD 
    #Enable port forwarding on 960
    WriteI2C(0x20,0x00) # forwarding enable
    Regards,
    Cindy