[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z2hgbdeTXjqWKa14@pengutronix.de>
Date: Sun, 22 Dec 2024 19:54:37 +0100
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>,
linux-arm-kernel@...ts.infradead.org,
Christophe Leroy <christophe.leroy@...roup.eu>,
Herve Codina <herve.codina@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Köry Maincent <kory.maincent@...tlin.com>,
Marek Behún <kabel@...nel.org>,
Nicolò Veronese <nicveronese@...il.com>,
Simon Horman <horms@...nel.org>, mwojtas@...omium.org,
Antoine Tenart <atenart@...nel.org>
Subject: Re: [PATCH net-next RFC 0/5] net: phy: Introduce a port
representation
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_TX0_P PHY_TX0_N>; /* PHY pin mapping */
> pse-mapping = <PSE_OUT0_P PSE_OUT0_N>; /* PSE pin mapping */
> };
> pair@1 {
> name = "B"; /* Pair B */
> pins = <3 6>;
> phy-mapping = <PHY_RX0_P PHY_RX0_N>;
> pse-mapping = <PSE_OUT1_P PSE_OUT1_N>;
> };
> };
>
> 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_TX0_P PHY_TX0_N>; /* PHY pin mapping */
center-tap = "CT0"; /* Central tap identifier */
pse-negative = <PSE_GND>; /* CT0 connected to GND */
};
pair@1 {
name = "B"; /* Pair B */
pins = <3 6>; /* Connector pins */
phy-mapping = <PHY_RX0_P PHY_RX0_N>;
center-tap = "CT1"; /* Central tap identifier */
pse-positive = <PSE_OUT0>; /* CT1 connected to PSE_OUT0 */
};
pair@2 {
name = "C"; /* Pair C */
pins = <4 5>; /* Connector pins */
phy-mapping = <PHY_TXRX1_P PHY_TXRX1_N>; /* 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_TXRX2_P PHY_TXRX2_N>; /* 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_TX0_P PHY_TX0_N>; /* PHY pin mapping */
center-tap = "CT0"; /* Central tap identifier */
/* if pse-positive and pse-negative are present - polarity is configurable */
pse-positive = <PSE_OUT0_0>; /* PSE-controlled positive pin -> CT0 */
pse-negative = <PSE_OUT0_1>; /* PSE-controlled negative pin -> CT0 */
};
pair@1 {
name = "B"; /* Pair B */
pins = <3 6>; /* Connector pins */
phy-mapping = <PHY_RX0_P PHY_RX0_N>;
center-tap = "CT1"; /* Central tap identifier */
pse-positive = <PSE_OUT1_0>;
pse-negative = <PSE_OUT1_1>;
};
pair@2 {
name = "C"; /* Pair C */
pins = <4 5>; /* Connector pins */
phy-mapping = <PHY_TXRX1_P PHY_TXRX1_N>; /* PHY connection only */
center-tap = "CT2"; /* Central tap identifier */
pse-positive = <PSE_OUT2_0>;
pse-negative = <PSE_OUT2_1>;
};
pair@3 {
name = "D"; /* Pair D */
pins = <7 8>; /* Connector pins */
phy-mapping = <PHY_TXRX2_P PHY_TXRX2_N>; /* PHY connection only */
center-tap = "CT3"; /* Central tap identifier */
pse-positive = <PSE_OUT3_0>;
pse-negative = <PSE_OUT3_1>;
};
};
};
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_TXRX0_P PHY_TXRX0_N>; /* PHY pin mapping */
podl-mapping = <PODL_OUT0_P PODL_OUT0_N>; /* 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 |
Powered by blists - more mailing lists