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 1/2] dt-bindings: ethernet-controller: create a type for PHY interface modes
Date: Wed, 24 Mar 2021 11:35:55 +0100 [thread overview]
Message-ID: <20210324103556.11338-2-kabel@kernel.org> (raw)
In-Reply-To: <20210324103556.11338-1-kabel@kernel.org>
In order to be able to define a property describing an array of PHY
interface modes, we need to change the current scalar
`phy-connection-type`, which lists the possible PHY interface modes, to
an array of length 1 (otherwise we would need to define the same list at
two different places).
Moreover Rob Herring says that we cannot reuse the values of a property;
we need to $ref a type.
Move the definition of possible PHY interface modes from the
`phy-connection-type` property to an array type definition
`phy-connection-type-array`, and simply reference this type in the
original property.
Signed-off-by: Marek Behún <kabel@kernel.org>
---
.../bindings/net/ethernet-controller.yaml | 89 ++++++++++---------
1 file changed, 48 insertions(+), 41 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
index 4b7d1e5d003c..0ee25ecbffde 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -53,50 +53,12 @@ properties:
const: mac-address
phy-connection-type:
+ $ref: "#/$defs/phy-connection-type-array"
description:
Specifies interface type between the Ethernet device and a physical
layer (PHY) device.
- enum:
- # There is not a standard bus between the MAC and the PHY,
- # something proprietary is being used to embed the PHY in the
- # MAC.
- - internal
- - mii
- - gmii
- - sgmii
- - qsgmii
- - tbi
- - rev-mii
- - rmii
-
- # RX and TX delays are added by the MAC when required
- - rgmii
-
- # RGMII with internal RX and TX delays provided by the PHY,
- # the MAC should not add the RX or TX delays in this case
- - rgmii-id
-
- # RGMII with internal RX delay provided by the PHY, the MAC
- # should not add an RX delay in this case
- - rgmii-rxid
-
- # RGMII with internal TX delay provided by the PHY, the MAC
- # should not add an TX delay in this case
- - rgmii-txid
- - rtbi
- - smii
- - xgmii
- - trgmii
- - 1000base-x
- - 2500base-x
- - 5gbase-r
- - rxaui
- - xaui
-
- # 10GBASE-KR, XFI, SFI
- - 10gbase-kr
- - usxgmii
- - 10gbase-r
+ minItems: 1
+ maxItems: 1
phy-mode:
$ref: "#/properties/phy-connection-type"
@@ -226,4 +188,49 @@ properties:
additionalProperties: true
+'$defs':
+ phy-connection-type-array:
+ items:
+ enum:
+ # There is not a standard bus between the MAC and the PHY,
+ # something proprietary is being used to embed the PHY in the
+ # MAC.
+ - internal
+ - mii
+ - gmii
+ - sgmii
+ - qsgmii
+ - tbi
+ - rev-mii
+ - rmii
+
+ # RX and TX delays are added by the MAC when required
+ - rgmii
+
+ # RGMII with internal RX and TX delays provided by the PHY,
+ # the MAC should not add the RX or TX delays in this case
+ - rgmii-id
+
+ # RGMII with internal RX delay provided by the PHY, the MAC
+ # should not add an RX delay in this case
+ - rgmii-rxid
+
+ # RGMII with internal TX delay provided by the PHY, the MAC
+ # should not add an TX delay in this case
+ - rgmii-txid
+ - rtbi
+ - smii
+ - xgmii
+ - trgmii
+ - 1000base-x
+ - 2500base-x
+ - 5gbase-r
+ - rxaui
+ - xaui
+
+ # 10GBASE-KR, XFI, SFI
+ - 10gbase-kr
+ - usxgmii
+ - 10gbase-r
+
...
--
2.26.2
next prev 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 ` Marek Behún [this message]
2021-03-24 20:07 ` [PATCH net-next 1/2] dt-bindings: ethernet-controller: create a type for PHY interface modes Rob Herring
2021-03-24 20:59 ` Marek Behún
2021-03-24 10:35 ` [PATCH net-next 2/2] dt-bindings: ethernet-phy: define `supported-mac-connection-types` property Marek Behún
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-2-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).