工具/软件:
尊敬的 TI 专家:
我们将 TDA4VE EVM (包括 SOM、CPB 和融合板)作为定制电路板设计的基础。
UB960串行器连接到主域的 I2C5、这与 EVM 配置一致。
不过、我们发现在定制电路板上、I2C5目前无法进行读取和写入操作。
为了验证这一点、我们通过将以下配置添加到 U-Boot 器件树中、对 I2C5执行了一项简单的读取/写入测试。
文件:u-boot-2021.01+gitAUTOINC+7996ed51F1-g7996ed51F1/arch/arm/dts/k3-j721s2-common-proc-board.dts
main_i2c5_pins_default: main-i2c5-default-pins { pinctrl-single,pins = < J721S2_IOPAD(0x01c, PIN_INPUT_PULLUP, 8) /* (Y24) MCAN15_TX.I2C5_SCL */ J721S2_IOPAD(0x018, PIN_INPUT_PULLUP, 8) /* (W23) MCAN14_RX.I2C5_SDA */ >; }; &main_i2c5 { pinctrl-names = "default"; pinctrl-0 = <&main_i2c5_pins_default>; clock-frequency = <400000>; /*clock-frequency = <100000>;*/ status = "okay"; };
在上 TDA4EVM EVM 、我们可以通过 I2C 总线成功地与 UB960通信
请参阅以下日志。 焊盘配置看起来正确、可以成功扫描总线上的 i2c 器件、并且可以读取 UB960 0x3D 的寄存器。
=> i2c bus Bus 0: i2c@42120000 Bus 1: i2c@40b00000 Bus 2: i2c@40b10000 Bus 3: i2c@2000000 21: gpio@21, offset len 1, flags 0 20: gpio@20, offset len 1, flags 0 22: gpio@22, offset len 1, flags 0 Bus 4: i2c@2010000 Bus 5: i2c@2030000 Bus 6: i2c@2040000 20: gpio@20, offset len 1, flags 0 Bus 7: i2c@2050000 => i2c dev 7 Setting bus to 7 => md.l 0x0011C01C 0011c01c: 00060008 08214007 08214007 08214007 .....@!..@!..@!. 0011c02c: 08214007 08214007 08214007 08214007 .@!..@!..@!..@!. 0011c03c: 08214007 0005000e 0001000e 08214007 .@!..........@!. => md.l 0x0011C018 0011c018: 00060008 00060008 08214007 08214007 .........@!..@!. 0011c028: 08214007 08214007 08214007 08214007 .@!..@!..@!..@!. 0011c038: 08214007 08214007 0005000e 0001000e .@!..@!......... => i2c probe Valid chip addresses: 20 36 3D 50 => i2c md 0x3d 0x35 1 0035: 00 . =>
然而,同样的方法 失败 UB960的一些示例输入 定制板 。
=> i2c bus Bus 0: i2c@42120000 Bus 1: i2c@40b00000 Bus 2: i2c@40b10000 Bus 3: i2c@2000000 21: gpio@21, offset len 1, flags 0 20: gpio@20, offset len 1, flags 0 22: gpio@22, offset len 1, flags 0 Bus 4: i2c@2010000 Bus 5: i2c@2030000 Bus 6: i2c@2040000 20: gpio@20, offset len 1, flags 0 Bus 7: i2c@2050000 => i2c dev 7 Setting bus to 7 => md.l 0x0011C01C 0011c01c: 00060008 08214007 08214007 08214007 .....@!..@!..@!. 0011c02c: 08214007 08214007 08214007 08214007 .@!..@!..@!..@!. 0011c03c: 08214007 0005000e 0001000e 08214007 .@!..........@!. => md.l 0x0011C018 0011c018: 00060008 00060008 08214007 08214007 .........@!..@!. 0011c028: 08214007 08214007 08214007 08214007 .@!..@!..@!..@!. 0011c038: 08214007 08214007 0005000e 0001000e .@!..@!......... => i2c probe Valid chip addresses:Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured Timed out in wait_for_event: status=0000
我们也尝试在 Linux 中进行类似的访问、但仍然失败。
root@j721s2-evm:~# devmem2 0x0011C01C /dev/mem opened. Memory mapped at address 0xffff8113f000. Read at address 0x0011C01C (0xffff8113f01c): 0x40060008 root@j721s2-evm:~# devmem2 0x0011C018 /dev/mem opened. Memory mapped at address 0xffffaa3da000. Read at address 0x0011C018 (0xffffaa3da018): 0x00060008 root@j721s2-evm:~# root@j721s2-evm:~# i2cdetect -l i2c-3 i2c OMAP I2C adapter I2C adapter i2c-1 i2c OMAP I2C adapter I2C adapter i2c-4 i2c OMAP I2C adapter I2C adapter i2c-2 i2c OMAP I2C adapter I2C adapter i2c-0 i2c OMAP I2C adapter I2C adapter root@j721s2-evm:~# i2cdetect -y 4 Warning: Can't use SMBus Quick Write command, will skip some addresses 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 10: 20: 30: [ 72.559377] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 73.571375] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 74.583373] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 75.595376] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 76.607375] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 77.623373] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 78.639375] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 79.651374] omap_i2c 2050000.i2c: timeout waiting for bus ready -- 40: 50: [ 80.663373] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 81.675377] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 82.687372] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 83.699372] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 84.711376] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 85.723374] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 86.735374] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 87.747375] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 88.759374] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 89.775375] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 90.787374] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 91.803372] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 92.815371] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 93.827373] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 94.839374] omap_i2c 2050000.i2c: timeout waiting for bus ready -- [ 95.851373] omap_i2c 2050000.i2c: timeout waiting for bus ready -- 60: 70: root@j721s2-evm:~#
我们不知道为什么定制电路板上的相同软件配置会失败。
非常感谢你的指导、 我期待着你的答复。
此致、
Christopher