Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Mar 2015 03:48:12 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279577 - head/sys/mips/conf
Message-ID:  <201503040348.t243mCHA088103@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed Mar  4 03:48:11 2015
New Revision: 279577
URL: https://svnweb.freebsd.org/changeset/base/279577

Log:
  Fix both arge0 and arge1 to work correctly on the AP135.
  
  * Force the arge0 interface to not use a PHY for speed negotiation
    for now.  It'd be nice to do it, but right now the RGMII interface
    to the switch needs to stay at 1000/full in order to match what
    the switch side of the port is programmed as.
  
    So until that's all sorted out, disconnect arge0 from the PHY
    and leave it at fixed at 1000/full.
  
    I noticed this when I tried using a busted ethernet cable that
    forced the PHY to negotiate 100/full.  The switch was fine and
    it negotiated to 100/full, but then arge0 saw the link update
    and set the speed to 100/full when the switch side of that
    hook up was set to 1000/full.  Tsk.
  
  * When using argemdio, the mdio device resets and initialises
    the MAC, /not/ the arge_attach (or, as I discovered, arge_init.)
    So arge1 wasn't being fully initialised and thus no traffic
    would ever flow.
  
    So until I tidy up that mess, just create an argemdio bus for
    arge1.  It's totally fine; it won't do anything or find anything
    attached to it.
  
  Tested:
  
  * AP135 reference board - both arge0 and arge1 now work.

Modified:
  head/sys/mips/conf/AP135.hints

Modified: head/sys/mips/conf/AP135.hints
==============================================================================
--- head/sys/mips/conf/AP135.hints	Wed Mar  4 02:56:32 2015	(r279576)
+++ head/sys/mips/conf/AP135.hints	Wed Mar  4 03:48:11 2015	(r279577)
@@ -14,6 +14,12 @@ hint.argemdio.0.maddr=0x19000000
 hint.argemdio.0.msize=0x1000
 hint.argemdio.0.order=0
 
+# mdiobus1 on arge1 - required to bring up arge1?
+hint.argemdio.1.at="nexus0"
+hint.argemdio.1.maddr=0x1a000000
+hint.argemdio.1.msize=0x1000
+hint.argemdio.1.order=0
+
 # AR8327 - connected via mdiobus0 on arge0
 hint.arswitch.0.at="mdio0"
 hint.arswitch.0.is_7240=0	# definitely not the internal switch!
@@ -77,8 +83,10 @@ hint.arswitch.0.port.6.txpause=1
 hint.arswitch.0.port.6.rxpause=1
 
 # arge0 - hooked up to AR8327 GMAC6, RGMII
-hint.arge.0.phymask=0x10
+hint.arge.0.phymask=0x0
 hint.arge.0.miimode=3           # RGMII
+hint.arge.0.media=1000
+hint.arge.0.fduplex=1
 hint.arge.0.pll_1000=0x56000000
 
 # MAC for arge0 is the first 6 bytes of the ART



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503040348.t243mCHA088103>