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 6F22A144D21 for ; Sun, 22 Dec 2024 18:54:46 +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=1734893690; cv=none; b=Xi62Y+fvQ7KblAnQ3tdYa+CWbYoH2TqoiWbhyeAexRb+nTW5SWtpHlpDeg1uLn3frEDBYGjMJyeoEoJs325dHoDmcmcWqGlDZlK+ZDJCwDkZdrZSUgJp6FnHpecW1nX7ZA3SoQIbYOBLy2hwDXWtACyIWuvoJTF0BUkipxo+c6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734893690; c=relaxed/simple; bh=3yGOikwdW8s3N7+tvkdRZaBPIINTsmcY8WRC4/1djv4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T7p+sHUx+XzzoLiMJhHQs/vqEMxGJHD6nZUKuvEUO6z3hW22gOUAii8ZLEP3WuQ9WRg6HYChLJdaemAmxivcLWZtuSthDEAVcdnTxYh4Ef4EWOjBz7sCHt7AdsivOMg3muMe1URIQEJkYOL/RxohXhjOpLr+bk1wJTioKzvDY2M= 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 1tPR6A-0004rL-4k; Sun, 22 Dec 2024 19:54:42 +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 1tPR64-004k5l-1z; Sun, 22 Dec 2024 19:54:37 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tPR65-00ENlm-0r; Sun, 22 Dec 2024 19:54:37 +0100 Date: Sun, 22 Dec 2024 19:54:37 +0100 From: Oleksij Rempel To: Maxime Chevallier Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?utf-8?B?S8O2cnk=?= Maincent , 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> 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 Content-Transfer-Encoding: 8bit In-Reply-To: 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 Sun, Dec 22, 2024 at 04:59:43PM +0100, Oleksij Rempel wrote: > ### Proposed Port Description Schema > > Here’s how I imagine the port description could look to address these issues: > > #### **Device Tree Example** > /* Ports should be in the root of DT */ > ports { > /* Twisted-Pair Example */ > port0: ethernet-port@0 { > reg = <0>; /* Port index */ > label = "ETH0"; /* Physical label on the device */ > connector = "RJ45"; /* Connector type */ > supported-modes = <10BaseT 100BaseTX>; /* Supported modes */ > > pairs { > pair@0 { > name = "A"; /* Pair A */ > pins = <1 2>; /* Connector pins */ > phy-mapping = ; /* PHY pin mapping */ > pse-mapping = ; /* PSE pin mapping */ > }; > pair@1 { > name = "B"; /* Pair B */ > pins = <3 6>; > phy-mapping = ; > pse-mapping = ; > }; > }; > > pse = <&pse1>; /* Reference to attached PSE controller */ > > leds { > link = <&led0>; /* Link status LED */ > activity = <&led1>; /* Activity LED */ > }; > }; 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 */ }; }; }; pse = <&pse1>; /* Reference to the attached PSE controller */ leds { ethernet-leds { link = <ð_led0>; /* Link status LED */ activity = <ð_led1>; /* Activity LED */ speed = <ð_led2>; /* Speed indication LED */ }; poe-leds { power = <&poe_led0>; /* PoE power status LED */ fault = <&poe_led1>; /* PoE fault indication LED */ budget = <&poe_led2>; /* PoE budget usage LED */ }; }; }; }; A port with fully configurable PoE support: ports { /* 1000BaseT Port with Fully Configurable 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 */ shielding = "grounded"; /* Indicates the connector is shielded */ /* grounded: Shield is connected to chassis or earth ground. floating: Shield is not electrically connected. capacitive: Shield is connected to ground via a capacitor. signal: Shield is connected to the signal ground. */ 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 */ /* if pse-positive and pse-negative are present - polarity is configurable */ pse-positive = ; /* PSE-controlled positive pin -> CT0 */ pse-negative = ; /* PSE-controlled negative pin -> CT0 */ }; pair@1 { name = "B"; /* Pair B */ pins = <3 6>; /* Connector pins */ phy-mapping = ; center-tap = "CT1"; /* Central tap identifier */ pse-positive = ; pse-negative = ; }; pair@2 { name = "C"; /* Pair C */ pins = <4 5>; /* Connector pins */ phy-mapping = ; /* PHY connection only */ center-tap = "CT2"; /* Central tap identifier */ pse-positive = ; pse-negative = ; }; pair@3 { name = "D"; /* Pair D */ pins = <7 8>; /* Connector pins */ phy-mapping = ; /* PHY connection only */ center-tap = "CT3"; /* Central tap identifier */ pse-positive = ; pse-negative = ; }; }; }; pse = <&pse1>; /* Reference to the attached PSE controller */ thermal { temp-sensor = <&tsensor0>; /* Reference to temperature sensor */ /* or */ thermal-zone = <&thermal_zone0>; /* Reference to thermal zone */ } fuses { overcurrent-fuse { type = "resettable"; /* Resettable polyfuse */ max-current = <1000>; /* Maximum current in milliamps */ location = "data-pairs"; /* Fuse protects data pairs */ }; overvoltage-fuse { type = "tvs-diode"; /* TVS diode for surge protection */ clamp-voltage = <60>; /* Clamping voltage in volts */ location = "poe-pairs"; /* Fuse protects PoE pairs */ }; }; leds { ethernet-leds { link = <ð_led0>; /* Link status LED */ activity = <ð_led1>; /* Activity LED */ speed = <ð_led2>; /* Speed indication LED */ }; poe-leds { power = <&poe_led0>; /* PoE power status LED */ fault = <&poe_led1>; /* PoE fault indication LED */ budget = <&poe_led2>; /* PoE budget usage LED */ }; }; }; }; In case of PoDL, we will have something like this: pair@0 { name = "A"; /* Single pair for 10BaseT1L */ pins = <1 2>; /* Connector pins */ phy-mapping = ; /* PHY pin mapping */ podl-mapping = ; /* PoDL mapping: Positive and negative outputs */ }; -- 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 |