Thread (17 messages) 17 messages, 4 authors, 2021-03-25

Re: [PATCHv1 1/6] dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy compatible string

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-03-25 12:58:24
Also in: linux-amlogic, linux-devicetree, netdev

On Thu, Mar 25, 2021 at 12:42:20PM +0000, Anand Moon wrote:
Fix the parsing of check of pattern ethernet-phy-ieee802.3 used
by the device tree to initialize the mdio phy.

As per the of_mdio below 2 are valid compatible string
	"ethernet-phy-ieee802.3-c22"
	"ethernet-phy-ieee802.3-c45"
Nope, this is not the full story. Yes, you can have these compatible
strings. But you can also use the PHY ID,
e.g. ethernet-phy-idAAAA.BBBB, where AAAA and BBBB are what you find in
registers 2 and 3 of the PHY.
quoted hunk ↗ jump to hunk
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Anand Moon <redacted>
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 2766fe45bb98..cfc7909d3e56 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -33,7 +33,7 @@ properties:
         description: PHYs that implement IEEE802.3 clause 22
       - const: ethernet-phy-ieee802.3-c45
         description: PHYs that implement IEEE802.3 clause 45
-      - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
+      - pattern: "^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$"
So here you need, in addition to, not instead of.

Please test you change on for example imx6ul-14x14-evk.dtsi

   Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help