From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.147 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796204326; b=mV4fZs9m24j3EOXymovaGCCdI2nO/hIL9daJr01w/4qpSvZ6CiQrgbNq9XAi68HgnMdS dkOdnMO4BJWz/P0nwWzYx0+/YoN9JNby/Y/wzI3vKfFsuhLe1IH5vzOa5rQB2CQmyT/h6 uKls84YFH1HvW04lzfUXq8PXPd6mTkuS1+1bYTo9a4In7T05hn7ErhKxRdlcNfXsCBEb+ N7uygO1MTeFW3wZWLxbfkM6ROTFuNjMfcF1Q+eCr5QejtD2e8XypGShVMp7+mGRNPZkjS ONF9pYkgiUkUWPvZdd1BQMcQMwaSdCKGtyXnDjxBkiqw/XuNPi7gFine4hghl8f3z0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796204326; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=1ypzx+2uk4tHtj/zCbhCxQGveAuGcISjsSG1QAwlg2s=; b=Vd3pUeCyvQCAAVjq18uaZYkYJhQK12IjiETSQBh3IFEsJq9kLLErQBhO6QoRp+j0jETN ssVUPlS0G/lmlgUGZRb9zzwMoEUpiTMbxXqvus1LsRSZBnrJ9hOU1djTyvmmfnf9uJtvz eJjSpOJYC/2BZPEtustPXndEuBB8SRkTJI82fi+dKhqU9HM9XtX6Eed/WGa9LReUZAlwT wvdLnqLaQK/g52nfgDbFerAq1Ry1OtGiJUnCYR/4fykDnmg6T6sG2ERZd2dgihsHgEa1Q ZUzyLnraMhf2qPaxa4brGmfl+43Ae/FCPoVHeY8a6PYZtNTQ5gLcEoRtf4i6KdYYFBA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=TarGDgz4; arc=none smtp.remote-ip=95.215.58.147 Received: from mta1.migadu.com (out-147.mta1.migadu.com [95.215.58.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8450C606A32F for ; Wed, 2 Dec 2026 09:38:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8450C606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=TarGDgz4 X-Envelope-To: netdev@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=a8JCPZ4X6AgyovhJ/fs2ArEzUqB4htyQPIFf6fPKjsY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796204323; v=1; x=1796809123; b=TarGDgz4+wBHi+zPnQBrIY674KPi8V719K49GRoSNYSx7dpXSW4lcnvYagvqTkkY7VVCRo+8 aWUOu/EmWZ62960FxtnzuUCx/Apb4I8z6+kuGVnIIOia39rMbK448pw8od2Y0HkKo8OVhCtOhSF +3hPJxeVXWpJnT0GJIj7mufs= X-Envelope-To: netdev@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 9291e1ffe965d7d5; Wed, 02 Dec 2026 09:38:43 +0000 X-Mizu-Trace-ID: 9291e1ffe965d7d5 X-Migadu-Flow: FLOW_OUT Message-ID: Date: Wed, 2 Dec 2026 10:38:37 +0100 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v6 15/15] net: dsa: rzn1-a5psw: Add support for RZ/T2H Ethernet switch To: Prabhakar , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Willem de Bruijn , Simon Horman , Philipp Zabel , Geert Uytterhoeven , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar References: <20261202093357.15693-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20261202093357.15693-16-prabhakar.mahadev-lad.rj@bp.renesas.com> Content-Language: en-US From: Clement Leger In-Reply-To: <20261202093357.15693-16-prabhakar.mahadev-lad.rj@bp.renesas.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/2/26 10:33, Prabhakar wrote: > From: Lad Prabhakar > > 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 > --- > 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 Thanks, Clément