devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Frank Li <Frank.li@nxp.com>
Cc: krzk@kernel.org, conor+dt@kernel.org, davem@davemloft.net,
	 devicetree@vger.kernel.org, edumazet@google.com,
	imx@lists.linux.dev,  krzk+dt@kernel.org, kuba@kernel.org,
	linux-kernel@vger.kernel.org,  netdev@vger.kernel.org,
	pabeni@redhat.com
Subject: Re: [PATCH v2 1/1] dt-bindings: net: convert enetc to yaml
Date: Tue, 9 Jul 2024 08:33:05 -0600	[thread overview]
Message-ID: <CAL_JsqJE69akg0WnmaNHYBupSNrktDkOxWHPdQ7h2ZWB8fWGZQ@mail.gmail.com> (raw)
In-Reply-To: <ZoMn0Pc/agPGKeTS@lizhi-Precision-Tower-5810>

On Mon, Jul 1, 2024 at 4:04 PM Frank Li <Frank.li@nxp.com> wrote:
>
> On Thu, Jun 27, 2024 at 09:55:47AM -0600, Rob Herring wrote:
> > On Wed, Jun 26, 2024 at 12:23:07PM -0400, Frank Li wrote:
> > > Convert enetc device binding file to yaml. Split to 3 yaml files,
> > > 'fsl,enetc.yaml', 'fsl,enetc-mdio.yaml', 'fsl,enetc-ierb.yaml'.
> > >
> > > Additional Changes:
> > > - Add pci<vendor id>,<production id> in compatible string.
> > > - Ref to common ethernet-controller.yaml and mdio.yaml.
> > > - Remove fixed-link part.
> > >
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > > Change from v1 to v2
> > > - renamee file as fsl,enetc-mdio.yaml, fsl,enetc-ierb.yaml, fsl,enetc.yaml
> > > - example include pcie node
> > > ---
> > >  .../bindings/net/fsl,enetc-ierb.yaml          |  35 ++++++
> > >  .../bindings/net/fsl,enetc-mdio.yaml          |  53 ++++++++
> > >  .../devicetree/bindings/net/fsl,enetc.yaml    |  50 ++++++++
> > >  .../devicetree/bindings/net/fsl-enetc.txt     | 119 ------------------
> > >  4 files changed, 138 insertions(+), 119 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/net/fsl,enetc-ierb.yaml
> > >  create mode 100644 Documentation/devicetree/bindings/net/fsl,enetc-mdio.yaml
> > >  create mode 100644 Documentation/devicetree/bindings/net/fsl,enetc.yaml
> > >  delete mode 100644 Documentation/devicetree/bindings/net/fsl-enetc.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/net/fsl,enetc-ierb.yaml b/Documentation/devicetree/bindings/net/fsl,enetc-ierb.yaml
> > > new file mode 100644
> > > index 0000000000000..ce88d7ce07a5e
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/net/fsl,enetc-ierb.yaml
> > > @@ -0,0 +1,35 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/net/fsl,enetc-ierb.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Integrated Endpoint Register Block
> > > +
> > > +description:
> > > +  The fsl_enetc driver can probe on the Integrated Endpoint Register
> > > +  Block, which preconfigures the FIFO limits for the ENETC ports.
> >
> > Wrap at 80 chars
> >
> > > +
> > > +maintainers:
> > > +  - Frank Li <Frank.Li@nxp.com>
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - fsl,ls1028a-enetc-ierb
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    ierb@1f0800000 {
> >
> > unit-address doesn't match
> >
> > > +        compatible = "fsl,ls1028a-enetc-ierb";
> > > +        reg = <0xf0800000 0x10000>;
> > > +    };
> > > diff --git a/Documentation/devicetree/bindings/net/fsl,enetc-mdio.yaml b/Documentation/devicetree/bindings/net/fsl,enetc-mdio.yaml
> > > new file mode 100644
> > > index 0000000000000..60740ea56cb08
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/net/fsl,enetc-mdio.yaml
> > > @@ -0,0 +1,53 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/net/fsl,enetc-mdio.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: ENETC the central MDIO PCIe endpoint device
> > > +
> > > +description:
> > > +  In this case, the mdio node should be defined as another PCIe
> > > +  endpoint node, at the same level with the ENETC port nodes
> > > +
> > > +maintainers:
> > > +  - Frank Li <Frank.Li@nxp.com>.
> >
> > stray '.'                         ^
> >
> > > +
> > > +properties:
> > > +  compatible:
> > > +    items:
> > > +      - enum:
> > > +          - pci1957,ee01
> > > +      - const: fsl,enetc-mdio
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +
> > > +allOf:
> > > +  - $ref: mdio.yaml
> >
> > As a PCI device, also needs pci-device.yaml.
>
> After I add pci-devices.yaml, I get
> Documentation/devicetree/bindings/net/fsl,enetc.example.dtb: ethernet@0,0: False schema does not allow {'compatible': ['pci1957,e100', 'fsl,enetc'], 'reg': [[0, 0, 0, 0, 0]], 'phy-handle': [[4294967295]], 'phy-connection-type': ['sgmii'], '$nodename': ['ethernet@0,0']}

Perhaps use pci-device.yaml, not pci-devices.yaml which doesn't exist.
The latter gives me this error, the former works fine for me.

Rob

  reply	other threads:[~2024-07-09 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 16:23 [PATCH v2 1/1] dt-bindings: net: convert enetc to yaml Frank Li
2024-06-26 17:55 ` Rob Herring (Arm)
2024-06-26 18:38 ` Fabio Estevam
2024-06-27 15:44   ` Rob Herring
2024-06-27 15:55 ` Rob Herring
2024-07-01 22:04   ` Frank Li
2024-07-09 14:33     ` Rob Herring [this message]
2024-07-08 10:07 ` Wei Fang
2024-07-09 14:10   ` Rob Herring
2024-07-10  2:01     ` Wei Fang

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=CAL_JsqJE69akg0WnmaNHYBupSNrktDkOxWHPdQ7h2ZWB8fWGZQ@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=Frank.li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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).