From: Rob Herring <robh@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
"open list:ETHERNET PHY LIBRARY" <netdev@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
imx@lists.linux.dev
Subject: Re: [PATCH v3 1/1] dt-bindings: net: mdio: change nodename match pattern
Date: Thu, 15 Aug 2024 09:28:41 -0600 [thread overview]
Message-ID: <20240815152841.GA1903517-robh@kernel.org> (raw)
In-Reply-To: <20240814170322.4023572-1-Frank.Li@nxp.com>
On Wed, Aug 14, 2024 at 01:03:21PM -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.
>
> Also change node name mdio to mdio-0 in example of mdio-gpio.yaml to avoid
> warning.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Change from v2 to v3
> - update mdio-gpio.yaml node name mdio to mdio-0 to fix dt_binding_check
> error foud by rob's bot.
>
> 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#
>
> Change from v1 to v2
> - use rob's suggest to fix node name pattern.
> ---
> Documentation/devicetree/bindings/net/mdio-gpio.yaml | 2 +-
> Documentation/devicetree/bindings/net/mdio.yaml | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.yaml b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
> index eb4171a1940e4..3be4f94638e61 100644
> --- a/Documentation/devicetree/bindings/net/mdio-gpio.yaml
> +++ b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
> @@ -44,7 +44,7 @@ examples:
> mdio-gpio0 = &mdio0;
> };
>
> - mdio0: mdio {
Just 'mdio' should be accepted. There's a lot of those.
> + mdio0: mdio-0 {
> compatible = "virtual,mdio-gpio";
> #address-cells = <1>;
> #size-cells = <0>;
> 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]+))$'
Needs a '?' on the end:
'^mdio(-(bus|external))?(@.+|-([0-9]+))?$'
>
> "#address-cells":
> const: 1
> --
> 2.34.1
>
prev parent reply other threads:[~2024-08-15 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 17:03 [PATCH v3 1/1] dt-bindings: net: mdio: change nodename match pattern Frank Li
2024-08-15 15:28 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240815152841.GA1903517-robh@kernel.org \
--to=robh@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).