This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/EVMK2H: receive doesn't work on eth2 and eth3 interfaces

Part Number: EVMK2H

Tool/software: Linux

Hello Ti Support Team.

 

We tried to follow Linux Core NetCP User Guide to enable SGMII 3 and SGMII 4 ports under Linux but after doing appropriate changes (see DTS include file below) we can see that the TX is working by doing tcpdump on other end but the receive doesn't work although the packets are coming to the keystone 2internal switch and we can see it by reading ALE table from Linux.  Could you please help us to identify what we are doing wrong we are using Processor SDK 4.3.0.

~# ifconfig eth3 192.168.40.100 netmask 255.255.255.0 

~# ping 192.168.40.233
PING 192.168.40.233 (192.168.40.233) 56(84) bytes of data.
From 192.168.40.100 icmp_seq=1 Destination Host Unreachable
From 192.168.40.100 icmp_seq=2 Destination Host Unreachable
From 192.168.40.100 icmp_seq=3 Destination Host Unreachable
From 192.168.40.100 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.40.233 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3057ms
pipe 4

~# cat /sys/devices/platform/soc/2620110.netcp/ale_table
index 0, raw: 0000007c d000ffff ffffffff, type: addr(1), addr: ff:ff:ff:ff:ff:ff, mcstate: f(3), port mask: 1f, no super
index 1, raw: 00000000 1000d26d d45670d0, type: addr(1), addr: d2:6d:d4:56:70:d0, uctype: persistent(0), port: 0
index 2, raw: 0000007c d0000100 5e000001, type: addr(1), addr: 01:00:5e:00:00:01, mcstate: f(3), port mask: 1f, no super
index 3, raw: 0000007c d0003333 00000001, type: addr(1), addr: 33:33:00:00:00:01, mcstate: f(3), port mask: 1f, no super
index 4, raw: 0000007c d0003333 ff5670d0, type: addr(1), addr: 33:33:ff:56:70:d0, mcstate: f(3), port mask: 1f, no super
index 5, raw: 00000000 10005e63 3ac2fc58, type: addr(1), addr: 5e:63:3a:c2:fc:58, uctype: persistent(0), port: 0
index 6, raw: 00000000 10000218 317e3e6f, type: addr(1), addr: 02:18:31:7e:3e:6f, uctype: persistent(0), port: 0
index 7, raw: 00000000 10003415 135ff8b7, type: addr(1), addr: 34:15:13:5f:f8:b7, uctype: persistent(0), port: 0
index 69, raw: 00000010 d0000013 3a028b3d, type: addr(1), addr: 00:13:3a:02:8b:3d, uctype: touched(3), port: 4
[0..72]: 35 entries, +

~# cat arch/arm/boot/dts/keystone-k2hk-netcp.dtsi
/*
* Device Tree Source for Keystone 2 Hawking Netcp driver
*
* Copyright 2015 Texas Instruments, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

qmss: qmss@2a40000 {
compatible = "ti,keystone-navigator-qmss";
dma-coherent;
#address-cells = <1>;
#size-cells = <1>;
clocks = <&chipclk13>;
ranges;
queue-range = <0 0x4000>;
linkram0 = <0x100000 0x8000>;
linkram1 = <0x0 0x10000>;

qmgrs {
#address-cells = <1>;
#size-cells = <1>;
ranges;
qmgr0 {
managed-queues = <0 0x2000>;
reg = <0x2a40000 0x20000>,
<0x2a06000 0x400>,
<0x2a02000 0x1000>,
<0x2a03000 0x1000>,
<0x23a80000 0x20000>,
<0x2a80000 0x20000>;
reg-names = "peek", "status", "config",
"region", "push", "pop";
};

qmgr1 {
managed-queues = <0x2000 0x2000>;
reg = <0x2a60000 0x20000>,
<0x2a06400 0x400>,
<0x2a04000 0x1000>,
<0x2a05000 0x1000>,
<0x23aa0000 0x20000>,
<0x2aa0000 0x20000>;
reg-names = "peek", "status", "config",
"region", "push", "pop";
};
};

queue-pools {
qpend {
qpend-0 {
qrange = <658 8>;
interrupts =<0 40 0xf04 0 41 0xf04 0 42 0xf04
0 43 0xf04 0 44 0xf04 0 45 0xf04
0 46 0xf04 0 47 0xf04>;
};
qpend-1 {
qrange = <8704 16>;
interrupts = <0 48 0xf04 0 49 0xf04 0 50 0xf04
0 51 0xf04 0 52 0x104 0 53 0x204
0 54 0xf04 0 55 0xf04 0 56 0xf04
0 57 0xf04 0 58 0xf04 0 59 0xf04
0 60 0xf04 0 61 0xf04 0 62 0xf04
0 63 0xf04>;
qalloc-by-id;
};
qpend-2 {
qrange = <8720 16>;
interrupts = <0 64 0xf04 0 65 0xf04 0 66 0xf04
0 59 0xf04 0 68 0xf04 0 69 0xf04
0 70 0xf04 0 71 0xf04 0 72 0xf04
0 73 0xf04 0 74 0xf04 0 75 0xf04
0 76 0xf04 0 77 0xf04 0 78 0xf04
0 79 0xf04>;
};
};
general-purpose {
gp-0 {
qrange = <4000 64>;
};
netcp-tx {
qrange = <640 9>;
qalloc-by-id;
};
netcpx-tx {
qrange = <8752 8>;
qalloc-by-id;
};
};
accumulator {
acc-low-0 {
qrange = <480 32>;
accumulator = <0 47 16 2 50>;
interrupts = <0 226 0xf01>;
multi-queue;
qalloc-by-id;
};
};
};

descriptor-regions {
#address-cells = <1>;
#size-cells = <1>;
ranges;
region-12 {
id = <12>;
region-spec = <11264 128>;
link-index = <0x4000>;
};
};

pdsps {
#address-cells = <1>;
#size-cells = <1>;
ranges;
pdsp0@0x2a10000 {
reg = <0x2a10000 0x1000 /*iram */
0x2a0f000 0x100 /*reg*/
0x2a0c000 0x3c8 /*intd */
0x2a20000 0x4000>; /*cmd*/
id = <0>;
};
};
}; /* qmss */

