TI中文支持网
TI专业的中文技术问题搜集分享网站

DSP c6638万兆网卡相关配置

 TI美女帅哥工程师你们好:
   我们使用dsp的C6638处理器,芯片中有4核ARM,跑了Linux系统,在调试万兆网卡的时候出现了如下问题
操作如下    (1).按照官网对Linux内核进行了相关的设置支持万兆网口,设置如下
arch/arm/configs/keystone2_defconfigCONFIG_TI_KEYSTONE_XGE=y
CONFIG_TI_KEYSTONE_XGE_MDIO=y
CONFIG_TI_KEYSTONE_XGE=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_GPIO=y
CONFIG_GPIO_PCA953X=y
   arch/arm/boot/dts/k2e-net.dtsinetcpx: netcp@2f00000 {
status = "ok";
slaves {
slave0 {
link-interface = <11>;
phy-handle = <&phyx0>;
};
slave1 {
link-interface = <11>;
phy-handle = <&phyx1>;
};
};
};
我们使用的LINUX内核版本为k2_linux_03.10.10.14.12在   arch/arm/boot/dts/k2e-net.dtsi 没有发现如下设置,所以没有如下设
Enabling 10G-KR Firmware
Starting from MCSDK 3.1.4, 10G-KR firmware can be enabled for handling of auto-negotiation and link training.
Enabling firmware through DTS:
Update the status property of the firmware and lane bindings from "disabled" to "ok" in arch/arm/boot/dts/k2e-net.dtsi or arch/arm/boot/dts/k2hk-net.dtsi:
firmware {
status = "ok";
lane0 {
status = "ok";
};
lane1 {
status = "ok";
};
配置后编译发现keystone_xgemdio.c文件中的函数static int keystone_mdiox_probe(struct platform_device *pdev)里面有个函数xge_serdes_init_156p25Mhz();不存在,参考代码将其修改为 xge_serdes_init(of_get_child_by_name(node, "serdes"));
在LINUX内核启动时发现如下现象
[   45.530000] XGE serdes config:
[   45.533062]   ref_clk=156.25MHz, link_rate=10.3125G, lanes=2
[   45.538712]   c1=2, c2=0, cm=2, tx_att=12, tx_vreg=4
[   45.543676]   eq flags: vreg=1, cdfe=1, offset=1
[   45.548291] XGE: serdes reset
[   46.781965] XGE: timeout waiting for serdes link up
[   46.787524] keystone-netcp 2f00000.netcp: Created interface "eth4"
[   46.793725] keystone-netcp 2f00000.netcp: dma_chan_name xgetx0
[   46.799557] XGE: serdes reset
[   48.033185] XGE: timeout waiting for serdes link up
[   48.038718] keystone-netcp 2f00000.netcp: Created interface "eth5"
[   48.044920] keystone-netcp 2f00000.netcp: dma_chan_name xgetx1
[   48.050751] XGE: serdes reset
[   49.284367] XGE: timeout waiting for serdes link up
[   49.289329] keystone-netcp 2090000.netcp: pdsp 0 firmware: keystone/pa_pdsp0_classify1.fw
[   49.297509] keystone-netcp 2090000.netcp: pdsp 1 firmware: keystone/pa_pdsp1_classify1.fw
   49.305687] keystone-netcp 2090000.netcp: pds 2 firmware: keystone/pa_pdsp2_classify1.fw
[   49.313865] keystone-netcp 2090000.netcp: pdsp 3 firmware: keystone/pa_pdsp3_classify2.fw
[   49.322034] keystone-netcp 2090000.netcp: pdsp 4 firmware: keystone/pa_pdsp45_pam.fw
[   49.329778] keystone-netcp 2090000.netcp: pdsp 5 firmware: keystone/pa_pdsp45_pam.fw
[   49.337659] keystone-netcp 2090000.netcp: could not find interface 2 node in device tree
[   49.345754] keystone-netcp 2090000.netcp: Attach of module keystone-qos declined with -19
[   49.353935] keystone-netcp 2090000.netcp: could not find interface 3 node in device tree
[   49.362017] keystone-netcp 2090000.netcp: Attach of module keystone-qos declined with -19
[   49.370222] keystone-netcp 2090000.netcp: Attach of module keystone-sa declined with -19
[   49.378314] keystone-netcp 2090000.netcp: Attach of module keystone-sa declined with -19
[   49.388224] keystone-dwc3 2690000.dwc: usbss revision 47914300
[   49.394092] keystone-dwc3 2690000.dwc: mapped irq 425 to virq 572
查看linux内核源代码原因是 pcsr_rx_sts寄存器全0导致的XGE: timeout waiting for serdes link up。不知道这里是否有影响。
我启动后并未发现eth4,使用linux命令ifconfig eth4 192.168.12.12 打印信息如下
root@k2hk-evm:~# ifconfig eth4 192.168.12.12
[  220.617401] keystone-netcp 2f00000.netcp: initialize cpsw version 1.1 (0) CPSW identification value 0x4ee3
[  220.627417] keystone-netcp 2f00000.netcp: Created a cpsw ale engine
[  220.693167] net eth4: netcp device eth4 opened
[  220.699394] IPv6: ADDRCONF(NETDEV_UP): eth4: link is not ready
[  220.705249] 8021q: adding VLAN 0 to HW filter on device eth4
[  220.710910] net eth4: adding rx vlan id: 0
 [  220.732586] IPv6: ADDRCONF(NETDEV_CHANGE): eth4: link becomes ready
root@k2hk-evm:~#ping 192.168.12.12
可以通
root@k2hk-evm:~#ping 192.168.12.13
对端是不通。
 (2)C6638在linux系统起来后使用I2C配置芯片DS125DF111
参考配置写入信息手册《DS110DF111, DS125DF111, DS100DF410, DS110DF410, and DS125DF410 Programming Guide》
将如下数据写入芯片DS125DF111
 T
参考配置手册中第七页,的9,
able 9. 10.3125-Gbps Backplane and Cable Configuration Sequence
             最终写入的数据为:
             地址:0xff  写入数据:0xc;
            地址:0x00 写入数据:0x04;
            地址:0x0a  写入数据:0x1c;
            地址:0x2f  写入数据:0xc6;

            地址:0x31 写入数据:0x60;
            地址:0x3a  写入数据:0x00;
            地址:0x1e  写入数据:0xe1;
            地址:0x2d  写入数据:0x80;

            地址:0x15 写入数据:0x10;
            地址:0x0a  写入数据:0x10;
除了:  地址:0x00 写入数据0x04;读出来是0x00外所有配置写入和读出的值相同。
两个C6638的万兆网口,走XFI接口,通过光纤连接,发现PING不通。
 
 
使用公司,安捷伦的8GHZ的示波器40Gbps示波器发现DSP的XFI是有数据出来,但是经过DS125DF111数据没有了,
 
不知道这个芯片是否配置还存在什么问题,还有就是不知道C6638的LINUX内核设置那里是否也存在问题,导致数据可能存在问题
user5315971:

问题解决,谢谢。

Shine:

回复 user5315971:

方便的话,分享一下解决方法,谢谢。

user5315971:

回复 Shine:

配置DS125DF111芯片时一定要设置接口速率,DATASHEET中并未说明。

赞(0)
未经允许不得转载:TI中文支持网 » DSP c6638万兆网卡相关配置
分享到: 更多 (0)