mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Lukasz Majewski <lukma@denx.de>
Cc: Conor Dooley <conor+dt@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	 davem@davemloft.net, imx@lists.linux.dev,
	 Richard Cochran <richardcochran@gmail.com>,
	netdev@vger.kernel.org,
	 Maxime Chevallier <maxime.chevallier@bootlin.com>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	Paolo Abeni <pabeni@redhat.com>,
	 Andrew Lunn <andrew+netdev@lunn.ch>,
	linux-arm-kernel@lists.infradead.org,
	 Shawn Guo <shawnguo@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	 linux-kernel@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	devicetree@vger.kernel.org,
	 Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH 0/5] net: mtip: Add support for MTIP imx287 L2 switch driver
Date: Tue, 25 Mar 2025 09:51:53 -0500	[thread overview]
Message-ID: <174291413928.2015590.6304239007146936808.robh@kernel.org> (raw)
In-Reply-To: <20250325115736.1732721-1-lukma@denx.de>


On Tue, 25 Mar 2025 12:57:31 +0100, Lukasz Majewski wrote:
> This patch series adds support for More Than IP's L2 switch driver embedded
> in some NXP's SoCs. This one has been tested on imx287, but is also available
> in the vf610.
> 
> In the past there has been performed some attempts to upstream this driver:
> 1. The 4.19-cip based one [1]
> 2. DSA based one for 5.12 [2] - i.e. the switch itself was treat as a DSA switch
>    with NO tag appended.
> 3. The extension for FEC driver for 5.12 [3] - the trick here was to fully reuse
>    FEC when the in-HW switching is disabled. When bridge offloading is enabled,
>    the driver uses already configured MAC and PHY to also configure PHY.
> 
> All three approaches were not accepted as eligible for upstreaming.
> 
> The driver from this series has floowing features:
> 
> 1. It is fully separated from fec_main - i.e. can be used interchangeable
>    with it. To be more specific - one can build them as modules and
>    if required switch between them when e.g. bridge offloading is required.
> 
>    To be more specific:
> 	- Use FEC_MAIN: When one needs support for two ETH ports with separate
> 	  uDMAs used for both and bridging can be realized in SW.
> 
> 	- Use MTIPL2SW: When it is enough to support two ports with only uDMA0
> 	  attached to switch and bridging shall be offloaded to HW.
> 
> 2. This driver uses MTIP's L2 switch internal VLAN feature to provide port
>    separation at boot time. Port separation is disabled when bridging is
>    required.
> 
> 3. Example usage:
> 	Configuration:
> 	ip link set lan0 up; sleep 1;
> 	ip link set lan1 up; sleep 1;
> 	ip link add name br0 type bridge;
> 	ip link set br0 up; sleep 1;
> 	ip link set lan0 master br0;
> 	ip link set lan1 master br0;
> 	bridge link;
> 	ip addr add 192.168.2.17/24 dev br0;
> 	ping -c 5 192.168.2.222
> 
> 	Removal:
> 	ip link set br0 down;
> 	ip link delete br0 type bridge;
> 	ip link set dev lan1 down
> 	ip link set dev lan0 down
> 
> 4. Limitations:
> 	- Driver enables and disables switch operation with learning and ageing.
> 	- Missing is the advanced configuration (e.g. adding entries to FBD). This is
> 	  on purpose, as up till now we didn't had consensus about how the driver
> 	  shall be added to Linux.
> 
> Links:
> [1] - https://github.com/lmajewski/linux-imx28-l2switch/commits/master
> [2] - https://github.com/lmajewski/linux-imx28-l2switch/tree/imx28-v5.12-L2-upstream-RFC_v1
> [3] - https://source.denx.de/linux/linux-imx28-l2switch/-/tree/imx28-v5.12-L2-upstream-switchdev-RFC_v1?ref_type=heads
> 
> 
> 
> Lukasz Majewski (5):
>   MAINTAINERS: Add myself as the MTIP L2 switch maintainer (IMX SoCs:
>     imx287)
>   dt-bindings: net: Add MTIP L2 switch description
>     (fec,mtip-switch.yaml)
>   arm: dts: Adjust the 'reg' range for imx287 L2 switch description
>   arm: dts: imx287: Provide description for MTIP L2 switch
>   net: mtip: The L2 switch driver for imx287
> 
>  .../bindings/net/fec,mtip-switch.yaml         |  160 ++
>  MAINTAINERS                                   |    7 +
>  arch/arm/boot/dts/nxp/mxs/imx28-xea.dts       |   56 +
>  arch/arm/boot/dts/nxp/mxs/imx28.dtsi          |    4 +-
>  drivers/net/ethernet/freescale/Kconfig        |    1 +
>  drivers/net/ethernet/freescale/Makefile       |    1 +
>  drivers/net/ethernet/freescale/mtipsw/Kconfig |   10 +
>  .../net/ethernet/freescale/mtipsw/Makefile    |    6 +
>  .../net/ethernet/freescale/mtipsw/mtipl2sw.c  | 2108 +++++++++++++++++
>  .../net/ethernet/freescale/mtipsw/mtipl2sw.h  |  784 ++++++
>  .../ethernet/freescale/mtipsw/mtipl2sw_br.c   |  113 +
>  .../ethernet/freescale/mtipsw/mtipl2sw_mgnt.c |  434 ++++
>  12 files changed, 3682 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/fec,mtip-switch.yaml
>  create mode 100644 drivers/net/ethernet/freescale/mtipsw/Kconfig
>  create mode 100644 drivers/net/ethernet/freescale/mtipsw/Makefile
>  create mode 100644 drivers/net/ethernet/freescale/mtipsw/mtipl2sw.c
>  create mode 100644 drivers/net/ethernet/freescale/mtipsw/mtipl2sw.h
>  create mode 100644 drivers/net/ethernet/freescale/mtipsw/mtipl2sw_br.c
>  create mode 100644 drivers/net/ethernet/freescale/mtipsw/mtipl2sw_mgnt.c
> 
> --
> 2.39.5
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y for arch/arm/boot/dts/nxp/' for 20250325115736.1732721-1-lukma@denx.de:

