From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 E98B61F4729 for ; Tue, 7 Jan 2025 14:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736258579; cv=none; b=DbB/MwfOdFhKh4ILR9kFxplDPrQZ+nusulo0TvxI5y34PXNd0P4PhhxbWCPW64L14GPCKkOABXA3brmfAay9E2psw4UDfGo986lpQEaULdjx1bv8NCxD6Ce8XvzUdtjEabFsR90mOM05dX2nxSC0/y92t5auod2f8hRzSQ8ISTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736258579; c=relaxed/simple; bh=/lAC7NXIey1ZuH7WjX/6NB0HEBVim6c3pkzgBWmHeiU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QigrxKUvPGsXtcidudXADLxly78XK3py1WoxMfAqCZtnlzkJriIW3nblIorE0w5ua17rcnCwDS2Ktb22iTyP6M/Hrk0M00ZBwOcXTaqgjSS5zaK9Emgn7bCH0Qhxu7fdWSknoGdq8D5XAeKd2g4F6hV7UPUa3NUMsLe8vV4JRQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tVAAR-0007Xm-QU; Tue, 07 Jan 2025 15:02:47 +0100 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tVAAQ-007M3c-1B; Tue, 07 Jan 2025 15:02:47 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tVAAQ-009aOe-33; Tue, 07 Jan 2025 15:02:47 +0100 Date: Tue, 7 Jan 2025 15:02:46 +0100 From: Oleksij Rempel To: Kory Maincent Cc: "Russell King (Oracle)" , Maxime Chevallier , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , Marek =?utf-8?B?QmVow7pu?= , =?utf-8?Q?Nicol=C3=B2?= Veronese , Simon Horman , mwojtas@chromium.org, Antoine Tenart Subject: Re: [PATCH net-next RFC 0/5] net: phy: Introduce a port representation Message-ID: References: <20241220201506.2791940-1-maxime.chevallier@bootlin.com> <20250107142605.6c605eaf@kmaincent-XPS-13-7390> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20250107142605.6c605eaf@kmaincent-XPS-13-7390> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Tue, Jan 07, 2025 at 02:26:05PM +0100, Kory Maincent wrote: > On Thu, 2 Jan 2025 18:03:52 +0100 > Oleksij Rempel wrote: > > > On Thu, Jan 02, 2025 at 10:48:05AM +0000, Russell King (Oracle) wrote: > > > On Sun, Dec 22, 2024 at 07:54:37PM +0100, Oleksij Rempel wrote: > > > > Here is updated version: > > > > > > > > ports { > > > > /* 1000BaseT Port with Ethernet and simple PoE */ > > > > port0: ethernet-port@0 { > > > > reg = <0>; /* Port index */ > > > > label = "ETH0"; /* Physical label on the device */ > > > > connector = "RJ45"; /* Connector type */ > > > > supported-modes = <10BaseT 100BaseTX 1000BaseT>; /* Supported > > > > modes */ > > > > > > > > transformer { > > > > model = "ABC123"; /* Transformer model number */ > > > > manufacturer = "TransformerCo"; /* Manufacturer name */ > > > > > > > > pairs { > > > > pair@0 { > > > > name = "A"; /* Pair A */ > > > > pins = <1 2>; /* Connector pins */ > > > > phy-mapping = ; /* PHY pin > > > > mapping */ center-tap = "CT0"; /* Central tap identifier */ > > > > pse-negative = ; /* CT0 connected to GND */ > > > > }; > > > > pair@1 { > > > > name = "B"; /* Pair B */ > > > > pins = <3 6>; /* Connector pins */ > > > > phy-mapping = ; > > > > center-tap = "CT1"; /* Central tap identifier */ > > > > pse-positive = ; /* CT1 connected to > > > > PSE_OUT0 */ }; > > > > pair@2 { > > > > name = "C"; /* Pair C */ > > > > pins = <4 5>; /* Connector pins */ > > > > phy-mapping = ; /* PHY > > > > connection only */ center-tap = "CT2"; /* Central tap identifier */ > > > > /* No power connection to CT2 */ > > > > }; > > > > pair@3 { > > > > name = "D"; /* Pair D */ > > > > pins = <7 8>; /* Connector pins */ > > > > phy-mapping = ; /* PHY > > > > connection only */ center-tap = "CT3"; /* Central tap identifier */ > > > > /* No power connection to CT3 */ > > > > }; > > > > }; > > > > }; > > Couldn't we begin with something simple like the following and add all the > transformers and pairs information as you described later if the community feels > we need it? > > mdis { > > /* 1000BaseT Port with Ethernet and PoE */ > mdi0: ethernet-mdi@0 { > reg = <0>; /* Port index */ > label = "ETH0"; /* Physical label on the device */ > connector = "RJ45"; /* Connector type */ > supported-modes = <10BaseT 100BaseTX 1000BaseT>; /* Supported modes */ > lanes = <2>; > variant = "MDI-X"; /* MDI or MDI-X */ > pse = <&pse1>; > }; > }; The problematic properties are lanes and variants. Lanes seems to not provide any additional information which is not provided by the supported-modes. We have at least following working variants, which are supported by (some?) microchip PHYs: https://microchip.my.site.com/s/article/1000Base-T-Differential-Pair-Swapping For swapping A and B pairs, we may use MDI/MDI-X. What is about swapped C and D pairs? The IEEE 802.3 - 2022 has following variants: 14.5.2 Crossover function - only A<>B swap is supported 40.4.4 Automatic MDI/MDI-X Configuration - only A<>B swap is supported? 55.4.4 Automatic MDI/MDI-X configuration - 4 swap variants are supported 113.4.4 Automatic MDI/MDI-X configuration - 4 swap variants are supported 126.4.4 Automatic MDI/MDI-X configuration - 4 swap variants are supported This was only the pair swap. How to reflect the polarity swap withing the pairs? > We can also add led, thermal and fuse subnodes later. > Let's begin with something simple for the initial support, considering > that it has places for additional details in the future. Yes :) -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |