2023-07-17 16:57:27

by Marco Felsch

[permalink] [raw]
Subject: [PATCH net-next 1/2] dt-bindings: net: snps,dwmac: add phy-supply support

Document the common phy-supply property to be able to specify a phy
regulator.

Signed-off-by: Marco Felsch <[email protected]>
---
Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 363b3e3ea3a60..f66d1839cf561 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -159,6 +159,9 @@ properties:
can be passive (no SW requirement), and requires that the MAC operate
in a different mode than the PHY in order to function.

+ phy-supply:
+ description: PHY regulator
+
snps,axi-config:
$ref: /schemas/types.yaml#/definitions/phandle
description:
--
2.39.2



2023-07-17 17:09:56

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH net-next 1/2] dt-bindings: net: snps,dwmac: add phy-supply support

On 17/07/2023 18:43, Marco Felsch wrote:
> Document the common phy-supply property to be able to specify a phy
> regulator.
>
> Signed-off-by: Marco Felsch <[email protected]>
> ---
> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 363b3e3ea3a60..f66d1839cf561 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -159,6 +159,9 @@ properties:
> can be passive (no SW requirement), and requires that the MAC operate
> in a different mode than the PHY in order to function.
>
> + phy-supply:
> + description: PHY regulator
> +

Isn't this property of the PHY? Why would the Ethernet controller play
with a supply of a phy?

Best regards,
Krzysztof


2023-07-17 17:10:32

by Marco Felsch

[permalink] [raw]
Subject: Re: [PATCH net-next 1/2] dt-bindings: net: snps,dwmac: add phy-supply support

On 23-07-17, Krzysztof Kozlowski wrote:
> On 17/07/2023 18:43, Marco Felsch wrote:
> > Document the common phy-supply property to be able to specify a phy
> > regulator.
> >
> > Signed-off-by: Marco Felsch <[email protected]>
> > ---
> > Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > index 363b3e3ea3a60..f66d1839cf561 100644
> > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > @@ -159,6 +159,9 @@ properties:
> > can be passive (no SW requirement), and requires that the MAC operate
> > in a different mode than the PHY in order to function.
> >
> > + phy-supply:
> > + description: PHY regulator
> > +
>
> Isn't this property of the PHY? Why would the Ethernet controller play
> with a supply of a phy?

Because this is the current state. Please check the all other MACs
handling the phy-supply (if supported). Some of them handling it under
the mdio-node (not the phy-node) but most bindings do specify this on
MAC level (e.g. FEC, DWMAC (suni, rk)).

I agree that the phy sould handle this but this would be a lot more
effort and since the dwmac-sun8i/rk bindings do support this on MAC
level I would keep it that way.

Regards,
Marco

2023-07-18 08:25:40

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH net-next 1/2] dt-bindings: net: snps,dwmac: add phy-supply support

On 17/07/2023 18:43, Marco Felsch wrote:
> Document the common phy-supply property to be able to specify a phy
> regulator.
>
> Signed-off-by: Marco Felsch <[email protected]>
> ---


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-07-18 08:26:48

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH net-next 1/2] dt-bindings: net: snps,dwmac: add phy-supply support

On 17/07/2023 18:57, Marco Felsch wrote:
> On 23-07-17, Krzysztof Kozlowski wrote:
>> On 17/07/2023 18:43, Marco Felsch wrote:
>>> Document the common phy-supply property to be able to specify a phy
>>> regulator.
>>>
>>> Signed-off-by: Marco Felsch <[email protected]>
>>> ---
>>> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>>> index 363b3e3ea3a60..f66d1839cf561 100644
>>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>>> @@ -159,6 +159,9 @@ properties:
>>> can be passive (no SW requirement), and requires that the MAC operate
>>> in a different mode than the PHY in order to function.
>>>
>>> + phy-supply:
>>> + description: PHY regulator
>>> +
>>
>> Isn't this property of the PHY? Why would the Ethernet controller play
>> with a supply of a phy?
>
> Because this is the current state. Please check the all other MACs
> handling the phy-supply (if supported). Some of them handling it under
> the mdio-node (not the phy-node) but most bindings do specify this on
> MAC level (e.g. FEC, DWMAC (suni, rk)).
>
> I agree that the phy sould handle this but this would be a lot more
> effort and since the dwmac-sun8i/rk bindings do support this on MAC
> level I would keep it that way.

Indeed phy bindings do not allow a supply.

Best regards,
Krzysztof