From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0087.outbound.protection.outlook.com [104.47.36.87]) by dpdk.org (Postfix) with ESMTP id C5E7B1C941 for ; Thu, 5 Apr 2018 08:40:17 +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=eY3uX9i4+S49DM8V8nUcL1HRYrOlNYqf8ualA72KYDM=; b=ULzknukKuPzq3Wr+0+lqznfGcCRbZhFfBdbb1Q5b09wYHW6juZybl3TjGemdQM9hHe5K2O7H7IyDfFfVhYwLlJfRnTJiD8FsRbugaUpDohgTiHvuAUBQG9BaU5K1x2qYR1ppZnxzJlFOz5mmTk03iuqylDCKHSb5vTVF60fX+l0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by BN6PR12MB1505.namprd12.prod.outlook.com (2603:10b6:405:11::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Thu, 5 Apr 2018 06:40:15 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Thu, 5 Apr 2018 02:39:35 -0400 Message-Id: <1522910389-35530-3-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522910389-35530-1-git-send-email-Ravi1.kumar@amd.com> References: <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> <1522910389-35530-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: BMXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::26) To BN6PR12MB1505.namprd12.prod.outlook.com (2603:10b6:405:11::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ad09d92-8b9d-42f9-7c40-08d59ac0176e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN6PR12MB1505; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 3:p9UhkrZYZBCFqCUSunqSTNTgHUhOAyFx/8h899qfyxdAhgbcWTCCgMYgDznsZRgezk7ldMaIr93yjF9+/guS29XPTdzSY1CGsrv3XeANTk0M6tc++xkkbbN/T27FzHqTYvOAS6HiCqjDn7yZ5F3fyY9JPGDIukTmEsy/os6HFJsQyz/lObVdltLgPCnlwtl4ElUMtBKJh4p9i+hEZyIvzYTFirVOdrXJK/S0COObz/9IM9M6G/9rIDVSzmn16zc+; 25:XNKtIOR8gQCYcxJFn5YXbXJSvZMyyor8H2PjfdboTh2hsjvW0P0BOtSsdUCgGvGlBdVzV61XqsWDFAjPbhZHC2KqFRiC4MGG7CKtEcgPZTajVTz0ykGaz3HiOkniKWj1ev46vWcoXK2RWdhGvodtqczdpgDwDFUboiDGrjm7wJHUW1oEB+d0X8tIp7v813a1BJv5TMxImE9Xzpd/DW/fBrYBwDFhXA7vkWaQ1olU+YqY8KFnMQaA0ny+c4vTLz3axs2ngm9MUC7SQbUOWbOb0WT51+ZDiA/69+qqYEcdspX8LfyIK9yjDvwJLWtawP0TUxQby9NEEYJFbM1Ult6AIw==; 31:hHmlX4D/pR4GxkYq8n1ZVUfIiIPq67QhW+RinABFkBPljrBuu4CznpnNFirJj6KKwHiB3Tw9ewyfkPQxiXh7wd0Jtt5mYslkZJHar8TZtLYvsdUhamJtdTg1VRthJc9SLKa5SxuCZ2aOqqcA6bE5+CwYHFMgNudW+4y+liHxg2/wlJ1zCbrsI/+x7xszwJDXlDsqGk6bjNcy4N3Hz9x7GReetN4HdGe+jmueIZy2QLQ= X-MS-TrafficTypeDiagnostic: BN6PR12MB1505: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 20:58plWA3CBQUrpkGyFjfyvuF9QVNHDZdY8X3H25hqvVZ/KHKddjjdvd5djQorCaKDoDRnjtq8Y1ID4WSmBqGTPXl4f3QkqwDo8foeQy1dQRLM2Ip7dZFqkJrHa2ZXlV/65GXv2XJ58sXNPtO5EHe2PJjWGRNvC/EotGytb3YtWeerDADy9JN9CkQFduhhm3W8dfqF1Wx8rKUU+9gp5izOMJ5edaIYKY3Ivdh1yxrSe4rnP8NFxdAEyD4fSnP2Bk00OA3HN3NRbKODrTmtN3Ni3Z0fJUsvBSTiqUPCndSWGoSBvFPHScSkFsuyKl2Ez2Qr3ry0IDSw1sO2k0DyT23OoI1/lrqKsR0DeAp+Db3EgcmwutWMq6+mSCUsgW9SWgcZeoNMVkh2UxfznEoWhLv/fP8/B46k1VI6BC0qOWt4yr1o6QDkQCfWic1rMdeXzzxWKUqt9LkZEbPCCMkR17ngguyQriZQRKwg52qFkARvQp5W8e1i1NMCj7XdNUN0SDM+; 4:aVz3U1fm5noO4yO5lZkecv+cgITl9sa9LvuSmfbl9naxX8Fz0K6Ct/kCsZfvoVR0bNwCvZTHF2KYwMLmPyBTUbhYqmFetrpK0kJcjUiMyZD/8j2u6sxFj9CxTAvdGRc4Gs7R4Qd/qmXBj7qGzfbob0tcyyApFb7OGNJbTqTo3fHC5oYYIKOroUSTsy1k+tQmPCdo7S9k6Z+Whr2WyGmUST4iTjKd3G/mvWMNRrsVavGai9IeLxF0tIa503/g92oPOtHT3mnSmV7Bb9/1aAE49wYoKktqH1oVbaTj5UeIeu4iTMLjXXP5K/9UyfhH+wzU 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)(8121501046)(5005006)(3002001)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BN6PR12MB1505; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1505; X-Forefront-PRVS: 06339BAE63 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(396003)(39860400002)(39380400002)(199004)(189003)(3846002)(476003)(2616005)(316002)(446003)(956004)(305945005)(7736002)(478600001)(5890100001)(16586007)(16526019)(6486002)(186003)(76176011)(5660300001)(59450400001)(97736004)(2906002)(6116002)(486006)(386003)(26005)(50466002)(11346002)(25786009)(575784001)(8936002)(86362001)(50226002)(66066001)(47776003)(48376002)(2351001)(6666003)(2361001)(6916009)(4326008)(81166006)(36756003)(53416004)(51416003)(68736007)(7696005)(8676002)(106356001)(105586002)(52116002)(81156014)(53936002)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1505; 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; BN6PR12MB1505; 23:CSdo6KESSUBxH67J+Datgp5ZhbpXB+kRlEIKno0/e?= =?us-ascii?Q?+lLRVd7uiSjAzHN9Fi1AhwejibU32uEMVJoucu84PcOQX7+E3Ys81IZTMYgh?= =?us-ascii?Q?NRqoZkldiue8xm2ncL3HHZKr9XQQZIN30j4pVtEv5DX70ASiUgY4gUXHGwL4?= =?us-ascii?Q?lhxwFTHb2HoMBaMsp4GbtrDuCmGCxpfforwvoElJfrcZeVSpfG8OvEQW1c5p?= =?us-ascii?Q?zQoT7drPgog3fD2YXBvCz7M29VYMOdx4yHw/9W6ifZSBHQokXUXrxe/C8Of6?= =?us-ascii?Q?mCDO/7Qvi9gV/4srfkB5qdO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fSRRjuRl8XHV3M+gxxT7CjZBokEidPdwF0DeK5vMBN5PV9sXVEZhHd4JkFLSCwD2bnZ2obTIiBzihDFwFLY2LThnDz02xNJ8/g5Q4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 7:LGe0sx2jNYZjU8vnzlvwkYkzSiwFBd8tfkUzPA0kuDrZCv3seSZVA+gFlFy1DeKyAE/lSyw1E0WQ86q7LuyypX/380qLYP7+No/1OzMmA77cQZl1B49mtglaVVh5aGRQKBI1opnYrtitLhAnBz0F64l/DJkoMuplFSlkNLrm8N9T3vYMIS5L65JYRJBYLJqBVCBDwkbdKg08rkSW9hBVNrBnWrg18tB/o89qHCsKv/pPRzEiXaRON7RP0HDiOzuQ; 20:TO2SfT9kNgZRp2LCYYona33XgeM7d4rm7tN5fDZa+uvcFx/SsTOrU0Kn4Pz4f4skxdNLYXBnEQ1Ind/KIZkxj3eTgWnrUQ3cEXpudfb4lh/hdm+vaSpQjUXkTrWeDCQhLn2Or6Os7novC0F16gAaqBfu92RdaWgZM9oO7p/BJgz+ATRHDgzmwXqtXlqh6uHaS7adRmuFLUuKIXwfFagtPEN98Kd7IG2rSoPjqCBjN3RHTUGwCSVpRUayDeUFUXY1 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2018 06:40:15.1280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ad09d92-8b9d-42f9-7c40-08d59ac0176e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1505 Subject: [dpdk-dev] [PATCH v4 03/17] 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: Thu, 05 Apr 2018 06:40:18 -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