Date: Fri, 13 Mar 2015 11:58:22 +0900 From: Yonghyeon PYUN <pyunyh@gmail.com> To: Matt Dooner <dclscratch@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: cpsw/atphy network drivers Message-ID: <20150313025822.GA4447@michelle.fasterthan.com> In-Reply-To: <CAJi99x2a-%2BQRtfq=9utOWpxG1cUZTgiFhTv7Q10zHCMecUGRyg@mail.gmail.com> References: <CAJi99x3QuM2rh4OZBJMCSB3%2BU2Gkaqh6EUiax54PV8cR5ZxaWg@mail.gmail.com> <20150309061926.GA975@michelle.fasterthan.com> <CAJi99x2a-%2BQRtfq=9utOWpxG1cUZTgiFhTv7Q10zHCMecUGRyg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 12, 2015 at 01:17:12PM +0000, Matt Dooner wrote: > Hello, > > Thank you for your reply. Confirming the link configuration was a good > exercise, but I think I've been able to rule it out as the issue. > 100baseTX <half-duplex> appears to be the configuration request by the > switch the board was plugged into. I have connected the 335x board > directly to two other systems (windows and freebsd) and the correct > configuration is negotiated when either or both are set to auto (If I > change the configuration on one machine the other updates its > configuration accordingly). I have also tested setting the link > manually on both systems. I have also confirmed that my two other > systems can connect with each other and the switch. > > I've connected the 335x board directly to another FreeBSD 10.1 > (desktop) system. The desktop uses the fxp-miibus-inphy driver combo. > I ifconfig 192.168.0.1 255.255.255.0 and ifconfig 192.168.0.2 > 255.255.255.0 each system respectively. I also setup default routes > between them. When I create traffic (ping) on either machine I see the > following incremented on the 335x: > > dev.cpsw.0.stats.GoodTxFrames: 64 > dev.cpsw.0.stats.BroadcastTxFrames: 64 > dev.cpsw.0.stats.RxTx65to127OctetFrames: 64 > > and on the desktop: > > dev.fxp.0.status.tx.good_frames: 3 > > All other stats on both the 335x and desktop are zero. Good to know you've solved the issue. > > I am able to follow similar steps to build a working network between > the desktop and a windows laptop. > > Do you know if atphy(4) has been previously tested to work on the > AR8033 or even the AR8031? miidevs only has an entry for AR8021. I've No I'm not aware of that. > only found limited information about the PHY being used, but its from > OpenBSD and the wrong cpu type. These is also a note in the change > logs about this hardware "Added atphy(4) to armv7, for the Atheros > AR8031 phys in the AM335x starter kit." > (http://www.openbsd.org/plus57.html) > > openbsd-current > sys\arch\armv7\imx\imxenet.c: > 466: case BOARD_ID_IMX6_WANDBOARD: /* AR8031 */ > 467 /* disable SmartEEE */ > 468 imxenet_miibus_writereg(dev, phy, 0x0d, 0x0003); > ... > 472 imxenet_miibus_writereg(dev, phy, 0x0e, reg & ~0x0100); > 473 > 474: /* enable 125MHz clk output for AR8031 */ > 475 imxenet_miibus_writereg(dev, phy, 0x0d, 0x0007); > 476 imxenet_miibus_writereg(dev, phy, 0x0e, 0x8016); > > important configure pin mux and work mode to RGMII mode." > > It seems that some additional driver development will likely be required. > I don't have datasheet for AR8031/AR8033 PHYs so I'm not sure whether it's doable to apply PHY config magic above to atphy(4). I'm under the impression that AR8031/AR8035 may have some other special registers that report resolved speed/duplex and it shall require a new PHY driver. Linux seems to have slightly better comment for those PHYs though.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150313025822.GA4447>