Hello, We want to make board with dual ethernet based on A20 - one 1Gbps and one 100Mbps.
We've prepared prototype board, but the dual ethernet is not working as expected. On PA is connected gigabit PHY and on PH - megabit. As you can guess GMAC and EMAC are enabled simultaneously. First to clarify, both MACs are working fine alone, so hardware problem is unlikely possible. The two phys has different addresses - 1 and 3. Here is the part of the dts we are currently using: sun7i-a20.dtsi: emac_pins_b: emac0@1 { pins = "PH8", "PH9", "PH10", "PH11", "PH14", "PH15", "PH16", "PH17", "PH18, ""PH19", "PH20", "PH21", "PH22", "PH23", "PH24", "PH25", "PH26", "PH27"; function = "emac"; }; xxxx.dts: &emac { pinctrl-names = "default"; pinctrl-0 = <&emac_pins_b>; phy = <&phy1>; status = "okay"; }; &emac_sram { status = "okay"; }; &gmac { pinctrl-names = "default"; pinctrl-0 = <&gmac_pins_rgmii_a>; phy = <&phy3>; phy-mode = "rgmii"; phy-supply = <®_vcc3v3>; status = "okay"; phy3: ethernet-phy@3 { reg = <3>; }; }; ... &mdio { phy-supply = <®_vcc3v3>; status = "okay"; phy1: ethernet-phy@1 { reg = <1>; }; }; After boot, I get this log: [ 3.703707] sun7i-dwmac 1c50000.ethernet: PTP uses main clock [ 3.703719] sun7i-dwmac 1c50000.ethernet: no reset control found [ 3.703889] sun7i-dwmac 1c50000.ethernet: Ring mode enabled [ 3.703896] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported [ 3.703903] sun7i-dwmac 1c50000.ethernet: Normal descriptors [ 3.704048] libphy: stmmac: probed [ 4.301477] sun4i-emac 1c0b000.ethernet: using random MAC address 7e:94: 7b:31:bf:c4 [ 4.303733] sun4i-emac 1c0b000.ethernet: eth1: at f1182000, IRQ 29 MAC: 7e:94:7b:31:bf:c4 [ 11.844674] Micrel KSZ9031 Gigabit PHY stmmac-0:03: attached PHY driver [ Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=stmmac-0:03, irq=POLL) [ 11.848890] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled [ 11.848926] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available [ 11.848951] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW [ 14.962832] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 16.471741] sun4i-emac 1c0b000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx But none of the interfaces work. root@olimex:~# cat /proc/net/dev Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed bond0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lo: 20736 256 0 0 0 0 0 0 20736 256 0 0 0 0 0 0 eth1: 0 0 0 0 0 4 0 0 1534 9 0 0 0 0 0 0 eth0: 0 0 0 0 0 0 0 0 2778 15 0 0 0 0 0 As you can see the receive doesn't work. However if I force the GMAC to work 100Mbps both interfaces work. Same happens if I omit PH18 in the dts. In this case the GMAC "auto" goes to 100Mbps. [ 3.703765] sun7i-dwmac 1c50000.ethernet: PTP uses main clock [ 3.703776] sun7i-dwmac 1c50000.ethernet: no reset control found [ 3.703958] sun7i-dwmac 1c50000.ethernet: Ring mode enabled [ 3.703966] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported [ 3.703973] sun7i-dwmac 1c50000.ethernet: Normal descriptors [ 3.704102] libphy: stmmac: probed [ 4.310098] sun4i-emac 1c0b000.ethernet: using random MAC address 62:1a: 55:37:03:c3 [ 4.312432] sun4i-emac 1c0b000.ethernet: eth1: at f1182000, IRQ 29 MAC: 62:1a:55:37:03:c3 [ 12.314605] Micrel KSZ9031 Gigabit PHY stmmac-0:03: attached PHY driver [ Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=stmmac-0:03, irq=POLL) [ 12.318913] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled [ 12.318948] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available [ 12.318972] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW [ 15.442783] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 17.111725] sun4i-emac 1c0b000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx I think there is something wrong with GRXCK and ERXCK. Maybe they are muxed some way? Can someone give some directions? Best regards, Stefan Mavrodiev sssx -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.