arch/arm/boot/dts/nxp/mxs/imx28-xea.dtb: /ahb@80080000/switch@800f0000: failed to match any schema with compatible: ['fsl,imx287-mtip-switch']
arch/arm/boot/dts/nxp/imx/imx6q-tx6q-1110.dtb: /lvds1-panel: failed to match any schema with compatible: ['nlt,nl12880bc20-spwg-24']






      parent reply	other threads:[~2025-03-25 14:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 11:57 Lukasz Majewski
2025-03-25 11:57 ` [PATCH 1/5] MAINTAINERS: Add myself as the MTIP L2 switch maintainer (IMX SoCs: imx287) Lukasz Majewski
2025-03-25 12:01   ` Krzysztof Kozlowski
2025-03-25 12:15     ` Lukasz Majewski
2025-03-25 11:57 ` [PATCH 2/5] dt-bindings: net: Add MTIP L2 switch description (fec,mtip-switch.yaml) Lukasz Majewski
2025-03-25 12:04   ` Krzysztof Kozlowski
2025-03-25 12:15     ` Lukasz Majewski
2025-03-25 12:24       ` Krzysztof Kozlowski
2025-03-25 12:39         ` Lukasz Majewski
2025-03-25 12:43           ` Krzysztof Kozlowski
2025-03-25 14:27             ` Lukasz Majewski
2025-03-25 13:25   ` Rob Herring (Arm)
2025-03-25 15:05   ` Andrew Lunn
2025-03-25 15:11     ` Krzysztof Kozlowski
2025-03-25 16:12     ` Lukasz Majewski
2025-03-26 13:43     ` Lukasz Majewski
2025-03-26 14:15       ` Krzysztof Kozlowski
2025-03-26 15:24       ` Andrew Lunn
2025-03-25 11:57 ` [PATCH 3/5] arm: dts: Adjust the 'reg' range for imx287 L2 switch description Lukasz Majewski
2025-03-25 12:04   ` Krzysztof Kozlowski
2025-03-25 12:19     ` Lukasz Majewski
2025-03-25 11:57 ` [PATCH 4/5] arm: dts: imx287: Provide description for MTIP L2 switch Lukasz Majewski
2025-03-25 15:14   ` Andrew Lunn
2025-03-25 16:16     ` Lukasz Majewski
2025-03-25 11:57 ` [PATCH 5/5] net: mtip: The L2 switch driver for imx287 Lukasz Majewski
2025-03-25 12:11   ` Krzysztof Kozlowski
2025-03-25 13:28     ` Lukasz Majewski
2025-03-25 14:36       ` Krzysztof Kozlowski
2025-03-25 15:34       ` Andrew Lunn
2025-03-25 16:38         ` Lukasz Majewski
2025-03-25 17:13           ` Krzysztof Kozlowski
2025-03-25 17:30             ` Lukasz Majewski
2025-03-25 14:51 ` Rob Herring (Arm) [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=174291413928.2015590.6304239007146936808.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukma@denx.de \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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®