From: Florian Fainelli <f.fainelli@gmail.com>
To: "Marek Behún" <kabel@kernel.org>,
netdev@vger.kernel.org, "Andrew Lunn" <andrew@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"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
Subject: Re: [PATCH net-next 0/2] dt-bindings: define property describing supported ethernet PHY modes
Date: Wed, 24 Mar 2021 14:19:28 -0700 [thread overview]
Message-ID: <e4e088a4-1538-1e7d-241d-e43b69742811@gmail.com> (raw)
In-Reply-To: <20210324103556.11338-1-kabel@kernel.org>
On 3/24/2021 3:35 AM, Marek Behún wrote:
> Hello,
>
> the Marvell Alaska PHYs (88X3310, 88E2110) can, depending on their
> configuration, change the PHY mode to the MAC, depending on the
> copper/fiber speed.
>
> The 88X3310, for example, can be configured (via MACTYPE register)
> so that it communicates with the MAC in sgmii for 10/100/1000mbps,
> 2500base-x for 2500mbps, 5gbase-r for 5gbps and either 10gbase-r,
> xaui or rxaui for 10gbps. Or the PHY may communicate with the MAC
> in usxgmii, or one of the 10gbase-r, rxaui or xaui modes with rate
> matching.
>
> So for the 10gbps mode we have options 10gbase-r, xaui, rxaui and
> usxgmii. The MAC can support some of these modes, and if it does more
> than one, we need to know which one to use. Not all of these modes
> must necessarily be supported by the board (xaui required wiring for
> 4 SerDes lanes, for example, and 10gbase-r requires wiring capable
> of transmitting at 10.3125 GBd).
>
> The MACTYPE is upon HW reset configured by strapping pins - so the
> board should have a correct mode configured after HW reset.
>
> One problem with this is that some boards configure the MACTYPE to
> a rate matching mode, which, according to the errata, is broken in
> some situations (it does not work for 10/100/1000, for example).
>
> Another problem is that if lower modes are supported, we should
> maybe use them in order to save power.
That is an interesting proposal but if you want it to be truly valuable,
does not that mean that an user ought to be able to switch between any
of the supported PHY <=> MAC interfaces at runtime, and then within
those interfaces to the speeds that yield the best power savings?
>
> But for this we need to know which phy-modes are supported on the
> board.
>
> This series adds documentation for a new ethernet PHY property,
> called `supported-mac-connection-types`.
That naming does not quite make sense to me, if we want to describe the
MAC supported connection types, then those would naturally be within the
Ethernet MAC Device Tree node, no? If we are describing what the PHY is
capable, then we should be dropping "mac" from the property name not to
create confusion.
>
> When this property is present for a PHY node, only the phy-modes
> listed in this property should be considered to be functional on
> the board.
Can you post the code that is going to utilize these properties so we
have a clearer picture of how and what you need to solve?
>
> The second patch adds binding for this property.
>
> The first patch does some YAML magic in ethernet-controller.yaml
> in order to be able to reuse the PHY modes enum, so that the same
> list does not have to be defined twice.
>
> Marek
>
> Marek Behún (2):
> dt-bindings: ethernet-controller: create a type for PHY interface
> modes
> dt-bindings: ethernet-phy: define `supported-mac-connection-types`
> property
>
> .../bindings/net/ethernet-controller.yaml | 89 ++++++++++---------
> .../devicetree/bindings/net/ethernet-phy.yaml | 18 ++++
> 2 files changed, 66 insertions(+), 41 deletions(-)
>
--
Florian
next prev parent reply other threads:[~2021-03-24 21:20 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 ` [PATCH net-next 2/2] dt-bindings: ethernet-phy: define `supported-mac-connection-types` property Marek Behún
2021-03-24 21:19 ` Florian Fainelli [this message]
2021-03-24 23:00 ` [PATCH net-next 0/2] dt-bindings: define property describing supported ethernet PHY modes 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=e4e088a4-1538-1e7d-241d-e43b69742811@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=hkallweit1@gmail.com \
--cc=kabel@kernel.org \
--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).