Hi
I am trying to get a AM335x Starter Kit working with a Ubuntu userspace.
I have followed the instructions at: https://www.eewiki.net/display/linuxonarm/BeagleBone to build the kernel and installed the Ubuntu 14.04 LTS rootfs.
The system boots OK.
The problem I have is that I can not get eth1 to work properly.
I am aware that the AM335x Starter Kit has a switch that needs to be in “Dual EMAC” mode. I have checked the Device Tree and it includes:
&mac {
pinctrl-names = “default”, “sleep”;
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
dual_emac = <1>;
status = “okay”;
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = “rgmii-txid”;
dual_emac_res_vlan = <1>;
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = “rgmii-txid”;
dual_emac_res_vlan = <2>;
};
Both eth0 and eth1 are detected during boot:
ubuntu@arm:~$ dmesg | grep eth
[ 4.323689] cpsw 4a100000.ethernet: Detected MACID = 00:18:31:e7:be:8d
[ 4.331473] cpsw 4a100000.ethernet: cpsw: Detected MACID = 00:18:31:e7:be:8e
[ 11.850175] net eth1: initializing cpsw version 1.12 (0)
[ 11.948809] net eth1: phy found : id is : 0x4dd074
[ 11.951002] net eth1: BQL enabled
[ 11.955396] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 11.956216] net eth0: initializing cpsw version 1.12 (0)
[ 12.038709] net eth0: phy found : id is : 0x4dd074
[ 12.038824] net eth0: BQL enabled
[ 12.043271] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 15.949189] cpsw 4a100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 15.949292] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
eth0 works as expected.
I am aware from: http://processors.wiki.ti.com/index.php/Linux_Core_CPSW_User’s_Guide that eth0 and eth1 can not be on the same subnet when in “Dual EMAC” mode.
If I boot from the TI SDK Linux image I can get eth1 to work.
The simple experimental setup I have is:
-
Connect eth1 to a laptop running wireshark with a static IP of 192.168.1.1.
-
Boot image.
-
Take eth0 down:
ip link set eth0 down
- Assign eth1 a static ip address:
ip addr add 192.168.1.2/24 dev eth1
- Ping test laptop:
ping 192.168.1.1
When I follow this procedure with the TI SDK Linux image I see the ICMP traffic on wireshark as expected.
When I do the same think with the bb-kernel/4.1.2-bone12 ubuntu image I see no traffic from the dev board at all. The link is coming up because the test laptop detects the link and starts sending discovery packets.
The link is shown as up:
ubuntu@arm:~$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 00:18:31:e7:be:8d brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 00:18:31:e7:be:8e brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether de:ad:be:ef:00:00 brd ff:ff:ff:ff:ff:ff
The interface has an address:
root@arm:~# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 00:18:31:e7:be:8d brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:18:31:e7:be:8e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/24 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::218:31ff:fee7:be8e/64 scope link
valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether de:ad:be:ef:00:00 brd ff:ff:ff:ff:ff:ff
There is a route:
root@arm:~# ip route show
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.2
I have attach the content of /proc/config.gz
Can anyone help with any ideas?
Many thanks
Richard
config.txt (130 KB)