Other Parts Discussed in Thread: DS90UB962-Q1
soc->DS90UB962-Q1=>4个ub953->sc132(sensor)
随机出现概率1个没有图像,对应的lock显示已经lock
root@j784s4-evm:~# i2cset -f -y 5 0x3d 0x4c 0x24
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x4d
0x8b
但是没有数据
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x76
0x00
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x75
0x00
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x73
0x00
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x74
0x00
其他port状态,有图像
root@j784s4-evm:~# i2cset -f -y 5 0x3d 0x4c 0x01
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x4d
0x0b
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x76
0x00
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x75
0x0a
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x73
0x04
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x74
0x38
config
#!/bin/bash
# I2C write format:
# [Words to Write][I2C Slave address][I2C Register Address MSB][I2C Register Address LSB][Data Word]
#Enables VDD LDO regulator of MAX96712
Cmd_I2cSetUb962="i2ctransfer -f -y 5 w2@0x32"
Cmd_I2cSet9295="i2ctransfer -f -y 5 w2@0x40"
Cmd_I2cSetUb953="i2ctransfer -f -y 5 w2@0x18"
Func_VC_In_ALL()
{
${Cmd_I2cSetUb962} 0x01 0x01 ##reset*/
${Cmd_I2cSetUb962} 0x1f 0x00 #/*CSI Transmitter Speed 1.472 - 1.664 Gbps , 0x03:400Mpbs 0x02:800Mpbs, 00: 1.472 - 1.664 Gbps serial rate*/
${Cmd_I2cSetUb962} 0x0c 0xf #/*RX_PORT_CTL*/
${Cmd_I2cSetUb962} 0x10 0x91 #/*enable GPIO0*/
# # // prot 0
${Cmd_I2cSetUb962} 0x4c 0x01
${Cmd_I2cSetUb962} 0x72 0x0
${Cmd_I2cSetUb962} 0x6e 0xaa
${Cmd_I2cSetUb962} 0x7c 0x80
${Cmd_I2cSetUb962} 0x70 0x1e #VC1 and CSI0 datatype yuv422_8b; 0x1E for VC0 */
${Cmd_I2cSetUb962} 0x71 0x1f
${Cmd_I2cSetUb962} 0x58 0x5e #BCC_CONFIG*/
${Cmd_I2cSetUb962} 0x6d 0x00 #PORT_CONFIG
${Cmd_I2cSetUb962} 0x0f 0x01 #GPIO_INPUT_CTL
${Cmd_I2cSetUb962} 0x5c 0x30 #
${Cmd_I2cSetUb962} 0x5D 0x30 # ser physical address 8bits */
${Cmd_I2cSetUb962} 0x65 0xe8
${Cmd_I2cSetUb962} 0xbc 0x00 #
${Cmd_I2cSetUb962} 0x66 0x80
${Cmd_I2cSetUb962} 0x6D 0x04
${Cmd_I2cSetUb962} 0x32 0x01
${Cmd_I2cSetUb962} 0x20 0x0
${Cmd_I2cSetUb962} 0x21 0x03
# # // prot 1
${Cmd_I2cSetUb962} 0x4c 0x12
${Cmd_I2cSetUb962} 0x72 0x01
${Cmd_I2cSetUb962} 0x6e 0xaa
${Cmd_I2cSetUb962} 0x7c 0x80
${Cmd_I2cSetUb962} 0x70 0x1e #VC1 and CSI0 datatype yuv422_8b; 0x1E for VC0 */
${Cmd_I2cSetUb962} 0x71 0x1f
${Cmd_I2cSetUb962} 0x58 0x5e #BCC_CONFIG*/
${Cmd_I2cSetUb962} 0x6d 0x00 #PORT_CONFIG
${Cmd_I2cSetUb962} 0x0f 0x01 #GPIO_INPUT_CTL
${Cmd_I2cSetUb962} 0x5c 0x30 #
${Cmd_I2cSetUb962} 0x5D 0x30 # ser physical address 8bits */
${Cmd_I2cSetUb962} 0x65 0xe8
${Cmd_I2cSetUb962} 0xbc 0x00 #
${Cmd_I2cSetUb962} 0x66 0x80
${Cmd_I2cSetUb962} 0x6D 0x04
${Cmd_I2cSetUb962} 0x32 0x01
${Cmd_I2cSetUb962} 0x20 0x0
${Cmd_I2cSetUb962} 0x21 0x03
# # // prot 2
${Cmd_I2cSetUb962} 0x4c 0x24
${Cmd_I2cSetUb962} 0x72 0x02
${Cmd_I2cSetUb962} 0x6e 0xaa
${Cmd_I2cSetUb962} 0x7c 0x80
${Cmd_I2cSetUb962} 0x70 0x1e #VC1 and CSI0 datatype yuv422_8b; 0x1E for VC0 */
${Cmd_I2cSetUb962} 0x71 0x1f
${Cmd_I2cSetUb962} 0x58 0x5e #BCC_CONFIG*/
${Cmd_I2cSetUb962} 0x6d 0x00 #PORT_CONFIG
${Cmd_I2cSetUb962} 0x0f 0x01 #GPIO_INPUT_CTL
${Cmd_I2cSetUb962} 0x5c 0x30 #
${Cmd_I2cSetUb962} 0x5D 0x30 # ser physical address 8bits */
${Cmd_I2cSetUb962} 0x65 0xe8
${Cmd_I2cSetUb962} 0xbc 0x00 #
${Cmd_I2cSetUb962} 0x66 0x80
${Cmd_I2cSetUb962} 0x6D 0x04
${Cmd_I2cSetUb962} 0x32 0x01
${Cmd_I2cSetUb962} 0x20 0x0
${Cmd_I2cSetUb962} 0x21 0x03
# # // prot 3
${Cmd_I2cSetUb962} 0x4c 0x38
${Cmd_I2cSetUb962} 0x72 0x03
${Cmd_I2cSetUb962} 0x6e 0xaa
${Cmd_I2cSetUb962} 0x7c 0x80
${Cmd_I2cSetUb962} 0x70 0x1e #VC1 and CSI0 datatype yuv422_8b; 0x1E for VC0 */
${Cmd_I2cSetUb962} 0x71 0x1f
${Cmd_I2cSetUb962} 0x58 0x5e #BCC_CONFIG*/
${Cmd_I2cSetUb962} 0x6d 0x00 #PORT_CONFIG
${Cmd_I2cSetUb962} 0x0f 0x01 #GPIO_INPUT_CTL
${Cmd_I2cSetUb962} 0x5c 0x30 #
${Cmd_I2cSetUb962} 0x5D 0x30 # ser physical address 8bits */
${Cmd_I2cSetUb962} 0x65 0xe8
${Cmd_I2cSetUb962} 0xbc 0x00 #
${Cmd_I2cSetUb962} 0x66 0x80
${Cmd_I2cSetUb962} 0x6D 0x04
${Cmd_I2cSetUb962} 0x32 0x01
${Cmd_I2cSetUb962} 0x20 0x0
${Cmd_I2cSetUb962} 0x21 0x03
#stream on
${Cmd_I2cSetUb962} 0x33 0x3
i2cdetect -r -y 5
echo "953 config"
${Cmd_I2c\SetUb953} 0x1 0x7
sleep 1
${Cmd_I2cSetUb953} 0x02 0x52
${Cmd_I2cSetUb953} 0x0e 0x1e
${Cmd_I2cSetUb953} 0x06 0x41
${Cmd_I2cSetUb953} 0x07 0x28
${Cmd_I2cSetUb953} 0x0e 0xf
${Cmd_I2cSetUb953} 0x0d 0xf0
${Cmd_I2cSetUb953} 0x32 0x88
echo "953 end config"
}
Func_VC_In_ALL
0x3d是ub96的i2c地址
