From patchwork Tue Feb 16 19:20:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12090553 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18B61C433DB for ; Tue, 16 Feb 2021 19:22:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAF4D64E65 for ; Tue, 16 Feb 2021 19:22:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbhBPTWJ (ORCPT ); Tue, 16 Feb 2021 14:22:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:51978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbhBPTWB (ORCPT ); Tue, 16 Feb 2021 14:22:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9802364E85; Tue, 16 Feb 2021 19:21:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613503280; bh=x7C+xNyA1dFyqXI65UWTk3st0xVyfG8AtkemF+t8OAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iz6/mkOJzulqwlXn3iKe7C1rhnM26NLHXeWdVg5Z9Fl0rNJOy5Bq40zFFSolhlrUO wTzRLhO4/w5Ey730GlwnZM8ktDuh3zLYrRceVYrZkuQ1HA9wSJnaYZ0q6OBj+IEz/n afXOn3IhlDn2BY9eix+gfIcR1xpOlroVjHDz8ilUt8CB64nizmCckOQG+YrV6mu345 CORG/GiVxyCbH5JsHYdA0yvoNFQkkkj82epPHy+AyK+kYl0bxTdJXJWD91fx4lfbV7 0wzt+zQoMrhL/aRbg2BKEEEOfb/ayEz/88RrYAdPZZcu3ZHtrp6kNUHmLVPNLgvICJ ra+xY3sAL26Rg== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Russell King - ARM Linux admin , davem@davemloft.net, kuba@kernel.org Cc: pavana.sharma@digi.com, vivien.didelot@gmail.com, f.fainelli@gmail.com, lkp@intel.com, ashkan.boldaji@digi.com, andrew@lunn.ch, Chris Packham , olteanv@gmail.com, Rob Herring , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net-next 1/4] dt-bindings: net: Add 5GBASER phy interface Date: Tue, 16 Feb 2021 20:20:52 +0100 Message-Id: <20210216192055.7078-2-kabel@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210216192055.7078-1-kabel@kernel.org> References: <20210216192055.7078-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Pavana Sharma Add 5gbase-r PHY interface mode. Signed-off-by: Pavana Sharma Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Marek Behún --- Documentation/devicetree/bindings/net/ethernet-controller.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index dac4aadb6e2e..f599c1d9c961 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml @@ -89,6 +89,7 @@ properties: - trgmii - 1000base-x - 2500base-x + - 5gbase-r - rxaui - xaui From patchwork Tue Feb 16 19:20:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12090555 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28A0DC433E0 for ; Tue, 16 Feb 2021 19:22:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEA9764E7A for ; Tue, 16 Feb 2021 19:22:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230436AbhBPTWL (ORCPT ); Tue, 16 Feb 2021 14:22:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:52002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbhBPTWE (ORCPT ); Tue, 16 Feb 2021 14:22:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 52F1C64EAE; Tue, 16 Feb 2021 19:21:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613503283; bh=W7fj9c0DvNZzR2btLzllGTiumDSRsIl/b4n3A/oliU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLZrcNNL5rYChEjEtQAklqYrzOAkypK8VQDiX81tpCb9cRVJJYT10xIc6ejVGfbPP 3+bm1g3PT/Puyzj3ITh/63rphLwEbOzuZtmpqMzzAU8hKFV+BThScR4uK6cANPEUOt h6/BlqtyGE2tGFBADtSr2L6fm9pffQGOUu1M3c1wZAt7iifqwru/SvHASy0BPjSpVw qbxXmjv1sfaQjq8BfYUZil6xpjYo0jc8/zgzugIQm9rnYUdVZNhwORJ3MitqwXN/VD N1Umpv8GxDxNyOfwftrFUHjhbbD6kRLD+Y80GiuaYboEBSKn6V8k0vZxbLLcqJXneC D6fWw5OSv0R7g== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Russell King - ARM Linux admin , davem@davemloft.net, kuba@kernel.org Cc: pavana.sharma@digi.com, vivien.didelot@gmail.com, f.fainelli@gmail.com, lkp@intel.com, ashkan.boldaji@digi.com, andrew@lunn.ch, Chris Packham , olteanv@gmail.com, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net-next 2/4] net: phy: Add 5GBASER interface mode Date: Tue, 16 Feb 2021 20:20:53 +0100 Message-Id: <20210216192055.7078-3-kabel@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210216192055.7078-1-kabel@kernel.org> References: <20210216192055.7078-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Pavana Sharma Add 5GBASE-R phy interface mode Signed-off-by: Pavana Sharma Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Marek Behún --- Documentation/networking/phy.rst | 6 ++++++ include/linux/phy.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/networking/phy.rst b/Documentation/networking/phy.rst index 70136cc9e25e..06adfc2afcf0 100644 --- a/Documentation/networking/phy.rst +++ b/Documentation/networking/phy.rst @@ -267,6 +267,12 @@ Some of the interface modes are described below: duplex, pause or other settings. This is dependent on the MAC and/or PHY behaviour. +``PHY_INTERFACE_MODE_5GBASER`` + This is the IEEE 802.3 Clause 129 defined 5GBASE-R protocol. It is + identical to the 10GBASE-R protocol defined in Clause 49, with the + exception that it operates at half the frequency. Please refer to the + IEEE standard for the definition. + ``PHY_INTERFACE_MODE_10GBASER`` This is the IEEE 802.3 Clause 49 defined 10GBASE-R protocol used with various different mediums. Please refer to the IEEE standard for a diff --git a/include/linux/phy.h b/include/linux/phy.h index 5d7c4084ade9..0d537f59b77f 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -107,6 +107,7 @@ extern const int phy_10gbit_features_array[1]; * @PHY_INTERFACE_MODE_100BASEX: 100 BaseX * @PHY_INTERFACE_MODE_1000BASEX: 1000 BaseX * @PHY_INTERFACE_MODE_2500BASEX: 2500 BaseX + * @PHY_INTERFACE_MODE_5GBASER: 5G BaseR * @PHY_INTERFACE_MODE_RXAUI: Reduced XAUI * @PHY_INTERFACE_MODE_XAUI: 10 Gigabit Attachment Unit Interface * @PHY_INTERFACE_MODE_10GBASER: 10G BaseR @@ -139,6 +140,7 @@ typedef enum { PHY_INTERFACE_MODE_100BASEX, PHY_INTERFACE_MODE_1000BASEX, PHY_INTERFACE_MODE_2500BASEX, + PHY_INTERFACE_MODE_5GBASER, PHY_INTERFACE_MODE_RXAUI, PHY_INTERFACE_MODE_XAUI, /* 10GBASE-R, XFI, SFI - single lane 10G Serdes */ @@ -209,6 +211,8 @@ static inline const char *phy_modes(phy_interface_t interface) return "1000base-x"; case PHY_INTERFACE_MODE_2500BASEX: return "2500base-x"; + case PHY_INTERFACE_MODE_5GBASER: + return "5gbase-r"; case PHY_INTERFACE_MODE_RXAUI: return "rxaui"; case PHY_INTERFACE_MODE_XAUI: From patchwork Tue Feb 16 19:20:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12090559 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45194C433E9 for ; Tue, 16 Feb 2021 19:22:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13B8964E7C for ; Tue, 16 Feb 2021 19:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbhBPTWR (ORCPT ); Tue, 16 Feb 2021 14:22:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:52030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbhBPTWG (ORCPT ); Tue, 16 Feb 2021 14:22:06 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E5B3364EAD; Tue, 16 Feb 2021 19:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613503286; bh=FwzLSkHq/fQKXd7PxmVrEybGxcvHyVQtbZPZ5PEVB+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jZ9ON9D/0sLfuFKWG96uxwE5QdjVp0qc4LgYXDs4QnStVvJOPDP3VCdnuPHCYfVN/ VSkwChYmN0ZXq7bQWOA9N69zLwij+PuP/WxzZuGjFtAbeql327SgtlEnT/LsBRkt8V EAYtyUWupRo3OzwgUXtT/yaVN6KaTnwxRHcMMccg4duC1wuCCg4Qp0oSiULAjAJxQ8 T5BinTSHdJg/SPqTbgIpHos0wsxT9JWOhY/nHdtRcwdnonnKT7L2Ul/bWW8RHMr8Qr PvshmEtvwTsQheF0UqBiHTdpwHT5agHD2RwAtLZsNXBoZ0ebsvH8+nsfqtN6KErZ4F 3Rmn4ED03TC3w== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Russell King - ARM Linux admin , davem@davemloft.net, kuba@kernel.org Cc: pavana.sharma@digi.com, vivien.didelot@gmail.com, f.fainelli@gmail.com, lkp@intel.com, ashkan.boldaji@digi.com, andrew@lunn.ch, Chris Packham , olteanv@gmail.com, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net-next 3/4] net: phylink: Add 5gbase-r support Date: Tue, 16 Feb 2021 20:20:54 +0100 Message-Id: <20210216192055.7078-4-kabel@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210216192055.7078-1-kabel@kernel.org> References: <20210216192055.7078-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add 5GBASER interface type and speed to phylink. Signed-off-by: Marek Behún --- drivers/net/phy/phylink.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 84f6e197f965..053c92e02cd8 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -306,6 +306,10 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode) phylink_set(pl->supported, 2500baseX_Full); break; + case PHY_INTERFACE_MODE_5GBASER: + phylink_set(pl->supported, 5000baseT_Full); + break; + case PHY_INTERFACE_MODE_USXGMII: case PHY_INTERFACE_MODE_10GKR: case PHY_INTERFACE_MODE_10GBASER: From patchwork Tue Feb 16 19:20:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12090557 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56D4FC433E6 for ; Tue, 16 Feb 2021 19:22:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D3ED64E65 for ; Tue, 16 Feb 2021 19:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbhBPTWW (ORCPT ); Tue, 16 Feb 2021 14:22:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:52052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbhBPTWJ (ORCPT ); Tue, 16 Feb 2021 14:22:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 862EA64E7A; Tue, 16 Feb 2021 19:21:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613503288; bh=C55g7mCUuCjm7Ez3PWGLGQz+jfvuDmdosTrWGgfK1AM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ozMnd0ikBYDQ7Nk2Hyyr0PJ+xVLwXyZtvYvOgnBwzrRqCzQvorOw8eex4PtozvIus cjG8Og0ft3IVPOivVZgYs89BSaGfmcm4a0/ypEUi3LVhLspSRJnzYggRnkbO8denWH zLSoiDP2M85vjRbCRgGWlmgLiuEl887TpjVl/xcgZyQU8EkkCTk2Y9iF2Z26hBJTOw vRuKmGQWEMg3Fc8mgftEshcDB4iymFOwBY+jQ/LEGH7yrneotA7Hdl1deAtZhXtisy uexpHQwSXsilOZ4eGfizZSO76EuRpCDVAMD4hyECbhzb8ZMWIUPwcKAldE75DzYUo/ dRQYhtwxRmziw== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Russell King - ARM Linux admin , davem@davemloft.net, kuba@kernel.org Cc: pavana.sharma@digi.com, vivien.didelot@gmail.com, f.fainelli@gmail.com, lkp@intel.com, ashkan.boldaji@digi.com, andrew@lunn.ch, Chris Packham , olteanv@gmail.com, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net-next 4/4] sfp: add support for 5gbase-t SFPs Date: Tue, 16 Feb 2021 20:20:55 +0100 Message-Id: <20210216192055.7078-5-kabel@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210216192055.7078-1-kabel@kernel.org> References: <20210216192055.7078-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The sfp_parse_support() function is setting 5000baseT_Full in some cases. Now that we have PHY_INTERFACE_MODE_5GBASER interface mode available, change sfp_select_interface() to return PHY_INTERFACE_MODE_5GBASER if 5000baseT_Full is set in the link mode mask. Signed-off-by: Marek Behún --- drivers/net/phy/sfp-bus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index 3cfd773ae5f4..2e11176c6b94 100644 --- a/drivers/net/phy/sfp-bus.c +++ b/drivers/net/phy/sfp-bus.c @@ -400,6 +400,9 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus, phylink_test(link_modes, 10000baseT_Full)) return PHY_INTERFACE_MODE_10GBASER; + if (phylink_test(link_modes, 5000baseT_Full)) + return PHY_INTERFACE_MODE_5GBASER; + if (phylink_test(link_modes, 2500baseX_Full)) return PHY_INTERFACE_MODE_2500BASEX;