From patchwork Wed Apr 10 11:31:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kavyasree Kotagiri X-Patchwork-Id: 1083340 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="WPDn4rKf"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44fMSh6Dpxz9s0W for ; Wed, 10 Apr 2019 21:32:04 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731386AbfDJLcD (ORCPT ); Wed, 10 Apr 2019 07:32:03 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:49983 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727206AbfDJLcB (ORCPT ); Wed, 10 Apr 2019 07:32:01 -0400 X-IronPort-AV: E=Sophos;i="5.60,332,1549954800"; d="scan'208";a="28041118" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 10 Apr 2019 04:32:01 -0700 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.37) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 10 Apr 2019 04:31:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E4wwGYRScLo8q4AByXnc9krU5B2HQAb6nq8PCHskPBU=; b=WPDn4rKfquTK7kKC4i1O9KdMLU5J8rFAO1JHJsJekudPYNv/A4ifpGxChn9RDiz7cFVGH1lObsVwOPfdaF+v7x9oYEuVrIEXwysdWOgH8KHrCgO2or++iscwRLNSIa3Z204VCcbM9EDXa+gHzjNyxHbVWoI2CEcbi0OlIAcxE20= Received: from BY5PR11MB4119.namprd11.prod.outlook.com (10.255.162.219) by BY5PR11MB3926.namprd11.prod.outlook.com (10.255.160.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.15; Wed, 10 Apr 2019 11:31:57 +0000 Received: from BY5PR11MB4119.namprd11.prod.outlook.com ([fe80::4454:7962:5f5a:72e9]) by BY5PR11MB4119.namprd11.prod.outlook.com ([fe80::4454:7962:5f5a:72e9%2]) with mapi id 15.20.1771.021; Wed, 10 Apr 2019 11:31:57 +0000 From: To: , , CC: , Subject: [PATCH v4 0/2] net: phy: mscc: Improvements to VSC8514 PHY driver Thread-Topic: [PATCH v4 0/2] net: phy: mscc: Improvements to VSC8514 PHY driver Thread-Index: AQHU75EBAV/9H5j3NUqkDphc6VqpYg== Date: Wed, 10 Apr 2019 11:31:57 +0000 Message-ID: <20190410112531.23482-1-kavyasree.kotagiri@microchip.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR0101CA0053.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::15) To BY5PR11MB4119.namprd11.prod.outlook.com (2603:10b6:a03:18f::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Kavyasree.Kotagiri@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [182.72.246.220] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 67313321-0864-426b-a1f7-08d6bda82386 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:BY5PR11MB3926; x-ms-traffictypediagnostic: BY5PR11MB3926: x-microsoft-antispam-prvs: x-forefront-prvs: 00032065B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39860400002)(366004)(376002)(136003)(43544003)(189003)(199004)(52116002)(105586002)(68736007)(316002)(3846002)(6512007)(99286004)(71200400001)(2201001)(486006)(71190400001)(78486014)(86362001)(7736002)(6436002)(72206003)(386003)(110136005)(6116002)(1076003)(102836004)(2501003)(2616005)(55236004)(305945005)(476003)(54906003)(36756003)(5660300002)(66066001)(14454004)(186003)(6486002)(50226002)(97736004)(8936002)(106356001)(2906002)(53936002)(81166006)(107886003)(6506007)(25786009)(8676002)(478600001)(4326008)(81156014)(256004)(26005)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY5PR11MB3926; H:BY5PR11MB4119.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: VMMvLw4fyO/0klQz55AxQJctxFropfvGPqmYX/nhZ3kr+NOkergzyh/blFyESLFQPnGwLUzwUzOXx+PbO2I7dk2D/NgMnzNz2zFzcy5/G8G9o/Zoq2ItJYpDZbQmoxv8W7n2smfRFSmY2Lm9l0IIGlJp3op8sONrsAS0Q/lr1mMh4SZ/PcxDtHSPv9PFhmERUCSj6c+T3KY5HnQPUxLpQo7FBZMjjygr5+YieJOpiRZv3gtIqN4c0uwoFMQGu7oU8pwumAZkjC6LaFNdDt7sD/ayg8FZAFFyBp8XlYoL4IJ9y0t7u2Zj6aL7Vx+nDxvWGH9ujtF091VWo99WtD5yuxVq1Uq95LNjBWH4xllK1nasIR/qmk1SiJV9hCfvpge7D2K0CR3XKPOsjT+AzoZddBSYVkZuCYWik3jeaNFZ2bY= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 67313321-0864-426b-a1f7-08d6bda82386 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2019 11:31:57.0507 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB3926 X-OriginatorOrg: microchip.com Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The VSC8514 PHY is a 4-ports PHY that is 10/100/1000BASE-T, 100BASE-FX, 1000BASE-X, can communicate with the MAC via QSGMII. The MAC interface protocol for each port within QSGMII can be either 1000BASE-X or SGMII, if the QSGMII MAC that the VSC8514 is connecting to supports this functionality. VSC8514 also supports SGMII MAC-side autonegotiation on each individual port, downshifting, can set the blinking pattern of each of its 4 LEDs, SyncE, 1000BASE-T Ring Resiliency as well as HP Auto-MDIX detection. This patch series adds support for 10BASE-T, 100BASE-TX, and 1000BASE-T, QSGMII link with the MAC, downshifting, HP Auto-MDIX detection and blinking pattern for its 4 LEDs. The GPIO register bank is a set of registers that are common to all PHYs in the package. So any modification in any register of this bank affects all PHYs of the package. If the PHYs haven't been reset before booting the Linux kernel and were configured to use interrupts for e.g. link status updates, it is required to clear the interrupts mask register of all PHYs before being able to use interrupts with any PHY. The first PHY of the package that will be init will take care of clearing all PHYs interrupts mask registers. Thus, we need to keep track of the init sequence in the package, if it's already been done or if it's to be done. Most of the init sequence of a PHY of the package is common to all PHYs in the package, thus we use the SMI broadcast feature which enables us to propagate a write in one register of one PHY to all PHYs in the same package. This patch series adds support for VSC8514 in Microsemi driver(mscc.c) and removes support from Vitesse driver(vitesse.c). v4 - mscc: Removed features settings - mscc: Removed aneg_done settings. v3 - mscc: Used BIT(x) for PHY_MCB_S6G_WRITE and PHY_MCB_S6G_READ instead of hex. - mscc: Replaced magic numbers with proper constants. - mscc: Handled delays and timeouts at appropriate points. - mscc: Added comments/explanation where requested. v2 - mscc: Sorted variable declarations in reverse christmas tree order. v1 - Added 0/2 file. Kavya Sree (2): net: phy: mscc: add support for VSC8514 PHY net: phy: vitesse: Remove support for VSC8514 drivers/net/phy/Kconfig | 2 +- drivers/net/phy/mscc.c | 426 ++++++++++++++++++++++++++++++++++++++ drivers/net/phy/vitesse.c | 12 -- 3 files changed, 427 insertions(+), 13 deletions(-)