From: "J. Neuschäfer" <j.ne@posteo.net>
To: Rob Herring <robh@kernel.org>
Cc: "J. Neuschäfer" <j.ne@posteo.net>,
"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>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Claudiu Manoil" <claudiu.manoil@nxp.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] dt-bindings: net: Convert fsl,gianfar to YAML
Date: Tue, 25 Feb 2025 10:44:53 +0000 [thread overview]
Message-ID: <Z72fJSqng8od-5Z7@probook> (raw)
In-Reply-To: <20250221233523.GA372501-robh@kernel.org>
On Fri, Feb 21, 2025 at 05:35:23PM -0600, Rob Herring wrote:
> On Thu, Feb 20, 2025 at 06:29:23PM +0100, J. Neuschäfer wrote:
> > Add a binding for the "Gianfar" ethernet controller, also known as
> > TSEC/eTSEC.
> >
> > Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> > ---
> > .../devicetree/bindings/net/fsl,gianfar.yaml | 242 +++++++++++++++++++++
> > .../devicetree/bindings/net/fsl-tsec-phy.txt | 39 +---
> > 2 files changed, 243 insertions(+), 38 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/fsl,gianfar.yaml b/Documentation/devicetree/bindings/net/fsl,gianfar.yaml
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..dc75ceb5dc6fdee8765bb17273f394d01cce0710
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/fsl,gianfar.yaml
> > @@ -0,0 +1,242 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/fsl,gianfar.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale Three-Speed Ethernet Controller (TSEC), "Gianfar"
[...]
> > + "#address-cells": true
>
> enum: [ 1, 2 ]
>
> because 3 is not valid here.
>
> > +
> > + "#size-cells": true
>
> enum: [ 1, 2 ]
>
> because 0 is not valid here.
Good point.
>
>
> > +
> > + cell-index:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > + interrupts:
> > + maxItems: 3
>
> Based on the if/then schema, you need 'minItems' here if the min is not 3.
>
> Really, move the descriptions here and make them work for the combined
> interrupt case (just a guess).
The difference here (as previously documented in prose) is by device
variant:
for FEC:
- one combined interrupt
for TSEC, eTSEC:
- transmit interrupt
- receive interrupt
- error interrupt
Combining these cases might look like this, not sure if it's good:
interrupts:
minItems: 1
description:
items:
- Transmit interrupt or combined interrupt
- Receive interrupt
- Error interrupt
>
> > +
> > + dma-coherent:
> > + type: boolean
>
> dma-coherent: true
Will do.
> > +
> > + fsl,num_rx_queues:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Number of receive queues
>
> Constraints? I assume there's at least more than 0.
>
> > +
> > + fsl,num_tx_queues:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Number of transmit queues
>
> Constraints?
Good point, for both of these the only value I can find in use is 8,
which corresponds to the number of queues documented in at least one
hardware manual (MPC8548E).
> > + # eTSEC2 controller nodes have "queue group" subnodes and don't need a "reg"
> > + # property.
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: fsl,etsec2
> > + then:
> > + patternProperties:
> > + "^queue-group@[0-9a-f]+$":
> > + type: object
> > +
> > + properties:
> > + "#address-cells": true
> > +
> > + "#size-cells": true
>
> These have no effect if there are not child nodes or a 'ranges'
> property.
Ah, good point, these properties are used in existing DTs, but I see no
reason to keep them. I'll remove them.
>
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 3
>
> Need to define what each one is.
Will do.
> > + - |
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > + soc1 {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
>
> You don't need the soc1 node.
Ah, true.
> > + - |
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > + soc2 {
>
> bus {
Will rename.
Thanks,
J. Neuschäfer
next prev parent reply other threads:[~2025-02-25 10:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 17:29 [PATCH 0/3] net: Convert Gianfar (Triple Speed Ethernet Controller) bindings to YAML J. Neuschäfer via B4 Relay
2025-02-20 17:29 ` [PATCH 1/3] dt-bindings: net: Convert fsl,gianfar-{mdio,tbi} " J. Neuschäfer via B4 Relay
2025-02-21 16:36 ` Rob Herring
2025-02-24 20:58 ` J. Neuschäfer
2025-02-25 11:12 ` J. Neuschäfer
2025-02-26 13:31 ` Rob Herring
2025-02-26 14:59 ` J. Neuschäfer
2025-02-28 13:38 ` Rob Herring
2025-02-20 17:29 ` [PATCH 2/3] dt-bindings: net: fsl,gianfar-mdio: Update information about TBI J. Neuschäfer via B4 Relay
2025-02-21 23:23 ` Rob Herring (Arm)
2025-02-20 17:29 ` [PATCH 3/3] dt-bindings: net: Convert fsl,gianfar to YAML J. Neuschäfer via B4 Relay
2025-02-20 18:02 ` Andrew Lunn
2025-02-21 11:51 ` J. Neuschäfer
2025-02-20 19:01 ` Rob Herring (Arm)
2025-02-21 23:35 ` Rob Herring
2025-02-25 10:44 ` J. Neuschäfer [this message]
2025-02-28 13:52 ` Rob Herring
2025-02-27 13:10 ` kernel test robot
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=Z72fJSqng8od-5Z7@probook \
--to=j.ne@posteo.net \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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).