From patchwork Fri Oct 25 10:17:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 1183985 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=fail (p=none dis=none) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4700RS41dfz9s7T for ; Fri, 25 Oct 2019 21:17:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409308AbfJYKRi (ORCPT ); Fri, 25 Oct 2019 06:17:38 -0400 Received: from inva021.nxp.com ([92.121.34.21]:58480 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408990AbfJYKRh (ORCPT ); Fri, 25 Oct 2019 06:17:37 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id EEB17200871; Fri, 25 Oct 2019 12:17:34 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E18A8200793; Fri, 25 Oct 2019 12:17:34 +0200 (CEST) Received: from fsr-ub1464-137.ea.freescale.net (fsr-ub1464-137.ea.freescale.net [10.171.82.114]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 88F59205DB; Fri, 25 Oct 2019 12:17:34 +0200 (CEST) From: Ioana Ciornei To: davem@davemloft.net, netdev@vger.kernel.org Cc: laurentiu.tudor@nxp.com, andrew@lunn.ch, f.fainelli@gmail.com, linux@armlinux.org.uk, Ioana Ciornei Subject: [PATCH net-next v3 0/5] dpaa2-eth: add MAC/PHY support through phylink Date: Fri, 25 Oct 2019 13:17:05 +0300 Message-Id: <1571998630-17108-1-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 Reply-to: ioana.ciornei@nxp.com X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The dpaa2-eth driver now has support for connecting to its associated PHY device found through standard OF bindings. The PHY interraction is handled by PHYLINK and even though, at the moment, only RGMII_* phy modes are supported by the driver, this is just the first step into adding the necessary changes to support the entire spectrum of capabilities. This comes after feedback on the initial DPAA2 MAC RFC submitted here: https://lwn.net/Articles/791182/ The notable change is that now, the DPMAC is not a separate driver, and communication between the DPMAC and DPNI no longer happens through firmware. Rather, the DPMAC is now a set of API functions that other net_device drivers (DPNI, DPSW, etc) can use for PHY management. The change is incremental, because the DPAA2 architecture has many modes of connecting net devices in hardware loopback (for example DPNI to DPNI). Those operating modes do not have a DPMAC and phylink instance. The documentation patch provides a more complete view of the software architecture and the current implementation. Changes in v2: - added patch 1/5 in order to fix module build - use -ENOTCONN as a proper return error of dprc_get_connection() - move the locks to rtnl outside of dpaa2_eth_[dis]connect_mac functions - remove setting supported/advertised from .validate() Changes in v3: - remove an unused variable Ioana Ciornei (5): bus: fsl-mc: export device types present on the bus bus: fsl-mc: add the fsl_mc_get_endpoint function dpaa2-eth: update the TX frame queues on DPNI_IRQ_EVENT_ENDPOINT_CHANGED dpaa2-eth: add MAC/PHY support through phylink net: documentation: add docs for MAC/PHY support in DPAA2 .../device_drivers/freescale/dpaa2/index.rst | 1 + .../freescale/dpaa2/mac-phy-support.rst | 191 +++++++++++++ MAINTAINERS | 4 + drivers/bus/fsl-mc/dprc-driver.c | 6 +- drivers/bus/fsl-mc/dprc.c | 53 ++++ drivers/bus/fsl-mc/fsl-mc-bus.c | 43 +++ drivers/bus/fsl-mc/fsl-mc-private.h | 42 +++ drivers/net/ethernet/freescale/dpaa2/Makefile | 2 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 126 +++++++-- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 3 + .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 25 ++ drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 301 +++++++++++++++++++++ drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h | 32 +++ drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h | 62 +++++ drivers/net/ethernet/freescale/dpaa2/dpmac.c | 149 ++++++++++ drivers/net/ethernet/freescale/dpaa2/dpmac.h | 144 ++++++++++ include/linux/fsl/mc.h | 2 + 17 files changed, 1157 insertions(+), 29 deletions(-) create mode 100644 Documentation/networking/device_drivers/freescale/dpaa2/mac-phy-support.rst create mode 100644 drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c create mode 100644 drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h create mode 100644 drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h create mode 100644 drivers/net/ethernet/freescale/dpaa2/dpmac.c create mode 100644 drivers/net/ethernet/freescale/dpaa2/dpmac.h