From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0071.outbound.protection.outlook.com [104.47.32.71]) by dpdk.org (Postfix) with ESMTP id B2B6E1CF8F for ; Fri, 6 Apr 2018 14:37:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mGXutseGPfKVgl0cbZj2DWSg9A8moYEbHJZOEJJ7Jgs=; b=YmpfYWnDobrfc15uiaB3uHCdrk2qzIT0hUxaaXYdrdumU0/2/3HMZd/5JwarmEaF8F6C3tDIyEBXXcsHohy/55i8hO/Ga3irwNEEpN5bgErlXa4qRfNBCjyCzv13msEjUb8ovCxiZPxEwO8LmYeUMpadYJnbKJpBOzxmLarXcd4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by CY4PR12MB1509.namprd12.prod.outlook.com (2603:10b6:910:8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Fri, 6 Apr 2018 12:37:16 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 6 Apr 2018 08:36:36 -0400 Message-Id: <1523018211-65765-3-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523018211-65765-1-git-send-email-Ravi1.kumar@amd.com> References: <1522910389-35530-1-git-send-email-Ravi1.kumar@amd.com> <1523018211-65765-1-git-send-email-Ravi1.kumar@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: MA1PR0101CA0013.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::23) To CY4PR12MB1509.namprd12.prod.outlook.com (2603:10b6:910:8::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 615ba3c3-fca5-46f4-1c5b-08d59bbb221d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CY4PR12MB1509; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1509; 3:P1dKZvLTrVybomw+avDzqLi2PQnx9UOlRBmRGMEG5HVC4lxtsDC/vMLHUF06lyD5aBxFTONmGyShzweIsTCE3gLF4gr10fp64E9o3SPX4Za3Gvt5ECLF6vbIuia2PCBCEzHNPDQiuPNqTeUN84yubO4SbOi0MqfRSrfF6K/YzQBuIDF0yCPgbrt1FdmJWOQ9cDppA8pATxTInYCB4zGJaBrqw6pAwCipUYPcnKiSk92bgWSCcJWE9L+wyyeHMkR1; 25:9MbaJIbeQ2bZeA9cXFiral1s2fWYaV9mwY9f7x1gmjFmBa3t52YLT5bfDD9eMgOid3L8NWJ5W1T0HwlD5Rfqxsj9eK/iszPpFJJS0/JTwtQH8orZQJi9lVrp76eCQZdgc2yqWoa0BOHe/e0A3/RlkDXxRp+4LBsDJh18vT5giCDHrKQNsMzrwu02REC24hKvVe3j0pBemIkaw+AVtFIc8UhiwWqo4QBzZUSn3X7UgY78fjTAJX7Kf7+OM+YDCgg5LIaAXH+JYcomH8dX888ibRj2ZMjM9YynVc2ub7NUA2rjqWxGNZ3PHpoIU99+LiYMYLwVdY4GCvwaZQ+qvWeZQg==; 31:86wQ1GAQq4fHkmONIUB5pon1BqsbNSVNgzwtq/gpgHdxsuP8yhk0t4c3eijNQVhDNu33pyl1pLK37KaiY3Z+xkbsE88v1xjOKacfwiSbPP23SjS0JSNIJaoOp+bG9NhiuDX1aARiqAf3A5nthx173RPCIIBFSrZXEPiWgTo53tXwD5Q03bpy7vEHvaH74DAAvoxUx9Ay+mtQp1Cuj9tooPhZLhquzrQLYHXq8cNQxTU= X-MS-TrafficTypeDiagnostic: CY4PR12MB1509: X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1509; 20:tSEIiAHvSiUcb5EnwNykfC1kN3DAPnohnL74utkbWL5Qy/80Tnnlrg1IzMkUnriSH5Pc07Jli6PxGrXIdXxHmDydRp4zohZmKYfdIpCEw1rzkGclejYbt6nhxRs5TkKZe1/6bljCG88aCSN/1C1xQZATpWu7H8JMRfMGnOWWAViZvEsWWeA/eVLU8sHfai+0FUTlVxeCOV9Jm9a8YiBCjErDoF5H/BPaChsGifMs6cQE5zGpqFfaPdcF8R7PlbJRKH8ry/5ElB2uqHBaqNI0iVb9XAJpOh+RL0WyJ75u3ei2D7ShixsouxOcVBMYOG3DB0CYRF1LoItFZVGtPXf0JWhx4gcSLrfHj5agxxQYQ8Pc9PpLTSpC1PA5BD51Loqk+5aKn1ShEWTuyjAt/F4wGYhTDTDQrBRkCFUzNPowuGOPEFoUcnwwi/M+bJ8JB5FAvk6G95BoANf5NbOjhgWoOi2tuo5n6PTwoeNYIDH5ioIgXCD2esdnc/XCwQRc0fZ9; 4:t0jC+eud5KCAfr0ML2+Qfd5vFOibKYR9Nmbbl9o2hj6cGm/ezkr/lejmZUWbVrvN6DpaV8MB6AgycOn8f9uPyiQmv7aQi38VxoJS+K8TE0MTwGlGw7FhYQ+a1JQRVTPbbiKW7GOLViqEyukeqT03qn6RkXACFcbgE8/z4QOZSAFKWzyiCCJlcIxWsv2zScHmaiRLUmjkVcozxpc7pNQh6lqq8qVrASzC4zoPLwWDm7/6cYAR0pUqdKqb2XGFpSOW2pJxwdS3QQukJmbC4PTZ7kFLs48bv/vpqt2G9/kzyZsPM4zNiwXcY4tKCqgfnViv X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR12MB1509; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1509; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(39860400002)(346002)(366004)(376002)(199004)(189003)(48376002)(72206003)(7696005)(105586002)(478600001)(6116002)(50466002)(3846002)(575784001)(446003)(486006)(53936002)(11346002)(68736007)(2906002)(2616005)(51416003)(386003)(16526019)(186003)(26005)(76176011)(956004)(50226002)(16586007)(476003)(316002)(97736004)(305945005)(5890100001)(2351001)(2361001)(25786009)(7736002)(36756003)(59450400001)(5660300001)(52116002)(8676002)(6916009)(6666003)(47776003)(4326008)(6486002)(86362001)(53416004)(8936002)(66066001)(81166006)(81156014)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1509; H:wallaby-smavila.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1509; 23:NOdu+d4gBK0CfEFNMtgYNVnK8qdIcdvjpg6JmP7ES?= =?us-ascii?Q?lz5DegtyxCRzEDls+cHiKpCDpcesYE/G88VnkBvTTwpZ4fCLfEalZFY4gTaM?= =?us-ascii?Q?Bi/53h4xHoK/mhUwYF64BTd1fWe5+Zd0GqGtvJKWoVDgl2xLHlhwgybakhUe?= =?us-ascii?Q?JR4beQeObo51isI9yjm6BATEgTLEeKHR/xVSpu66wSmLCTcnmR7K3w1i8WAV?= =?us-ascii?Q?rCSilcUSafjEoJvx8xAXbGLibkv3+R0UtdwMkF/JcxsTZrIupR9J4VeypyZY?= =?us-ascii?Q?cWmNVq8scWtUpgBaOx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84Y=; 24:WyZXc4JyJHJw+O5UdbbI37mcOtjahli3/xjV2N2PI4ENzvzo5GfiGeCVX5FXic0IocJeak8lT7yuwehN5Dsk5eyiC6vQvJWQzWi7bHs502Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1509; 7:kAF2OUhqPOuZV19S9hzmgPNMwy+2CIoYZVAlqK4z/Hc39I7y1kf74iPIXLWz1F7cUgBAc2fvWbDXMpZ3lz3xnvjFty/AJpvUSjyKfTy4ET0Y2zxztJl/Ezm/HTxD08kwoF7LF/lh7/xeQdyL0hJC7tKqJsAQDzGXbcsRSB4Zxcj9qZlxlpvMmBiWwFfENYe/0jts8/9TxebHGEnrOEantuLsHTfDMiiufL+o+o8DspFQe7jNoFrqy/k1DT0TEsfb; 20:RkJTkn3NJjFcI7pv1FTGQmUHMh9bMYgwBwEdFsu1L3zqC/aBgD47lL5gmNuc+iPOrAVnfH2dNbYxh/okLi7sdjBsU/BPSw6rXUU3Q25DAVL+bNwQ4Ct527qxgTIGP3u/rUT1Ju2W7f/406/o3fYP+45zyGz2QFji9jGHLzNp7BI3a3HoS0Olas7oNp95OWqAVD7EBQCrQ8fu4OwOVbWYLSK7d4bcRDe1RyCYZxB/vVccR+H7qxS3gAjFzO6OlVJh X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 12:37:16.6628 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 615ba3c3-fca5-46f4-1c5b-08d59bbb221d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1509 Subject: [dpdk-dev] [PATCH v5 03/18] net/axgbe: add phy register map and helper macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2018 12:37:20 -0000 Added phy related register definitions. Signed-off-by: Ravi Kumar --- drivers/net/axgbe/axgbe_phy.h | 192 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 drivers/net/axgbe/axgbe_phy.h diff --git a/drivers/net/axgbe/axgbe_phy.h b/drivers/net/axgbe/axgbe_phy.h new file mode 100644 index 0000000..77ee20a --- /dev/null +++ b/drivers/net/axgbe/axgbe_phy.h @@ -0,0 +1,192 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved. + * Copyright(c) 2018 Synopsys, Inc. All rights reserved. + */ + +#ifndef __AXGBE_PHY_H__ +#define __AXGBE_PHY_H__ + +#define SPEED_10 10 +#define SPEED_100 100 +#define SPEED_1000 1000 +#define SPEED_2500 2500 +#define SPEED_10000 10000 + + +/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit + * IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. + */ +#define MII_ADDR_C45 (1 << 30) + +/* Basic mode status register. */ +#define BMSR_LSTATUS 0x0004 /* Link status */ + +/* Status register 1. */ +#define MDIO_STAT1_LSTATUS BMSR_LSTATUS + +/* Generic MII registers. */ +#define MII_BMCR 0x00 /* Basic mode control register */ +#define MII_BMSR 0x01 /* Basic mode status register */ +#define MII_PHYSID1 0x02 /* PHYS ID 1 */ +#define MII_PHYSID2 0x03 /* PHYS ID 2 */ +#define MII_ADVERTISE 0x04 /* Advertisement control reg */ +#define MII_LPA 0x05 /* Link partner ability reg */ +#define MII_EXPANSION 0x06 /* Expansion register */ +#define MII_CTRL1000 0x09 /* 1000BASE-T control */ +#define MII_STAT1000 0x0a /* 1000BASE-T status */ +#define MII_MMD_CTRL 0x0d /* MMD Access Control Register */ +#define MII_MMD_DATA 0x0e /* MMD Access Data Register */ +#define MII_ESTATUS 0x0f /* Extended Status */ +#define MII_DCOUNTER 0x12 /* Disconnect counter */ +#define MII_FCSCOUNTER 0x13 /* False carrier counter */ +#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ +#define MII_RERRCOUNTER 0x15 /* Receive error counter */ +#define MII_SREVISION 0x16 /* Silicon revision */ +#define MII_RESV1 0x17 /* Reserved... */ +#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ +#define MII_PHYADDR 0x19 /* PHY address */ +#define MII_RESV2 0x1a /* Reserved... */ +#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ +#define MII_NCONFIG 0x1c /* Network interface config */ + +/* Basic mode control register. */ +#define BMCR_RESV 0x003f /* Unused... */ +#define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */ +#define BMCR_CTST 0x0080 /* Collision test */ +#define BMCR_FULLDPLX 0x0100 /* Full duplex */ +#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ +#define BMCR_ISOLATE 0x0400 /* Isolate data paths from MII */ +#define BMCR_PDOWN 0x0800 /* Enable low power state */ +#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ +#define BMCR_SPEED100 0x2000 /* Select 100Mbps */ +#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ +#define BMCR_RESET 0x8000 /* Reset to default state */ +#define BMCR_SPEED10 0x0000 /* Select 10Mbps */ + + +/* MDIO Manageable Devices (MMDs). */ +#define MDIO_MMD_PMAPMD 1 /* Physical Medium Attachment + * Physical Medium Dependent + */ +#define MDIO_MMD_WIS 2 /* WAN Interface Sublayer */ +#define MDIO_MMD_PCS 3 /* Physical Coding Sublayer */ +#define MDIO_MMD_PHYXS 4 /* PHY Extender Sublayer */ +#define MDIO_MMD_DTEXS 5 /* DTE Extender Sublayer */ +#define MDIO_MMD_TC 6 /* Transmission Convergence */ +#define MDIO_MMD_AN 7 /* Auto-Negotiation */ +#define MDIO_MMD_C22EXT 29 /* Clause 22 extension */ +#define MDIO_MMD_VEND1 30 /* Vendor specific 1 */ +#define MDIO_MMD_VEND2 31 /* Vendor specific 2 */ + +/* Generic MDIO registers. */ +#define MDIO_CTRL1 MII_BMCR +#define MDIO_STAT1 MII_BMSR +#define MDIO_DEVID1 MII_PHYSID1 +#define MDIO_DEVID2 MII_PHYSID2 +#define MDIO_SPEED 4 /* Speed ability */ +#define MDIO_DEVS1 5 /* Devices in package */ +#define MDIO_DEVS2 6 +#define MDIO_CTRL2 7 /* 10G control 2 */ +#define MDIO_STAT2 8 /* 10G status 2 */ +#define MDIO_PMA_TXDIS 9 /* 10G PMA/PMD transmit disable */ +#define MDIO_PMA_RXDET 10 /* 10G PMA/PMD receive signal detect */ +#define MDIO_PMA_EXTABLE 11 /* 10G PMA/PMD extended ability */ +#define MDIO_PKGID1 14 /* Package identifier */ +#define MDIO_PKGID2 15 +#define MDIO_AN_ADVERTISE 16 /* AN advertising (base page) */ +#define MDIO_AN_LPA 19 /* AN LP abilities (base page) */ +#define MDIO_PCS_EEE_ABLE 20 /* EEE Capability register */ +#define MDIO_PCS_EEE_WK_ERR 22 /* EEE wake error counter */ +#define MDIO_PHYXS_LNSTAT 24 /* PHY XGXS lane state */ +#define MDIO_AN_EEE_ADV 60 /* EEE advertisement */ +#define MDIO_AN_EEE_LPABLE 61 /* EEE link partner ability */ + +/* Media-dependent registers. */ +#define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */ +#define MDIO_PMA_10GBT_TXPWR 131 /* 10GBASE-T TX power control */ +#define MDIO_PMA_10GBT_SNR 133 /* 10GBASE-T SNR margin, lane A. + * Lanes B-D are numbered 134-136. + */ +#define MDIO_PMA_10GBR_FECABLE 170 /* 10GBASE-R FEC ability */ +#define MDIO_PCS_10GBX_STAT1 24 /* 10GBASE-X PCS status 1 */ +#define MDIO_PCS_10GBRT_STAT1 32 /* 10GBASE-R/-T PCS status 1 */ +#define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */ +#define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */ +#define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ + +/* Control register 1. */ +/* Enable extended speed selection */ +#define MDIO_CTRL1_SPEEDSELEXT (BMCR_SPEED1000 | BMCR_SPEED100) +/* All speed selection bits */ +#define MDIO_CTRL1_SPEEDSEL (MDIO_CTRL1_SPEEDSELEXT | 0x003c) +#define MDIO_CTRL1_FULLDPLX BMCR_FULLDPLX +#define MDIO_CTRL1_LPOWER BMCR_PDOWN +#define MDIO_CTRL1_RESET BMCR_RESET +#define MDIO_PMA_CTRL1_LOOPBACK 0x0001 +#define MDIO_PMA_CTRL1_SPEED1000 BMCR_SPEED1000 +#define MDIO_PMA_CTRL1_SPEED100 BMCR_SPEED100 +#define MDIO_PCS_CTRL1_LOOPBACK BMCR_LOOPBACK +#define MDIO_PHYXS_CTRL1_LOOPBACK BMCR_LOOPBACK +#define MDIO_AN_CTRL1_RESTART BMCR_ANRESTART +#define MDIO_AN_CTRL1_ENABLE BMCR_ANENABLE +#define MDIO_AN_CTRL1_XNP 0x2000 /* Enable extended next page */ +#define MDIO_PCS_CTRL1_CLKSTOP_EN 0x400 /* Stop the clock during LPI */ + + + + + +/* PMA 10GBASE-R FEC ability register. */ +#define MDIO_PMA_10GBR_FECABLE_ABLE 0x0001 /* FEC ability */ +#define MDIO_PMA_10GBR_FECABLE_ERRABLE 0x0002 /* FEC error indic. ability */ + + +/* Autoneg related */ +#define ADVERTISED_Autoneg (1 << 6) +#define SUPPORTED_Autoneg (1 << 6) +#define AUTONEG_DISABLE 0x00 +#define AUTONEG_ENABLE 0x01 + +#define ADVERTISED_Pause (1 << 13) +#define ADVERTISED_Asym_Pause (1 << 14) + +#define SUPPORTED_Pause (1 << 13) +#define SUPPORTED_Asym_Pause (1 << 14) + +#define SUPPORTED_Backplane (1 << 16) +#define SUPPORTED_TP (1 << 7) + +#define ADVERTISED_10000baseR_FEC (1 << 20) + +#define SUPPORTED_10000baseR_FEC (1 << 20) + +#define SUPPORTED_FIBRE (1 << 10) + +#define ADVERTISED_10000baseKR_Full (1 << 19) +#define ADVERTISED_10000baseT_Full (1 << 12) +#define ADVERTISED_2500baseX_Full (1 << 15) +#define ADVERTISED_1000baseKX_Full (1 << 17) +#define ADVERTISED_1000baseT_Full (1 << 5) +#define ADVERTISED_100baseT_Full (1 << 3) +#define ADVERTISED_TP (1 << 7) +#define ADVERTISED_FIBRE (1 << 10) +#define ADVERTISED_Backplane (1 << 16) + +#define SUPPORTED_1000baseKX_Full (1 << 17) +#define SUPPORTED_10000baseKR_Full (1 << 19) +#define SUPPORTED_2500baseX_Full (1 << 15) +#define SUPPORTED_100baseT_Full (1 << 2) +#define SUPPORTED_1000baseT_Full (1 << 5) +#define SUPPORTED_10000baseT_Full (1 << 12) +#define SUPPORTED_2500baseX_Full (1 << 15) + + +#define SPEED_UNKNOWN -1 + +/* Duplex, half or full. */ +#define DUPLEX_HALF 0x00 +#define DUPLEX_FULL 0x01 +#define DUPLEX_UNKNOWN 0xff + +#endif +/* PHY */ -- 2.7.4