diff mbox series

[v10,3/4] dt-bindings: ethernet-phy: add optional brr-mode flag

Message ID 20240704140413.2797199-4-kamilh@axis.com (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series net: phy: bcm5481x: add support for BroadR-Reach mode | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: f.fainelli@gmail.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-05--06-00 (tests: 695)

Commit Message

Kamil Horák (2N) July 4, 2024, 2:04 p.m. UTC
There is a group of PHY chips supporting BroadR-Reach link modes in
a manner allowing for more or less identical register usage as standard
Clause 22 PHY.
These chips support standard Ethernet link modes as well, however, the
circuitry is mutually exclusive and cannot be auto-detected.
The link modes in question are 100Base-T1 as defined in IEEE802.3bw,
based on Broadcom's 1BR-100 link mode, and newly defined 10Base-T1BRR
(1BR-10 in Broadcom documents).

Add optional brr-mode flag to switch the PHY to BroadR-Reach mode.

Signed-off-by: Kamil Horák (2N) <kamilh@axis.com>
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Conor Dooley July 4, 2024, 4:17 p.m. UTC | #1
On Thu, Jul 04, 2024 at 04:04:12PM +0200, Kamil Horák (2N) wrote:
> There is a group of PHY chips supporting BroadR-Reach link modes in
> a manner allowing for more or less identical register usage as standard
> Clause 22 PHY.
> These chips support standard Ethernet link modes as well, however, the
> circuitry is mutually exclusive and cannot be auto-detected.
> The link modes in question are 100Base-T1 as defined in IEEE802.3bw,
> based on Broadcom's 1BR-100 link mode, and newly defined 10Base-T1BRR
> (1BR-10 in Broadcom documents).
> 
> Add optional brr-mode flag to switch the PHY to BroadR-Reach mode.
> 
> Signed-off-by: Kamil Horák (2N) <kamilh@axis.com>

Where did the tags go? There's no mention of why they were dropped.

> ---
>  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> index 8fb2a6ee7e5b..349ae72ebf42 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> @@ -93,6 +93,14 @@ properties:
>        the turn around line low at end of the control phase of the
>        MDIO transaction.
>  
> +  brr-mode:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      If set, indicates the network cable interface is alternative one as
> +      defined in the BroadR-Reach link mode specification under 1BR-100 and
> +      1BR-10 names. The driver needs to configure the PHY to operate in
> +      BroadR-Reach mode.

I find this second sentence unclear. Does the driver need to do
configure the phy because this mode is not enabled by default or because
the device will not work outside of this mode.

Cheers,
Conor.
Andrew Lunn July 4, 2024, 9:11 p.m. UTC | #2
> > ---
> >  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > index 8fb2a6ee7e5b..349ae72ebf42 100644
> > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > @@ -93,6 +93,14 @@ properties:
> >        the turn around line low at end of the control phase of the
> >        MDIO transaction.
> >  
> > +  brr-mode:
> > +    $ref: /schemas/types.yaml#/definitions/flag
> > +    description:
> > +      If set, indicates the network cable interface is alternative one as
> > +      defined in the BroadR-Reach link mode specification under 1BR-100 and
> > +      1BR-10 names. The driver needs to configure the PHY to operate in
> > +      BroadR-Reach mode.
> 
> I find this second sentence unclear. Does the driver need to do
> configure the phy because this mode is not enabled by default or because
> the device will not work outside of this mode.

BroadR-Reach uses one pair. Standard 10/100Mbps ethernet needs 2 pair,
and 1G needs 4 pair. So any attempt to use standard 10/100/1G is going
to fail, the socket/plug and cable just don't work for anything other
than BroadR-Reach.

As far as i understand it, the PHY could be strapped into BroadR-Reach
mode, but there is no guarantee it is, so we should also program it to
BroadR-Reach mode if this property is present.

	Andrew
Conor Dooley July 5, 2024, 2:51 p.m. UTC | #3
On Thu, Jul 04, 2024 at 11:11:41PM +0200, Andrew Lunn wrote:
> > > ---
> > >  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > > index 8fb2a6ee7e5b..349ae72ebf42 100644
> > > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > > @@ -93,6 +93,14 @@ properties:
> > >        the turn around line low at end of the control phase of the
> > >        MDIO transaction.
> > >  
> > > +  brr-mode:
> > > +    $ref: /schemas/types.yaml#/definitions/flag
> > > +    description:
> > > +      If set, indicates the network cable interface is alternative one as

nit: an alternative

> > > +      defined in the BroadR-Reach link mode specification under 1BR-100 and
> > > +      1BR-10 names. The driver needs to configure the PHY to operate in
> > > +      BroadR-Reach mode.
> > 
> > I find this second sentence unclear. Does the driver need to do
> > configure the phy because this mode is not enabled by default or because
> > the device will not work outside of this mode.
> 
> BroadR-Reach uses one pair. Standard 10/100Mbps ethernet needs 2 pair,
> and 1G needs 4 pair. So any attempt to use standard 10/100/1G is going
> to fail, the socket/plug and cable just don't work for anything other
> than BroadR-Reach.
> 
> As far as i understand it, the PHY could be strapped into BroadR-Reach
> mode, but there is no guarantee it is, so we should also program it to
> BroadR-Reach mode if this property is present.

Right, I guess for people that want brr-mode they'll probably understand
that and it's just unclear to me as I don't :) The nitpicking side of my
brain would like that last sentence reworded to "The PHY must be
configured to operate in BroadR-Reach mode by software", mostly cos the
word "driver" assumes a particular model for the OS, but it's not really
a big deal.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 8fb2a6ee7e5b..349ae72ebf42 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -93,6 +93,14 @@  properties:
       the turn around line low at end of the control phase of the
       MDIO transaction.
 
+  brr-mode:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      If set, indicates the network cable interface is alternative one as
+      defined in the BroadR-Reach link mode specification under 1BR-100 and
+      1BR-10 names. The driver needs to configure the PHY to operate in
+      BroadR-Reach mode.
+
   clocks:
     maxItems: 1
     description: