Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: Introduce the ethernet-connector description

The ability to describe the physical ports of Ethernet devices is useful
to describe multi-port devices, as well as to remove any ambiguity with
regard to the nature of the port.

Moreover, describing ports allows for a better description of features
that are tied to connectors, such as PoE through the PSE-PD devices.

Introduce a binding to allow describing the ports, for now with 2
attributes :

- The number of pairs, which is a quite generic property that allows
differentating between multiple similar technologies such as BaseT1
and "regular" BaseT (which usually means BaseT4).

- The media that can be used on that port, such as BaseT for Twisted
Copper, BaseC for coax copper, BaseS/L for Fiber, BaseK for backplane
ethernet, etc. This allows defining the nature of the port, and
therefore avoids the need for vendor-specific properties such as
"micrel,fiber-mode" or "ti,fiber-mode".

The port description lives in its own file, as it is intended in the
future to allow describing the ports for phy-less devices.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260108080041.553250-2-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Maxime Chevallier and committed by
Jakub Kicinski
fb7a8d07 8d48d92e

+75
+56
Documentation/devicetree/bindings/net/ethernet-connector.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/ethernet-connector.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Generic Ethernet Connector 8 + 9 + maintainers: 10 + - Maxime Chevallier <maxime.chevallier@bootlin.com> 11 + 12 + description: 13 + An Ethernet Connector represents the output of a network component such as 14 + a PHY, an Ethernet controller with no PHY, or an SFP module. 15 + 16 + properties: 17 + 18 + pairs: 19 + description: 20 + Defines the number of BaseT pairs that are used on the connector. 21 + $ref: /schemas/types.yaml#/definitions/uint32 22 + enum: [1, 2, 4] 23 + 24 + media: 25 + description: 26 + The mediums, as defined in 802.3, that can be used on the port. 27 + enum: 28 + - BaseT 29 + - BaseK 30 + - BaseS 31 + - BaseC 32 + - BaseL 33 + - BaseD 34 + - BaseE 35 + - BaseF 36 + - BaseV 37 + - BaseMLD 38 + 39 + required: 40 + - media 41 + 42 + allOf: 43 + - if: 44 + properties: 45 + media: 46 + const: BaseT 47 + then: 48 + required: 49 + - pairs 50 + else: 51 + properties: 52 + pairs: false 53 + 54 + additionalProperties: true 55 + 56 + ...
+18
Documentation/devicetree/bindings/net/ethernet-phy.yaml
··· 281 281 282 282 additionalProperties: false 283 283 284 + mdi: 285 + type: object 286 + 287 + patternProperties: 288 + '^connector-[0-9]+$': 289 + $ref: /schemas/net/ethernet-connector.yaml# 290 + 291 + unevaluatedProperties: false 292 + 293 + additionalProperties: false 294 + 284 295 required: 285 296 - reg 286 297 ··· 326 315 color = <LED_COLOR_ID_WHITE>; 327 316 function = LED_FUNCTION_LAN; 328 317 default-state = "keep"; 318 + }; 319 + }; 320 + /* Fast Ethernet port, with only 2 pairs wired */ 321 + mdi { 322 + connector-0 { 323 + pairs = <2>; 324 + media = "BaseT"; 329 325 }; 330 326 }; 331 327 };
+1
MAINTAINERS
··· 9395 9395 L: netdev@vger.kernel.org 9396 9396 S: Maintained 9397 9397 F: Documentation/ABI/testing/sysfs-class-net-phydev 9398 + F: Documentation/devicetree/bindings/net/ethernet-connector.yaml 9398 9399 F: Documentation/devicetree/bindings/net/ethernet-phy.yaml 9399 9400 F: Documentation/devicetree/bindings/net/mdio* 9400 9401 F: Documentation/devicetree/bindings/net/qca,ar803x.yaml