[PATCH v2] dt-bindings: net: xilinx_gmii2rgmii: Convert to json schema

Somisetty, Pranavi pranavi.somisetty at amd.com
Thu Jul 27 00:51:09 PDT 2023



> -----Original Message-----
> From: Somisetty, Pranavi <pranavi.somisetty at amd.com>
> Sent: Monday, July 24, 2023 6:47 PM
> To: Rob Herring <robh at kernel.org>
> Cc: davem at davemloft.net; edumazet at google.com; kuba at kernel.org;
> krzysztof.kozlowski+dt at linaro.org; conor+dt at kernel.org; Simek, Michal
> <michal.simek at amd.com>; Katakam, Harini <harini.katakam at amd.com>;
> git (AMD-Xilinx) <git at amd.com>; Pandey, Radhey Shyam
> <radhey.shyam.pandey at amd.com>; netdev at vger.kernel.org; linux-
> kernel at vger.kernel.org; devicetree at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org
> Subject: RE: [PATCH v2] dt-bindings: net: xilinx_gmii2rgmii: Convert to json
> schema
> 
> 
> 
> > -----Original Message-----
> > From: Rob Herring <robh at kernel.org>
> > Sent: Wednesday, July 19, 2023 11:52 PM
> > To: Somisetty, Pranavi <pranavi.somisetty at amd.com>
> > Cc: davem at davemloft.net; edumazet at google.com; kuba at kernel.org;
> > krzysztof.kozlowski+dt at linaro.org; conor+dt at kernel.org; Simek, Michal
> > <michal.simek at amd.com>; Katakam, Harini <harini.katakam at amd.com>;
> git
> > (AMD-Xilinx) <git at amd.com>; Pandey, Radhey Shyam
> > <radhey.shyam.pandey at amd.com>; netdev at vger.kernel.org; linux-
> > kernel at vger.kernel.org; devicetree at vger.kernel.org; linux-arm-
> > kernel at lists.infradead.org
> > Subject: Re: [PATCH v2] dt-bindings: net: xilinx_gmii2rgmii: Convert
> > to json schema
> >
<snip>

> > > +
> > > +  phy-handle:
> > > +    $ref: ethernet-controller.yaml#/properties/phy-handle
> >
> > Don't reference individual properties like this. Instead add a $ref at
> > the top level to just "ethernet-controller.yaml#". Since this is the
> > only property you want from there, put a 'phy-handle: true' here and
> > use additionalProperties instead of unevaluatedProperties below.
> >
> 
> Adding a top level $ref to ethernet-controller, implies, DT for gmii2rgmii,
> follows the schema in ethernet-controller.yaml. This is incorrect since
> gmii2rgmii IP isn't an ethernet controller.
> I'm not sure how to reference ethernet-controller.yaml from this schema.
> Would it be okay to add a description to the phy-handle property instead of
> referencing the description in ethernet-controller.yaml?
> 
> Regards
> Pranavi

Just FYI, when I add a $ref pointing to ethernet-controller.yaml, this is the error I'm seeing: Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.example.dtb: gmiitorgmii at 8: $nodename:0: 'gmiitorgmii at 8' does not match '^ethernet(@.*)?$'

Regards,
Pranavi
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +  - phy-handle
> > > +
> > > +unevaluatedProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    mdio {
> > > +        #address-cells = <1>;
> > > +        #size-cells = <0>;
> > > +        phy: ethernet-phy at 0 {
> > > +            reg = <0>;
> > > +        };
> > > +        gmiitorgmii at 8 {
> > > +            compatible = "xlnx,gmii-to-rgmii-1.0";
> > > +            reg = <8>;
> > > +            phy-handle = <&phy>;
> > > +        };
> > > +    };
> > > --
> > > 2.36.1
> > >




More information about the linux-arm-kernel mailing list