From: Krzysztof Kozlowski <krzk@kernel.org>
To: Corentin Guillevic <corentin.guillevic@smile.fr>,
Woojung Huh <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Marek Vasut <marex@denx.de>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: net: dsa: microchip: add bit-banged SMI example
Date: Mon, 2 Jun 2025 21:53:17 +0200 [thread overview]
Message-ID: <a5028d5a-cc93-4ece-bff5-16990a7de2e3@kernel.org> (raw)
In-Reply-To: <20250602170458.125549-1-corentin.guillevic@smile.fr>
On 02/06/2025 19:04, Corentin Guillevic wrote:
> KSZ8863 can be configured using I2C, SPI or Microchip SMI. The latter is
> similar to MDIO, but uses a different protocol. If the hardware doesn't
> support this, SMI bit banging can help. This commit adds an device tree
> example that uses the CONFIG_MDIO_GPIO driver for SMI bit banging.
So the difference is in one property? Or no difference at all...
>
> Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
> ---
> Changes in v2:
> - Fix dt_binding_check errors
>
> .../bindings/net/dsa/microchip,ksz.yaml | 59 ++++++++++++++++++-
> 1 file changed, 58 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> index 62ca63e8a26f..33a067809ebe 100644
> --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> @@ -241,4 +241,61 @@ examples:
> };
> };
> };
> -...
> +
> + # KSZ8863 with bit-banged SMI
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + // Ethernet switch connected via SMI to the host, CPU port wired to eth0:
> + ethernet0 {
Drop node, not really used.
> + phy-mode = "rmii";
> +
> + fixed-link {
> + speed = <100>;
> + full-duplex;
> + pause;
> + };
> + };
> +
> + mdio: mdio {
> + #address-cells = <1>;
> + #size-cells = <0>;
Order properties according to DTS coding style.
> + compatible = "microchip,mdio-smi0";
Not relevant. This binding describes device, not bus.
> + gpios = <&gpioc 1 GPIO_ACTIVE_HIGH>,
> + <&gpioa 2 GPIO_ACTIVE_HIGH>;
Messed indentation
> + status = "okay";
Drop status
but anyway all above is not really relevant, drop.
> +
> + switch@0 {
> + compatible = "microchip,ksz8863";
> + reg = <0>;
> + reset-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>;
> + status = "okay";
Drop.
After cleanup from redundant pieces there is basically no difference.
Don't add examples which differ by compatible (or even by one property).
Best regards,
Krzysztof
prev parent reply other threads:[~2025-06-02 19:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 17:04 Corentin Guillevic
2025-06-02 19:53 ` Krzysztof Kozlowski [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=a5028d5a-cc93-4ece-bff5-16990a7de2e3@kernel.org \
--to=krzk@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=corentin.guillevic@smile.fr \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=woojung.huh@microchip.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
all inboxes | Powered by JetHome®