芯片信号 SOC =》954 =》913=》sensor
954addr is 0x30 913 addr is SER_ID=0xB4,SlaveAlias=0xB6 寄存器配置如下
nvidia@tegra-ubuntu:~/Wl_Work$ sudo i2cdump -f -y 2 0x30
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: 60 00 3e 20 d3 01 00 fe 1c 10 06 0c 81 09 08 7f `.> ??.?????????
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 02 …………..??
20: 30 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0?…………..
30: 00 00 00 00 40 00 00 00 00 00 00 01 14 6f 00 40 ….@……??o.@
40: 00 a7 71 01 00 00 00 00 00 00 00 12 01 30 eb 05 .?q?…….??0??
50: 57 00 00 00 00 00 00 00 78 00 00 b4 b6 00 00 00 W…….x..??…
60: 00 00 00 00 00 20 00 00 00 00 00 00 00 7c 88 88 ….. …….|??
70: 2b 2c e4 00 03 be 16 c5 00 01 0f ff 20 00 00 00 +,?.????.??. …
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
a0: 02 0f 00 00 08 18 00 00 00 00 00 00 00 00 00 00 ??..??……….
b0: 08 14 3f 08 25 00 18 00 8c 33 83 74 80 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 01 00 00 04 6b 00 00 00 00 .C??`?.?..?k….
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
f0: 5f 55 42 39 35 34 00 00 00 00 00 00 00 00 00 00 _UB954……….
配置完成后 扫描i2c总线上设备
nvidia@tegra-ubuntu:~/Wl_Work$ sudo i2cdetect -y 2
Error: Can't use SMBus Quick Write command on this bus
nvidia@tegra-ubuntu:~/Wl_Work$ sudo i2cdetect -y -r 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — –10: — — — — — — — — — — — — — — — –20: — — — — — — — — — — — — — — — –30: 30 — — — — — — — — — — — — — — –40: — — — — — — — — — — — — — — — –50: — — — — — — — — — — — — — — — –60: — — — — — — — — — — — — — — — –70: — — — — — — — —
没有找到我配置的SlaveAlias 0x5a 的地址,我该怎么解决呢,感谢TI工程师
Kailyn Chen:
0X5a需要左移一位为0XB4,因为I2C是7bit从机地址,所以在写地址的时候需要左移一位,那么8bit 地址应该为0XB4。
6056807:
回复 Kailyn Chen:
上面是954的寄存器打印,其中SER_ID (Address 0x5B)为设备自动获取的0xB4值 我将SER_ALIAS_ID (Address 0x5C)设置了0xB6,DATAPATH_CTL2 (Address 0x5A)
我的寄存器打印上面有显示呢,
nvidia@tegra-ubuntu:~/Wl_Work$ sudo i2cdump -f -y 2 0x30
No size specified (using byte-data access)0123456789abcdef
00: 60 00 3e 20 d3 01 00 fe 1c 10 7a 7a bf 09 08 7f
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 02
20: 30 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 40 00 00 00 00 00 00 01 14 6f 00 40
40: 00 a7 71 01 00 00 00 00 00 00 00 12 01 17 ed 5e
50: 80 00 00 00 00ffff00 58 00 00b4 b6 20 00 00
60: 00 00 00 00 00 20 00 00 00 00 00 00 00 7c 88 88
70: 2b 2c e4 00 08 c9 72 c5 00 01 0fff 2 0 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 02 0f 00 00 08 18 00 00 00 00 00 00 00 00 00 00
b0: 08 14 3f 08 25 00 18 00 8c 33 83 74 80 00 00 00
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 00 00 00 04 6b 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 5f55 42 39 35 34 00 00 00 00 00 00 00 00 00 00
我在网上了解GPIO还需要配置还是怎么回事呢,探测不到这个I2C设备
6056807:
回复 Kailyn Chen:
我的SER ID为设备自动获取0xB4,我的SER Alias设置为0xB6,能自动获取到SER ID说明913设备是正常工作的对吧,我的slave ID 0 设置的0x20 , 但是我探测设备没有找到相应地址的设备(0x30是我的954地址),我期望探测到913设备,和摄像头设备该怎么操作呢。
nvidia@tegra-ubuntu:~/Wl_Work$ sudo i2cdetect-y -r 20123456789abcdef
00:– — — — — — — — — — — — —
10: — — — — — — — — — — — — — — — —
20: — — — — — — — — — — — — — — — —
30: 30 — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — — — — — — — — —
70: — — — — — — — —
寄存器配置如下nvidia@tegra-ubuntu:~/Wl_Work$ sudo i2cdump -f -y 2 0x30
No size specified (using byte-data access)0123456789abcdef0123456789abcdef
00: 60 00 3e 20 d3 01 00 fe 1c 10 7a 7a bf 09 08 7f`.> ??.???zz????
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 02…………..??
20: 30 01 00 00 00 00 00 00 00 00 00 00 00 00 00 000?…………..
30: 00 00 00 00 40 00 00 00 00 00 00 01 14 6f 00 40….@……??o.@
40: 00 a7 71 01 00 00 00 00 00 00 00 12 01 17 ed 5e.?q?…….????^
50: 80 00 00 00 00 ff ff 00 58 00 00 b4 b6 20 00 00?…….X..?? ..
60: 00 00 00 00 00 20 00 00 00 00 00 00 00 7c 88 88….. …….|??
70: 2b 2c e4 00 08 c9 72 c5 00 01 0f ff 20 00 00 00+,?.??r?.??. …
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….
a0: 02 0f 00 00 08 18 00 00 00 00 00 00 00 00 00 00??..??……….
b0: 08 14 3f 08 25 00 18 00 8c 33 83 74 80 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 00 00 00 04 6b 00 00 00 00.C??`?….?k….
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………….
f0: 5f 55 42 39 35 34 00 00 00 00 00 00 00 00 00 00_UB954……….我的配置脚本如下:
#!/bin/bash# i2c bus num
export I2C_BUS_NUM=2#
# ds90ub954 deserializer
#
export primary_devaddr_7bit=0x30
# register
export FPD3_PORT_SEL_ADDR=0x4c
export RX_PORT_CTL_ADDR=0x0c
export BCC_CONFIG=0x58
export SER_ALIAS_ID_ADDR=0x5C
export SLAVE_ID0_ADDR=0x5D
export SLAVE_ALIAS_ID0_ADDR=0x65
export I2C_DEVICE_ID_REG=0x00
export I2C_RX0_ID=0xF8
export I2C_RX1_ID=0xF9# 913 i2c addr
# remote 913 SER slave addr: 7'bit: 0x56
export REMOTE_SER_ADDR_8BIT=0xB6# ar0144
# ar0144 slave addr: 7'bit: 0x10
export AR0144_ADDR_8BIT=0x20#
# config 954 deserializer regs
#
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${FPD3_PORT_SEL_ADDR}0x1
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${RX_PORT_CTL_ADDR}0x81
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} 20x3e
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${BCC_CONFIG} 0x58
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit}0xc 0xFF
sleep 1
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${SER_ALIAS_ID_ADDR} ${REMOTE_SER_ADDR_8BIT}# ar0144
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${SLAVE_ID0_ADDR} ${AR0144_ADDR_8BIT}
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${SLAVE_ALIAS_ID0_ADDR} ${AR0144_ADDR_8BIT}
# i2cset -y I2C_BUSS 7'bit_i2c_addr reg val#
# check ds90ub954 deserializer regs
#
i2cget -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${SER_ALIAS_ID_ADDR}
i2cget -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${SLAVE_ID0_ADDR}
i2cget -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${SLAVE_ALIAS_ID0_ADDR}
Kailyn Chen:
回复 6056807:
能自动获取到SER ID,说明host和serializer 913 的link已经建立完好。
再就是需要配置SER Alias的值,配置好之后,host就可以和913 进行通讯了。
6056807:
回复 Kailyn Chen:
我检查了一下我的芯片上的标识为77ACNDUUB913AQ ,请问这个和DS90UB913A-Q1是一个芯片吗,我954的0x4D 的值是0x17,是因为什么原因导致的我探测不到913的SER Alias地址呢,能给点指导意见吗,其他配置都没有问题,谢谢
Kailyn Chen:
回复 6056807:
标识是UB913AQ的型号为DS90UB913A-Q1没问题。
另外,在和913A通讯的时候,需要配置ser ID和ser alias ID,同时需要enable pass though,所以您现在Ser Alias ID设置没问题,那么检查下pass though 是否enable了呢?
6056807:
回复 Kailyn Chen:
export BCC_CONFIG=0x58
i2cset -y ${I2C_BUS_NUM} ${primary_devaddr_7bit} ${BCC_CONFIG}0x58这个寄存器我已经配置为0x58了,已经使能了呢,还有什么其他需要配置的吗
6056807:
回复 Kailyn Chen:
我的RX_PORT_STS1 (Address 0x4D) 的状态为0x17
2
PARITY_ERROR R 0
FPD-Link III parity errors detected
This flag is set when the number of parity errors detected is greater
than the threshold programmed in the PAR_ERR_THOLD registers.
1: Number of FPD-Link III parity errors detected is greater than the
threshold
0: Number of FPD-Link III parity errors is below the threshold This bit
is cleared when the RX_PAR_ERR_HI/LO registers are cleared.
跟这个奇偶校验有关系吗
6056807:
回复 Kailyn Chen:
感谢TI工程师的技术支持,
现在的现象是这样的,当913没有连接到954的时候,954 的0x5b 与0x4d都是0 ,当913连接到954后,0x5b 值为0xb4,0x4d为0x17,我看了其中0x4d寄存器的 PARITY_ERROR 始终为1,好像是这个问题导致的,但是我不知道是什么原因,项目目前比较紧,感谢您们的支持
6056807:
回复 Kailyn Chen:
另外一个问题是客户提供的设备(913)供电3.3v,我们板子的954供电(1.8v),是这个问题吗,还是两边的电压必须一致呢