* [PATCH v2 1/1] dt-bindings: net: mdio: change nodename match pattern
@ 2024-08-13 15:06 Frank Li
2024-08-13 16:28 ` Rob Herring (Arm)
0 siblings, 1 reply; 2+ messages in thread
From: Frank Li @ 2024-08-13 15:06 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
open list:ETHERNET PHY LIBRARY,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Cc: imx
Change mdio.yaml nodename match pattern to
'^mdio(-(bus|external))?(@.+|-([0-9]+))$'
Fix mdio.yaml wrong parser mdio controller's address instead phy's address
when mdio-mux exist.
For example:
mdio-mux-emi1@54 {
compatible = "mdio-mux-mmioreg", "mdio-mux";
mdio@20 {
reg = <0x20>;
^^^ This is mdio controller register
ethernet-phy@2 {
reg = <0x2>;
^^^ This phy's address
};
};
};
Only phy's address is limited to 31 because MDIO bus definition.
But CHECK_DTBS report below warning:
arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: mdio-mux-emi1@54:
mdio@20:reg:0:0: 32 is greater than the maximum of 31
The reason is that "mdio-mux-emi1@54" match "nodename: '^mdio(@.*)?'" in
mdio.yaml.
Change to '^mdio(-(bus|external))?(@.+|-([0-9]+))$' to avoid wrong match
mdio mux controller's node.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Change from v1 to v2
- use rob's suggest to fix node name pattern.
---
Documentation/devicetree/bindings/net/mdio.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/mdio.yaml b/Documentation/devicetree/bindings/net/mdio.yaml
index a266ade918ca7..2ed787e4fbbf2 100644
--- a/Documentation/devicetree/bindings/net/mdio.yaml
+++ b/Documentation/devicetree/bindings/net/mdio.yaml
@@ -19,7 +19,7 @@ description:
properties:
$nodename:
- pattern: "^mdio(@.*)?"
+ pattern: '^mdio(-(bus|external))?(@.+|-([0-9]+))$'
"#address-cells":
const: 1
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v2 1/1] dt-bindings: net: mdio: change nodename match pattern
2024-08-13 15:06 [PATCH v2 1/1] dt-bindings: net: mdio: change nodename match pattern Frank Li
@ 2024-08-13 16:28 ` Rob Herring (Arm)
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring (Arm) @ 2024-08-13 16:28 UTC (permalink / raw)
To: Frank Li
Cc: Paolo Abeni, Andrew Lunn, devicetree, Jakub Kicinski,
linux-kernel, Krzysztof Kozlowski, Eric Dumazet, imx, netdev,
Florian Fainelli, Conor Dooley, Heiner Kallweit, David S. Miller,
Russell King
On Tue, 13 Aug 2024 11:06:14 -0400, Frank Li wrote:
> Change mdio.yaml nodename match pattern to
> '^mdio(-(bus|external))?(@.+|-([0-9]+))$'
>
> Fix mdio.yaml wrong parser mdio controller's address instead phy's address
> when mdio-mux exist.
>
> For example:
> mdio-mux-emi1@54 {
> compatible = "mdio-mux-mmioreg", "mdio-mux";
>
> mdio@20 {
> reg = <0x20>;
> ^^^ This is mdio controller register
>
> ethernet-phy@2 {
> reg = <0x2>;
> ^^^ This phy's address
> };
> };
> };
>
> Only phy's address is limited to 31 because MDIO bus definition.
>
> But CHECK_DTBS report below warning:
>
> arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: mdio-mux-emi1@54:
> mdio@20:reg:0:0: 32 is greater than the maximum of 31
>
> The reason is that "mdio-mux-emi1@54" match "nodename: '^mdio(@.*)?'" in
> mdio.yaml.
>
> Change to '^mdio(-(bus|external))?(@.+|-([0-9]+))$' to avoid wrong match
> mdio mux controller's node.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Change from v1 to v2
> - use rob's suggest to fix node name pattern.
> ---
> Documentation/devicetree/bindings/net/mdio.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/mdio-gpio.example.dtb: mdio: $nodename:0: 'mdio' does not match '^mdio(-(bus|external))?(@.+|-([0-9]+))$'
from schema $id: http://devicetree.org/schemas/net/mdio-gpio.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240813150615.3866759-1-Frank.Li@nxp.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-13 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-13 15:06 [PATCH v2 1/1] dt-bindings: net: mdio: change nodename match pattern Frank Li
2024-08-13 16:28 ` Rob Herring (Arm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®