From: Conor Dooley <conor@kernel.org>
To: Daniel Machon <daniel.machon@microchip.com>
Cc: UNGLinuxDriver@microchip.com, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
Steen Hegelund <Steen.Hegelund@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Russell King <linux@armlinux.org.uk>,
jacob.e.keller@intel.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, devicetree@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next v2 8/8] dt-bindings: net: sparx5: document RGMII MAC delays
Date: Wed, 20 Nov 2024 17:46:36 +0000 [thread overview]
Message-ID: <20241120-decrease-wired-f6f21af817ce@spud> (raw)
In-Reply-To: <20241118105025.hjtji5cnl75rcrb4@DEN-DL-M70577>
[-- Attachment #1: Type: text/plain, Size: 3041 bytes --]
On Mon, Nov 18, 2024 at 10:50:25AM +0000, Daniel Machon wrote:
> Hi Conor,
>
> > > The lan969x switch device supports two RGMII port interfaces that can be
> > > configured for MAC level rx and tx delays.
> > >
> > > Document two new properties {rx,tx}-internal-delay-ps. Make them
> > > required properties, if the phy-mode is one of: rgmii, rgmii_id,
> > > rgmii-rxid or rgmii-txid. Also specify accepted values.
> > >
> > > Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
> > > ---
> > > .../bindings/net/microchip,sparx5-switch.yaml | 20 ++++++++++++++++++++
> > > 1 file changed, 20 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
> > > index dedfad526666..a3f2b70c5c77 100644
> > > --- a/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
> > > +++ b/Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
> > > @@ -129,6 +129,26 @@ properties:
> > > minimum: 0
> > > maximum: 383
> > >
> > > + allOf:
> > > + - if:
> > > + properties:
> > > + phy-mode:
> > > + contains:
> > > + enum:
> > > + - rgmii
> > > + - rgmii-rxid
> > > + - rgmii-txid
> > > + - rgmii-id
> > > + then:
> > > + properties:
> > > + rx-internal-delay-ps:
> > > + enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
> > > + tx-internal-delay-ps:
> > > + enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
> >
> > Properties should be define at the top level and constrained in the
> > if/then parts. Please move the property definitions out, and just leave
> > the required: bit here.
> >
> > > + required:
> > > + - rx-internal-delay-ps
> > > + - tx-internal-delay-ps
> >
> > You've got no else, so these properties are valid even for !rgmii?
> >
> > > +
> > > required:
> > > - reg
> > > - phys
> >
> > Additionally, please move the conditional bits below the required
> > property list.
> >
> > Cheers,
> > Conor.
>
> I will be getting rid of the 'required' constraints in v3. What I hear
> you say, is that the two {rx,tx}-internal-delay-ps properties (incl.
> their enum values) should be moved out of the if/else and to the
> top-level - can you confirm this?
> Is specifying the values
> a property can take not considered a constraint?
Actually, in this case the property isn't even defined (per
ethernet-controller.yaml) if the phy-mode wasn't an rgmii one, so what
you had here was probably fine. Ordinarily, that's not the case, so you'd
have been setting constraints for only rgmii phy-modes and no
constraints at all for non-rgmii phy-modes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-11-20 17:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 21:11 [PATCH net-next v2 0/8] net: lan969x: add RGMII support Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 1/8] net: sparx5: do some preparation work Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 2/8] net: sparx5: add function for RGMII port check Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 3/8] net: sparx5: use is_port_rgmii() throughout Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 4/8] net: sparx5: use phy_interface_mode_is_rgmii() Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 5/8] net: sparx5: verify RGMII speeds Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 6/8] net: lan969x: add RGMII registers Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 7/8] net: lan969x: add RGMII implementation Daniel Machon
2024-11-13 21:11 ` [PATCH net-next v2 8/8] dt-bindings: net: sparx5: document RGMII MAC delays Daniel Machon
2024-11-14 20:06 ` Conor Dooley
2024-11-18 10:50 ` Daniel Machon
2024-11-20 17:46 ` Conor Dooley [this message]
2024-11-14 20:13 ` Andrew Lunn
2024-11-15 9:22 ` Daniel Machon
2024-11-19 0:59 ` Andrew Lunn
2024-11-19 11:43 ` Daniel Machon
2024-11-14 11:55 ` [PATCH net-next v2 0/8] net: lan969x: add RGMII support Robert Marko
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=20241120-decrease-wired-f6f21af817ce@spud \
--to=conor@kernel.org \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=horatiu.vultur@microchip.com \
--cc=jacob.e.keller@intel.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=lars.povlsen@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.