knav_dmas: knav_dmas@0 {
compatible = "ti,keystone-navigator-dma";
clocks = <&papllclk>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
ti,navigator-cloud-address = <0x23a80000 0x23a90000
0x23aa0000 0x23ab0000>;

dma_gbe: dma_gbe@0 {
reg = <0x2004000 0x100>,
<0x2004400 0x120>,
<0x2004800 0x300>,
<0x2004c00 0x120>,
<0x2005000 0x400>;
reg-names = "global", "txchan", "rxchan",
"txsched", "rxflow";
ti,enable-all;
};

dma_xgbe: dma_xgbe@0 {
reg = <0x2fa1000 0x100>,
<0x2fa1400 0x200>,
<0x2fa1800 0x200>,
<0x2fa1c00 0x200>,
<0x2fa2000 0x400>;
reg-names = "global", "txchan", "rxchan",
"txsched", "rxflow";
};
};

gbe_subsys: subsys@2090000 {
compatible = "syscon";
reg = <0x02090000 0x100>;
};

gbe_serdes: phy@232a000 {
compatible = "ti,keystone-serdes-gbe";
reg = <0x0232a000 0x2000>;
status = "disabled";
link-rate-kbps = <1250000>;
num-lanes = <4>;
#address-cells = <1>;
#size-cells = <0>;

serdes_lane0: lane@0 {
#phy-cells = <0>;
reg = <0>;
status = "ok";
control-rate = <2>;
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>;
};
serdes_lane1: lane@1 {
#phy-cells = <0>;
reg = <1>;
status = "ok";
control-rate = <2>;
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>;
};
serdes_lane2: lane@2 {
#phy-cells = <0>;
reg = <2>;
status = "ok";
control-rate = <2>;
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>;
};
serdes_lane3: lane@3 {
#phy-cells = <0>;
reg = <3>;
status = "ok";
control-rate = <2>;
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>;
};
};

netcp: netcp@2000000 {
reg = <0x2620110 0x8>;
reg-names = "efuse";
compatible = "ti,netcp-1.0";
#address-cells = <1>;
#size-cells = <1>;

/* NetCP address range */
ranges = <0 0x2000000 0x100000>;

clocks = <&clkpa>, <&clkcpgmac>, <&chipclk12>;
clock-names = "pa_clk", "ethss_clk", "cpts";
dma-coherent;

ti,navigator-dmas = <&dma_gbe 22>, /* rx flow for CPSW port 0 */
<&dma_gbe 23>, /* rx flow for CPSW port 1 */
<&dma_gbe 8>, /* CPSW tx channel */
<&dma_gbe 24>, /* rx flow for CPSW port 2 */
<&dma_gbe 25>, /* rx flow for CPSW port 3 */
<&dma_gbe 0>, /* PA cluster 0 channel */
<&dma_gbe 1>, /* PA cluster 1 channel */
<&dma_gbe 2>, /* PA cluster 2 channel */
<&dma_gbe 3>, /* PA cluster 3 channel */
<&dma_gbe 4>, /* PA cluster 4 channel */
<&dma_gbe 5>, /* PA cluster 5 channel */
<&dma_gbe 31>, /* PA rx flow for cmd rsp */
<&dma_gbe 6>; /* SA tx channel */
ti,navigator-dma-names = "netrx0",
"netrx1",
"nettx",
"netrx2",
"netrx3",
"pa-cl0",
"pa-cl1",
"pa-cl2",
"pa-cl3",
"pa-cl4",
"pa-cl5",
"pa-cmd-rsp",
"sa-tx0";

netcp-devices {
#address-cells = <1>;
#size-cells = <1>;
ranges;
gbe@90000 { /* ETHSS */
label = "netcp-gbe";
compatible = "ti,netcp-gbe";
syscon-subsys = <&gbe_subsys>;
reg = <0x90100 0x200>, <0x90400 0x200>, <0x90800 0x700>;
tx-queue = <648>;
tx-channel = "nettx";

interfaces {
gbe0: interface-0 {
phys = <&serdes_lane0>;
slave-port = <0>;
link-interface = <1>;
phy-handle = <&ethphy0>;
};
gbe1: interface-1 {
phys = <&serdes_lane1>;
slave-port = <1>;
link-interface = <1>;
phy-handle = <&ethphy1>;
};
gbe2: interface-2 {
phys = <&serdes_lane2>;
slave-port = <2>;
link-interface = <2>;
};
gbe3: interface-3 {
phys = <&serdes_lane3>;
slave-port = <3>;
link-interface = <2>;
};
};
};

pa@0 {
#address-cells = <1>;
#size-cells = <1>;
label = "netcp-pa";
compatible = "ti,netcp-pa";

reg = <0 0x60>,
<0x400 0x10>,
<0x500 0x40>,
<0x604 0x4>,
<0x1000 0x600>,
<0x3000 0x600>,
<0x6000 0x100>,
<0x10000 0x30000>,
<0x40000 0x8000>;

mac-lut-ranges = <0 43 56 63>;
ip-lut-ranges = <61 63>;
rx-route = <8704 22>;
tx-cmd-pool = <256 12>;
rx-cmd-rsp-pool = <256 12>;
rx-cmd-rsp-chan = "pa-cmd-rsp";
rx-cmd-rsp-queue-depth = <128 32 0 0>;
rx-cmd-rsp-buffer-size = <128 512 0 0>;

interfaces {
pa0: interface-0 {
slave-port = <0>;
};

pa1: interface-1 {
slave-port = <1>;
};

pa2: interface-2 {
slave-port = <2>;
};

pa3: interface-3 {
slave-port = <3>;
};
};

clusters {
#address-cells = <1>;
#size-cells = <0>;
cluster@0 {
reg = <0>;
tx-queue = <640>;
tx-channel = "pa-cl0";
};

cluster@1 {
reg = <1>;
tx-queue = <641>;
tx-channel = "pa-cl1";
};

cluster@5 {
reg = <5>;
tx-queue = <645>;
tx-channel = "pa-cl5";
};
};
};

sa@c0000 {
label = "netcp-sa";
multi-interface;
/* Optional: Specify NATT port for fragmentation detection */
natt-port = <0>;
tx-submit-queue = <646>;

interfaces {
sa0: interface-0 {
slave-port = <0>;
ti,tx-channel = "sa-tx0";
};

sa1: interface-1 {
slave-port = <1>;
ti,tx-channel = "sa-tx0";
};

sa2: interface-2 {
slave-port = <2>;
ti,tx-channel = "sa-tx0";
};

sa3: interface-3 {
slave-port = <3>;
ti,tx-channel = "sa-tx0";
};
};
};
};

netcp-interfaces {
interface-0 {
rx-channel = "netrx0";
rx-pool = <1024 12>;
tx-pool = <1024 12>;
rx-queue-depth = <128 128 0 0>;
rx-buffer-size = <1518 4096 0 0>;
rx-queue = <8704>;
tx-completion-queue = <8708>;
efuse-mac = <1>;
netcp-gbe = <&gbe0>;
netcp-pa = <&pa0>;
netcp-sa = <&sa0>;
};
interface-1 {
rx-channel = "netrx1";
rx-pool = <1024 12>;
tx-pool = <1024 12>;
rx-queue-depth = <128 128 0 0>;
rx-buffer-size = <1518 4096 0 0>;
rx-queue = <8705>;
tx-completion-queue = <8709>;
efuse-mac = <0>;
local-mac-address = [02 18 31 7e 3e 6f];
netcp-gbe = <&gbe1>;
netcp-pa = <&pa1>;
netcp-sa = <&sa1>;
};
interface-2 {
rx-channel = "netrx2";
rx-pool = <1024 12>;
tx-pool = <1024 12>;
rx-queue-depth = <128 128 0 0>;
rx-buffer-size = <1518 4096 0 0>;
rx-queue = <8706>;
tx-completion-queue = <8710>;
efuse-mac = <0>;
netcp-gbe = <&gbe2>;
netcp-pa = <&pa2>;
netcp-sa = <&sa2>;
};
interface-3 {
rx-channel = "netrx3";
rx-pool = <1024 12>;
tx-pool = <1024 12>;
rx-queue-depth = <128 128 0 0>;
rx-buffer-size = <1518 4096 0 0>;
rx-queue = <8707>;
tx-completion-queue = <8711>;
efuse-mac = <0>;
netcp-gbe = <&gbe3>;
netcp-pa = <&pa3>;
netcp-sa = <&sa3>;
};
};
};

