From patchwork Thu Apr 18 12:09:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kavyasree Kotagiri X-Patchwork-Id: 1087559 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="2F2oKz1b"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44lHwK0q4hz9s4V for ; Thu, 18 Apr 2019 22:09:36 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388836AbfDRMJf (ORCPT ); Thu, 18 Apr 2019 08:09:35 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:47140 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388344AbfDRMJe (ORCPT ); Thu, 18 Apr 2019 08:09:34 -0400 X-IronPort-AV: E=Sophos;i="5.60,365,1549954800"; d="scan'208";a="31779840" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Apr 2019 05:09:33 -0700 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.49) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 18 Apr 2019 05:09:32 -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=oDiovo00aK6ZTWcJWjiE239q28PPxnNYNYmeQZpvqR0=; b=2F2oKz1bvFK1lEaIgqvuAzzBLkFvYWYLalcjo/slRSMk1DuphamZvnWikr5Mhj2hFj3+jpuAeowwt03lDrCJPVzFJ14DngD1B/pDwXlxZAeyMTLt07DH7bhW0unDiw/8mw0oVOA+lkNxQ3rCWhLqcaux7m+M9LeDFCtrcOAzqnQ= Received: from BY5PR11MB4119.namprd11.prod.outlook.com (10.255.162.219) by BY5PR11MB3877.namprd11.prod.outlook.com (10.255.72.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.19; Thu, 18 Apr 2019 12:09:30 +0000 Received: from BY5PR11MB4119.namprd11.prod.outlook.com ([fe80::bd60:4a64:87:1f39]) by BY5PR11MB4119.namprd11.prod.outlook.com ([fe80::bd60:4a64:87:1f39%5]) with mapi id 15.20.1813.013; Thu, 18 Apr 2019 12:09:30 +0000 From: To: , , CC: , Subject: [PATCH v7 0/2] net: phy: mscc: Improvements to VSC8514 PHY driver. Thread-Topic: [PATCH v7 0/2] net: phy: mscc: Improvements to VSC8514 PHY driver. Thread-Index: AQHU9d+TFU+Nupy2EUeGegK3N4UsrQ== Date: Thu, 18 Apr 2019 12:09:30 +0000 Message-ID: <20190418120901.6201-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: BYAPR03CA0012.namprd03.prod.outlook.com (2603:10b6:a02:a8::25) 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: f90b06fe-2324-49e4-e227-08d6c3f6b5d4 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600141)(711020)(4605104)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:BY5PR11MB3877; x-ms-traffictypediagnostic: BY5PR11MB3877: x-microsoft-antispam-prvs: x-forefront-prvs: 0011612A55 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(136003)(39860400002)(396003)(346002)(199004)(43544003)(189003)(476003)(66066001)(68736007)(52116002)(305945005)(99286004)(6436002)(316002)(50226002)(25786009)(110136005)(2906002)(6486002)(81156014)(53936002)(7736002)(6512007)(8676002)(2201001)(86362001)(8936002)(81166006)(3846002)(6116002)(5660300002)(386003)(2501003)(486006)(72206003)(102836004)(2616005)(6506007)(478600001)(55236004)(14454004)(54906003)(107886003)(78486014)(26005)(36756003)(1076003)(71190400001)(186003)(256004)(97736004)(71200400001)(4326008)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY5PR11MB3877; H:BY5PR11MB4119.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: 4lqmRMKF2by6UJscpxd1hOvZL/mNvDXjnXDQaR6Zkt0mcm3KBNZhm+WO0yNkNODtfDMfH6pbz3HSoQ4lJH3klF8h5A6NIk6w32E9S+aiKk9iDkPHjj1x8bG6HZmsf91yev0SdRgR0y2WOq038ASc5ORCjnTXRNwFgtT2GrPKM7piE7q0JwRBsvAEaNXShnFbRWrn+xqyyvH0JcLby9t09bn4ZAOeWjY7HQz1VKm9HXTK37zTYnUYtqCIqSlcEbrImZj9Aw1igiCfi8XBhiRUMr6OeC4GtMeDolAWyWqxRBIao9XgwdP723fhvPEqrq4VessQt2qsg4yZvDHuBPNCKwl+UlbH+SBpeIJrW778Y/WbFvbihf62+/BfX60wJF4JReVuiXS6M694v3eKn+riae0qNsC/NivGh1RT3yQ2mTc= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f90b06fe-2324-49e4-e227-08d6c3f6b5d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2019 12:09:30.4355 (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: BY5PR11MB3877 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). v7 - mscc: Handled return values in vsc8514_config_init(). v6 - mscc: Added proper return value in vsc85xx_csr_ctrl_phy_read(). - mscc: Replaced __mdiobus_write and__mdiobus_read with __phy_write and __phy_read resp. - mscc: Replaced register addresses in 8514_config_init() with proper constants. v5 - mscc: Added return error statements for few function calls. - mscc: Added comments in vsc85xx_csr_ctrl_phy_read() and vsc85xx_csr_ctrl_phy_write() 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 Kotagiri (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 | 469 ++++++++++++++++++++++++++++++++++++++ drivers/net/phy/vitesse.c | 12 - 3 files changed, 470 insertions(+), 13 deletions(-)