Message ID | 3251ac3db1a739e0c18ded0a824edae981c1e2df.1707153425.git.daniel@makrotopia.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-53103-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1031309dyb; Mon, 5 Feb 2024 09:37:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPnHGW2LOkuXg62NZ45PvoWR88PhJ+moFQQAF0mhCGvaojcLBp4gpKakPxM8twC3W8QmAL X-Received: by 2002:a17:90a:e392:b0:296:19b1:3d76 with SMTP id b18-20020a17090ae39200b0029619b13d76mr99393pjz.37.1707154674677; Mon, 05 Feb 2024 09:37:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707154674; cv=pass; d=google.com; s=arc-20160816; b=NlouKTq6QIv18C4FC4L6gORPdikWpBPUsUoRbsu1YDJCxxpaVLYnTdP5e1qLr+F/J+ A9iTwGzay+YuuxRGtUnDJII95TNtjeCGt5SuQdi8DphbY4oFcswC1nKwE5YBjz6BGcAT QkKk4JF3y6syIh9Ec/VUhvIzMVrZeGsuYmeeFyQqbCl/cmHdMPhwQ7TUlYeeBAuh2htU 3wi3uqlb4A00QShz+b/JIk9nRQonBso4qKuPvedZeSurTSW22G5p2JHWN+XDHFleAFTA Xf4KmG5xK0Xj+wuUsdsEcsE2et8lzhqfpevJJgkxeaI19WwxPOCvrsolYc7vEhSwjhlC AtPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:to:from:date; bh=cJnc60gS+J7znT5nLyWKaMmA2nb4MeXbLJozAsUS+Oo=; fh=qdeikBFjwQkndx3IIzZoBohQvqRe7+jG1TLoV/iEK+k=; b=dvI7tpyZxmlUuUf2lAabKbpkZist7AZW6eEjZ3ZISbQRotSaD5z2Z2YzjQrBoT8LNQ etBOtO2vAlpnj0kJ1ZAz2H6RDgZgW++L/7PULC/ptOneNNjp/u29VshIh69FDRONYQr0 KjjxlQ5LNTvqFIbQtuzm68TPVWSR67FIhByDvoG5BWZUEZMRMnQGmr2HBpfKoLU5F+Vr 3A4PBaVc/g8c7MOz1n9bDAB/G2fwVqCl/PcLxiYk7yGz8F4TV/5Hl3Eak3N3DjGXpTRF U2M6FjF5wkDWuuaN3jlU9Vc6+DHeNbLEK0uT4nqudpLJDd4xfT+oHKue/yJNb0kLmIVW SdIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-53103-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53103-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV3SvDtyZVr+r2cLDmpYvxgkRhQCDgYJJNSKgb6bXefpaFoFAXYOItUx9y1fHzlhF3e9ZGyzhal43NQPjjj2wgFr7sN6A== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ha2-20020a17090af3c200b00290da6bae15si4701018pjb.127.2024.02.05.09.37.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:37:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53103-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-53103-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53103-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D9AFBB24C5E for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 17:29:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DE514503E; Mon, 5 Feb 2024 17:28:45 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3A2344C66; Mon, 5 Feb 2024 17:28:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707154123; cv=none; b=tgpnQJy07VmxnZscr0jp13G761I6M0jVBQhDm8xedOZzWFXEehGWPRYYOmxouF05mcx44e8zFxSpySok9dMjxHGBpepkqNvLe4s1aRkF8kifn29OwBK+bXPLt1DOK6xQzaTcKgmEcX73c/M/dmyN+KqPfBTx8kN4/9NiSny+fL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707154123; c=relaxed/simple; bh=mlrjZuog6v94ZLezXrGvG5aQ50FyFFhxMe3KiPzrb6E=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=TkyceT6JVwJt52RUdRen0lujjKb6fwrgIvqg5suOke5gZ+crkiVqGDYRfjIckgVgYV8B42iXmaiMzYDOHsgv3g1HS1wJC9EHZ9egAlkWYnG/Zgotivr2LdzNwkOhCzUxhy1cLNdCM5kaEnIiB/iYFbUuPn25KZifF+KievzHgPg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from <daniel@makrotopia.org>) id 1rX2lZ-0000ND-05; Mon, 05 Feb 2024 17:28:21 +0000 Date: Mon, 5 Feb 2024 17:28:17 +0000 From: Daniel Golle <daniel@makrotopia.org> To: Chunfeng Yun <chunfeng.yun@mediatek.com>, Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Daniel Golle <daniel@makrotopia.org>, Qingfang Deng <dqfext@gmail.com>, SkyLake Huang <SkyLake.Huang@mediatek.com>, Philipp Zabel <p.zabel@pengutronix.de>, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: phy: mediatek,mt7988-xfi-tphy: add new bindings Message-ID: <3251ac3db1a739e0c18ded0a824edae981c1e2df.1707153425.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790081420059782627 X-GMAIL-MSGID: 1790081420059782627 |
Series |
[v2,1/2] dt-bindings: phy: mediatek,mt7988-xfi-tphy: add new bindings
|
|
Commit Message
Daniel Golle
Feb. 5, 2024, 5:28 p.m. UTC
Add bindings for the MediaTek XFI Ethernet SerDes T-PHY found in the
MediaTek MT7988 SoC which can operate at various interfaces modes:
via USXGMII PCS:
* USXGMII
* 10GBase-R
* 5GBase-R
via LynxI SGMII PCS:
* 2500Base-X
* 1000Base-X
* Cisco SGMII (MAC side)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
v2: unify filename and compatible as requested
.../phy/mediatek,mt7988-xfi-tphy.yaml | 77 +++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/mediatek,mt7988-xfi-tphy.yaml
Comments
Il 05/02/24 18:28, Daniel Golle ha scritto: > Add bindings for the MediaTek XFI Ethernet SerDes T-PHY found in the > MediaTek MT7988 SoC which can operate at various interfaces modes: > > via USXGMII PCS: > * USXGMII > * 10GBase-R > * 5GBase-R > > via LynxI SGMII PCS: > * 2500Base-X > * 1000Base-X > * Cisco SGMII (MAC side) > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On 05/02/2024 18:28, Daniel Golle wrote: > Add bindings for the MediaTek XFI Ethernet SerDes T-PHY found in the > MediaTek MT7988 SoC which can operate at various interfaces modes: > > via USXGMII PCS: > * USXGMII > * 10GBase-R > * 5GBase-R > > via LynxI SGMII PCS: > * 2500Base-X > * 1000Base-X > * Cisco SGMII (MAC side) > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > --- > v2: unify filename and compatible as requested Several comments, from me and Rob, were ignored. Please respond to them. Best regards, Krzysztof
Hi Krzysztof, On Tue, Feb 06, 2024 at 11:53:55AM +0100, Krzysztof Kozlowski wrote: > On 05/02/2024 18:28, Daniel Golle wrote: > > Add bindings for the MediaTek XFI Ethernet SerDes T-PHY found in the > > MediaTek MT7988 SoC which can operate at various interfaces modes: > > > > via USXGMII PCS: > > * USXGMII > > * 10GBase-R > > * 5GBase-R > > > > via LynxI SGMII PCS: > > * 2500Base-X > > * 1000Base-X > > * Cisco SGMII (MAC side) > > > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > > --- > > v2: unify filename and compatible as requested > > Several comments, from me and Rob, were ignored. Please respond to them. I'm sorry if I have missed something. I just checked again on patchwork, just in case I would have missed an email reply to this or any of the preceding posts of this patch as part of the old series going to netdev. Comments you have made which I have addressed: - removed $nodename - use compatible as filename And the only thing I found that I didn't either fix or reply to is this: > Can you explain what is this issue and errata about (except performance)? Not overwriting that (undocumented) value in that (undocumented) register results in 10GBase-R having performance issues according to a commit in MediaTek's SDK, see here: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/a500d94cd%5E%21/#F0 Maybe Bc or SkyLake of MediaTek (added to Cc) can explain this in more detail? What I did miss was Rob's comment at the very bottom of this reply: > What is PEXTP? I can again only answer by referencing to MediaTek's SDK sources: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/refs/heads/master/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c#96 Here this reset is called XFI_PEXTP0_GRST. I personally find that name confusing (as this PHY has nothing to do with _P_ci _EX_press) and have tried to get rid of it where it isn't either part of official documentation or already merged drivers (like Sam's clock driver). If there have been any other issues with this patch which I'm not aware of, please point them out to me. Thank you Best regards Daniel
Hi Daniel, Hi Krzysztof, On Tue, 2024-02-06 at 15:31 +0000, Daniel Golle wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > Hi Krzysztof, > > On Tue, Feb 06, 2024 at 11:53:55AM +0100, Krzysztof Kozlowski wrote: > > On 05/02/2024 18:28, Daniel Golle wrote: > > > Add bindings for the MediaTek XFI Ethernet SerDes T-PHY found in > the > > > MediaTek MT7988 SoC which can operate at various interfaces > modes: > > > > > > via USXGMII PCS: > > > * USXGMII > > > * 10GBase-R > > > * 5GBase-R > > > > > > via LynxI SGMII PCS: > > > * 2500Base-X > > > * 1000Base-X > > > * Cisco SGMII (MAC side) > > > > > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > > > --- > > > v2: unify filename and compatible as requested > > > > Several comments, from me and Rob, were ignored. Please respond to > them. > > I'm sorry if I have missed something. I just checked again on > patchwork, just in case I would have missed an email reply to this or > any of the preceding posts of this patch as part of the old series > going to netdev. > > Comments you have made which I have addressed: > - removed $nodename > - use compatible as filename > > And the only thing I found that I didn't either fix or reply to is > this: > > Can you explain what is this issue and errata about (except > performance)? > > Not overwriting that (undocumented) value in that (undocumented) > register results in 10GBase-R having performance issues according to > a > commit in MediaTek's SDK, see here: > > https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/a500d94cd%5E%21/#F0 > > Maybe Bc or SkyLake of MediaTek (added to Cc) can explain this in > more > detail? Our QA team has identified a potential performance issue when connecting XFI Port0 with an SFP optical fiber, which may violate the SFP specification. Therefore, we have adjusted the PHYA setting for this port. > > What I did miss was Rob's comment at the very bottom of this reply: > > What is PEXTP? > > I can again only answer by referencing to MediaTek's SDK sources: > > https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/refs/heads/master/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c#96 > > Here this reset is called XFI_PEXTP0_GRST. > > I personally find that name confusing (as this PHY has nothing to do > with > _P_ci _EX_press) and have tried to get rid of it where it isn't > either part > of official documentation or already merged drivers (like Sam's clock > driver). > > If there have been any other issues with this patch which I'm not > aware > of, please point them out to me. > > > Thank you > > > Best regards > > > Daniel Thanks BC
On 06/02/2024 16:31, Daniel Golle wrote: > Hi Krzysztof, > > On Tue, Feb 06, 2024 at 11:53:55AM +0100, Krzysztof Kozlowski wrote: >> On 05/02/2024 18:28, Daniel Golle wrote: >>> Add bindings for the MediaTek XFI Ethernet SerDes T-PHY found in the >>> MediaTek MT7988 SoC which can operate at various interfaces modes: >>> >>> via USXGMII PCS: >>> * USXGMII >>> * 10GBase-R >>> * 5GBase-R >>> >>> via LynxI SGMII PCS: >>> * 2500Base-X >>> * 1000Base-X >>> * Cisco SGMII (MAC side) >>> >>> Signed-off-by: Daniel Golle <daniel@makrotopia.org> >>> --- >>> v2: unify filename and compatible as requested >> >> Several comments, from me and Rob, were ignored. Please respond to them. > > I'm sorry if I have missed something. I just checked again on > patchwork, just in case I would have missed an email reply to this or > any of the preceding posts of this patch as part of the old series > going to netdev. > > Comments you have made which I have addressed: > - removed $nodename > - use compatible as filename > > And the only thing I found that I didn't either fix or reply to is this: >> Can you explain what is this issue and errata about (except performance)? > > Not overwriting that (undocumented) value in that (undocumented) > register results in 10GBase-R having performance issues according to a > commit in MediaTek's SDK, see here: > > https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/a500d94cd%5E%21/#F0 > > Maybe Bc or SkyLake of MediaTek (added to Cc) can explain this in more > detail? > > > What I did miss was Rob's comment at the very bottom of this reply: >> What is PEXTP? > > I can again only answer by referencing to MediaTek's SDK sources: > > https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/refs/heads/master/21.02/files/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_sgmii.c#96 > > Here this reset is called XFI_PEXTP0_GRST. > > I personally find that name confusing (as this PHY has nothing to do with > _P_ci _EX_press) and have tried to get rid of it where it isn't either part > of official documentation or already merged drivers (like Sam's clock driver). > > If there have been any other issues with this patch which I'm not aware > of, please point them out to me. These both cases should be explained in the binding somehow. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/phy/mediatek,mt7988-xfi-tphy.yaml b/Documentation/devicetree/bindings/phy/mediatek,mt7988-xfi-tphy.yaml new file mode 100644 index 0000000000000..e897118dcf7e6 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/mediatek,mt7988-xfi-tphy.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/mediatek,mt7988-xfi-tphy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek XFI T-PHY + +maintainers: + - Daniel Golle <daniel@makrotopia.org> + +description: + The MediaTek XFI SerDes T-PHY provides the physical SerDes lanes + used by the (10G/5G) USXGMII PCS and (1G/2.5G) LynxI PCS found in + MediaTek's 10G-capabale MT7988 SoC. + +properties: + compatible: + const: mediatek,mt7988-xfi-tphy + + reg: + maxItems: 1 + + clocks: + items: + - description: XFI PHY clock + - description: XFI register clock + + clock-names: + items: + - const: xfipll + - const: topxtal + + resets: + items: + - description: PEXTP reset + + mediatek,usxgmii-performance-errata: + $ref: /schemas/types.yaml#/definitions/flag + description: + One instance of the T-PHY on MT7988 suffers from a performance + problem in 10GBase-R mode which needs a work-around in the driver. + The work-around is enabled using this flag. + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - "#phy-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/mediatek,mt7988-clk.h> + soc { + #address-cells = <2>; + #size-cells = <2>; + + phy@11f20000 { + compatible = "mediatek,mt7988-xfi-tphy"; + reg = <0 0x11f20000 0 0x10000>; + clocks = <&xfi_pll CLK_XFIPLL_PLL_EN>, + <&topckgen CLK_TOP_XFI_PHY_0_XTAL_SEL>; + clock-names = "xfipll", "topxtal"; + resets = <&watchdog 14>; + mediatek,usxgmii-performance-errata; + #phy-cells = <0>; + }; + }; + +...