[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqJE69akg0WnmaNHYBupSNrktDkOxWHPdQ7h2ZWB8fWGZQ@mail.gmail.com>
Date: Tue, 9 Jul 2024 08:33:05 -0600
From: Rob Herring <robh@...nel.org>
To: Frank Li <Frank.li@....com>
Cc: krzk@...nel.org, conor+dt@...nel.org, davem@...emloft.net,
devicetree@...r.kernel.org, edumazet@...gle.com, imx@...ts.linux.dev,
krzk+dt@...nel.org, kuba@...nel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, pabeni@...hat.com
Subject: Re: [PATCH v2 1/1] dt-bindings: net: convert enetc to yaml
On Mon, Jul 1, 2024 at 4:04 PM Frank Li <Frank.li@....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@....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@....com>
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + - fsl,ls1028a-enetc-ierb
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > +required:
> > > + - compatible
> > > + - reg
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > + - |
> > > + ierb@...800000 {
> >
> > 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@....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
Powered by blists - more mailing lists