From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 27 14:07:10 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7EACDD07 for ; Tue, 27 Aug 2013 14:07:10 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00E6E2A0F for ; Tue, 27 Aug 2013 14:07:09 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id cb5so3196770wib.8 for ; Tue, 27 Aug 2013 07:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Q8hWmHbhWp82qgtmIlEt66t4P6sdP3ONX7JRx//94Vs=; b=iIYIACWFWFoQT3Jz6zLy/RUr0nFCZoMVSzyNvuwEKJEA72KnmgvgFncqHdnvKCVjW0 1sh1MrD6l8we6xUPKsH1b7MlOYra8fRwJjkP9cwjWSSd6PdcbhO7SxeoN/IUp9QvPllA JgOmB5LgyvJU30MCJTENneCOvYIInBxtsGxSO1uEcJZXz6dC44QQQToTSXgKSZHlWuIS TQUXWCA8NX0A4KEDnUZyDnZrR2E0M1lSHBtA/hIBiv7BUuYPpx6QohKcAS8UbQvxU4Ei 4IyR7FG9l6FM79Z2zCG++F52peKBJwzMAk1ZkwRaKYtwHjwMDoXcJMbmQ0AU13brCaW+ NsnQ== MIME-Version: 1.0 X-Received: by 10.180.198.79 with SMTP id ja15mr11573219wic.36.1377612427430; Tue, 27 Aug 2013 07:07:07 -0700 (PDT) Received: by 10.216.75.140 with HTTP; Tue, 27 Aug 2013 07:07:07 -0700 (PDT) In-Reply-To: <1377349999.56818.YahooMailNeo@web171203.mail.ir2.yahoo.com> References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> <1377349999.56818.YahooMailNeo@web171203.mail.ir2.yahoo.com> Date: Tue, 27 Aug 2013 11:07:07 -0300 Message-ID: Subject: Re: Arge1 link status is not updated From: Luiz Otavio O Souza To: Pham Viet Ha Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 14:07:10 -0000 On 24 August 2013 10:13, Pham Viet Ha 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