diff mbox series

[net-next,1/2] dt-bindings: net: renesas,etheravb: Add optional MDIO bus node

Message ID 20240309155334.1310262-2-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series ravb: Support describing the MDIO bus | expand

Commit Message

Niklas Söderlund March 9, 2024, 3:53 p.m. UTC
The Renesas Ethernet AVB bindings do not allow the MDIO bus to be
described. This has not been needed as only a single PHY is
supported and no MDIO bus properties have been needed.

Add an optional mdio node to the binding which allows the MDIO bus to be
described and allow bus properties to be set.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 Documentation/devicetree/bindings/net/renesas,etheravb.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Sergey Shtylyov March 9, 2024, 7:22 p.m. UTC | #1
On 3/9/24 6:53 PM, Niklas Söderlund wrote:

> The Renesas Ethernet AVB bindings do not allow the MDIO bus to be
> described. This has not been needed as only a single PHY is
> supported and no MDIO bus properties have been needed.
> 
> Add an optional mdio node to the binding which allows the MDIO bus to be
> described and allow bus properties to be set.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey
Krzysztof Kozlowski March 10, 2024, 8:44 a.m. UTC | #2
On 09/03/2024 16:53, Niklas Söderlund wrote:
> The Renesas Ethernet AVB bindings do not allow the MDIO bus to be
> described. This has not been needed as only a single PHY is
> supported and no MDIO bus properties have been needed.
> 
> Add an optional mdio node to the binding which allows the MDIO bus to be
> described and allow bus properties to be set.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---

I believe this is v2. Mark your patchsets clearly (git format-patch -v2
or use b4) and provide changelog under --- or in the cover letter.


>  Documentation/devicetree/bindings/net/renesas,etheravb.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> index de7ba7f345a9..5345ad8e1be4 100644
> --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> @@ -93,6 +93,10 @@ properties:
>      description: Number of size cells on the MDIO bus.
>      const: 0
>  
> +  mdio:
> +    $ref: /schemas/net/mdio.yaml#
> +    unevaluatedProperties: false
> +

Please fixup the phy pattern, so it will be obvious it is for
ethernet-phy and probably deprecate it. The phy goes to mdio bus, right?


Best regards,
Krzysztof
Niklas Söderlund March 10, 2024, 1:46 p.m. UTC | #3
Hi Krzysztof,

Thanks for your comments.

On 2024-03-10 09:44:45 +0100, Krzysztof Kozlowski wrote:
> On 09/03/2024 16:53, Niklas Söderlund wrote:
> > The Renesas Ethernet AVB bindings do not allow the MDIO bus to be
> > described. This has not been needed as only a single PHY is
> > supported and no MDIO bus properties have been needed.
> > 
> > Add an optional mdio node to the binding which allows the MDIO bus to be
> > described and allow bus properties to be set.
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > ---
> 
> I believe this is v2. Mark your patchsets clearly (git format-patch -v2
> or use b4) and provide changelog under --- or in the cover letter.
> 
> 
> >  Documentation/devicetree/bindings/net/renesas,etheravb.yaml | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> > index de7ba7f345a9..5345ad8e1be4 100644
> > --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> > +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> > @@ -93,6 +93,10 @@ properties:
> >      description: Number of size cells on the MDIO bus.
> >      const: 0
> >  
> > +  mdio:
> > +    $ref: /schemas/net/mdio.yaml#
> > +    unevaluatedProperties: false
> > +
> 
> Please fixup the phy pattern, so it will be obvious it is for
> ethernet-phy and probably deprecate it. The phy goes to mdio bus, right?

Yes the PHY goes on the MDIO bus and the pattern is only needed for 
backward compatibility.

The pattern was specific to ethernet-phy in the past, but Rob removed it 
in commit ac8fe40c3628 ("dt-bindings: net: renesas: Drop ethernet-phy 
node schema"). Have something changed and I should revert that as part 
of this patch?

I agree it should be listed as deprecated, would this diff work for you?

+# In older bindings there where no mdio child-node to describe the MDIO bus
+# and the PHY. To not fail older bindings accept any node with an address. New
+# users should describe the PHY inside the mdio child-node.
 patternProperties:
   "@[0-9a-f]$":
     type: object
+    deprecated: true

Depending on if Rob's patch should be reverted in whole or in part I 
could also try to revert the pattern to "^ethernet-phy@[0-9a-f]$" if you 
wish. Please let me know what looks best to you.

> 
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski March 12, 2024, 12:07 p.m. UTC | #4
On 10/03/2024 14:46, Niklas Söderlund wrote:
> Hi Krzysztof,
> 
> Thanks for your comments.
> 
> On 2024-03-10 09:44:45 +0100, Krzysztof Kozlowski wrote:
>> On 09/03/2024 16:53, Niklas Söderlund wrote:
>>> The Renesas Ethernet AVB bindings do not allow the MDIO bus to be
>>> described. This has not been needed as only a single PHY is
>>> supported and no MDIO bus properties have been needed.
>>>
>>> Add an optional mdio node to the binding which allows the MDIO bus to be
>>> described and allow bus properties to be set.
>>>
>>> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>>> ---
>>
>> I believe this is v2. Mark your patchsets clearly (git format-patch -v2
>> or use b4) and provide changelog under --- or in the cover letter.
>>
>>
>>>  Documentation/devicetree/bindings/net/renesas,etheravb.yaml | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
>>> index de7ba7f345a9..5345ad8e1be4 100644
>>> --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
>>> +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
>>> @@ -93,6 +93,10 @@ properties:
>>>      description: Number of size cells on the MDIO bus.
>>>      const: 0
>>>  
>>> +  mdio:
>>> +    $ref: /schemas/net/mdio.yaml#
>>> +    unevaluatedProperties: false
>>> +
>>
>> Please fixup the phy pattern, so it will be obvious it is for
>> ethernet-phy and probably deprecate it. The phy goes to mdio bus, right?
> 
> Yes the PHY goes on the MDIO bus and the pattern is only needed for 
> backward compatibility.
> 
> The pattern was specific to ethernet-phy in the past, but Rob removed it 
> in commit ac8fe40c3628 ("dt-bindings: net: renesas: Drop ethernet-phy 
> node schema"). Have something changed and I should revert that as part 
> of this patch?

Ah, indeed. Let it stay as is. I thought there would be conflict with
mdio, but pattern still looks for unit address, so it's fine to have
both: existing @[0-9a-f] and mdio.

> 
> I agree it should be listed as deprecated, would this diff work for you?
> 
> +# In older bindings there where no mdio child-node to describe the MDIO bus
> +# and the PHY. To not fail older bindings accept any node with an address. New
> +# users should describe the PHY inside the mdio child-node.
>  patternProperties:
>    "@[0-9a-f]$":
>      type: object
> +    deprecated: true

Looks fine.

> 
> Depending on if Rob's patch should be reverted in whole or in part I 
> could also try to revert the pattern to "^ethernet-phy@[0-9a-f]$" if you 
> wish. Please let me know what looks best to you.
> 

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
index de7ba7f345a9..5345ad8e1be4 100644
--- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
+++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
@@ -93,6 +93,10 @@  properties:
     description: Number of size cells on the MDIO bus.
     const: 0
 
+  mdio:
+    $ref: /schemas/net/mdio.yaml#
+    unevaluatedProperties: false
+
   renesas,no-ether-link:
     type: boolean
     description: