From patchwork Sun Aug 28 06:30:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 600792 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1503ECAAD2 for ; Sun, 28 Aug 2022 06:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232197AbiH1Gbj (ORCPT ); Sun, 28 Aug 2022 02:31:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232224AbiH1Gar (ORCPT ); Sun, 28 Aug 2022 02:30:47 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D95B32A9F for ; Sat, 27 Aug 2022 23:30:44 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSBoQ-0003be-1n; Sun, 28 Aug 2022 08:30:26 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oSBoO-002QZg-H2; Sun, 28 Aug 2022 08:30:24 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oSBoN-00GdAm-47; Sun, 28 Aug 2022 08:30:23 +0200 From: Oleksij Rempel To: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, David Jander , Luka Perkov , Robert Marko Subject: [PATCH net-next v4 0/7] add generic PSE support Date: Sun, 28 Aug 2022 08:30:14 +0200 Message-Id: <20220828063021.3963761-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add generic support for the Ethernet Power Sourcing Equipment. changes are listed within patches. Oleksij Rempel (7): dt-bindings: net: phy: add PoDL PSE property net: add framework to support Ethernet PSE and PDs devices net: mdiobus: fwnode_mdiobus_register_phy() rework error handling net: mdiobus: search for PSE nodes by parsing PHY nodes. ethtool: add interface to interact with Ethernet Power Equipment dt-bindings: net: pse-dt: add bindings for generic PSE controller net: pse-pd: add regulator based PSE driver .../devicetree/bindings/net/ethernet-phy.yaml | 5 + .../bindings/net/pse-pd/pse-regulator.yaml | 40 ++ Documentation/networking/ethtool-netlink.rst | 59 +++ drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/mdio/fwnode_mdio.c | 55 ++- drivers/net/phy/phy_device.c | 2 + drivers/net/pse-pd/Kconfig | 22 ++ drivers/net/pse-pd/Makefile | 6 + drivers/net/pse-pd/pse_core.c | 363 ++++++++++++++++++ drivers/net/pse-pd/pse_regulator.c | 148 +++++++ include/linux/phy.h | 2 + include/linux/pse-pd/pse.h | 155 ++++++++ include/uapi/linux/ethtool.h | 45 +++ include/uapi/linux/ethtool_netlink.h | 17 + net/ethtool/Makefile | 3 +- net/ethtool/common.h | 1 + net/ethtool/netlink.c | 19 + net/ethtool/netlink.h | 4 + net/ethtool/pse-pd.c | 178 +++++++++ 20 files changed, 1115 insertions(+), 12 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/pse-pd/pse-regulator.yaml create mode 100644 drivers/net/pse-pd/Kconfig create mode 100644 drivers/net/pse-pd/Makefile create mode 100644 drivers/net/pse-pd/pse_core.c create mode 100644 drivers/net/pse-pd/pse_regulator.c create mode 100644 include/linux/pse-pd/pse.h create mode 100644 net/ethtool/pse-pd.c