devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Rob Herring <robh@kernel.org>,
	devicetree@vger.kernel.org
Cc: pali@kernel.org, "Marek Behún" <kabel@kernel.org>
Subject: [PATCH net-next 2/2] dt-bindings: ethernet-phy: define `supported-mac-connection-types` property
Date: Wed, 24 Mar 2021 11:35:56 +0100	[thread overview]
Message-ID: <20210324103556.11338-3-kabel@kernel.org> (raw)
In-Reply-To: <20210324103556.11338-1-kabel@kernel.org>

An ethernet PHY may support PHY interface modes that are not wired on a
specific board (or are broken for some other reason).

For example the Marvell 88X3310 PHY supports connecting the MAC with the
PHY with `xaui` and `rxaui`, the MAC can also support these modes, but
it is possible for a board not to have them wired (since these modes use
multiple SerDes lanes).

In order for the kernel to know which modes are supported on the board,
we need to specify them in the device tree.

Define a new ethernet PHY property `supported-mac-connection-types`,
which lists the supported modes. If this property is missing, all modes
supported by the PHY and MAC are presumed to be supported by the board.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 .../devicetree/bindings/net/ethernet-phy.yaml  | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 2766fe45bb98..3706760b5637 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -136,6 +136,23 @@ properties:
       used. The absence of this property indicates the muxers
       should be configured so that the external PHY is used.
 
+  supported-mac-connection-types:
+    $ref: "ethernet-controller.yaml#/$defs/phy-connection-type-array"
+    description:
+      The PHY device may support different interface types for
+      connecting the Ethernet MAC device to the PHY device (i.e.
+      rgmii, sgmii, xaui, ...), but not all of these interface
+      types must necessarily be supported for a specific board
+      (not all of them are wired, or there may be some known bug
+      for a specific mode, ...).
+      This property specifies a list of interface modes to the
+      MAC supported by the PHY hardware that are also supported
+      by the board.
+      If this property is missing, all modes supported by the
+      PHY are presumend to be supported by the board.
+    minItems: 1
+    maxItems: 64
+
   resets:
     maxItems: 1
 
@@ -196,5 +213,6 @@ examples:
             reset-gpios = <&gpio1 4 1>;
             reset-assert-us = <1000>;
             reset-deassert-us = <2000>;
+            supported-mac-connection-types = "xaui", "rxaui";
         };
     };
-- 
2.26.2


  parent reply	other threads:[~2021-03-24 10:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 10:35 [PATCH net-next 0/2] dt-bindings: define property describing supported ethernet PHY modes Marek Behún
2021-03-24 10:35 ` [PATCH net-next 1/2] dt-bindings: ethernet-controller: create a type for PHY interface modes Marek Behún
2021-03-24 20:07   ` Rob Herring
2021-03-24 20:59     ` Marek Behún
2021-03-24 10:35 ` Marek Behún [this message]
2021-03-24 21:19 ` [PATCH net-next 0/2] dt-bindings: define property describing supported ethernet PHY modes Florian Fainelli
2021-03-24 23:00   ` Marek Behún
2021-03-24 23:16     ` Florian Fainelli
2021-03-24 23:45       ` Marek Behún
2021-03-25  0:11         ` Florian Fainelli
2021-03-25  0:30           ` Russell King - ARM Linux admin
2021-03-25  0:43           ` Marek Behún
2021-03-25  0:28         ` Russell King - ARM Linux admin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210324103556.11338-3-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).