Other Parts Discussed in Thread: DS90UB962-Q1
Hi Team,
soc->DS90UB962-Q1=>4个ub953->sc132(sensor)
There is a random situation where there is no image, but the corresponding lock shows that it is already locked.
root@j784s4-evm:~# i2cset -f -y 5 0x3d 0x4c 0x24
root@j784s4-evm:~# i2cget -f -y 5 0x3d 0x4d
0x8b
But there is no data.
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
Other port status: there is an image.
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 is as follows:
#!/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 is the I2C address of UB96.
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 0x47
0x02
BCC_STATUS Register (Address 0x47)
bit 1
BCC Slave Timeout Error
When the issue occurs,
UB960
i2cdump -f -y 5 0x3d
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 7a 00 1e 40 d0 01 00 fe 1c 10 7a 7a 0f b9 00 01 z.?@??.???zz??.?
10: 91 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 ?.............?.
20: 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .?..............
30: 00 00 01 03 00 01 00 01 00 00 00 00 00 00 00 00 ..??.?.?........
40: 00 a9 71 01 00 00 20 02 00 00 00 12 38 d3 45 64 .?q?.. ?...?8?Ed
50: 00 00 00 03 00 00 00 00 5e 00 00 30 30 30 00 00 ...?....^..000..
60: 00 00 00 00 00 e8 80 00 00 00 00 00 00 04 aa 88 .....??......???
70: 1e 1f 03 04 38 0a 00 c5 00 01 00 00 80 00 00 00 ????8?.?.?..?...
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 35 d9 00 03 ff ff 00 03 00 00 00 00 00 00 00 00 5?.?...?........
a0: 00 00 00 00 00 1c 00 00 00 00 00 00 00 00 00 00 .....?..........
b0: 1c 3a 14 08 25 00 18 00 ff 33 83 74 00 00 00 00 ?:??%.?..3?t....
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 43 94 03 60 f2 00 02 00 00 00 00 00 00 00 00 .C??`?.?........
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 5f 55 42 39 36 30 00 00 00 00 00 00 00 00 00 00 _UB960..........
ub953
i2cdump -f -y 5 0x18
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 30 00 52 48 00 03 41 28 fe 1e 10 7f 7f f0 0f 00 0.RH.?A(???????.
10: 00 00 00 00 00 20 18 3c 80 62 62 62 00 00 00 00 ..... ?<?bbb....
20: 00 00 00 00 00 02 00 00 67 33 01 00 00 00 00 00 .....?..g3?.....
30: 00 20 88 04 00 10 00 60 00 00 00 00 00 00 00 00 . ??.?.`........
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 20 c0 45 0f 00 00 00 00 07 07 07 00 00 00 00 00 ?E?....???.....
60: 00 00 00 00 00 c8 00 00 00 00 00 00 00 00 00 00 .....?..........
70: 00 00 25 00 00 00 00 00 00 00 e4 00 00 00 00 00 ..%.......?.....
80: 00 00 00 00 00 00 90 00 00 00 00 00 00 00 00 00 ......?.........
90: 32 e3 64 01 00 00 00 00 00 00 00 00 00 00 00 00 2?d?............
a0: 00 00 0c 00 00 10 42 10 10 10 00 01 00 00 00 00 ..?..?B???.?....
b0: 04 4a 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 ?J?.............
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 5f 55 42 39 35 33 00 00 00 00 00 00 00 00 00 00 _UB953..........
The corresponding port 3 reads as written:
ub960读出来与写入去一样 Cmd_I2cGetUb953="i2cget -f -y 5 0x18" i2cget -f -y 5 0x3d ${Cmd_I2cGetUb953} 0x1 0x7 sleep 1 ${Cmd_I2cGetUb953} 0x02 0x52 ${Cmd_I2cGetUb953} 0x0e 0x1e ${Cmd_I2cGetUb953} 0x06 0x41 ${Cmd_I2cGetUb953} 0x07 0x28 ${Cmd_I2cGetUb953} 0x0e 0xf ${Cmd_I2cGetUb953} 0x0d 0xf0 ${Cmd_I2cGetUb953} 0x32 0x88 root@j784s4-evm:~# Cmd_I2cGetUb953="i2cget -f -y 5 0x18" root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0x1 0x00 root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0x2 0x52 root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0xe 0x0f root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0x6 0x41 root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0x7 0x28 root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0xe 0x0f root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0xd 0xf0 root@j784s4-evm:~# ${Cmd_I2cGetUb953} 0x32 0x88 root@j784s4-evm:~# ub953读出来与写入去一样
Could you help check this case? Thanks.
Best Regards,
Cherry