Date: Tue, 27 Aug 2013 11:07:07 -0300 From: Luiz Otavio O Souza <lists.br@gmail.com> To: Pham Viet Ha <hapvbk@yahoo.co.uk> Cc: freebsd-embedded <freebsd-embedded@freebsd.org> Subject: Re: Arge1 link status is not updated Message-ID: <CAB=2f8xZV%2BYBL5n%2BhU1xNEk_NZBGrAWrW=4=PJWSRMhNAAbKbQ@mail.gmail.com> In-Reply-To: <1377349999.56818.YahooMailNeo@web171203.mail.ir2.yahoo.com> References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> <CAB=2f8zYj2RtN7Cqi8785ySnwHHdHuRdOrEyha7OeSJxTNyy1A@mail.gmail.com> <1377349999.56818.YahooMailNeo@web171203.mail.ir2.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24 August 2013 10:13, Pham Viet Ha <hapvbk@yahoo.co.uk> wrote: > Hi Louiz, > > Yes, the LAN ports are on arge0 with 4 PHY ports (0-3). The WAN port is on > arge1 with PHY4. This is an AG300H board from Buffalo. > > At this time I am using phymask 0x0f for arge0. It looks like that we > should use phymask 0x00 for this interface as when the etherswitch/arswitch > is enabled, it will attach and manage the 4 LAN ports correctly. > > If I need to update the arge1 link status from inside the switch driver, > what should I do? > > Also, the ifnet interfaces are also created during the switch init. How > can I make these interfaces available for infconfig command? > Right. It is somewhat the same as in RB450G. Please try with the following kernel and hints: for the kernel part: # For etherswitch support options ARGE_MDIO device miiproxy device etherswitch device arswitch hints: # arge0 mdio bus hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x19000000 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 # arge0: nail to 1000/full, RGMII - connected to the switch hint.arge.0.media=1000 # Map to 1000/full hint.arge.0.fduplex=1 # hint.arge.0.miimode=3 # RGMII hint.arge.0.phymask=0x0 # no directly mapped PHYs # arge1: dedicated switch port hint.arge.1.phymask=0x10 # PHY4 hint.arge.1.miimode=3 # RGMII hint.arge.1.mdio=mdioproxy1 # .. off of the switch mdiobus # arswitch hint.arswitch.0.at="mdio0" hint.arswitch.0.is_7240=0 hint.arswitch.0.numphys=4 hint.arswitch.0.phy4cpu=1 hint.arswitch.0.is_rgmii=1 hint.arswitch.0.is_gmii=0 Looks like you also have to turn on the USB power (GPIO pin 2), so you need at least: # GPIO hint.gpio.0.pinmask=0x4 # Pin 2: USB Power hint.gpio.0.pinon=0x4 # Turn on USB Power But later on, make sure to add all the GPIO pins used by leds and switches if you want play with them. I'll see what can be done about getting the cable status up to the arge interface. Luiz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB=2f8xZV%2BYBL5n%2BhU1xNEk_NZBGrAWrW=4=PJWSRMhNAAbKbQ>