dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required
Subsystems (3)
PATCH 1/1 dt-bindings: net: snps,dwmac: Do not make 'phy-mode' required
From: Fabio Estevam <[email protected]>
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#
--- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/snps,dwmac.yaml +4 -1
@@ -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"]
Signature · 1 line
2.34.1
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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
Quoted 9 lines · Andrew Lunn
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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.
Quoted 7 lines
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.
Signature · 1 line
Florian
Quoted 10 lines · Florian Fainelli
Quoted 9 lines · Andrew Lunn
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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.
Quoted 7 lines
Quoted 7 lines
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
Quoted 1 line
'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.
Quoted 5 lines
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 thanof_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
Hi Andrew and Florian,
Quoted 2 lines · Andrew Lunn
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