xgbe_subsys: subsys@2f00000 {
status = "disabled";
compatible = "syscon";
reg = <0x02f00000 0x100>;
};

xgbe_pcsr: pcsr@2f00600 {
status = "disabled";
compatible = "syscon";
reg = <0x02f00600 0x100>;
};

xgbe_serdes: phy@231e000 {
compatible = "ti,keystone-serdes-xgbe";
reg = <0x0231e000 0x2000>;
status = "disabled";
link-rate-kbps = <10312500>;
num-lanes = <2>;
syscon-peripheral = <&xgbe_subsys>;
syscon-link = <&xgbe_pcsr>;
#address-cells = <1>;
#size-cells = <0>;

xserdes_lane0: lane@0 {
#phy-cells = <0>;
reg = <0>;
status = "ok";
control-rate = <0>;
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <2 0 0 12 4>;
};
xserdes_lane1: lane@1 {
#phy-cells = <0>;
reg = <1>;
status = "ok";
control-rate = <0>;
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <2 0 0 12 4>;
};
};

netcpx: netcp@2f00000 {
status = "disabled";
compatible = "ti,netcp-1.0";
#address-cells = <1>;
#size-cells = <1>;
ranges;

clocks = <&clkxge>, <&chipclk12>;
clock-names = "xge_clk", "cpts";
dma-coherent;

ti,navigator-dmas = <&dma_xgbe 0>,
<&dma_xgbe 8>,
<&dma_xgbe 0>;
ti,navigator-dma-names = "xnetrx0", "xnetrx1", "xnettx";

netcp-devices {
#address-cells = <1>;
#size-cells = <1>;
ranges;
xgbe@0x2f00000 {
label = "netcp-xgbe";
compatible = "ti,netcp-xgbe";
syscon-subsys = <&xgbe_subsys>;
syscon-pcsr = <&xgbe_pcsr>;
reg = <0x02f00100 0x200>, <0x02f01000 0xb00>;
tx-queue = <8752>;
tx-channel = "xnettx";

interfaces {
xgbe0: interface-0 {
phys = <&xserdes_lane0>;
slave-port = <0>;
link-interface = <11>;
};
xgbe1: interface-1 {
phys = <&xserdes_lane1>;
slave-port = <1>;
link-interface = <11>;
};
};
};
};

netcp-interfaces {
interface-0 {
rx-channel = "xnetrx0";
rx-pool = <2048 12>;
tx-pool = <1024 12>;
rx-queue-depth = <1024 1024 64 0 0>;
rx-buffer-size = <1536 4096 0 0>;
rx-queue = <8712>;
tx-completion-queue = <8714>;
efuse-mac = <0>;
netcp-xgbe = <&xgbe0>;

};
interface-1 {
rx-channel = "xnetrx1";
rx-pool = <2048 12>;
tx-pool = <1024 12>;
rx-queue-depth = <1024 1024 0 0>;
rx-buffer-size = <1536 4096 0 0>;
rx-queue = <8713>;
tx-completion-queue = <8715>;
efuse-mac = <0>;
netcp-xgbe = <&xgbe1>;
};
};
};

sa_subsys: subsys@20c0000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x20c0000 0x40000>;
dma-coherent;
dma-ranges;

sa_config: subsys@0 {
compatible = "syscon";
reg = <0x0 0x100>;
};

hwrng@24000 {
compatible = "ti,keystone-rng";
reg = <0x24000 0x1000>;
ti,syscon-sa-cfg = <&sa_config>;
clocks = <&clksa>;
clock-names = "fck";
};

crypto@0 {
compatible = "ti,netcp-sa-crypto";
syscon-subsys = <&sa_config>;
clocks = <&clksa>;
clock-names = "fck";

ti,navigator-dmas = <&dma_gbe 26>, <&dma_gbe 6>;
ti,navigator-dma-names = "crypto-rx", "crypto-tx";

ti,rx-channel = "crypto-rx";
ti,rx-queue-depth = <256 64 0 0>;
ti,rx-compl-queue = <8712>;
ti,rx-pool = <512 12>;

ti,tx-channel = "crypto-tx";
ti,tx-queue-depth = <256>;
ti,tx-completion-queue = <8713>;
ti,tx-pool = <512 12>;
ti,tx-submit-queue = <646>;

ti,sc-id = <0x7000 0x71ff>;
};
};

Thanks,

Andrew.