Devicetree
 help / color / mirror / Atom feed
From: Clement Leger <clement.leger@linux.dev>
To: Prabhakar <prabhakar.csengg@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	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>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Willem de Bruijn <willemb@google.com>,
	Simon Horman <horms@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org,
	Prabhakar <prabhakar.csengg+renesas@gmail.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH net-next v6 15/15] net: dsa: rzn1-a5psw: Add support for RZ/T2H Ethernet switch
Date: Wed, 2 Dec 2026 10:38:37 +0100	[thread overview]
Message-ID: <f7ffbf33-edd6-4643-ba7c-e8c3f77f4687@linux.dev> (raw)
In-Reply-To: <20261202093357.15693-16-prabhakar.mahadev-lad.rj@bp.renesas.com>



On 12/2/26 10:33, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Add OF match data for the Ethernet switch (ETHSW) found on the Renesas
> RZ/T2H SoC. The ETHSW is based on the same A5PSW IP as the RZ/N1, but
> has a different port configuration and register layout.
> 
> Configure the driver for the RZ/T2H variant with:
> - 4 ports (3 external and 1 management), with the management port
>    at port 3.
> - DSA_TAG_PROTO_RZT2H_ETHSW tagging protocol.
> - A fixed management port frame length of 0x3fff.
> - Pattern matcher register offsets of 0x3f00 and 0x3f40.
> - VLAN_RES fields using VLANID[15:4] and PORTMASK[3:0].
> - 4096 lookup table entries.
> - Keep MAC TX enabled, gating transmission through PORT_ENA.TXENA.
> 
> Add the renesas,r9a09g077-ethsw compatible string to the OF match
> table. The RZ/N2H SoC uses this compatible as a fallback.
> 
> Update the Kconfig prompt and help text to reflect support for the
> RZ/T2H and RZ/N2H ETHSW variants.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v6:
>    - Squashed patches #21 and #24 to limit the number of patches in the series
>    - Updated commit message
> v5: https://lore.kernel.org/all/20261120002549.1908299-24-prabhakar.mahadev-lad.rj@bp.renesas.com/
>      https://lore.kernel.org/all/20261120002549.1908299-25-prabhakar.mahadev-lad.rj@bp.renesas.com/
>      https://lore.kernel.org/all/20261120002549.1908299-22-prabhakar.mahadev-lad.rj@bp.renesas.com/
>    - No change
> v4: https://lore.kernel.org/all/20261104182105.1102555-14-prabhakar.mahadev-lad.rj@bp.renesas.com/
>    - No change
> v3: https://lore.kernel.org/all/20261014131906.990077-13-prabhakar.mahadev-lad.rj@bp.renesas.com/
>    - No change
> v2: https://lore.kernel.org/all/20261001154326.754314-12-prabhakar.mahadev-lad.rj@bp.renesas.com/
>    - Added reviewed-by tag
> v1: https://lore.kernel.org/all/20251121113553.2955854-11-prabhakar.mahadev-lad.rj@bp.renesas.com/
> ---
>   drivers/net/dsa/Kconfig      |  9 +++++----
>   drivers/net/dsa/rzn1_a5psw.c | 20 ++++++++++++++++++--
>   2 files changed, 23 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
> index d62f0cccf13d..5af8bc1a4dce 100644
> --- a/drivers/net/dsa/Kconfig
> +++ b/drivers/net/dsa/Kconfig
> @@ -103,13 +103,14 @@ source "drivers/net/dsa/xrs700x/Kconfig"
>   source "drivers/net/dsa/realtek/Kconfig"
>   
>   config NET_DSA_RZN1_A5PSW
> -	tristate "Renesas RZ/N1 A5PSW Ethernet switch support"
> -	depends on OF && (ARCH_RZN1 || COMPILE_TEST)
> +	tristate "Renesas RZ/N1 A5PSW and RZ/{T2H,N2H} ETHSW Ethernet switch support"
> +	depends on OF && (ARCH_RENESAS || COMPILE_TEST)
>   	select NET_DSA_TAG_RZN1_A5PSW
>   	select PCS_RZN1_MIIC
>   	help
> -	  This driver supports the A5PSW switch, which is embedded in Renesas
> -	  RZ/N1 SoC.
> +	  This driver supports the Advanced 5-Port Switch (A5PSW) found on
> +	  Renesas RZ/N1 SoCs, and the Ethernet Switch (ETHSW) found on
> +	  Renesas RZ/T2H and RZ/N2H SoCs.
>   
>   config NET_DSA_KS8995
>   	tristate "Micrel KS8995 family 5-ports 10/100 Ethernet switches"
> diff --git a/drivers/net/dsa/rzn1_a5psw.c b/drivers/net/dsa/rzn1_a5psw.c
> index e4fd4425f52e..3114268e009c 100644
> --- a/drivers/net/dsa/rzn1_a5psw.c
> +++ b/drivers/net/dsa/rzn1_a5psw.c
> @@ -272,8 +272,9 @@ static void a5psw_phylink_get_caps(struct dsa_switch *ds, int port,
>   	config->mac_capabilities = MAC_1000FD;
>   
>   	if (dsa_is_cpu_port(ds, port)) {
> -		/* GMII is used internally and GMAC2 is connected to the switch
> -		 * using 1000Mbps Full-Duplex mode only (cf ethernet manual)
> +		/* GMII is used internally and the conduit GMAC (GMAC2 on RZ/N1,
> +		 * GMAC0 on RZ/T2H and RZ/N2H) is connected to the switch using
> +		 * 1000Mbps Full-Duplex mode only (cf ethernet manual)
>   		 */
>   		__set_bit(PHY_INTERFACE_MODE_GMII, intf);
>   	} else {
> @@ -1410,6 +1411,20 @@ static void a5psw_shutdown(struct platform_device *pdev)
>   	platform_set_drvdata(pdev, NULL);
>   }
>   
> +static const struct a5psw_of_data rzt2h_of_data = {
> +	.nports = 4,
> +	.npcs = 3,
> +	.cpu_port = 3,
> +	.tag_proto = DSA_TAG_PROTO_RZT2H_ETHSW,
> +	.management_port_fixed_frame_len = 0x3fff,
> +	.rxmatch_config_base = 0x3f00,
> +	.pattern_ctrl_base = 0x3f40,
> +	.vlan_res_vlanid = GENMASK(15, 4),
> +	.vlan_res_portmask = GENMASK(3, 0),
> +	.lk_table_entries = 4096,
> +	.keep_mac_tx_enabled = true,
> +};
> +
>   static const struct a5psw_of_data rzn1_of_data = {
>   	.nports = 5,
>   	.npcs = 4,
> @@ -1423,6 +1438,7 @@ static const struct a5psw_of_data rzn1_of_data = {
>   };
>   
>   static const struct of_device_id a5psw_of_mtable[] = {
> +	{ .compatible = "renesas,r9a09g077-ethsw", .data = &rzt2h_of_data },
>   	{ .compatible = "renesas,rzn1-a5psw", .data = &rzn1_of_data },
>   	{ /* sentinel */ }
>   };

Hi Prabhakar,

Reviewed-by: Clément Léger <clement.leger@linux.dev>

Thanks,

Clément

  reply	other threads:[~2026-12-02  9:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  9:33 [PATCH net-next v6 00/15] Add ETHSW support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 01/15] net: dsa: tag_rzn1_a5psw: Drop redundant ETH_P_DSA_A5PSW definition Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 02/15] net: dsa: tag_rzn1_a5psw: Fix RZ/N1 tagger module alias Prabhakar
2026-12-02  9:39   ` Clement Leger
2026-12-02  9:33 ` [PATCH net-next v6 03/15] net: dsa: tag_rzn1_a5psw: Add RZ/T2H ETHSW tag protocol support Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 04/15] net: pcs: rzn1-miic: Select ETHSW port speed through SWCTRL Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 05/15] dt-bindings: net: dsa: renesas,rzn1-a5psw: Reject the "ports" node Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 06/15] dt-bindings: net: dsa: renesas,rzn1-a5psw: Limit port reg values Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 07/15] dt-bindings: net: dsa: renesas,rzn1-a5psw: Add RZ/T2H and RZ/N2H ETHSW support Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 08/15] net: dsa: rzn1-a5psw: Add support for optional reset control Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 09/15] net: dsa: rzn1-a5psw: Add support for optional timestamp clock Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 10/15] net: dsa: rzn1-a5psw: Make use dev_err_probe() Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 11/15] net: dsa: rzn1-a5psw: Get switch configuration from OF data Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 12/15] net: dsa: rzn1-a5psw: Add fixed frame length workaround for management port Prabhakar
2026-12-02  9:42   ` Clement Leger
2026-12-02  9:33 ` [PATCH net-next v6 13/15] net: dsa: rzn1-a5psw: Get register layout from OF data Prabhakar
2026-12-02  9:37   ` Clement Leger
2026-12-02  9:33 ` [PATCH net-next v6 14/15] net: dsa: rzn1-a5psw: Keep MAC TX enabled on RZ/T2H Prabhakar
2026-12-02  9:33 ` [PATCH net-next v6 15/15] net: dsa: rzn1-a5psw: Add support for RZ/T2H Ethernet switch Prabhakar
2026-12-02  9:38   ` Clement Leger [this message]
2026-12-02  9:40 ` [PATCH net-next v6 00/15] Add ETHSW support for Renesas RZ/T2H and RZ/N2H SoCs netdev-bot+sinfo

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=f7ffbf33-edd6-4643-ba7c-e8c3f77f4687@linux.dev \
    --to=clement.leger@linux.dev \
    --cc=andrew@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=prabhakar.csengg+renesas@gmail.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=willemb@google.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