The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Benedikt Spranger <b.spranger@linutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Vasilij Strassheim <v.strassheim@linutronix.de>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	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>,
	Simon Horman <horms@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org,
	Martin Kaistra <martin.kaistra@linutronix.de>
Subject: Re: [PATCH 2/4] dt-bindings: net: dsa: Add SoC-e switch IP and DSA bindings
Date: Thu, 6 Aug 2026 17:25:41 +0200	[thread overview]
Message-ID: <20260806172541.009f1295@mitra> (raw)
In-Reply-To: <b47e0589-a3a2-4f88-ba90-72d176efccd3@lunn.ch>

On Thu, 6 Aug 2026 15:35:36 +0200
Andrew Lunn <andrew@lunn.ch> wrote:

> > The minimal IP core is an unmanaged switch. No need for a DSA driver
> > here. The IP core profides a MDIO bus, therefor a MDIO driver would
> > be good. The version register in combination with some feature
> > register can be determined to get the needed information to
> > configure the DSA driver, or in the minimal case to return -ENODEV.
 
> I think you misunderstood my comment. I expect the MDIO bus is part of
> the licensed core.
OK, I did the second step, but the first was not clear, so lets do some
ASCII art:

                     ---------
               S_AXI |   S   | port_0_gmii
              clk_in |   W   |     ...
               reset |   I   | port_N_gmii
           IP_enable |   T   |
default_op_mode[4:0] |   C   |
         port_0_link |   H   | port_0_phy_rst_n
             ...     |       |     ...
         port_N_link |   I   | port_N_phy_rst_n
          S_AXI_ACLK |   P   |
       S_AXI_ARESETN |       |
                     ---------

The switch is connected through an AXI Stream interface i.e. the memory
interface ==> Device Tree binding needed (Base Register)
Other AXI related signals are hiden and need no device tree
representation.

The switch has one mandatory and 6 optional clocks:
1. System Clock / clk_in (mandatory)
2. AXI4 Lite Clock
3. AXI Stream Clock
4. port_x_ref_rmii_clk
5. PHY RX Clock
6. PHY TX Clock
7. Port_x MDC

Here are all Device Tree bindings optional, since the mandatory clock
can be provided by some not exposed internal clock signal as in our
case and the other clocks are optional.

GMII ports ==> The ports are defined by the DSA bindings.

reset ==> optional GPIO device tree binding

IP_enable ==> optional GPIO device tree binding

default_op_mode ==> optional GPIO device tree bindings

port_x_link and port_x_phy_rst_n are signals to the PHY ==> mdio device
tree binding.

> So when you take your FPGA design, and delete the
> licensed part, that disappears as well. When you delete the licensed
> part, you should have a big hole in the middle of the design, leaving
> just what surrounds the switch. That is that logical? Clock dividers?
See above; hope that helps.

> Logic to map the switch registers to MMIO, so maybe a PCIe device
> core?
The AXI bus may connected to an PCIe bridge for example. In our case it
is connected directly to the SoC ARM core.

> Does any of this surrounding logic need software?
In our case: No.

> If it does, that is probably specific to your design, and needs a
> compatible which covers both the licensed switch core, and the
> surrounding design specific logic.

In our case the clocks are routed to fixed clocks, which have no device
tree representation. reset , IP_enable and default_op_mode are an fixed
levels.

Therefore no need for a detailed compatible string and no optional
device tree properties. Clean and simple *knock on wood*

Regards
    Bene

  reply	other threads:[~2026-08-06 15:25 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 16:36 [PATCH 0/4] net: dsa: Add SoC-e DSA driver Vasilij Strassheim
2026-07-29 16:36 ` [PATCH 1/4] dt-bindings: vendor-prefixes: Add soce Vasilij Strassheim
2026-07-30  8:50   ` Krzysztof Kozlowski
2026-08-03 16:03     ` Vasilij Strassheim
2026-07-29 16:36 ` [PATCH 2/4] dt-bindings: net: dsa: Add SoC-e switch IP and DSA bindings Vasilij Strassheim
2026-07-29 17:11   ` Andrew Lunn
2026-08-03 15:29     ` Vasilij Strassheim
2026-08-03 16:35       ` Andrew Lunn
2026-08-05 12:33         ` Vasilij Strassheim
2026-07-29 18:07   ` Rob Herring (Arm)
2026-08-03 15:47     ` Vasilij Strassheim
2026-07-30  8:56   ` Krzysztof Kozlowski
2026-08-03 16:15     ` Vasilij Strassheim
2026-08-03 16:43       ` Andrew Lunn
2026-08-05 12:40         ` Vasilij Strassheim
2026-08-05 12:53           ` Andrew Lunn
2026-08-05 13:17             ` Vasilij Strassheim
2026-08-05 13:32         ` Benedikt Spranger
2026-08-05 13:53           ` Andrew Lunn
2026-08-05 14:27             ` Benedikt Spranger
2026-08-06 13:35               ` Andrew Lunn
2026-08-06 15:25                 ` Benedikt Spranger [this message]
2026-08-04  6:25       ` Krzysztof Kozlowski
2026-08-05 13:03         ` Vasilij Strassheim
2026-07-30  8:56   ` Krzysztof Kozlowski
2026-08-03 16:16     ` Vasilij Strassheim
2026-07-29 16:36 ` [PATCH 3/4] net: dsa: Add support for SoC-e SDSA tags Vasilij Strassheim
2026-07-29 17:22   ` Andrew Lunn
2026-08-03 15:37     ` Vasilij Strassheim
2026-08-03 16:46       ` Andrew Lunn
2026-08-05 12:47         ` Vasilij Strassheim
2026-07-29 16:36 ` [PATCH 4/4] net: dsa: soce: Add initial driver support for MRS switches Vasilij Strassheim
2026-07-29 17:31   ` Andrew Lunn
2026-08-03 15:40     ` Vasilij Strassheim
2026-07-29 20:05   ` Andrew Lunn
2026-08-03 16:01     ` Vasilij Strassheim
2026-08-03 16:49       ` Andrew Lunn
2026-08-05 12:48         ` Vasilij Strassheim
2026-07-30  9:01   ` Krzysztof Kozlowski
2026-08-03 16:23     ` Vasilij Strassheim
2026-07-29 16:56 ` [PATCH 0/4] net: dsa: Add SoC-e DSA driver Andrew Lunn
2026-08-03 15:22   ` Vasilij Strassheim
2026-08-03 16:32     ` Andrew Lunn
2026-08-05 12:28       ` Vasilij Strassheim

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=20260806172541.009f1295@mitra \
    --to=b.spranger@linutronix.de \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=martin.kaistra@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=v.strassheim@linutronix.de \
    /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