Re: [PATCH 1/3] dt-bindings: net: Convert fsl,gianfar-{mdio,tbi} to YAML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 21, 2025 at 10:36:51AM -0600, Rob Herring wrote:
> On Thu, Feb 20, 2025 at 06:29:21PM +0100, J. Neuschäfer wrote:
> > Move the information related to the Freescale Gianfar (TSEC) MDIO bus
> > and the Ten-Bit Interface (TBI) from fsl-tsec-phy.txt to a new binding
> > file in YAML format, fsl,gianfar-mdio.yaml.
> > 
> > Signed-off-by: J. Neuschäfer <j.ne@xxxxxxxxxx>
> > ---
[...]
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - fsl,gianfar-tbi
> > +      - fsl,gianfar-mdio
> > +      - fsl,etsec2-tbi
> > +      - fsl,etsec2-mdio
> > +      - fsl,ucc-mdio
> > +      - gianfar
> 
> Can you just comment out this to avoid the duplicate issue.
> 
> Though I think if you write a custom 'select' which looks for 
> 'device_type = "mdio"' with gianfar compatible and similar in the other 
> binding, then the warning will go away. 

I'm not sure how the 'select' syntax works, is there a reference
document I could read?

> 
> > +      - ucc_geth_phy
> > +
> > +  reg:
> > +    minItems: 1
> > +    items:
> > +      - description:
> > +          Offset and length of the register set for the device
> > +
> > +      - description:
> > +          Optionally, the offset and length of the TBIPA register (TBI PHY
> > +          address register). If TBIPA register is not specified, the driver
> > +          will attempt to infer it from the register set specified (your
> > +          mileage may vary).
> > +
> > +  device_type:
> > +    const: mdio
> > +
> 
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 0
> 
> These are defined in mdio.yaml, so drop them here.

Will do.

> 
> > +
> > +required:
> > +  - reg
> > +  - "#address-cells"
> > +  - "#size-cells"
> > +
> > +allOf:
> > +  - $ref: mdio.yaml#
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - gianfar
> > +              - ucc_geth_phy
> > +    then:
> > +      required:
> > +        - device_type
> 
> Essentially, move this to the 'select' schema and add that property 
> device_type must be 'mdio'. You won't need it here anymore because it 
> had to be true for the schema to be applied.

I'll have to read up on how select works.


Best Regards,
J. Neuschäfer




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux