From owner-svn-src-all@FreeBSD.ORG Mon Oct 14 23:57:12 2013 Return-Path: Delivered-To: svn-src-all@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 DF8F8856; Mon, 14 Oct 2013 23:57:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDABC20FD; Mon, 14 Oct 2013 23:57:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9ENvC2B046325; Mon, 14 Oct 2013 23:57:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9ENvC6P046324; Mon, 14 Oct 2013 23:57:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201310142357.r9ENvC6P046324@svn.freebsd.org> From: Adrian Chadd Date: Mon, 14 Oct 2013 23:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256482 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2013 23:57:13 -0000 Author: adrian Date: Mon Oct 14 23:57:12 2013 New Revision: 256482 URL: http://svnweb.freebsd.org/changeset/base/256482 Log: Add register definitions for the AR933x SoC GMAC (ie, ethernet MAC) control block. The GMAC configuration block allows for some configuration of how the GMAC0 (ie, arge0) port is connected to the on-board switch (if indeed there is one.) It both can be pushed into the on-board switch; it could also be torn out and exposed via an external MII (and that operational mode is also controllable.) Obtained from: Linux/OpenWRT Modified: head/sys/mips/atheros/ar933xreg.h Modified: head/sys/mips/atheros/ar933xreg.h ============================================================================== --- head/sys/mips/atheros/ar933xreg.h Mon Oct 14 23:56:38 2013 (r256481) +++ head/sys/mips/atheros/ar933xreg.h Mon Oct 14 23:57:12 2013 (r256482) @@ -38,6 +38,24 @@ #define AR933X_UART_BASE (AR71XX_APB_BASE + 0x00020000) #define AR933X_UART_SIZE 0x14 + +#define AR933X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000) +#define AR933X_GMAC_SIZE 0x04 + +#define AR933X_GMAC_REG_ETH_CFG (AR933X_GMAC_BASE + 0x00) + +#define AR933X_ETH_CFG_RGMII_GE0 (1 << 0) +#define AR933X_ETH_CFG_MII_GE0 (1 << 1) +#define AR933X_ETH_CFG_GMII_GE0 (1 << 2) +#define AR933X_ETH_CFG_MII_GE0_MASTER (1 << 3) +#define AR933X_ETH_CFG_MII_GE0_SLAVE (1 << 4) +#define AR933X_ETH_CFG_MII_GE0_ERR_EN (1 << 5) +#define AR933X_ETH_CFG_SW_PHY_SWAP (1 << 7) +#define AR933X_ETH_CFG_SW_PHY_ADDR_SWAP (1 << 8) +#define AR933X_ETH_CFG_RMII_GE0 (1 << 9) +#define AR933X_ETH_CFG_RMII_GE0_SPD_10 0 +#define AR933X_ETH_CFG_RMII_GE0_SPD_100 (1 << 10) + #define AR933X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) #define AR933X_WMAC_SIZE 0x20000 #define AR933X_EHCI_BASE 0x1b000000