* [PATCH net-next] dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required
@ 2023-11-13 20:40 Fabio Estevam
2023-11-13 21:51 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2023-11-13 20:40 UTC (permalink / raw)
To: kuba
Cc: davem, edumazet, pabeni, robh+dt, krzysztof.kozlowski+dt,
conor+dt, netdev, devicetree, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
The property 'phy-connection-type' can also be used to describe
the interface type between the Ethernet device and the Ethernet PHY
device.
Mark 'phy-mode' as a non required property.
This fixes the following schema warning:
imx8mp-debix-model-a.dtb: ethernet@30bf0000: 'phy-mode' is a required property
from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 5c2769dc689a..6c0d9e694d76 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -505,6 +505,10 @@ properties:
required:
- compatible
+ phy-connection-type: true
+
+ phy-mode: true
+
stmmac-axi-config:
type: object
unevaluatedProperties: false
@@ -564,7 +568,6 @@ required:
- reg
- interrupts
- interrupt-names
- - phy-mode
dependencies:
snps,reset-active-low: ["snps,reset-gpio"]
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required
2023-11-13 20:40 [PATCH net-next] dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required Fabio Estevam
@ 2023-11-13 21:51 ` Andrew Lunn
2023-11-13 22:03 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2023-11-13 21:51 UTC (permalink / raw)
To: Fabio Estevam
Cc: kuba, davem, edumazet, pabeni, robh+dt, krzysztof.kozlowski+dt,
conor+dt, netdev, devicetree, Fabio Estevam
On Mon, Nov 13, 2023 at 05:40:52PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> The property 'phy-connection-type' can also be used to describe
> the interface type between the Ethernet device and the Ethernet PHY
> device.
>
> Mark 'phy-mode' as a non required property.
Hi Fabio
What does the driver actually require? Will it error out if neither is
provided?
Maybe we should be changing the condition that one or the other is
required?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required
2023-11-13 21:51 ` Andrew Lunn
@ 2023-11-13 22:03 ` Florian Fainelli
2023-11-13 22:23 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2023-11-13 22:03 UTC (permalink / raw)
To: Andrew Lunn, Fabio Estevam
Cc: kuba, davem, edumazet, pabeni, robh+dt, krzysztof.kozlowski+dt,
conor+dt, netdev, devicetree, Fabio Estevam
On 11/13/23 13:51, Andrew Lunn wrote:
> On Mon, Nov 13, 2023 at 05:40:52PM -0300, Fabio Estevam wrote:
>> From: Fabio Estevam <festevam@denx.de>
>>
>> The property 'phy-connection-type' can also be used to describe
>> the interface type between the Ethernet device and the Ethernet PHY
>> device.
>>
>> Mark 'phy-mode' as a non required property.
>
> Hi Fabio
>
> What does the driver actually require? Will it error out if neither is
> provided?
>
> Maybe we should be changing the condition that one or the other is
> required?
'phy-connection-type' is the deprecated version of 'phy-mode' which
of_get_phy_mode() will fall back to if 'phy-mode' is not provided. It
does not appear that stmmac attempts to use anything other than
of_get_phy_mode() therefore would not it be acceptable to update the
relevant .dts file such that it uses 'phy-mode'?
That really should not have a functional impact given that
of_get_phy_mode() has worked that way for a while.
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required
2023-11-13 22:03 ` Florian Fainelli
@ 2023-11-13 22:23 ` Andrew Lunn
2023-11-13 22:55 ` Fabio Estevam
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2023-11-13 22:23 UTC (permalink / raw)
To: Florian Fainelli
Cc: Fabio Estevam, kuba, davem, edumazet, pabeni, robh+dt,
krzysztof.kozlowski+dt, conor+dt, netdev, devicetree,
Fabio Estevam
On Mon, Nov 13, 2023 at 02:03:00PM -0800, Florian Fainelli wrote:
> On 11/13/23 13:51, Andrew Lunn wrote:
> > On Mon, Nov 13, 2023 at 05:40:52PM -0300, Fabio Estevam wrote:
> > > From: Fabio Estevam <festevam@denx.de>
> > >
> > > The property 'phy-connection-type' can also be used to describe
> > > the interface type between the Ethernet device and the Ethernet PHY
> > > device.
> > >
> > > Mark 'phy-mode' as a non required property.
> >
> > Hi Fabio
> >
> > What does the driver actually require? Will it error out if neither is
> > provided?
> >
> > Maybe we should be changing the condition that one or the other is
> > required?
Hi Florian
> 'phy-connection-type' is the deprecated version of 'phy-mode'
I thought that too, but
Documentation/devicetree/bindings/net/ethernet-controller.yaml does
not mark it deprecated.
The original .txt file has a different wording:
- phy-mode: string, operation mode of the PHY interface. This is now a de-facto
standard property; supported values are:
* "internal" (Internal means there is not a standard bus between the MAC and
the PHY, something proprietary is being used to embed the PHY in the MAC.)
* "mii"
* "gmii"
- phy-connection-type: the same as "phy-mode" property but described in the
Devicetree Specification;
So it could technically be we cannot deprecate phy-connection-type
because it is part of the standard, and we need to accept it.
> which
> of_get_phy_mode() will fall back to if 'phy-mode' is not provided. It does
> not appear that stmmac attempts to use anything other than of_get_phy_mode()
> therefore would not it be acceptable to update the relevant .dts file such
> that it uses 'phy-mode'?
Using phy-mode would be more consistent, since its used > 10x more
than phy-connection-type.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required
2023-11-13 22:23 ` Andrew Lunn
@ 2023-11-13 22:55 ` Fabio Estevam
0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2023-11-13 22:55 UTC (permalink / raw)
To: Andrew Lunn
Cc: Florian Fainelli, kuba, davem, edumazet, pabeni, robh+dt,
krzysztof.kozlowski+dt, conor+dt, netdev, devicetree,
Fabio Estevam
Hi Andrew and Florian,
On Mon, Nov 13, 2023 at 7:23 PM Andrew Lunn <andrew@lunn.ch> wrote:
> Using phy-mode would be more consistent, since its used > 10x more
> than phy-connection-type.
Thanks for the suggestion. I will change the dts to use phy-mode then.
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-13 22:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 20:40 [PATCH net-next] dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required Fabio Estevam
2023-11-13 21:51 ` Andrew Lunn
2023-11-13 22:03 ` Florian Fainelli
2023-11-13 22:23 ` Andrew Lunn
2023-11-13 22:55 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).