From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Camel Guo <camel.guo@axis.com>, Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Vivien Didelot <vivien.didelot@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Rob Herring <robh@kernel.org>,
kernel@axis.com
Subject: Re: [RFC net-next 1/2] dt-bindings: net: dsa: add bindings for GSW Series switches
Date: Tue, 25 Oct 2022 10:27:50 -0400 [thread overview]
Message-ID: <16aac887-232a-7141-cc65-eab19c532592@linaro.org> (raw)
In-Reply-To: <20221025135243.4038706-2-camel.guo@axis.com>
On 25/10/2022 09:52, Camel Guo wrote:
> Add documentation and an example for Maxlinear's GSW Series Ethernet
> switches.
>
> Signed-off-by: Camel Guo <camel.guo@axis.com>
> ---
> .../devicetree/bindings/net/dsa/mxl,gsw.yaml | 140 ++++++++++++++++++
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> MAINTAINERS | 6 +
> 3 files changed, 148 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml b/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml
> new file mode 100644
> index 000000000000..8e124b7ec58c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/mxl,gsw.yaml
Filename based on compatible, so mxl,gsw145-mdio.yaml. But see below.
> @@ -0,0 +1,140 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/dsa/mxl,gsw.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxlinear GSW Series Switch Device Tree Bindings
Drop "Device Tree Bindings"
> +
> +allOf:
> + - $ref: dsa.yaml#
> +
> +maintainers:
> + - Camel Guo <camel.guo@axis.com>
> +
> +description:
> + The Maxlinear's GSW Series Ethernet Switch is a highly integrated, low-power,
> + non-blocking Gigabit Ethernet Switch.
> +
> +properties:
> + compatible:
> + oneOf:
You do not have multiple choices, so no need for oneOf
> + - enum:
> + - mxl,gsw145-mdio
Why "mdio" suffix?
> +
> + reg:
> + maxItems: 1
> +
> + mdio:
> + type: object
> +
> + description:
> + Container of ethernet phy devices on the MDIO bus of GSW switch
> +
> + properties:
> + '#address-cells':
> + const: 1
> + '#size-cells':
> + const: 0
> +
> + allOf:
No need for allOf
> + - $ref: "http://devicetree.org/schemas/net/ethernet-phy.yaml#"
That's not an URL. Open other schemas using ethernet-phy and check how
they are doing.
You miss:
unevaluatedProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - mdio
> +
> +additionalProperties: true
This cannot be true. Again - open existing bindings and do like they are
doing, not differently.
You wanted here unevaluatedProperties: false.
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + mdio {
Hmmm... switch with MDIO is part of MDIO?
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + switch@0 {
> + compatible = "mxl,gsw145-mdio";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x0>;
reg is a second property
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-10-25 14:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 13:52 [RFC net-next 0/2] DSA driver draft for MaxLinear's gsw1xx series switch Camel Guo
2022-10-25 13:52 ` [RFC net-next 1/2] dt-bindings: net: dsa: add bindings for GSW Series switches Camel Guo
2022-10-25 14:27 ` Krzysztof Kozlowski [this message]
2022-10-25 15:01 ` Andrew Lunn
2022-10-25 19:00 ` Krzysztof Kozlowski
[not found] ` <d0179725-0730-5826-caa4-228469d3bad4@axis.com>
2022-10-27 12:46 ` Krzysztof Kozlowski
2022-10-27 13:57 ` Vladimir Oltean
2022-10-27 16:08 ` Krzysztof Kozlowski
2022-10-27 16:12 ` Vladimir Oltean
2022-10-25 20:05 ` Rob Herring
2022-10-27 15:41 ` Vladimir Oltean
2022-10-25 13:52 ` [RFC net-next 2/2] net: dsa: Add driver for Maxlinear GSW1XX switch Camel Guo
2022-10-25 14:23 ` Krzysztof Kozlowski
2022-10-25 14:56 ` Andrew Lunn
2022-10-27 6:35 ` Camel Guo
2022-10-27 12:09 ` Andrew Lunn
[not found] ` <55da4718-4422-745a-8880-95adc8e0abd9@axis.com>
2022-10-27 12:48 ` Krzysztof Kozlowski
2022-10-25 14:53 ` Andrew Lunn
[not found] ` <a04fc8bd-e18e-c300-8300-7cba8fe33557@axis.com>
2022-10-27 12:20 ` Andrew Lunn
2022-10-27 16:00 ` Vladimir Oltean
2022-10-28 4:41 ` Arun.Ramadoss
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=16aac887-232a-7141-cc65-eab19c532592@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=andrew@lunn.ch \
--cc=camel.guo@axis.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@axis.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=vivien.didelot@gmail.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